Implement pytest for 04_atomic_add/atomic_add_bench.py and fix data type support#129
Implement pytest for 04_atomic_add/atomic_add_bench.py and fix data type support#129
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.
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
int8support from both test and main files since atomic_add operations don't support int8 data typesint32,int64,float16,bfloat16,float32Documentation
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.