intel / intel/torch-xpu-ops

higher_order_ops/test_invoke_subgraph_xpu.py got AssertionError: 'clas[798 chars] mul: "f32[8]" = torch.ops.aten.mul.Tensor(ar[63 chars],)\n' != 'clas[798 chars] mul_tensor: "f32[8]" = torch.ops.aten.mul.Te[77 chars],)

Open Beginner friendly
#5,260 1 comment 0 reactions 0 assignees View on GitHub
regression skipped_bmg
Dominant language
Python
Stars
113
Forks
129
Avg merge
5d 9h
Merged PRs (30d)
112

Description

### 🐛 Describe the bug

Cases:
op_ut,third_party.torch-xpu-ops.test.xpu.higher_order_ops.test_invoke_subgraph_xpu.TestInvokeSubgraphReuse,test_subgraph_reuse_synthetic_source_different_args
op_ut,third_party.torch-xpu-ops.test.xpu.higher_order_ops.test_invoke_subgraph_xpu.TestInvokeSubgraphExportNonstrict,test_simple_func

## ErrorLog
```bash
_ TestInvokeSubgraphReuse.test_subgraph_reuse_synthetic_source_different_args __
[gw6] 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/pytorch/third_party/torch-xpu-ops/test/xpu/higher_order_ops/test_invoke_subgraph_xpu.py", line 3554, in test_subgraph_reuse_synthetic_source_different_args
self.assertExpectedInline(
File "/__w/torch-xpu-ops/torch-xpu-ops/.venv/lib/python3.10/site-packages/torch/testing/_internal/common_utils.py", line 3830, in assertExpectedInline
return super().assertExpectedInline(actual if isinstance(actual, str) else str(actual), expect, skip + 1)
File "/__w/torch-xpu-ops/torch-xpu-ops/.venv/lib/python3.10/site-packages/expecttest/__init__.py", line 413, in assertExpectedInline
assert_expected_inline(
File "/__w/torch-xpu-ops/torch-xpu-ops/.venv/lib/python3.10/site-packages/expecttest/__init__.py", line 378, in assert_expected_inline
assert_eq(expect, actual, msg=help_text)
File "/__w/torch-xpu-ops/torch-xpu-ops/.venv/lib/python3.10/site-packages/expecttest/__init__.py", line 450, in assertMultiLineEqualMaybeCppStack
self.assertMultiLineEqual(expect, actual, *args, **kwargs)
File "/github/home/.local/share/uv/python/cpython-3.10-linux-x86_64-gnu/lib/python3.10/unittest/case.py", line 1226, in assertMultiLineEqual
self.fail(self._formatMessage(msg, standardMsg))
File "/github/home/.local/share/uv/python/cpython-3.10-linux-x86_64-gnu/lib/python3.10/unittest/case.py", line 675, in fail
raise self.failureException(msg)
AssertionError: 'clas[661 chars] x: "f32[8]" = invoke_subgraph[0]; invoke[958 chars],)\n' != 'clas[661 chars] getitem: "f32[8]" = invoke_subgraph[0]; [1006 chars],)\n'
class GraphModule(torch.nn.Module):
def forward(self, L_x_: "f32[8]", SYNTHETIC_LOCAL_tmp_0_ : test_opaque_obj_v2_HoistedString, SYNTHETIC_LOCAL_tmp_2_ : test_opaque_obj_v2_HoistedString, SYNTHETIC_LOCAL_tmp_4_ : test_opaque_obj_v2_HoistedString):
l_x_ = L_x_
synthetic_local_tmp_0_ = SYNTHETIC_LOCAL_tmp_0_
synthetic_local_tmp_2_ = SYNTHETIC_LOCAL_tmp_2_
synthetic_local_tmp_4_ = SYNTHETIC_LOCAL_tmp_4_

subgraph_0 = self.subgraph_0
invoke_subgraph = torch.ops.higher_order.invoke_subgraph(subgraph_0, 'subgraph_0', l_x_, synthetic_local_tmp_0_); subgraph_0 = l_x_ = synthetic_local_tmp_0_ = None
- x: "f32[8]" = invoke_subgraph[0]; invoke_subgraph = None
? ^
+ getitem: "f32[8]" = invoke_subgraph[0]; invoke_subgraph = None
? ^^^^^^^

subgraph_1 = self.subgraph_0
- invoke_subgraph_1 = torch.ops.higher_order.invoke_subgraph(subgraph_1, 'subgraph_0', x, synthetic_local_tmp_2_); subgraph_1 = x = synthetic_local_tmp_2_ = None
? ^ ^
+ invoke_subgraph_1 = torch.ops.higher_order.invoke_subgraph(subgraph_1, 'subgraph_0', getitem, synthetic_local_tmp_2_); subgraph_1 = getitem = synthetic_local_tmp_2_ = None
? ^^^^^^^ ^^^^^^^
- x_1: "f32[8]" = invoke_subgraph_1[0]; invoke_subgraph_1 = None
? ^
+ getitem_1: "f32[8]" = invoke_subgraph_1[0]; invoke_subgraph_1 = None
? ^^^^^^^

subgraph_2 = self.subgraph_0
- invoke_subgraph_2 = torch.ops.higher_order.invoke_subgraph(subgraph_2, 'subgraph_0', x_1, synthetic_local_tmp_4_); subgraph_2 = x_1 = synthetic_local_tmp_4_ = None
? ^ ^
+ invoke_subgraph_2 = torch.ops.higher_order.invoke_subgraph(subgraph_2, 'subgraph_0', getitem_1, synthetic_local_tmp_4_); subgraph_2 = getitem_1 = synthetic_local_tmp_4_ = None
? ^^^^^^^ ^^^^^^^
- x_2: "f32[8]" = invoke_subgraph_2[0]; invoke_subgraph_2 = None
? ^
+ getitem_2: "f32[8]" = invoke_subgraph_2[0]; invoke_subgraph_2 = None
? ^^^^^^^
- return (x_2,)
? ^
+ return (getitem_2,)
? ^^^^^^^

class subgraph_0(torch.nn.Module):
def forward(self, l_x_: "f32[8]", synthetic_local_tmp_0_ : test_opaque_obj_v2_HoistedString):
op_with_string_default: "f32[8]" = torch.ops.mylib.op_with_string.default(l_x_, synthetic_local_tmp_0_); l_x_ = synthetic_local_tmp_0_ = None
return (op_with_string_default,)
: To accept the new output, re-run test with envvar EXPECTTEST_ACCEPT=1 (we recommend staging/committing your changes before doing this)
```
## Pytorch
latest good : f634d0e91da4cc1d4d669a60ede149214b754854
current : ca66d9844119d868477faa88c782bd46495e1783

