vision icon indicating copy to clipboard operation
vision copied to clipboard

Update usages of torch.library APIs

Open zou3519 opened this issue 10 months ago • 1 comments

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

zou3519 avatar Apr 18 '24 18:04 zou3519

:link: Helpful Links

:test_tube: See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/8384

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 (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

pytorch-bot[bot] avatar Apr 18 '24 18:04 pytorch-bot[bot]

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!

zbt78 avatar Jun 27 '24 10:06 zbt78

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

jielyu avatar Jul 05 '24 16:07 jielyu

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’

humphreyde avatar Sep 20 '24 06:09 humphreyde