-
Notifications
You must be signed in to change notification settings - Fork 62
Enable FP8 compare_xpu #2154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Enable FP8 compare_xpu #2154
Conversation
There was a problem hiding this 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.
Issue link: #1939