NVIDIA-AI-IOT / torch2trt

An easy to use PyTorch to TensorRT converter
MIT License
4.6k stars 675 forks source link

Is it possible to get a description of all required libraries with their versions here? #312

Closed GarrettLee closed 4 years ago

GarrettLee commented 4 years ago

Hi,

I am compiling torch2trt with c++ extension. I can compile torch2trt with no error. However, there is always undefined symbols when I use: ldd -r torch2trt/libtorch2trt.so

linux-vdso.so.1 (0x00007ffecb3a9000)
    /usr/lib/x86_64-linux-gnu/libtcmalloc.so.4 (0x00007f531e271000)
    libc10.so => /usr/local/lib/python3.6/dist-packages/torch/lib/libc10.so (0x00007f531e020000)
    libc10_cuda.so => /usr/local/lib/python3.6/dist-packages/torch/lib/libc10_cuda.so (0x00007f531dded000)
    libcudart.so.10.1 => /usr/local/cuda-10.1/targets/x86_64-linux/lib/libcudart.so.10.1 (0x00007f531db71000)
    libprotobuf.so.22 => /usr/local/lib/libprotobuf.so.22 (0x00007f531d6d0000)
    libnvinfer.so.7 => /usr/lib/libnvinfer.so.7 (0x00007f530fa55000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f530f6cc000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f530f4b4000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f530f0c3000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f531e74e000)
    libunwind.so.8 => /usr/lib/x86_64-linux-gnu/libunwind.so.8 (0x00007f530eea8000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f530ec89000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f530e8eb000)
    libnuma.so.1 => /usr/lib/x86_64-linux-gnu/libnuma.so.1 (0x00007f530e6e0000)
    libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f530e4b1000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f530e2ad000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f530e0a5000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f530de88000)
    libcudnn.so.7 => /usr/lib/x86_64-linux-gnu/libcudnn.so.7 (0x00007f52f431b000)
    libcublas.so.10.0 => /usr/local/cuda-10.0/targets/x86_64-linux/lib/libcublas.so.10.0 (0x00007f52efd85000)
    libcudart.so.10.0 => /usr/local/cuda-10.0/targets/x86_64-linux/lib/libcudart.so.10.0 (0x00007f52efb0b000)
    libmyelin.so.1 => /usr/lib/libmyelin.so.1 (0x00007f52ef2fa000)
    libnvrtc.so.10.0 => /usr/local/cuda-10.0/targets/x86_64-linux/lib/libnvrtc.so.10.0 (0x00007f52edcde000)
    liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f52edab8000)
undefined symbol: _ZN3c1010Dispatcher17findSchemaOrThrowEPKcS2_ (torch2trt/libtorch2trt.so)
undefined symbol: _ZN2at6detail14defaultStridesEN3c108ArrayRefIlEE  (torch2trt/libtorch2trt.so)
undefined symbol: _ZN3c1010Dispatcher9singletonEv   (torch2trt/libtorch2trt.so)
undefined symbol: _ZN3c1010Dispatcher11reportErrorERKNS_13DispatchTableENS_11DispatchKeyE   (torch2trt/libtorch2trt.so)
undefined symbol: _ZN3c107IntType3getEv (torch2trt/libtorch2trt.so)
undefined symbol: _ZN2at13globalContextEv   (torch2trt/libtorch2trt.so)
undefined symbol: _ZN2at6detail11getHIPHooksEv  (torch2trt/libtorch2trt.so)
undefined symbol: _ZN2at6detail12getCUDAHooksEv (torch2trt/libtorch2trt.so)
undefined symbol: _ZN2at6detail20computeStorageNbytesEN3c108ArrayRefIlEES3_m    (torch2trt/libtorch2trt.so)

I guess it might be caused by mismatch of required libraries. Is it possible to get a description of all required library with their versions here? I think it should be great to put these in the README.

Thanks in advance!

SrivastavaKshitij commented 4 years ago

U can see the tested versions here https://github.com/NVIDIA-AI-IOT/torch2trt/pull/332#issuecomment-641675059

GarrettLee commented 4 years ago

U can see the tested versions here #332 (comment)

Thank you.