-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Register get_cpu_capability for jit #100723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/100723
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit 19d77cb: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
test/test_torch.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please let me know where to put this test if it is inappropriate to put it here
albanD
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that TorchScript is not really maintained anymore and we recommend users stop using it.
I'm happy to accept this one as it is pretty benign.
Context: In torchvision we ensure that functional ops are torchsciptable. Recently exposed `torch.backends.cpu.get_cpu_capability()` in pytorch#100164 is failing in torchvision CI ``` RuntimeError: Python builtin <built-in function _get_cpu_capability> is currently not supported in Torchscript: File "/usr/local/lib/python3.10/dist-packages/torch/backends/cpu/__init__.py", line 17 - "AVX512" """ return torch._C._get_cpu_capability() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE ``` Ref: pytorch/vision#7557 In this PR, `torch._C._get_cpu_capability()` is explicitly registered for JIT and tested.
98bd69e to
19d77cb
Compare
Yes, we know that but we keep it in torchvision due to BC |
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Description:
Context: In torchvision we ensure that functional ops are torchscriptable. Recently exposed
torch.backends.cpu.get_cpu_capability()in #100164 is failing in torchvision CIRef: pytorch/vision#7557
In this PR,
torch._C._get_cpu_capability()is explicitly registered for JIT and tested.cc @NicolasHug