-
Notifications
You must be signed in to change notification settings - Fork 539
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
MathiasMagnus SAXPY tutorial #3487
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.
provided comments
e65cedd
to
00f592f
Compare
|
177f56f
to
317acf5
Compare
317acf5
to
7aa88ec
Compare
Fixed. |
d919307
to
b3fbc85
Compare
Added language suggestions from @lpaoletti. Review the diff if needed 2b4a8be |
2b4a8be
to
9a161d8
Compare
9a161d8
to
3f9ac23
Compare
@lpaoletti Can I get an approval? |
The reduction tutorial PR: #3513 |
Should we remove the tab sync? I don't like how the page jumps around when you select a tab due to the length of content changing all over the place at the same time. |
Probably we should. I am thinking what we can do with it. |
I think we should keep it. I think a user is going to pick their flow in the first tab, and the page will update the content to display their flow. I don't think people will be flipping back and forth between flows except to see what differences there might be. |
915f342
to
3f163ee
Compare
docs/tutorial/saxpy.rst
Outdated
============================ | ||
|
||
First, let's do the "Hello, World!" of GPGPU: SAXPY. *SAXPY* is a mathematical | ||
acronym; a vector equation :math:`a\cdot x+y=z` where :math:`a\in\mathbb{R}` is |
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.
I think you have mentioned SAXPY's full form below. Can we move it up 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.
Added.
docs/tutorial/saxpy.rst
Outdated
|
||
``HIP_CHECK`` is a custom macro borrowed from the examples utilities which | ||
checks the error code returned by API functions for errors and reports them to | ||
the console. It's not essential to the API. |
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.
It is not essential to the API but it is a good practice to check the error codes of the HIP APIs incase you pass on incorrect values to the API or the API might be out of resources.
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.
Added.
docs/tutorial/saxpy.rst
Outdated
This function is launched from the host using a language extension often called | ||
the triple chevron syntax. Inside the angle brackets, provide the following. | ||
|
||
- The number of blocks to launch (our grid size) |
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.
Do we have any documentation describing grid and block sizes? If yes can we point the user to it from here. I think these are non trivial concepts and user who just wants to exec stuff on their GPU can go it it if they want to.
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.
Added.
docs/tutorial/saxpy.rst
Outdated
- A check is made to avoid overindexing the input. | ||
- The useful part of the computation is carried out. | ||
|
||
Retrieval of the result from the device is done much like its dispatching: |
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.
dispatching can mean different thing in context of HIP, can we change the wording here. Also the first memcpy should also be explained and here we can mention in simple terms that we are copying result back to host.
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.
Removed dispatching.
.. tab-item:: Linux and AMD | ||
:sync: linux-amd | ||
|
||
The utilities included with ROCm help significantly to inspect binary |
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.
I think binary inspection deserves its own doc, rather then putting it alongside saxpy explanation. In my head person looking for saxpy documentation will be least bothered with code object extraction and the person wanting to play with code objects will be least bothered with saxpy.
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 can put this feedback to a separate issue. Currently, we do not have binary inspection tutorial and at least we have some here now.
If we finally have the binary inspection page, we can rethink this suggestion. Maybe I can put this into a dropdown:
https://sphinx-design.readthedocs.io/en/latest/dropdowns.html
What do you think?
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.
I would rather have its own page, playing with code objects might require a bit more detail and populating here will overcomplicate this tutorial.
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.
OK. I am creating a separate issue to remove the code inspection from here to a new code inspection tutorial.
The Boy Scout Rule: Leave the campground cleaner than you found it. → I am merging this in. One tutorial better than zero, and we will improve this later.
3f163ee
to
ea3aa3c
Compare
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.
Looks good
.. tab-item:: Linux and AMD | ||
:sync: linux-amd | ||
|
||
The utilities included with ROCm help significantly to inspect binary |
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.
I would rather have its own page, playing with code objects might require a bit more detail and populating here will overcomplicate this tutorial.
Thanks for the review. |
- Move md files to rst - Impl editorial suggestions from @lpaoletti - External PR feedbacks from HIP team
8fb29dc
to
8a8e970
Compare
The SAXPY tutorial.