[BE] Add @skipIfNoFBGEMM decorator (Reland)#37894
[BE] Add @skipIfNoFBGEMM decorator (Reland)#37894malfet wants to merge 2 commits intopytorch:masterfrom
Conversation
2efb4e6 to
95f2178
Compare
💊 CI failures summary and remediationsAs of commit 0ebf0f6 (more details on the Dr. CI page):
❄️ 1 failure tentatively classified as flakybut reruns have not yet been triggered to confirm:
|
a959e77 to
49ae658
Compare
49ae658 to
0ebf0f6
Compare
facebook-github-bot
left a comment
There was a problem hiding this comment.
@malfet is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
| @unittest.skipUnless('fbgemm' in torch.backends.quantized.supported_engines, | ||
| " Quantized operations require FBGEMM. FBGEMM is only optimized for CPUs" | ||
| " with instruction set support avx2 or newer.") | ||
| @skipIfNoFBGEMM |
There was a problem hiding this comment.
@malfet seems like this doesn't work when you decorate class test with it.
I ran python test/test_quantization.py TestPostTrainingDynamic
See the following error
Traceback (most recent call last):
File "test/test_quantization.py", line 62, in <module>
run_tests()
File "/home/supriyar/local/miniconda3/envs/pytorch/lib/python3.7/site-packages/torch/testing/_internal/common_utils.py", line 266, in run_tests
unittest.main(argv=argv)
File "/home/supriyar/local/miniconda3/envs/pytorch/lib/python3.7/unittest/main.py", line 100, in __init__
self.parseArgs(argv)
File "/home/supriyar/local/miniconda3/envs/pytorch/lib/python3.7/unittest/main.py", line 147, in parseArgs
self.createTests()
File "/home/supriyar/local/miniconda3/envs/pytorch/lib/python3.7/unittest/main.py", line 159, in createTests
self.module)
File "/home/supriyar/local/miniconda3/envs/pytorch/lib/python3.7/unittest/loader.py", line 220, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/home/supriyar/local/miniconda3/envs/pytorch/lib/python3.7/unittest/loader.py", line 220, in <listcomp>
suites = [self.loadTestsFromName(name, module) for name in names]
File "/home/supriyar/local/miniconda3/envs/pytorch/lib/python3.7/unittest/loader.py", line 205, in loadTestsFromName
test = obj()
File "/home/supriyar/local/miniconda3/envs/pytorch/lib/python3.7/site-packages/torch/testing/_internal/common_quantization.py", line 129, in wrapper
fn(*args, **kwargs)
File "/home/supriyar/local/miniconda3/envs/pytorch/lib/python3.7/site-packages/torch/testing/_internal/common_utils.py", line 714, in __init__
test_method = getattr(self, method_name)
AttributeError: 'TestPostTrainingDynamic' object has no attribute 'runTest'
There was a problem hiding this comment.
@supriyar can you share a bit more details on your build config?
There was a problem hiding this comment.
Sorry about that, here is the fix: #38432
Summary: Pull Request resolved: pytorch#37894 Differential Revision: D21449993 Pulled By: malfet fbshipit-source-id: d9d355d360384cbb158f62b40dc885527f22ee05
No description provided.