Skip to content

Conversation

@rishi-yadav
Copy link

@rishi-yadav rishi-yadav commented Oct 28, 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 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 13:10
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 Xe FP8 GEMM operations using the MainloopIntelW8A8 dispatch policy. The tests validate FP8→FP32 matrix multiplication across diverse workload scenarios including LLM model configurations (LLaMA2-7B, Mistral-7B), various parallelization strategies, different batch sizes, and edge cases with large matrix dimensions.

Key Changes:

  • Added 14 test cases covering LLM workloads, parallelization patterns, batch processing, and matrix shape variations
  • Extended TestXe helper function to support 4D problem shapes (MNKL) 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 1 comment.

File Description
gemm_universal_fp8_fp8_fp32_tensor_op_f32_xe_models.cpp New test file with 14 unit tests for MainloopIntelW8A8 covering LLM models, parallelization, batching, and edge cases
gemm_testbed_3x.hpp Added overloaded TestXe function to support batched GEMM testing with 4D problem shapes
CMakeLists.txt Registered new test file in SYCL build configuration

💡 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.

Don't we need tests based on new APIs? Do you plan to add them after #579 #573

@Antonyvance Antonyvance requested a review from Copilot November 5, 2025 07:00
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

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

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 for MNKL = "
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

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

[nitpick] Using EXPECT_TRUE(false) is unconventional. Consider using ADD_FAILURE() or FAIL() instead for clearer test failure reporting.

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 for MNKL = "
ADD_FAILURE() << "TestXe: testbed.run threw an exception: " << e.what();
throw;
}
catch (...) {
ADD_FAILURE() << "TestXe: testbed.run threw an unknown exception for MNKL = "

Copilot uses AI. Check for mistakes.
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 for MNKL = "
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

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

[nitpick] Using EXPECT_TRUE(false) is unconventional. Consider using ADD_FAILURE() or FAIL() instead for clearer test failure reporting.

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 for MNKL = "
ADD_FAILURE() << "TestXe: testbed.run threw an exception: " << e.what();
throw;
}
catch (...) {
ADD_FAILURE() << "TestXe: testbed.run threw an unknown exception for MNKL = "

Copilot uses AI. Check for mistakes.
@Antonyvance Antonyvance requested a review from tdeng5 November 5, 2025 07:29
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