## Torch-xpu-ops
latest good : eba857c7146c61cf2db6c45591e901a234a965ca
current : d6fa1aaa5d0c5100624017d22ae7932f0bd9389f

### Versions

Detail
Collecting environment information...
PyTorch version: 2.15.0a0+gitca66d98
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: 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, Sep 1 2026, 14:16:49) [Clang 22.1.3 ] (64-bit runtime)
Python platform: Linux-7.0.0-14-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:
* libze1: 1.28.2-2
* intel-opencl-icd: 26.18.38308.1-1~26.04~ppa1
Intel GPU models onboard:
* Intel(R) Arc(TM) Pro B60 Graphics
* Intel(R) Arc(TM) Pro B60 Graphics
* Intel(R) Arc(TM) Pro B60 Graphics
* Intel(R) Arc(TM) Pro B60 Graphics
* Intel(R) Arc(TM) Pro B60 Graphics
* Intel(R) Arc(TM) Pro B60 Graphics
* Intel(R) Arc(TM) Pro B60 Graphics
* Intel(R) Arc(TM) Pro B60 Graphics
Intel GPU models detected:
* [0] _XpuDeviceProperties(name='Intel(R) Arc(TM) Pro B60 Graphics', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero V2', type='gpu', device_id=0xE211, uuid=868011e2-0000-0000-1700-000000000000, driver_version='1.15.38308+1', total_memory=24480MB, local_mem_size=128KB, last_level_cache_size=18432KB, max_compute_units=160, memory_clock_rate=2400MHz, memory_bus_width=64-bit, gpu_eu_count=160, gpu_subslice_count=20, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1, is_integrated_gpu=0)
* [1] _XpuDeviceProperties(name='Intel(R) Arc(TM) Pro B60 Graphics', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero V2', type='gpu', device_id=0xE211, uuid=868011e2-0000-0000-2c00-000000000000, driver_version='1.15.38308+1', total_memory=24480MB, local_mem_size=128KB, last_level_cache_size=18432KB, max_compute_units=160, memory_clock_rate=2400MHz, memory_bus_width=64-bit, gpu_eu_count=160, gpu_subslice_count=20, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1, is_integrated_gpu=0)
* [2] _XpuDeviceProperties(name='Intel(R) Arc(TM) Pro B60 Graphics', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero V2', type='gpu', device_id=0xE211, uuid=868011e2-0000-0000-3d00-000000000000, driver_version='1.15.38308+1', total_memory=24480MB, local_mem_size=128KB, last_level_cache_size=18432KB, max_compute_units=160, memory_clock_rate=2400MHz, memory_bus_width=64-bit, gpu_eu_count=160, gpu_subslice_count=20, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1, is_integrated_gpu=0)
* [3] _XpuDeviceProperties(name='Intel(R) Arc(TM) Pro B60 Graphics', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero V2', type='gpu', device_id=0xE211, uuid=868011e2-0000-0000-4e00-000000000000, driver_version='1.15.38308+1', total_memory=24480MB, local_mem_size=128KB, last_level_cache_size=18432KB, max_compute_units=160, memory_clock_rate=2400MHz, memory_bus_width=64-bit, gpu_eu_count=160, gpu_subslice_count=20, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1, is_integrated_gpu=0)
* [4] _XpuDeviceProperties(name='Intel(R) Arc(TM) Pro B60 Graphics', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero V2', type='gpu', device_id=0xE211, uuid=868011e2-0000-0000-9700-000000000000, driver_version='1.15.38308+1', total_memory=24480MB, local_mem_size=128KB, last_level_cache_size=18432KB, max_compute_units=160, memory_clock_rate=2400MHz, memory_bus_width=64-bit, gpu_eu_count=160, gpu_subslice_count=20, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1, is_integrated_gpu=0)
* [5] _XpuDeviceProperties(name='Intel(R) Arc(TM) Pro B60 Graphics', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero V2', type='gpu', device_id=0xE211, uuid=868011e2-0000-0000-a900-000000000000, driver_version='1.15.38308+1', total_memory=24480MB, local_mem_size=128KB, last_level_cache_size=18432KB, max_compute_units=160, memory_clock_rate=2400MHz, memory_bus_width=64-bit, gpu_eu_count=160, gpu_subslice_count=20, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1, is_integrated_gpu=0)
* [6] _XpuDeviceProperties(name='Intel(R) Arc(TM) Pro B60 Graphics', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero V2', type='gpu', device_id=0xE211, uuid=868011e2-0000-0000-ba00-000000000000, driver_version='1.15.38308+1', total_memory=24480MB, local_mem_size=128KB, last_level_cache_size=18432KB, max_compute_units=160, memory_clock_rate=2400MHz, memory_bus_width=64-bit, gpu_eu_count=160, gpu_subslice_count=20, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1, is_integrated_gpu=0)
* [7] _XpuDeviceProperties(name='Intel(R) Arc(TM) Pro B60 Graphics', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero V2', type='gpu', device_id=0xE211, uuid=868011e2-0000-0000-cb00-000000000000, driver_version='1.15.38308+1', total_memory=24480MB, local_mem_size=128KB, last_level_cache_size=18432KB, max_compute_units=160, memory_clock_rate=2400MHz, memory_bus_width=64-bit, gpu_eu_count=160, gpu_subslice_count=20, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1, is_integrated_gpu=0)
HIP runtime version: N/A
MIOpen runtime version: N/A

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+gitca66d98
[pip3] torchao==0.19.0.dev20260908+xpu
[pip3] torchaudio==2.11.0a0+b85c99c
[pip3] torchvision==0.30.0a0+ac8d215
[pip3] triton-xpu==3.8.0+git1e2d42a0
[pip3] umf==1.1.0
[conda] No relevant packages

Contributor guide

Open the contributing guide

Research direction

Start with pytorch/third_party/torch-xpu-ops/test/xpu/higher_order_ops/test_invoke_subgraph_xpu.py and inspect the inline expectations in TestInvokeSubgraphReuse.test_subgraph_reuse_synthetic_source_different_args and TestInvokeSubgraphExportNonstrict.test_simple_func. Run these tests to compare the generated graph names with the recorded expectations. Done means the expectations or underlying behavior are corrected consistently and both reported tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.