vision icon indicating copy to clipboard operation
vision copied to clipboard

error: ‘class torch::Library’ has no member named ‘set_python_module’

Open humphreyde opened this issue 1 year ago • 8 comments

🐛 Describe the bug

I was trying to install torchvision==0.19.0 from source. After download zip file, for command: python setup.py install, I got an error: error: ‘class torch::Library’ has no member named ‘set_python_module’

Versions

PyTorch version: 2.4.0a0+07cecf4168.nv24.05 Is debug build: False CUDA used to build PyTorch: 12.2 ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.4 LTS (aarch64) GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Clang version: Could not collect CMake version: version 3.22.1 Libc version: glibc-2.35

Python version: 3.10.14 (main, May 6 2024, 19:36:58) [GCC 11.2.0] (64-bit runtime) Python platform: Linux-5.15.136-tegra-aarch64-with-glibc2.35 Is CUDA available: True CUDA runtime version: 12.2.140 CUDA_MODULE_LOADING set to: LAZY GPU models and configuration: GPU 0: Orin (nvgpu) Nvidia driver version: N/A cuDNN version: Probably one of the following: /usr/lib/aarch64-linux-gnu/libcudnn.so.8.9.4 /usr/lib/aarch64-linux-gnu/libcudnn_adv_infer.so.8.9.4 /usr/lib/aarch64-linux-gnu/libcudnn_adv_train.so.8.9.4 /usr/lib/aarch64-linux-gnu/libcudnn_cnn_infer.so.8.9.4 /usr/lib/aarch64-linux-gnu/libcudnn_cnn_train.so.8.9.4 /usr/lib/aarch64-linux-gnu/libcudnn_ops_infer.so.8.9.4 /usr/lib/aarch64-linux-gnu/libcudnn_ops_train.so.8.9.4 HIP runtime version: N/A MIOpen runtime version: N/A Is XNNPACK available: True

CPU: Architecture: aarch64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 12 On-line CPU(s) list: 0-7 Off-line CPU(s) list: 8-11 Vendor ID: ARM Model name: Cortex-A78AE Model: 1 Thread(s) per core: 1 Core(s) per cluster: 4 Socket(s): - Cluster(s): 2 Stepping: r0p1 CPU max MHz: 2201.6001 CPU min MHz: 115.2000 BogoMIPS: 62.50 Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp uscat ilrcpc flagm paca pacg L1d cache: 512 KiB (8 instances) L1i cache: 512 KiB (8 instances) L2 cache: 2 MiB (8 instances) L3 cache: 4 MiB (2 instances) NUMA node(s): 1 NUMA node0 CPU(s): 0-7 Vulnerability Gather data sampling: Not affected Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Retbleed: Not affected Vulnerability Spec rstack overflow: Not affected Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Vulnerability Spectre v1: Mitigation; __user pointer sanitization Vulnerability Spectre v2: Mitigation; CSV2, but not BHB Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected

Versions of relevant libraries: [pip3] ament-flake8==0.12.11 [pip3] mypy-extensions==1.0.0 [pip3] numpy==1.26.4 [pip3] onnxruntime==1.19.0 [pip3] torch==2.4.0a0+07cecf4168.nv24.5 [conda] torch 2.4.0a0+07cecf4168.nv24.5 pypi_0 pypi

humphreyde avatar Sep 20 '24 07:09 humphreyde

Same error. Any leads on solving this?

yeshwanthv5 avatar Nov 11 '24 15:11 yeshwanthv5

Same error.

kimchioverfit avatar Nov 12 '24 02:11 kimchioverfit

same error

tangliming avatar Nov 26 '24 08:11 tangliming

same error

phmehta95 avatar Dec 23 '24 22:12 phmehta95

anyone solve it?

Un1Lee avatar Dec 24 '24 06:12 Un1Lee

I commented out the line:

m.set_python_module("torchvision._meta_registrations");

in torchvision/csrc/ops/nms.cpp and recompiled

phmehta95 avatar Dec 24 '24 15:12 phmehta95

I have the same PyTorch version: 2.4.0a0+07cecf4168.nv24.05

I changed torchvision to 0.18.0, then it worked. BTW, libjpeg should be installed first.

YSunLIN avatar Jan 03 '25 12:01 YSunLIN

same error

wsp1234 avatar Sep 19 '25 10:09 wsp1234