KEMBAR78
[Break XPU] Device bias code introduced from #134874: create CUDA tensor on XPU device. · Issue #136595 · pytorch/pytorch · GitHub
Skip to content

[Break XPU] Device bias code introduced from #134874: create CUDA tensor on XPU device. #136595

@etaf

Description

@etaf

🐛 Describe the bug

The test case inductor/test_memory.py::TestOperatorReorderForPeakMemory::test_reorder_peak_memory run with HAS_GPU, but hard code 'cuda' device tensor.

2024-09-24T14:16:59.2946914Z Traceback (most recent call last):
2024-09-24T14:16:59.2947432Z   File "/var/lib/jenkins/pytorch/test/inductor/test_memory.py", line 46, in setUp
2024-09-24T14:16:59.2947957Z     self.model = Foo().to("cuda")
2024-09-24T14:16:59.2948624Z   File "/opt/conda/envs/py_3.9/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1340, in to
2024-09-24T14:16:59.2949239Z     return self._apply(convert)
2024-09-24T14:16:59.2949917Z   File "/opt/conda/envs/py_3.9/lib/python3.9/site-packages/torch/nn/modules/module.py", line 927, in _apply
2024-09-24T14:16:59.2950539Z     param_applied = fn(param)
2024-09-24T14:16:59.2951210Z   File "/opt/conda/envs/py_3.9/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1326, in convert
2024-09-24T14:16:59.2951897Z     return t.to(
2024-09-24T14:16:59.2952533Z   File "/opt/conda/envs/py_3.9/lib/python3.9/site-packages/torch/cuda/__init__.py", line 310, in _lazy_init
2024-09-24T14:16:59.2953247Z     raise AssertionError("Torch not compiled with CUDA enabled")
2024-09-24T14:16:59.2953751Z AssertionError: Torch not compiled with CUDA enabled

Versions

PyTorch version: 2.5.0a0+git7da755b
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.4 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: version 3.29.4
Libc version: glibc-2.35

cc @gujinghui @EikanWang @fengyuan14 @guangyey

Metadata

Metadata

Assignees

Labels

module: xpuIntel XPU related issuestriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions