-
Notifications
You must be signed in to change notification settings - Fork 60
Support FP8 in op flip, index_put, and index.Tensor #2190
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?
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 adds FP8 support to XPU tensor operations including flip, index, and index_put operations by migrating from legacy dispatch macros to the newer AT_DISPATCH_V2 system.
- Migrates flip_kernel from AT_DISPATCH_ALL_TYPES_AND_COMPLEX_AND3 to AT_DISPATCH_V2
- Migrates index_kernel and index_put_kernel from AT_DISPATCH_ALL_TYPES_AND_COMPLEX_AND4 to AT_DISPATCH_V2
- Adds FP8 type support through AT_FLOAT8_TYPES expansion
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/ATen/native/xpu/sycl/TensorTransformationsKernels.cpp | Updates flip_kernel to use AT_DISPATCH_V2 with FP8 support |
| src/ATen/native/xpu/sycl/Indexing.cpp | Updates index_kernel and index_put_kernel to use AT_DISPATCH_V2 with FP8 support |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| }); | ||
| }), | ||
| AT_EXPAND(AT_ALL_TYPES_AND_COMPLEX), | ||
| AT_EXPAND(AT_FLOAT8_TYPES), |
Copilot
AI
Oct 20, 2025
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.
Missing AT_EXPAND(AT_BAREBONES_UNSIGNED_TYPES) that was included in the flip_kernel implementation. For consistency across operations, this should be added.
| AT_EXPAND(AT_FLOAT8_TYPES), | |
| AT_EXPAND(AT_FLOAT8_TYPES), | |
| AT_EXPAND(AT_BAREBONES_UNSIGNED_TYPES), |
Copilot uses AI. Check for mistakes.
| }); | ||
| }), | ||
| AT_EXPAND(AT_ALL_TYPES_AND_COMPLEX), | ||
| AT_EXPAND(AT_FLOAT8_TYPES), |
Copilot
AI
Oct 20, 2025
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.
Missing AT_EXPAND(AT_BAREBONES_UNSIGNED_TYPES) that was included in the flip_kernel implementation. For consistency across operations, this should be added.
| AT_EXPAND(AT_FLOAT8_TYPES), | |
| AT_EXPAND(AT_FLOAT8_TYPES), | |
| AT_EXPAND(AT_BAREBONES_UNSIGNED_TYPES), |
Copilot uses AI. Check for mistakes.

Fix Issue:#1939