intel / intel/torch-xpu-ops

[XPU] test_multiprocessing_xpu.py RuntimeError: _share_fd_: only available on CPU

Open
#5,219 0 comments 0 reactions 1 assignee Claimed by @jmamzax View on GitHub
test: ut
Dominant language
Python
Stars
113
Forks
128
Avg merge
5d 9h
Merged PRs (30d)
112

Description

### 🐛 Describe the bug

Tests:

- TestMultiprocessingDeviceType.test_leaf_variable_sharing
- TestMultiprocessingDeviceType.test_integer_parameter_serialization

are skipped in test_multiprocessing_xpu.py as firstly Sycl IPC must be implemented https://github.com/pytorch/pytorch/pull/191725. After this the skip can be reverted and tests run to check if everything works correctly. This submission is to trace those two tests as no other issue is filed with those tests.

**test_multiprocessing_xpu.py::TestMultiprocessingDeviceTypeXPU::test_integer_parameter_serialization_xpu** - AssertionError: False is not true

Error test_integer_parameter_serialization_xpu

```
======================================================================= FAILURES =======================================================================
______________________________________ TestMultiprocessingDeviceTypeXPU.test_integer_parameter_serialization_xpu _______________________________________
Traceback (most recent call last):
File "/Python/3.10.20/x64/lib/python3.10/unittest/case.py", line 59, in testPartExecutor
yield
File "/Python/3.10.20/x64/lib/python3.10/unittest/case.py", line 591, in run
self._callTestMethod(testMethod)
File "/Python/3.10.20/x64/lib/python3.10/unittest/case.py", line 549, in _callTestMethod
method()
File "/home/gta/pytorch/torch/testing/_internal/common_utils.py", line 3886, in wrapper
method(*args, **kwargs)
File "/home/gta/pytorch/torch/testing/_internal/common_device_type.py", line 672, in instantiated_test
result = test(self, **param_kwargs)
File "/home/gta/pytorch/third_party/torch-xpu-ops/test/xpu/../../../../test/test_multiprocessing.py", line 545, in test_integer_parameter_serialization
self._test_integer_parameter_serialization(device=device)
File "/home/gta/pytorch/third_party/torch-xpu-ops/test/xpu/../../../../test/test_multiprocessing.py", line 484, in _test_integer_parameter_serialization
self.assertTrue(done.wait(MAX_WAITING_TIME_IN_SECONDS))
File "/Python/3.10.20/x64/lib/python3.10/unittest/case.py", line 687, in assertTrue
raise self.failureException(msg)
AssertionError: False is not true

To execute this test, run the following from the base repo dir:
python ../../test/test_multiprocessing.py TestMultiprocessingDeviceTypeXPU.test_integer_parameter_serialization_xpu

This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
----------------------------------------------------------------- Captured stderr call -----------------------------------------------------------------
Traceback (most recent call last):
File "/Python/3.10.20/x64/lib/python3.10/multiprocessing/queues.py", line 244, in _feed
obj = _ForkingPickler.dumps(obj)
File "/Python/3.10.20/x64/lib/python3.10/multiprocessing/reduction.py", line 51, in dumps
cls(buf, protocol).dump(obj)
File "/home/gta/pytorch/torch/multiprocessing/reductions.py", line 618, in reduce_storage
fd, size = storage._share_fd_cpu_()
File "/home/gta/pytorch/torch/storage.py", line 458, in wrapper
return fn(self, *args, **kwargs)
File "/home/gta/pytorch/torch/storage.py", line 536, in _share_fd_cpu_
return super()._share_fd_cpu_(*args, **kwargs)
RuntimeError: _share_fd_: only available on CPU
=============================================================== short test summary info ================================================================
```

**test_multiprocessing_xpu.py::TestMultiprocessingDeviceTypeXPU::test_leaf_variable_sharing**
Tests freeze when runs on Windows or Linux.

### Versions

Click to expand environment details

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

