Skip to content

Conversation

@yucai-intel
Copy link
Contributor

@yucai-intel yucai-intel commented Oct 10, 2025

Issue link: #1939

@yucai-intel
Copy link
Contributor Author

image

Copy link
Contributor

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 enables FP8 (8-bit floating point) dtype support for comparison operations on XPU devices. The changes update both the kernel implementation and test suite to handle the new float8 types introduced in PyTorch.

Key changes:

  • Extended comparison kernel dispatcher to include all float8 dtypes (e5m2, e4m3fn, e4m3fnuz, e5m2fnuz, e8m0fnu)
  • Enhanced test coverage to validate comparison operations across all float8 types
  • Updated test infrastructure to use float32 CPU references for float8 comparisons

Reviewed Changes

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

File Description
src/ATen/native/xpu/sycl/CompareKernels.cpp Replaced AT_DISPATCH_ALL_TYPES_AND3 with AT_DISPATCH_V2 to include float8 dtypes
test/regressions/test_compare.py Added comprehensive float8 dtype test coverage with proper CPU reference handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants