vision
vision copied to clipboard
Update usages of torch.library APIs
We deprecated impl_abstract. This PR replaces it with the new API (register_fake). register_fake also (sometimes) requires a set_python_module
in C++, so I add that as well.
Test Plan:
- existing tests
:link: Helpful Links
:test_tube: See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/8384
- :page_facing_up: Preview Python docs built from this PR
Note: Links to docs will display an error until the docs builds have been completed.
:x: 2 New Failures
As of commit 4520bd43d188048382f5ef2c698e3d784745468f with merge base e1f1fbe418b410a5a049b3d3e92a202776ff03a9 ():
NEW FAILURES - The following jobs have failed:
-
Tests / unittests-linux (3.9, linux.12xlarge, cpu) / linux-job (gh)
test/test_ops.py::TestRoIAlign::test_autocast_cpu[rois_dtype1-x_dtype1-False-True]
-
Tests / unittests-windows (3.9, windows.4xlarge, cpu) / windows-job (gh)
The process 'C:\Program Files\Git\cmd\git.exe' failed with exit code 128
This comment was automatically generated by Dr. CI and updates every 15 minutes.
hello,when i install vision by source code,i got this error:
/home/gai_test/wuyang/vision/torchvision/csrc/ops/nms.cpp:22:5: error: ‘class torch::Library’ has no member named ‘set_python_module’
22 | m.set_python_module("torchvision._meta_registrations");
| ^~~~~~~~~~~~~~~~~
error: command '/usr/bin/gcc' failed with exit code 1
is there any solutions? thank you!
hello,when i install vision by source code,i got this error:
/home/gai_test/wuyang/vision/torchvision/csrc/ops/nms.cpp:22:5: error: ‘class torch::Library’ has no member named ‘set_python_module’ 22 | m.set_python_module("torchvision._meta_registrations"); | ^~~~~~~~~~~~~~~~~ error: command '/usr/bin/gcc' failed with exit code 1
is there any solutions? thank you!
It seems like the versions are not matching. You can check the corresponding versions of Torch and TorchVision on the official website, and then switch TorchVision’s source code to the appropriate version. INSTALLING PREVIOUS VERSIONS OF PYTORCH
hello,when i install vision by source code,i got this error:
/home/gai_test/wuyang/vision/torchvision/csrc/ops/nms.cpp:22:5: error: ‘class torch::Library’ has no member named ‘set_python_module’ 22 | m.set_python_module("torchvision._meta_registrations"); | ^~~~~~~~~~~~~~~~~ error: command '/usr/bin/gcc' failed with exit code 1
is there any solutions? thank you!
It seems like the versions are not matching. You can check the corresponding versions of Torch and TorchVision on the official website, and then switch TorchVision’s source code to the appropriate version. INSTALLING PREVIOUS VERSIONS OF PYTORCH
I got the same problem, while I'm using torch==2.4.0 torchvision==0.19.0 on jetson(arch). They are matched.But I got error:
/vision-0.19.0/torchvision/csrc/ops/nms.cpp:22:5: error: ‘class torch::Library’ has no member named ‘set_python_module’