Skip to content

Conversation

@rishi-yadav
Copy link

@rishi-yadav rishi-yadav commented Oct 28, 2025

API Function Template Signature Function
XE_LOAD_2D <Bits, Height, Width> High-speed 2D block loading
XE_STORE_2D <Bits, Height, Width> Efficient 2D block storage

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)

Data Type Description Test Function
uint8_t 8-bit unsigned integer XE_COPY_2D_uint8
int8_t 8-bit signed integer XE_COPY_2D_int8
char 8-bit character XE_COPY_2D_char

16-bit Types (32 elements per row)

Data Type Description Test Function
uint16_t 16-bit unsigned integer XE_COPY_2D_uint16
int16_t 16-bit signed integer XE_COPY_2D_int16
half_t 16-bit half precision float XE_COPY_2D_half
bfloat16_t 16-bit brain float XE_COPY_2D_bfloat16

32-bit Types (16 elements per row)

Data Type Description Test Function
uint32_t 32-bit unsigned integer XE_COPY_2D_uint32
int32_t 32-bit signed integer XE_COPY_2D_int32
float 32-bit single precision float XE_COPY_2D_float
tfloat32_t 32-bit tensor float XE_COPY_2D_tfloat32

Test Configuration Matrix

Bit Width Data Types Count Heights Tested Elements/Row Memory/Row Test Cases
8-bit 3 2, 3, 4, 5, 6, 7, 8 64 64 bytes 21
16-bit 4 2, 3, 4, 5, 6, 7, 8 32 64 bytes 28
32-bit 4 2, 3, 4, 5, 6, 7, 8 16 64 bytes 28

@rishi-yadav rishi-yadav added the Tests For Unit tests and Benchmark tests and general validation specific changes label Oct 28, 2025
@rishi-yadav rishi-yadav requested a review from Copilot October 28, 2025 10:46
Copy link

Copilot AI left a 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.cpp with device kernel and host test infrastructure for 2D copy validation
  • Updated version check guard in mma.cpp to 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.

Copy link

@Antonyvance Antonyvance left a 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?

@Antonyvance Antonyvance requested a review from tdeng5 November 5, 2025 07:30
@rishi-yadav
Copy link
Author

rishi-yadav commented Nov 5, 2025

Can you add comments on all the cases covered in the tests?

Added in description

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tests For Unit tests and Benchmark tests and general validation specific changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants