Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARC: FP64: Some operator fails on XPU UT with "Kernel is incompatible with all devices" error on A60 device #1150

Open
PenghuiCheng opened this issue Dec 9, 2024 · 1 comment
Assignees
Labels
Milestone

Comments

@PenghuiCheng
Copy link
Contributor

PenghuiCheng commented Dec 9, 2024

🐛 Describe the bug

Some operators UT fails on XPU with "Kernel is incompatible with all devices" error.
FAILED test_ops_xpu.py::TestCommonXPU::test_compare_cpu_logcumsumexp_xpu_float16 - RuntimeError: Kernel is incompatible with all devices in devs
FAILED test_ops_xpu.py::TestCommonXPU::test_compare_cpu_logcumsumexp_xpu_float32 - RuntimeError: Kernel is incompatible with all devices in devs
FAILED test_ops_xpu.py::TestCommonXPU::test_compare_cpu_nn_functional_pdist_xpu_float32 - RuntimeError: Kernel is incompatible with all devices in devs
FAILED test_ops_xpu.py::TestCommonXPU::test_compare_cpu_tril_indices_xpu_int32 - RuntimeError: Kernel is incompatible with all devices in devs
FAILED test_ops_xpu.py::TestCommonXPU::test_compare_cpu_tril_indices_xpu_int64 - RuntimeError: Kernel is incompatible with all devices in devs
FAILED test_ops_xpu.py::TestCommonXPU::test_compare_cpu_triu_indices_xpu_int32 - RuntimeError: Kernel is incompatible with all devices in devs
FAILED test_ops_xpu.py::TestCommonXPU::test_compare_cpu_triu_indices_xpu_int64 - RuntimeError: Kernel is incompatible with all devices in devs
FAILED test_ops_xpu.py::TestCompositeComplianceXPU::test_backward_logcumsumexp_xpu_float32 - RuntimeError: Kernel is incompatible with all devices in devs
FAILED test_ops_xpu.py::TestCompositeComplianceXPU::test_backward_nn_functional_pdist_xpu_float32 - RuntimeError: Kernel is incompatible with all devices in devs
FAILED test_ops_xpu.py::TestCompositeComplianceXPU::test_forward_ad_logcumsumexp_xpu_float32 - RuntimeError: Kernel is incompatible with all devices in devs
FAILED test_ops_xpu.py::TestCompositeComplianceXPU::test_operator_logcumsumexp_xpu_float32 - RuntimeError: Kernel is incompatible with all devices in devs
FAILED test_ops_xpu.py::TestCompositeComplianceXPU::test_operator_nn_functional_pdist_xpu_float32 - RuntimeError: Kernel is incompatible with all devices in devs
FAILED test_ops_xpu.py::TestCompositeComplianceXPU::test_view_replay_logcumsumexp_xpu_float32 - RuntimeError: Kernel is incompatible with all devices in devs
FAILED test_ops_xpu.py::TestCompositeComplianceXPU::test_view_replay_nn_functional_pdist_xpu_float32 - RuntimeError: Kernel is incompatible with all devices in devs

now we skip the cases in : #1146

example code:

import torch
a = torch.randn(10, device="xpu:0")
torch.logcumsumexp(a, dim=0)

My environment is Linux, and pytorch 2.6 nightly . and my card is ARC A60

Error message:
RuntimeError: Kernel is incompatible with all devices in devs

Steps to reproduce:

1. install nightly PyTorch2.6 wheel with XPU support
2. Create a random tensor on the XPU device
3. Attempt to apply operator to the tensor

Versions

PyTorch version: 2.6.0.dev20241202+xpu
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.31.1
Libc version: glibc-2.35

Python version: 3.10.16 | packaged by conda-forge | (main, Dec 5 2024, 14:16:10) [GCC 13.3.0] (64-bit runtime)
Python platform: Linux-6.6.7-060607-generic-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

CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 46 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 20
On-line CPU(s) list: 0-19
Vendor ID: GenuineIntel
Model name: 12th Gen Intel(R) Core(TM) i7-12700K
CPU family: 6
Model: 151
Thread(s) per core: 2
Core(s) per socket: 12
Socket(s): 1
Stepping: 2
CPU max MHz: 5000.0000
CPU min MHz: 800.0000
BogoMIPS: 7219.20
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 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault 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: 512 KiB (12 instances)
L1i cache: 512 KiB (12 instances)
L2 cache: 12 MiB (9 instances)
L3 cache: 25 MiB (1 instance)
NUMA node(s): 1
NUMA node0 CPU(s): 0-19
Vulnerability Gather data sampling: 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 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, RSB filling, PBRSB-eIBRS SW sequence
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected

Versions of relevant libraries:
[pip3] numpy==2.1.2
[pip3] optree==0.13.1
[pip3] pytorch-triton==3.2.0+git35c6c7c6
[pip3] pytorch-triton-xpu==3.2.0+gite98b6fcb
[pip3] torch==2.6.0.dev20241202+xpu
[pip3] torchaudio==2.5.0.dev20241202+xpu
[pip3] torchvision==0.20.0.dev20241202+xpu
[conda] numpy 2.1.2 pypi_0 pypi
[conda] optree 0.13.1 pypi_0 pypi
[conda] pytorch-triton 3.2.0+git35c6c7c6 pypi_0 pypi
[conda] pytorch-triton-xpu 3.2.0+gite98b6fcb pypi_0 pypi
[conda] torch 2.6.0.dev20241202+xpu pypi_0 pypi
[conda] torchaudio 2.5.0.dev20241202+xpu pypi_0 pypi
[conda] torchvision 0.20.0.dev20241202+xpu pypi_0 pypi

@fengyuan14
Copy link
Contributor

Kernel is incompatible with all devices in devs is a runtime error of SYCL, when calling sycl::get_kernel_bundle, as we call sycl::get_kernel_bundle before sycl::queue::submit, so the error is not FP64 is not supported on the platform., but Kernel is incompatible with all devices in devs.

When data types of input tensors are not FP64, we should make the op work on ARC with changing the scalar or immediate value from double to float.

The issue is not critical so far, which only impact some unit tests on ARC only. We won't cherry-pick it for PT2.6, as it is not the most critical issue.

@fengyuan14 fengyuan14 changed the title Some operator fails on XPU UT with "Kernel is incompatible with all devices" error on A60 device ARC: FP64: Some operator fails on XPU UT with "Kernel is incompatible with all devices" error on A60 device Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants