-
Notifications
You must be signed in to change notification settings - Fork 101
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
add note about unit stride to layout #1736
base: develop
Are you sure you want to change the base?
Conversation
@@ -55,20 +55,31 @@ which we define as: | |||
:language: C++ | |||
|
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.
Maybe we can add a warning about RAJA View performance?
.. warning:: In order to get the best performance out of ``RAJA::View``, be sure you are building in release mode (i.e. make sure you don't have a debug build when doing performance comparisons). |
¯_(ツ)_/¯
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 feel like building with release for performance is a given, and adding a statement like that might actually be more confusing (does building optimized with debug symbols degrade performance?).
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.
If you use -G in a Cuda build it removes kernel optimizations
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.
But -lineinfo should not, right?
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.
Right
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 leave it up to you whether you want to add this note.
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 can go either way, what do others 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 think the debug build comment is a general statement that anyone who works in HPC should know about. It is orthogonal to whether one uses RAJA::View
or not. So it seems out of place to put in this section. I would leave it out entirely.
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.
Yes, that is a good point. We can add it somewhere else.
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.
LGTM
|
||
RAJA::Layout<2, int, 1> | ||
|
||
In the example above index 1 will be marked to have unit stride making |
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.
The note is correct in that it correctly identifies the stride-1 index in the 2-dim'l layout case. The default stride-1 index in our convention is the rightmost index. I would suggestion adding that the third argument is optional. Also, I would use a permuted layout example to illustrate the optimized use case to avoid extraneous indexing arithmetic.
Summary
Add a note in the documentation regarding unit stride for RAJA::layouts