-
Notifications
You must be signed in to change notification settings - Fork 15
Adding Examples to the Helion Docs/site #330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pre-commit run --all-files
or ./lint.sh
can help fix the lint errors.
For the tests you will need to run EXPECTTEST_ACCEPT=1 pytest test
to update expected results to include addeded docstrings.
@@ -0,0 +1,736 @@ | |||
Helion Puzzles |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @drisspg
Co-authored-by: Jason Ansel <[email protected]>
Co-authored-by: Jason Ansel <[email protected]>
Changing example generation to use sphinx-gallery
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this a markdown file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sphinx gallery has issues with markdown files but I am investigating myst sphinx gallery which should work with markdown, will update
docs/requirements.txt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our docs requirements are here:
Lines 31 to 38 in 6c5c4ca
docs = [ | |
"sphinx", | |
"myst-parser", | |
"sphinx-rtd-theme", | |
"sphinx-autodoc-typehints", | |
"linkify-it-py", | |
"sphinx-autobuild" | |
] |
Installed with pip install ".[docs]"
(see docs/README.md)
Let's update that rather than creating a new file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sure, will update that, did not see this. Thanks
@@ -1,3 +1,14 @@ | |||
""" | |||
All-Gather Matrix Multiplication Example | |||
===============================>>>>>>> REPLACE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
REPLACE?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching that, will update it, not sure how I missed it but might explain a random issue I was having with this file rendering
- ``jagged_dense_add.py``: Addition between a jagged tensor and a dense tensor | ||
- ``jagged_mean.py``: Computing the mean of each row in a jagged tensor | ||
- ``segment_reduction.py``: Segmented reduction operation | ||
- ``moe_matmul_ogs.py``: Mixture-of-Experts matrix multiplication using Outer-Gather-Scatter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yf225 is this the right section?
@@ -1,3 +1,13 @@ | |||
""" | |||
Attention Mechanism Example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(thoughout) I think "Mechanism" is the wrong word here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will update this
@@ -1,4 +1,14 @@ | |||
# Code based on https://github.com/pytorch-labs/helion/issues/237 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should keep this citation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooops will put that back
I think you also need to rebase to fix merge conflict. |
Co-authored-by: Jason Ansel <[email protected]>
Co-authored-by: Jason Ansel <[email protected]>
Lints/tests are failing |
PR adds examples to the helion docs site:
Helion Puzzles is taken from a bento notebook created internally
The rest are examples taken from the .pys taken from examples/ folder.
Updates include:
Some mock ups below built locally