OS: Ubuntu 24.04.3 LTS (x86_64)
GCC version: (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
Clang version: Could not collect
CMake version: version 3.31.6
Libc version: glibc-2.39

Python version: 3.10.20 (main, Mar 3 2026, 15:36:40) [GCC 13.3.0] (64-bit runtime)
Python platform: Linux-6.17.0-1007-intel-x86_64-with-glibc2.39
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: 20260000
Intel GPU driver version:
* intel-opencl-icd: 26.05.37020.3-1~24.04~ppa3
* libze1: 1.27.0-1~24.04~ppa2
Intel GPU models onboard:
* Intel(R) Arc(TM) B570 Graphics
Intel GPU models detected:
* [0] _XpuDeviceProperties(name='Intel(R) Arc(TM) B570 Graphics', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero V2', type='gpu', device_id=0xE20C, uuid=86800ce2-0000-0000-0300-000000000000, driver_version='1.14.37020+3', total_memory=9663MB, local_mem_size=128KB, last_level_cache_size=13824KB, max_compute_units=160, memory_clock_rate=2750MHz, memory_bus_width=64-bit, gpu_eu_count=144, gpu_subslice_count=18, 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
Is XNNPACK available: False
Caching allocator config: N/A

CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 42 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 32
On-line CPU(s) list: 0-31
Vendor ID: GenuineIntel
Model name: 13th Gen Intel(R) Core(TM) i9-13900
CPU family: 6
Model: 183
Thread(s) per core: 2
Core(s) per socket: 24
Socket(s): 1
Stepping: 1
CPU(s) scaling MHz: 21%
CPU max MHz: 5600.0000
CPU min MHz: 800.0000
BogoMIPS: 3993.60
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect user_shstk avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi vnmi umip pku ospke waitpkg gfni vaes vpclmulqdq tme rdpid movdiri movdir64b fsrm md_clear serialize pconfig arch_lbr ibt flush_l1d arch_capabilities
Virtualization: VT-x
L1d cache: 896 KiB (24 instances)
L1i cache: 1.3 MiB (24 instances)
L2 cache: 32 MiB (12 instances)
L3 cache: 36 MiB (1 instance)
NUMA node(s): 1
NUMA node0 CPU(s): 0-31
Vulnerability Gather data sampling: Not affected
Vulnerability Ghostwrite: Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Old microcode: Not affected
Vulnerability Reg file data sampling: Mitigation; Clear Register File
Vulnerability Retbleed: Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S
Vulnerability Srbds: Not affected
Vulnerability Tsa: Not affected
Vulnerability Tsx async abort: Not affected
Vulnerability Vmscape: Mitigation; IBPB before exit to userspace

Versions of relevant libraries:
[pip3] bert_pytorch==0.0.1a4
[pip3] dpcpp-cpp-rt==2026.0.0
[pip3] functorch==1.14.0a0+b71aa0b
[pip3] impi-rt==2021.18.0
[pip3] intel-cmplr-lib-rt==2026.0.0
[pip3] intel-cmplr-lib-ur==2026.0.0
[pip3] intel-cmplr-lic-rt==2026.0.0
[pip3] intel-opencl-rt==2026.0.0
[pip3] intel-openmp==2026.0.0
[pip3] intel-pti==0.17.0
[pip3] intel-sycl-rt==2026.0.0
[pip3] mkl==2026.0.0
[pip3] mypy==1.16.0
[pip3] mypy_extensions==1.1.0
[pip3] numpy==1.23.2
[pip3] nvidia-cuda-cupti==13.3.35
[pip3] oneccl==2022.0.0
[pip3] oneccl-devel==2022.0.0
[pip3] onemkl-license==2026.0.0
[pip3] onemkl-sycl-blas==2026.0.0
[pip3] onemkl-sycl-dft==2026.0.0
[pip3] onemkl-sycl-lapack==2026.0.0
[pip3] onemkl-sycl-rng==2026.0.0
[pip3] onemkl-sycl-sparse==2026.0.0
[pip3] onnx==1.21.0
[pip3] onnx-ir==0.1.16
[pip3] onnxscript==0.6.2
[pip3] optree==0.13.0
[pip3] pytorch-labs-segment-anything-fast==0.2
[pip3] tbb==2023.0.0
[pip3] tcmlib==1.5.0
[pip3] torch==2.15.0a0+git18acb4f
[pip3] torch_geometric==2.4.0
[pip3] torchao==0.17.0
[pip3] torchaudio==2.11.0.dev20260621+xpu
[pip3] torchmultimodal==0.1.0b0
[pip3] torchvision==0.29.0.dev20260621+xpu
[pip3] triton-xpu==3.7.2+git5fcc14d9
[pip3] umf==1.1.0
[conda] Could not collect
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.