-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fixed mdBook build errors: - fixed wrong mdBook command - moved docs/ops under docs/src/ops - added README with hyperlinks to every file under docs/src (This is a requirement by mdBook) - added README under each folder - wrote a script to autogenerate READMEs (This needs to run as a part of nightly tests --> will handle in #215) I tested the website generation. Right now, it is uploaded as an artifact but not deployed. https://github.com/tenstorrent/tt-torch/actions/runs/12889599553 I assume when merged into main, the website will also be deployed or we will have more idea about why it's not.
- Loading branch information
Showing
140 changed files
with
185 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
#!/usr/bin/env python3 | ||
# SPDX-FileCopyrightText: (c) 2025 Tenstorrent AI ULC | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
import os | ||
from pathlib import Path | ||
|
||
|
||
def generate_summary(docs_dir): | ||
""" | ||
Generate top level SUMMARY.md which includes references to all pages | ||
""" | ||
summary_lines = ["# Summary\n"] | ||
summary_lines.append("- [Operations](ops/README.md)") | ||
summary_lines.append(" - [StableHLO Operations](ops/stablehlo/README.md)") | ||
|
||
# Add all Stablehlo operations | ||
stablehlo_dir = Path(docs_dir) / "ops" / "stablehlo" | ||
if stablehlo_dir.exists(): | ||
for file in sorted(stablehlo_dir.glob("*.md")): | ||
if file.name != "README.md": | ||
title = file.stem.replace(".", " ").title() | ||
rel_path = file.relative_to(docs_dir) | ||
summary_lines.append(f" - [{title}]({str(rel_path)})") | ||
|
||
summary_lines.append(" - [TTNN Operations](ops/ttnn/README.md)") | ||
|
||
# Add all TTNN operations | ||
ttnn_dir = Path(docs_dir) / "ops" / "ttnn" | ||
if ttnn_dir.exists(): | ||
for file in sorted(ttnn_dir.glob("*.md")): | ||
if file.name != "README.md": | ||
title = file.stem.replace(".", " ").title() | ||
rel_path = file.relative_to(docs_dir) | ||
summary_lines.append(f" - [{title}]({str(rel_path)})") | ||
|
||
return "\n".join(summary_lines) | ||
|
||
|
||
def ensure_readme_files(docs_dir): | ||
""" | ||
Ensure README.md files exist in necessary directories | ||
""" | ||
required_readmes = [ | ||
"ops/README.md", | ||
"ops/stablehlo/README.md", | ||
"ops/ttnn/README.md", | ||
] | ||
|
||
for readme_path in required_readmes: | ||
full_path = Path(docs_dir) / readme_path | ||
if not full_path.exists(): | ||
full_path.parent.mkdir(parents=True, exist_ok=True) | ||
with open(full_path, "w") as f: | ||
section_name = full_path.parent.name.title() | ||
f.write(f"# {section_name} Documentation\n\n") | ||
f.write( | ||
f"This section contains documentation for {section_name} operations.\n" | ||
) | ||
|
||
|
||
def main(): | ||
docs_src_dir = Path("./docs/src") | ||
|
||
if not docs_src_dir.exists(): | ||
print(f"Error: {docs_src_dir} directory not found") | ||
return | ||
|
||
ensure_readme_files(docs_src_dir) | ||
|
||
# Generate and write SUMMARY.md | ||
summary_content = generate_summary(docs_src_dir) | ||
summary_path = docs_src_dir / "SUMMARY.md" | ||
with open(summary_path, "w", encoding="utf-8") as f: | ||
f.write(summary_content) | ||
|
||
print(f"Generated SUMMARY.md at {summary_path}") | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# Summary | ||
|
||
- [Operations](ops/README.md) | ||
- [StableHLO Operations](ops/stablehlo/README.md) | ||
- [Arith Constant](ops/stablehlo/arith.constant.md) | ||
- [Stablehlo Add](ops/stablehlo/stablehlo.add.md) | ||
- [Stablehlo And](ops/stablehlo/stablehlo.and.md) | ||
- [Stablehlo Broadcast_In_Dim](ops/stablehlo/stablehlo.broadcast_in_dim.md) | ||
- [Stablehlo Ceil](ops/stablehlo/stablehlo.ceil.md) | ||
- [Stablehlo Clamp](ops/stablehlo/stablehlo.clamp.md) | ||
- [Stablehlo Compare](ops/stablehlo/stablehlo.compare.md) | ||
- [Stablehlo Concatenate](ops/stablehlo/stablehlo.concatenate.md) | ||
- [Stablehlo Constant](ops/stablehlo/stablehlo.constant.md) | ||
- [Stablehlo Convert](ops/stablehlo/stablehlo.convert.md) | ||
- [Stablehlo Convolution](ops/stablehlo/stablehlo.convolution.md) | ||
- [Stablehlo Cosine](ops/stablehlo/stablehlo.cosine.md) | ||
- [Stablehlo Divide](ops/stablehlo/stablehlo.divide.md) | ||
- [Stablehlo Dot_General](ops/stablehlo/stablehlo.dot_general.md) | ||
- [Stablehlo Dynamic_Iota](ops/stablehlo/stablehlo.dynamic_iota.md) | ||
- [Stablehlo Exponential](ops/stablehlo/stablehlo.exponential.md) | ||
- [Stablehlo Floor](ops/stablehlo/stablehlo.floor.md) | ||
- [Stablehlo Gather](ops/stablehlo/stablehlo.gather.md) | ||
- [Stablehlo Iota](ops/stablehlo/stablehlo.iota.md) | ||
- [Stablehlo Log](ops/stablehlo/stablehlo.log.md) | ||
- [Stablehlo Logistic](ops/stablehlo/stablehlo.logistic.md) | ||
- [Stablehlo Maximum](ops/stablehlo/stablehlo.maximum.md) | ||
- [Stablehlo Minimum](ops/stablehlo/stablehlo.minimum.md) | ||
- [Stablehlo Multiply](ops/stablehlo/stablehlo.multiply.md) | ||
- [Stablehlo Negate](ops/stablehlo/stablehlo.negate.md) | ||
- [Stablehlo Not](ops/stablehlo/stablehlo.not.md) | ||
- [Stablehlo Power](ops/stablehlo/stablehlo.power.md) | ||
- [Stablehlo Reduce_Stablehlo Add](ops/stablehlo/stablehlo.reduce_stablehlo.add.md) | ||
- [Stablehlo Reduce_Stablehlo And](ops/stablehlo/stablehlo.reduce_stablehlo.and.md) | ||
- [Stablehlo Reduce_Stablehlo Maximum](ops/stablehlo/stablehlo.reduce_stablehlo.maximum.md) | ||
- [Stablehlo Reduce_Window_Stablehlo Add](ops/stablehlo/stablehlo.reduce_window_stablehlo.add.md) | ||
- [Stablehlo Remainder](ops/stablehlo/stablehlo.remainder.md) | ||
- [Stablehlo Reshape](ops/stablehlo/stablehlo.reshape.md) | ||
- [Stablehlo Reverse](ops/stablehlo/stablehlo.reverse.md) | ||
- [Stablehlo Rng](ops/stablehlo/stablehlo.rng.md) | ||
- [Stablehlo Rsqrt](ops/stablehlo/stablehlo.rsqrt.md) | ||
- [Stablehlo Scatter](ops/stablehlo/stablehlo.scatter.md) | ||
- [Stablehlo Select](ops/stablehlo/stablehlo.select.md) | ||
- [Stablehlo Sine](ops/stablehlo/stablehlo.sine.md) | ||
- [Stablehlo Slice](ops/stablehlo/stablehlo.slice.md) | ||
- [Stablehlo Sqrt](ops/stablehlo/stablehlo.sqrt.md) | ||
- [Stablehlo Subtract](ops/stablehlo/stablehlo.subtract.md) | ||
- [Stablehlo Tanh](ops/stablehlo/stablehlo.tanh.md) | ||
- [Stablehlo Transpose](ops/stablehlo/stablehlo.transpose.md) | ||
- [Tensor Empty](ops/stablehlo/tensor.empty.md) | ||
- [TTNN Operations](ops/ttnn/README.md) | ||
- [Ttnn Abs](ops/ttnn/ttnn.abs.md) | ||
- [Ttnn Add](ops/ttnn/ttnn.add.md) | ||
- [Ttnn Clamp](ops/ttnn/ttnn.clamp.md) | ||
- [Ttnn Concat](ops/ttnn/ttnn.concat.md) | ||
- [Ttnn Conv2D](ops/ttnn/ttnn.conv2d.md) | ||
- [Ttnn Cos](ops/ttnn/ttnn.cos.md) | ||
- [Ttnn Div](ops/ttnn/ttnn.div.md) | ||
- [Ttnn Empty](ops/ttnn/ttnn.empty.md) | ||
- [Ttnn Eq](ops/ttnn/ttnn.eq.md) | ||
- [Ttnn Exp](ops/ttnn/ttnn.exp.md) | ||
- [Ttnn Floor](ops/ttnn/ttnn.floor.md) | ||
- [Ttnn From_Device](ops/ttnn/ttnn.from_device.md) | ||
- [Ttnn Full](ops/ttnn/ttnn.full.md) | ||
- [Ttnn Ge](ops/ttnn/ttnn.ge.md) | ||
- [Ttnn Get_Device](ops/ttnn/ttnn.get_device.md) | ||
- [Ttnn Gt](ops/ttnn/ttnn.gt.md) | ||
- [Ttnn Log](ops/ttnn/ttnn.log.md) | ||
- [Ttnn Logical_And](ops/ttnn/ttnn.logical_and.md) | ||
- [Ttnn Logical_Not](ops/ttnn/ttnn.logical_not.md) | ||
- [Ttnn Logical_Or](ops/ttnn/ttnn.logical_or.md) | ||
- [Ttnn Logit](ops/ttnn/ttnn.logit.md) | ||
- [Ttnn Lt](ops/ttnn/ttnn.lt.md) | ||
- [Ttnn Matmul](ops/ttnn/ttnn.matmul.md) | ||
- [Ttnn Max](ops/ttnn/ttnn.max.md) | ||
- [Ttnn Maximum](ops/ttnn/ttnn.maximum.md) | ||
- [Ttnn Minimum](ops/ttnn/ttnn.minimum.md) | ||
- [Ttnn Multiply](ops/ttnn/ttnn.multiply.md) | ||
- [Ttnn Ne](ops/ttnn/ttnn.ne.md) | ||
- [Ttnn Neg](ops/ttnn/ttnn.neg.md) | ||
- [Ttnn Remainder](ops/ttnn/ttnn.remainder.md) | ||
- [Ttnn Reshape](ops/ttnn/ttnn.reshape.md) | ||
- [Ttnn Rsqrt](ops/ttnn/ttnn.rsqrt.md) | ||
- [Ttnn Scatter](ops/ttnn/ttnn.scatter.md) | ||
- [Ttnn Sin](ops/ttnn/ttnn.sin.md) | ||
- [Ttnn Slice](ops/ttnn/ttnn.slice.md) | ||
- [Ttnn Sqrt](ops/ttnn/ttnn.sqrt.md) | ||
- [Ttnn Subtract](ops/ttnn/ttnn.subtract.md) | ||
- [Ttnn Sum](ops/ttnn/ttnn.sum.md) | ||
- [Ttnn Tanh](ops/ttnn/ttnn.tanh.md) | ||
- [Ttnn To_Device](ops/ttnn/ttnn.to_device.md) | ||
- [Ttnn To_Layout](ops/ttnn/ttnn.to_layout.md) | ||
- [Ttnn Transpose](ops/ttnn/ttnn.transpose.md) | ||
- [Ttnn Typecast](ops/ttnn/ttnn.typecast.md) | ||
- [Ttnn Where](ops/ttnn/ttnn.where.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Ops Documentation | ||
|
||
This section contains documentation for Ops operations. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Stablehlo Documentation | ||
|
||
This section contains documentation for Stablehlo operations. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.