TensorRT-LLM icon indicating copy to clipboard operation
TensorRT-LLM copied to clipboard

[Installation]: tensorrt_llm ImportError: tensorrt_llm/libs/libth_common.so: undefined symbol

Open haohaibo opened this issue 1 year ago • 2 comments

System Info

System Information:

  • OS: Ubuntu 22.04.3 LTS
  • Python version: Python 3.10.12
  • CUDA version: Cuda compilation tools, release 12.8, V12.8.61
  • GPU model(s): H20
  • Driver version: 550.54.15
  • TensorRT version: 10.11.0.33
  • PyTorch version: 2.7.1+cu128
  • TensorRT-LLM version: 1.1.0rc3

Detailed output:

# cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy


# nvidia-smi
Wed Sep 10 11:05:06 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.54.15              Driver Version: 550.54.15      CUDA Version: 12.8     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA H20                     On  |   00000000:08:00.0 Off |                    0 |
| N/A   37C    P0            116W /  500W |    7441MiB /  97871MiB |      0%      Default |
|                                         |                        |             Disabled |
+-----------------------------------------+------------------------+----------------------+
|   1  NVIDIA H20                     On  |   00000000:7E:00.0 Off |                    0 |
| N/A   30C    P0             73W /  500W |    1747MiB /  97871MiB |      0%      Default |
|                                         |                        |             Disabled |
+-----------------------------------------+------------------------+----------------------+


# nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2025 NVIDIA Corporation
Built on Wed_Jan_15_19:20:09_PST_2025
Cuda compilation tools, release 12.8, V12.8.61
Build cuda_12.8.r12.8/compiler.35404655_0

# python --version
Python 3.10.12

# pip list | grep -E "(tensorrt|torch|cuda)"
cuda-bindings                     12.9.2
cuda-pathfinder                   1.2.2
cuda-python                       12.9.2
nvidia-cuda-cupti-cu12            12.8.57
nvidia-cuda-nvrtc-cu12            12.8.61
nvidia-cuda-runtime-cu12          12.8.57
tensorrt                          10.11.0.33
tensorrt_cu12                     10.11.0.33
tensorrt_cu12_bindings            10.11.0.33
tensorrt_cu12_libs                10.11.0.33
tensorrt_llm                      1.1.0rc3
torch                             2.7.1+cu128
torchaudio                        2.7.1+cu128
torchprofile                      0.0.4
torchvision                       0.22.1

# pip show tensorrt_llm
Name: tensorrt_llm
Version: 1.1.0rc3
Summary: TensorRT-LLM: A TensorRT Toolbox for Large Language Models
Home-page: https://github.com/NVIDIA/TensorRT-LLM
Author: NVIDIA Corporation
Author-email: 
License: Apache License 2.0
Location: /usr/local/lib/python3.10/dist-packages
Requires: accelerate, aenum, backoff, blake3, blobfile, build, click, click_option_group, colored, cuda-python, datasets, diffusers, einops, etcd3, evaluate, fastapi, flashinfer-python, h5py, jsonschema, lark, llguidance, matplotlib, meson, mpi4py, mpmath, ninja, numpy, nvidia-cuda-nvrtc-cu12, nvidia-ml-py, nvidia-modelopt, nvidia-nccl-cu12, nvtx, omegaconf, onnx, onnx_graphsurgeon, openai, openai-harmony, opencv-python-headless, optimum, ordered-set, pandas, peft, pillow, polygraphy, prometheus_client, prometheus_fastapi_instrumentator, protobuf, psutil, pulp, pydantic, pydantic-settings, pynvml, pyzmq, sentencepiece, setuptools, soundfile, StrEnum, tensorrt, tiktoken, torch, torchvision, transformers, triton, uvicorn, wheel, xgrammar
Required-by: 

How you are installing TensorRT-LLM

# Installation command or method
pip install --extra-index-url https://pypi.nvidia.com/  tensorrt-llm==1.1.0rc3

Error msg

# python -c "import tensorrt_llm; print(tensorrt_llm.__version__)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/__init__.py", line 36, in <module>
    import tensorrt_llm._torch.models as torch_models
  File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/_torch/__init__.py", line 1, in <module>
    from .llm import LLM
  File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/_torch/llm.py", line 1, in <module>
    from tensorrt_llm.llmapi.llm import _TorchLLM
  File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/llmapi/__init__.py", line 1, in <module>
    from ..disaggregated_params import DisaggregatedParams
  File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/disaggregated_params.py", line 9, in <module>
    from tensorrt_llm.bindings import executor as tllme
ImportError: /usr/local/lib/python3.10/dist-packages/tensorrt_llm/libs/libth_common.so: undefined symbol: _ZN12tensorrt_llm7kernels19fp8_blockscale_gemm30CutlassFp8BlockScaleGemmRunnerI13__nv_bfloat16S3_S3_E4gemmEPvPKvS7_iiiP11CUstream_stPKfSB_
~# c++filt _ZN12tensorrt_llm7kernels19fp8_blockscale_gemm30CutlassFp8BlockScaleGemmRunnerI13__nv_bfloat16S3_S3_E4gemmEPvPKvS7_iiiP11CUstream_stPKfSB_
tensorrt_llm::kernels::fp8_blockscale_gemm::CutlassFp8BlockScaleGemmRunner<__nv_bfloat16, __nv_bfloat16, __nv_bfloat16>::gemm(void*, void const*, void const*, int, int, int, CUstream_st*, float const*, float const*)

Before submitting a new issue...

haohaibo avatar Sep 10 '25 03:09 haohaibo

We cannot reproduce the issue. The symbol in question can be found in libtensorrt_llm.so. Could you try reinstall the tensorrt_llm package?

/usr/local/lib/python3.10/dist-packages/tensorrt_llm/libs# nm -D libtensorrt_llm.so | grep "_ZN12tensorrt_llm7kernels19fp8_blockscale_gemm30CutlassFp8BlockScaleGemmRunnerI13__nv_bfloat16S3_S3_E4gemmEPvPKvS7_iiiP11CUstream_stPKfSB_"
0000000002f14500 W _ZN12tensorrt_llm7kernels19fp8_blockscale_gemm30CutlassFp8BlockScaleGemmRunnerI13__nv_bfloat16S3_S3_E4gemmEPvPKvS7_iiiP11CUstream_stPKfSB_

tongyuantongyu avatar Sep 10 '25 09:09 tongyuantongyu

@tongyuantongyu I've identified the root cause of the problem: a pre-existing installation of Triton Server included its own version of the tensorrt_llm library. This created a version conflict and led to an incorrect library being loaded at runtime.

haohaibo avatar Sep 11 '25 11:09 haohaibo