Skip to content

[Break XPU] Hard code “cuda” in GPU test case cause failure on XPU. #143974

@etaf

Description

@etaf

🐛 Describe the bug

The PR #139321 introduce a new test case torch/_inductor/pattern_matcher.py:test_duplicate_search which is not specified requires_cuda but hard code device type cuda, cause it fails on XPU.

patterns = PatternMatcherPass()
torch.set_default_device("cuda")
inputs = [torch.empty(4, 5, dtype=torch.float32)]
register_replacement(pattern1, replacement1, inputs, fwd_only, patterns)
register_replacement(pattern2, replacement2, inputs, fwd_only, patterns)

Versions

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

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

Python version: 3.10.15 | packaged by conda-forge | (main, Oct 16 2024, 01:24:24) [GCC 13.3.0] (64-bit runtime)
Python platform: Linux-5.15.47+prerelease24.6.13-x86_64-with-glibc2.35
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
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

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
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions