-
Notifications
You must be signed in to change notification settings - Fork 68
Unit tests for LOAD_2D and STORE_2D #582
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.
Pull Request Overview
This PR adds comprehensive unit tests for the Intel XE block 2D copy operations (XE_LOAD_2D and XE_STORE_2D). The tests validate these operations across 11 different data types with 7 height variations each, totaling 77 test configurations.
Key changes:
- Added new test file
xe_copy_2d_test.cppwith device kernel and host test infrastructure for 2D copy validation - Updated version check guard in
mma.cppto handle IGC version 2.18+ more robustly and added fallback test for older versions - Integrated new test file into the build system via CMakeLists.txt
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test/unit/cute/intel_xe/xe_copy_2d_test.cpp | Implements test infrastructure including kernel, test function template, and 11 test cases covering various data types |
| test/unit/cute/intel_xe/mma.cpp | Improves version check logic and adds fallback test case for IGC versions below 2.18 |
| test/unit/cute/intel_xe/CMakeLists.txt | Registers xe_copy_2d_test.cpp in the build configuration |
Comments suppressed due to low confidence (1)
test/unit/cute/intel_xe/mma.cpp:153
- Missing #endif to close the preprocessor conditional block opened at line 315.
#endif
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 you add comments on all the cases covered in the tests?
Added in description |
XE_LOAD_2D<Bits, Height, Width>XE_STORE_2D<Bits, Height, Width>11 test cases added for diff datatypes with 7 variations of height so total 77 variations used in this PR
Data Type Coverage
8-bit Types (64 elements per row)
uint8_tXE_COPY_2D_uint8int8_tXE_COPY_2D_int8charXE_COPY_2D_char16-bit Types (32 elements per row)
uint16_tXE_COPY_2D_uint16int16_tXE_COPY_2D_int16half_tXE_COPY_2D_halfbfloat16_tXE_COPY_2D_bfloat1632-bit Types (16 elements per row)
uint32_tXE_COPY_2D_uint32int32_tXE_COPY_2D_int32floatXE_COPY_2D_floattfloat32_tXE_COPY_2D_tfloat32Test Configuration Matrix