_ TestForeachXPU.test_foreach_copy_with_different_device_inputs__foreach_copy_xpu_bfloat16 _
[gw1] linux -- Python 3.10.21 /__w/torch-xpu-ops/torch-xpu-ops/.venv/bin/python
Traceback (most recent call last):
File "/__w/torch-xpu-ops/torch-xpu-ops/.venv/lib/python3.10/site-packages/torch/testing/_internal/common_device_type.py", line 1588, in test_wrapper
return test(*args, **kwargs)
File "/__w/torch-xpu-ops/torch-xpu-ops/pytorch/third_party/torch-xpu-ops/test/xpu/test_foreach_xpu.py", line 255, in _test_foreach_copy_with_different_device_inputs
output1 = fn(sample.input, rhs_tensors, non_blocking)
File "/__w/torch-xpu-ops/torch-xpu-ops/.venv/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 1261, in compile_wrapper
result = fn(*args, **kwargs)
File "/__w/torch-xpu-ops/torch-xpu-ops/pytorch/third_party/torch-xpu-ops/test/xpu/test_foreach_xpu.py", line 242, in fn
return foreach_copy(self_tensor, src_tensor, non_blocking)
File "/__w/torch-xpu-ops/torch-xpu-ops/.venv/lib/python3.10/site-packages/torch/foreach/__init__.py", line 201, in wrapped
return func(*args, **kwargs)
TypeError: copy_() takes 2 positional arguments but 3 were given
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/__w/torch-xpu-ops/torch-xpu-ops/.venv/lib/python3.10/site-packages/torch/testing/_internal/common_utils.py", line 3832, in wrapper
method(*args, **kwargs)
File "/__w/torch-xpu-ops/torch-xpu-ops/.venv/lib/python3.10/site-packages/torch/testing/_internal/common_device_type.py", line 672, in instantiated_test
result = test(self, **param_kwargs)
File "/__w/torch-xpu-ops/torch-xpu-ops/.venv/lib/python3.10/site-packages/torch/testing/_internal/common_utils.py", line 2149, in wrapper
fn(*args, **kwargs)
File "/__w/torch-xpu-ops/torch-xpu-ops/.venv/lib/python3.10/site-packages/torch/testing/_internal/common_device_type.py", line 1600, in test_wrapper
raise e_tracked from e
Exception: copy_() takes 2 positional arguments but 3 were given
Caused by sample input at index 0: SampleInput(input=TensorList[Tensor[size=(23, 23), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(22, 22), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(21, 21), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(20, 20), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(19, 19), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(18, 18), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(17, 17), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(16, 16), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(15, 15), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(14, 14), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(13, 13), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(12, 12), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(11, 11), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(10, 10), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(9, 9), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(8, 8), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(7, 7), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(6, 6), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(5, 5), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(4, 4), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(3, 3), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(2, 2), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(1, 1), device="xpu:0", dtype=torch.bfloat16]], args=(TensorList[Tensor[size=(23, 23), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(22, 22), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(21, 21), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(20, 20), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(19, 19), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(18, 18), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(17, 17), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(16, 16), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(15, 15), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(14, 14), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(13, 13), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(12, 12), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(11, 11), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(10, 10), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(9, 9), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(8, 8), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(7, 7), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(6, 6), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(5, 5), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(4, 4), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(3, 3), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(2, 2), device="xpu:0", dtype=torch.bfloat16], Tensor[size=(1, 1), device="xpu:0", dtype=torch.bfloat16]]), kwargs={}, broadcasts_input=False, name='')
馃悰 Describe the bug with skip template
Cases:
op_ut,third_party.torch-xpu-ops.test.xpu.test_foreach_xpu.TestForeachXPU,test_foreach_copy_with_different_device_inputs__foreach_copy_xpu_bfloat16
op_ut,third_party.torch-xpu-ops.test.xpu.test_foreach_xpu.TestForeachXPU,test_foreach_copy_with_different_device_inputs__foreach_copy_xpu_bool
op_ut,third_party.torch-xpu-ops.test.xpu.test_foreach_xpu.TestForeachXPU,test_foreach_copy_with_different_device_inputs__foreach_copy_xpu_float16
op_ut,third_party.torch-xpu-ops.test.xpu.test_foreach_xpu.TestForeachXPU,test_foreach_copy_with_different_device_inputs__foreach_copy_xpu_float32
op_ut,third_party.torch-xpu-ops.test.xpu.test_foreach_xpu.TestForeachXPU,test_foreach_copy_with_different_device_inputs__foreach_copy_xpu_float64
op_ut,third_party.torch-xpu-ops.test.xpu.test_foreach_xpu.TestForeachXPU,test_foreach_copy_with_different_device_inputs__foreach_copy_xpu_float8_e4m3fn
op_ut,third_party.torch-xpu-ops.test.xpu.test_foreach_xpu.TestForeachXPU,test_foreach_copy_with_different_device_inputs__foreach_copy_xpu_float8_e5m2
op_ut,third_party.torch-xpu-ops.test.xpu.test_foreach_xpu.TestForeachXPU,test_foreach_copy_with_different_device_inputs__foreach_copy_xpu_int16
op_ut,third_party.torch-xpu-ops.test.xpu.test_foreach_xpu.TestForeachXPU,test_foreach_copy_with_different_device_inputs__foreach_copy_xpu_int32
op_ut,third_party.torch-xpu-ops.test.xpu.test_foreach_xpu.TestForeachXPU,test_foreach_copy_with_different_device_inputs__foreach_copy_xpu_int64
op_ut,third_party.torch-xpu-ops.test.xpu.test_foreach_xpu.TestForeachXPU,test_foreach_copy_with_different_device_inputs__foreach_copy_xpu_int8
op_ut,third_party.torch-xpu-ops.test.xpu.test_foreach_xpu.TestForeachXPU,test_foreach_copy_with_different_device_inputs__foreach_copy_xpu_uint8
ErrorLog
TypeError: copy_() takes 2 positional arguments but 3 were given
Pytorch Version
latest good : 67aade50124b2ecf712bcfce2ec86c2d60d50caa
current : ff9aadcf39b4b0bb531a5384c52d7bcc189f69bd
Versions
Detail
Collecting environment information... PyTorch version: 2.15.0a0+gitff9aadc Is debug build: False CUDA used to build PyTorch: None ROCM used to build PyTorch: N/AOS: Ubuntu 26.04 LTS (x86_64)
GCC version: (Ubuntu 13.4.0-10ubuntu1) 13.4.0
Clang version: Could not collect
CMake version: version 3.31.6
Libc version: glibc-2.43
Python version: 3.10.21 (main, Aug 14 2026, 15:33:52) [Clang 22.1.3 ] (64-bit runtime)
Python platform: Linux-7.0.0-29-generic-x86_64-with-glibc2.43
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
Is XPU available: True
XPU used to build PyTorch: 20260100
Intel GPU driver version:
26.04ppa1Intel GPU models onboard:
Intel GPU models detected:
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: False
Caching allocator config: N/A
Vulnerability Tsx async abort: Not affected
Vulnerability Vmscape: Mitigation; IBPB before exit to userspace
Versions of relevant libraries:
[pip3] dpcpp-cpp-rt==2026.1.0
[pip3] impi-rt==2021.18.1
[pip3] intel-cmplr-lib-rt==2026.1.0
[pip3] intel-cmplr-lib-ur==2026.1.0
[pip3] intel-cmplr-lic-rt==2026.1.0
[pip3] intel-opencl-rt==2026.1.0
[pip3] intel-openmp==2026.1.0
[pip3] intel-pti==1.0.1
[pip3] intel-sycl-rt==2026.1.0
[pip3] mkl==2026.1.0
[pip3] mypy==1.16.0
[pip3] mypy_extensions==1.1.0
[pip3] numpy==1.24.4
[pip3] nvidia-cuda-cupti==13.3.75
[pip3] oneccl==2022.1.1
[pip3] oneccl-devel==2022.1.1
[pip3] onemkl-license==2026.1.0
[pip3] onemkl-sycl-blas==2026.1.0
[pip3] onemkl-sycl-dft==2026.1.0
[pip3] onemkl-sycl-lapack==2026.1.0
[pip3] onemkl-sycl-rng==2026.1.0
[pip3] onemkl-sycl-sparse==2026.1.0
[pip3] onnx==1.21.0
[pip3] onnx-ir==0.1.16
[pip3] onnxscript==0.6.2
[pip3] optree==0.13.0
[pip3] tbb==2023.1.0
[pip3] tcmlib==1.5.0
[pip3] torch==2.15.0a0+gitff9aadc
[pip3] torchao==0.19.0.dev20260823+xpu
[pip3] torchaudio==2.11.0a0+4e3e282
[pip3] torchvision==0.30.0a0+e6f0400
[pip3] triton-xpu==3.8.0+git1e2d42a0
[pip3] umf==1.1.0
[conda] No relevant packages