Closed u99127 closed 2 years ago
quantization is only supported on certain hardwares, please take a look at https://pytorch.org/docs/stable/quantization.html#backend-hardware-support
closing for now, please feel free to reopen if there are further questions
🐛 Describe the bug
$>cat test.py import torch linear = torch.nn.quantized.Linear(5, 2, dtype=torch.qint8) print(linear)
$>python test.py Traceback (most recent call last): File "test.py", line 2, in
linear = torch.nn.quantized.Linear(5, 2, dtype=torch.qint8)
File "/home/ramana/venv-torch/lib/python3.8/site-packages/torch/nn/quantized/modules/linear.py", line 144, in init
self._packed_params = LinearPackedParams(dtype)
File "/home/ramana/venv-torch/lib/python3.8/site-packages/torch/nn/quantized/modules/linear.py", line 22, in init
self.set_weight_bias(wq, None)
File "/home/ramana/venv-torch/lib/python3.8/site-packages/torch/nn/quantized/modules/linear.py", line 27, in set_weight_bias
self._packed_params = torch.ops.quantized.linear_prepack(weight, bias)
File "/home/ramana/venv-torch/lib/python3.8/site-packages/torch/_ops.py", line 143, in call
return self._op(*args, **kwargs or {})
RuntimeError: Didn't find engine for operation quantized::linear_prepack NoQEngine
Versions
Collecting environment information... PyTorch version: 1.12.1 Is debug build: False CUDA used to build PyTorch: None ROCM used to build PyTorch: N/A
OS: Ubuntu 20.04.4 LTS (aarch64) GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 Clang version: 14.0.6-++20220622053131+f28c006a5895-1~exp1~20220622173215.157 CMake version: version 3.16.3 Libc version: glibc-2.31
Python version: 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0] (64-bit runtime) Python platform: Linux-5.4.0-66-generic-aarch64-with-glibc2.29 Is CUDA available: False CUDA runtime version: No CUDA 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
Versions of relevant libraries: [pip3] numpy==1.23.2 [pip3] torch==1.12.1 [pip3] torchvision==0.13.1 [conda] Could not collect
cc @jerryzh168 @jianyuh @raghuramank100 @jamesr66a @vkuzo