Skip to content

Conversation

@rishi-yadav
Copy link

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

Unit tests for MainloopIntelW8A8 FP8 GEMM operations on Intel Xe

Comprehensive test coverage for Intel GPU FP8 GEMM kernels including:

  • LLM workloads: LLaMA2-7B, Mistral-7B configurations
  • Parallelization: Tensor/model parallel scenarios
  • Batch sizes: Micro-batch (4x) to large batch (32x)
  • Matrix shapes: Small (64²) to large (2048²), tall/wide matrices
  • Edge cases: Large K/N dimensions

Tests validate MainloopIntelW8A8 dispatch policy with FP8→FP32 precision on Intel Xe XMX architecture.

@rishi-yadav rishi-yadav marked this pull request as draft October 11, 2025 21:12
@rishi-yadav rishi-yadav marked this pull request as ready for review October 11, 2025 21:12
@aschabana aschabana marked this pull request as draft October 13, 2025 08:10
@rishi-yadav rishi-yadav marked this pull request as ready for review October 17, 2025 12:07
@rishi-yadav rishi-yadav requested a review from Copilot October 17, 2025 12:07
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 Intel GPU FP8 GEMM operations using the MainloopIntelW8A8 dispatch policy. The tests validate FP8→FP32 matrix multiplication kernels on Intel Xe XMX architecture across various workload scenarios.

Key changes:

  • Added 14 unit tests covering LLM model configurations (LLaMA2-7B, Mistral-7B), parallelization strategies, and various matrix dimensions
  • Introduced new TestXe overload accepting explicit batch parameter for batched GEMM operations
  • Integrated new test file into CMake build system

Reviewed Changes

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

File Description
gemm_universal_fp8_fp8_fp32_tensor_op_f32_xe_models.cpp New test file with 14 test cases covering model-specific and edge-case GEMM configurations
gemm_testbed_3x.hpp Added TestXe overload with explicit batch size parameter and enhanced error reporting
CMakeLists.txt Added new test file to SYCL-enabled build targets

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

Comment on lines +4216 to +4220
EXPECT_TRUE(false) << "TestXe: testbed.run threw an exception: " << e.what();
throw;
}
catch (...) {
EXPECT_TRUE(false) << "TestXe: testbed.run threw an unknown exception";
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

Using 'EXPECT_TRUE(false)' is an anti-pattern. Replace with 'FAIL()' or 'ADD_FAILURE()' for clearer intent and better test failure messages in Google Test.

Suggested change
EXPECT_TRUE(false) << "TestXe: testbed.run threw an exception: " << e.what();
throw;
}
catch (...) {
EXPECT_TRUE(false) << "TestXe: testbed.run threw an unknown exception";
FAIL() << "TestXe: testbed.run threw an exception: " << e.what();
throw;
}
catch (...) {
FAIL() << "TestXe: testbed.run threw an unknown exception";

Copilot uses AI. Check for mistakes.

Choose a reason for hiding this comment

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

copilot is wrong with FAIL. ADD_FAILURE might be slightly better but I'm OK either way.

Comment on lines +4216 to +4220
EXPECT_TRUE(false) << "TestXe: testbed.run threw an exception: " << e.what();
throw;
}
catch (...) {
EXPECT_TRUE(false) << "TestXe: testbed.run threw an unknown exception";
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

Using 'EXPECT_TRUE(false)' is an anti-pattern. Replace with 'FAIL()' or 'ADD_FAILURE()' for clearer intent and better test failure messages in Google Test.

Suggested change
EXPECT_TRUE(false) << "TestXe: testbed.run threw an exception: " << e.what();
throw;
}
catch (...) {
EXPECT_TRUE(false) << "TestXe: testbed.run threw an unknown exception";
FAIL() << "TestXe: testbed.run threw an exception: " << e.what();
throw;
}
catch (...) {
FAIL() << "TestXe: testbed.run threw an unknown exception";

Copilot uses AI. Check for mistakes.
@Antonyvance Antonyvance added the Tests For Unit tests and Benchmark tests and general validation specific changes label Oct 17, 2025
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