Skip to content

[BE] Add @skipIfNoFBGEMM decorator (Reland)#37894

Closed
malfet wants to merge 2 commits intopytorch:masterfrom
malfet:malfet/skip-if-no-fbgemm-take-2
Closed

[BE] Add @skipIfNoFBGEMM decorator (Reland)#37894
malfet wants to merge 2 commits intopytorch:masterfrom
malfet:malfet/skip-if-no-fbgemm-take-2

Conversation

@malfet
Copy link
Copy Markdown
Contributor

@malfet malfet commented May 6, 2020

No description provided.

@malfet malfet requested review from ezyang and vkuzo May 6, 2020 00:20
@malfet malfet force-pushed the malfet/skip-if-no-fbgemm-take-2 branch from 2efb4e6 to 95f2178 Compare May 6, 2020 00:22
@dr-ci
Copy link
Copy Markdown

dr-ci Bot commented May 6, 2020

💊 CI failures summary and remediations

As of commit 0ebf0f6 (more details on the Dr. CI page):



❄️ 1 failure tentatively classified as flaky

but reruns have not yet been triggered to confirm:

See CircleCI build pytorch_linux_xenial_py3_6_gcc5_4_ge_config_legacy_test (1/1)

Step: "Set Up CI Environment After attach_workspace" (full log | diagnosis details | 🔁 rerun) ❄️

gpg: no valid OpenPGP data found.
+ curl -s -L --retry 3 https://nvidia.github.io/nvidia-docker/gpgkey 
+ sudo apt-key add - 
gpg: no valid OpenPGP data found. 

🚧 1 ongoing upstream failure:

These were probably caused by upstream breakages that are not fixed yet:


ci.pytorch.org: 1 failed


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker.

See how this bot performed.

This comment has been revised 23 times.

@malfet malfet force-pushed the malfet/skip-if-no-fbgemm-take-2 branch 3 times, most recently from a959e77 to 49ae658 Compare May 7, 2020 05:11
@malfet malfet force-pushed the malfet/skip-if-no-fbgemm-take-2 branch from 49ae658 to 0ebf0f6 Compare May 7, 2020 06:19
Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@malfet is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@malfet malfet deleted the malfet/skip-if-no-fbgemm-take-2 branch May 7, 2020 19:04
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@malfet merged this pull request in 2b41b9b.

@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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@supriyar can you share a bit more details on your build config?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about that, here is the fix: #38432

laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary: Pull Request resolved: pytorch#37894

Differential Revision: D21449993

Pulled By: malfet

fbshipit-source-id: d9d355d360384cbb158f62b40dc885527f22ee05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants