Skip to content

Conversation

@CuiYifeng
Copy link
Contributor

To solve #2305.
This PR adds support for copying tensors with the Float4_e2m1fn_x2 data type on XPU devices.

Copilot AI review requested due to automatic review settings November 7, 2025 08:49
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 copying tensors with the Float4_e2m1fn_x2 data type on XPU devices by adding kernel support and extending test coverage. This addresses issue #2305 by implementing the missing copy operation for this float4 type.

Key changes:

  • Added float4_copy_kernel_xpu function to handle Float4_e2m1fn_x2 copy operations
  • Extended test coverage to include Float4_e2m1fn_x2 dtype in copy/clone tests

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/ATen/native/xpu/sycl/CopyKernel.cpp Implements float4 copy kernel and integrates it into the main copy_kernel dispatch logic
test/regressions/test_copy.py Adds Float4_e2m1fn_x2 to the test dtypes for copy and clone operations

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

@CuiYifeng CuiYifeng requested a review from Stonepia November 13, 2025 02:22
@CuiYifeng CuiYifeng added this pull request to the merge queue Nov 13, 2025
Merged via the queue into main with commit fd598b0 Nov 13, 2025
25 checks passed
@CuiYifeng CuiYifeng deleted the yifeng/fp4_copy branch November 13, 2025 02:41
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.

4 participants