-
Notifications
You must be signed in to change notification settings - Fork 19
Implement pytest for 04_atomic_add/atomic_add_bench.py and fix data type support #129
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
Co-authored-by: mawad-amd <112003944+mawad-amd@users.noreply.github.com>
Co-authored-by: mawad-amd <112003944+mawad-amd@users.noreply.github.com>
pytest
for 04_atomic_add/atomic_add_bench.py
CI Log
tests/examples/test_atomic_add_bench.py::test_atomic_add_bench[512-4294967296-8589934592-dtype0] FAILED [ 12%] =================================== FAILURES =================================== |
…shmem.ones() instead of shmem.arange() Co-authored-by: mawad-amd <112003944+mawad-amd@users.noreply.github.com>
... Fixed the HIP kernel configuration error by changing the test to use Commit: 6d3ad46 |
[ | ||
torch.int8, |
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.
@copilot atomic_add does not support int8
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.
You're correct! I've removed int8 from both the test and the main atomic_add_bench.py file since atomic_add doesn't support int8. Updated to use the supported data types (int32, int64, float16, bfloat16, float32) that match the unit tests. (commit: )
…dd operation Co-authored-by: mawad-amd <112003944+mawad-amd@users.noreply.github.com>
This PR implements comprehensive pytest testing for the atomic_add benchmark example and fixes data type compatibility issues.
Changes Made
Testing Implementation
bench_atomic_add()
wrapper function for testing compatibilityshmem.ones()
instead ofshmem.arange()
for large buffer initializationData Type Support Fix
int8
support from both test and main files since atomic_add operations don't support int8 data typesint32
,int64
,float16
,bfloat16
,float32
Documentation
The tests now align with the actual capabilities of the atomic_add operation and should pass CI validation.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.