Skip to content

Conversation

@rishi-yadav
Copy link

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

Created unit tests for Intel XE GPU 2D block operations

Files Added
xe_copy_prefetch_2d.cpp - XE_PREFETCH_2D operations
xe_vnni_2d.cpp - XE_LOAD_2D_VNNI API validation
xe_transpose_2d.cpp - XE_LOAD_2D_TRANSPOSE API validation
Test Results
6/6 tests passing (0ms execution time each)

3 prefetch tests (uint8, int16, float)
1 VNNI API test
2 transpose tests (API + constraints)

@rishi-yadav rishi-yadav marked this pull request as draft October 20, 2025 10:28
@rishi-yadav rishi-yadav added the Tests For Unit tests and Benchmark tests and general validation specific changes label Oct 20, 2025
@rishi-yadav rishi-yadav requested a review from Copilot October 20, 2025 10:39
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 test coverage for three new Intel XE GPU 2D block operation APIs: XE_PREFETCH_2D, XE_LOAD_2D_VNNI, and XE_LOAD_2D_TRANSPOSE. All tests are conditionally compiled for IGC version 2.18 or higher.

  • Validates API declarations and compile-time constraints for VNNI and transpose operations
  • Tests prefetch operations with uint8, int16, and float data types
  • Ensures proper integration with the existing CuTe tensor framework

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
test/unit/cute/intel_xe/xe_vnni_2d.cpp Tests API declaration and static assertions for VNNI 2D load operations
test/unit/cute/intel_xe/xe_transpose_2d.cpp Tests API declaration and validates compile-time constraints for transpose operations
test/unit/cute/intel_xe/xe_copy_prefetch_2d.cpp Implements kernel-based tests for 2D prefetch operations across multiple data types
test/unit/cute/intel_xe/CMakeLists.txt Registers the three new test files in the build system
Comments suppressed due to low confidence (1)

test/unit/cute/intel_xe/xe_transpose_2d.cpp:1

  • Missing article 'THE' before 'POSSIBILITY'. Should be 'EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.'
/***************************************************************************************************

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF POSSIBILITY OF SUCH DAMAGE.
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing article 'THE' before 'POSSIBILITY'. Should be 'EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.'

Suggested change
* OF THIS SOFTWARE, EVEN IF ADVISED OF POSSIBILITY OF SUCH DAMAGE.
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Copilot uses AI. Check for mistakes.
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF POSSIBILITY OF SUCH DAMAGE.
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing article 'THE' before 'POSSIBILITY'. Should be 'EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.'

Suggested change
* OF THIS SOFTWARE, EVEN IF ADVISED OF POSSIBILITY OF SUCH DAMAGE.
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Copilot uses AI. Check for mistakes.

// Matrix dimensions - must be compatible with block 2D constraints
constexpr int M = Height;
constexpr int N = Width * sizeof_bits_v<Element> / Bits;
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Integer division may produce incorrect results. Since sizeof_bits_v<Element> returns bits and is being divided by Bits, this should use floating-point division and rounding, or the multiplication order should be changed to (Width * Bits) / sizeof_bits_v<Element> if calculating elements from bits.

Suggested change
constexpr int N = Width * sizeof_bits_v<Element> / Bits;
constexpr int N = (Width * Bits) / sizeof_bits_v<Element>;

Copilot uses AI. Check for mistakes.
@rishi-yadav rishi-yadav marked this pull request as ready for review October 22, 2025 11:49
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.

1 participant