[XPU] aten::_dyn_quant_pack_4bit_weight not implemented, causing dyn_quant tests to skip
- Dominant language
- Python
- Stars
- 113
- Forks
- 128
- Avg merge
- 5d 9h
- Merged PRs (30d)
- 112
Description
Dynamic quantization tests that use 4-bit weight packing are skipped on XPU due to missing kernel implementation. The aten::_dyn_quant_pack_4bit_weight operator is not registered for the XPU device, causing all dependent tests to skip.
Affected Tests (3 total):
test__dyn_quant_pack_4bit_weight[xpu]
test__dyn_quant_matmul_4bit[xpu]
test_compile_dyn_quant_matmul_4bit[xpu]
Root Cause:
The aten::_dyn_quant_pack_4bit_weight operator used for dynamic quantization in PyTorch does not have a kernel implementation for XPU devices. This is a PyTorch quantization utility operator, not a standard matrix operation.
python -m pytest test/test_linalg.py::TestLinalgDeviceXPU::test__dyn_quant_pack_4bit_weight -xvs
branch: gplutop7:gplutopx/xpu-enable-test-cpp-extensions-aot
PR: https://github.com/pytorch/pytorch/pull/196597
### Versions
PyTorch version: 2.15.0a0+git32b89e1
Is debug build: False
CUDA used to build PyTorch: None
ROCm SDK used to build PyTorch: N/A
HIP used to build PyTorch: N/A
OS: Ubuntu 24.04.4 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.12.3 (main, Jul 15 2026, 23:46:41) [GCC 13.3.0] (64-bit runtime)
Python platform: Linux-6.17.0-1010-intel-x86_64-with-glibc2.39
Contributor guide
Research direction
Start by running test/test_linalg.py::TestLinalgDeviceXPU::test__dyn_quant_pack_4bit_weight -xvs and trace registration of aten::_dyn_quant_pack_4bit_weight for XPU. Review the linked PR for the work already underway. Done means the three listed XPU dynamic-quantization tests run instead of skipping and pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100