tenstorrent / tt-metal

:metal: TT-NN operator library, and TT-Metalium low level kernel programming model.
https://docs.tenstorrent.com/ttnn/latest/index.html
Apache License 2.0
488 stars 80 forks source link

Check in post-commit docs assets as Markdown to docs repo for docs team to control styling #8534

Open tt-rkim opened 6 months ago

tt-rkim commented 6 months ago

As discussed with @jwilde-tenstorrent , we will be transferring docs and styling ownership to the docs team. Their publishing model is:

Docs pipeline for pybuda as reference: https://yyz-gitlab.local.tenstorrent.com/tenstorrent/pybuda/-/blob/main/docs/CI/.gitlab-ci.build-docs.yml?ref_type=heads

cc: @adifrancescoTT @TT-billteng @dimitri-tenstorrent

tt-rkim commented 6 months ago

Sent in two tickets to IT:

cc: @warthog9

tt-rkim commented 6 months ago

@adifrancescoTT @jwilde-tenstorrent

Current action items are:

tt-rkim commented 6 months ago

https://github.com/tenstorrent/docs-test is the repo we need to use

tt-rkim commented 6 months ago

We've run into a blocking issue with the open source markdown file builder for Sphinx. Looks like someone with the exact same build flow is running into the same issue: https://github.com/liran-funaro/sphinx-markdown-builder/issues/21

Such is the woes of working in a feature-rich, language-rich (C++ and Python) API like tt-metal.

As referenced in: https://github.com/liran-funaro/sphinx-markdown-builder/issues/21#issuecomment-2106151098 This is a feature request, and likely won't be done any time soon. Let us know if we should devote more resources into trying to get this working, or if docs team and metal infra team can change either/both of our docs build processes to get around this issue.

cc: @jwilde-tenstorrent @adifrancescoTT

tt-rkim commented 6 months ago

@dimitri-tenstorrent For your future eyes.

tt-rkim commented 6 months ago

Pushed interim work to branch rkim/8534-markdown

  1. build_metal.sh w/ python env
  2. cd docs
  3. make markdown

You see the error.

This is because of the above.

dimitri-tenstorrent commented 6 months ago

I will try to replicate and see if I can identify a path towards the fix.

dimitri-tenstorrent commented 6 months ago

I have identified the issue and will work on figuring out if I can create a patch for Breathe to handle the missing definitions:

/Users/dgnidash/projects/tt-metal/docs/source/tt-metalium/tt_metal/apis/host_apis/buffers/AssignGlobalBufferToProgram.rst:5: WARNING: unknown node type: <desc_signature_line: <target "host__api_8hpp_1a4e29ca9df8b6f13424f2a392d89714 ...>

Exception occurred:
  File "/Users/dgnidash/projects/.tt/lib/python3.9/site-packages/sphinx_markdown_builder/contexts.py", line 339, in make
    assert len(content) > 0, "Empty title"
AssertionError: Empty title
dimitri-tenstorrent commented 6 months ago

I have been able to generate markdown and integrate it into the docs site. I need to do these additional tasks

tt-rkim commented 6 months ago

General

Screenshot 2024-05-30 at 5 12 08 PM

[1] Docs test

Screenshot 2024-05-30 at 5 11 58 PM

[2] original

TT-Metalium

Screenshot 2024-05-30 at 5 05 03 PM

Screenshot 2024-05-30 at 5 08 04 PM

[1] docs test

Screenshot 2024-05-30 at 5 08 52 PM

[2] original

TT-NN


Screenshot 2024-05-30 at 5 15 20 PM

[1] docs test

Screenshot 2024-05-30 at 5 14 00 PM

[2] original


Screenshot 2024-05-30 at 5 19 40 PM

[1] docs test

Screenshot 2024-05-30 at 5 16 44 PM

[2] original


Screenshot 2024-05-30 at 5 20 03 PM

[1] docs test

Screenshot 2024-05-30 at 5 19 54 PM

[2] original

dimitri-tenstorrent commented 5 months ago

@tt-rkim @TT-billteng

Thank you so much for reviewing the result! This is a great review. I have done a lot of experimentation on the weekend and was able to make progress with the tutorials and I believe there is a path to fix the first issue with expanding Table of Contents menu.

I am recording all the tickets in the doc-test repo and will cross mention the issues here when they are created.

dimitri-tenstorrent commented 5 months ago

@tt-rkim Take a look at the tutorial 2 here - https://tenstorrent.github.io/docs-test/ttnn/ttnn-latest/ttnn/tutorials/ttnn_tutorials/002.html

tt-rkim commented 5 months ago

Looks fantastic - how did you do this?

dimitri-tenstorrent commented 5 months ago

Lots of trial-and-error on the weekend with the sphinx-markdown-builder I had to implement something called CodeAreaNode. I do believe there are a few things missing from the tutorials due to lack of implementation of FancyCodeNode :)

writing output... [100%] ttnn_sweeps/index
/Users/dgnidash/projects/tt-metal/docs/source/ttnn/ttnn/tensor.rst:23: WARNING: unknown node type: <caption: <#text: 'Tensor with 16 ...'>>
/Users/dgnidash/projects/tt-metal/docs/source/ttnn/ttnn/tutorials/ttnn_tutorials/004.ipynb:45: WARNING: unknown node type: <FancyOutputNode: <container...>>
/Users/dgnidash/projects/tt-metal/docs/source/ttnn/ttnn/tutorials/ttnn_tutorials/006.ipynb:297: WARNING: unknown node type: <FancyOutputNode: <container...>>
/Users/dgnidash/projects/tt-metal/docs/source/ttnn/ttnn/tutorials/ttnn_tutorials/007.ipynb:238: WARNING: unknown node type: <FancyOutputNode: <container...>>
build succeeded, 568 warnings.
tt-rkim commented 3 months ago

@dimitri-tenstorrent can we close this?