-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
module: nnRelated to torch.nnRelated to torch.nnmodule: testsIssues related to tests (not the torch.testing module)Issues related to tests (not the torch.testing module)triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
🐛 Describe the bug
Since 3802edd there is a TestNNAPI test case which in its setUp unconditionally loads QNNPACK:
Line 25 in 3802edd
torch.backends.quantized.engine = 'qnnpack' |
So when PyTorch is built without it this will hard error:
======================================================================
ERROR: test_unsqueeze (jit.test_backend_nnapi.TestNnapiBackend)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/dev/shm/s3248973-EasyBuild/PyTorch/1.10.0/foss-2021a/pytorch/test/jit/test_backend_nnapi.py", line 37, in setUp
super().setUp()
File "/dev/shm/s3248973-EasyBuild/PyTorch/1.10.0/foss-2021a/pytorch/test/test_nnapi.py", line 25, in setUp
torch.backends.quantized.engine = 'qnnpack'
File "/tmp/easybuild-tmp/eb-5FO9wX/tmpIMOoeD/lib/python3.9/site-packages/torch/backends/quantized/__init__.py", line 29, in __set__
torch._C._set_qengine(_get_qengine_id(val))
RuntimeError: quantized engine QNNPACK is not supported
I'm not sure what the correct way to solve this here is:
- Skip the test if no QNNPACK is there
- Don't set it there if it isn't available
Versions
Affected is 1.9.0 and higher.
cc @albanD @mruberry @jbschlosser @walterddr @kshitij12345 @saketh-are
albanD
Metadata
Metadata
Assignees
Labels
module: nnRelated to torch.nnRelated to torch.nnmodule: testsIssues related to tests (not the torch.testing module)Issues related to tests (not the torch.testing module)triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module