Yutong-gannis/ETSAuto

The engine plan file has a layer that utilizes loop API or boolean tensors, but the current platform does not support these layers due to mismatch of libnvrtc version.

Dameng23333 opened this issue · 18 comments

[01/24/2023-00:50:48] [TRT] [E] 9: The engine plan file has a layer that utilizes loop API or boolean tensors, but the current platform does not support these layers due to mismatch of libnvrtc version.
[01/24/2023-00:50:48] [TRT] [E] 1: [engine.cpp::nvinfer1::rt::Engine::deserialize::762] Error Code 1: Serialization (Serialization assertion postDeserializationCheck() failed.Post deserialization check failure)
[01/24/2023-00:50:48] [TRT] [E] 4: [runtime.cpp::nvinfer1::Runtime::deserializeCudaEngine::50] Error Code 4: Internal Error (Engine deserialization failed.)
Traceback (most recent call last):
File "D:\autodrive\script\main.py", line 54, in
clrnet = CLRNet("D:/autodrive/Perception/LaneDetection/weights/llamas_dla34.engine")
File "D:\autodrive/Perception\LaneDetection\clrnet_trt.py", line 75, in init
self.context = self.engine.create_execution_context()
AttributeError: 'NoneType' object has no attribute 'create_execution_context'

TensorRT 版本 8.4.3.1,CUDA 版本 10.2
请教大佬们如何解决此问题。万分感激。

你看我昨晚的求助,里面有办法。不能直接用大佬的engine文件,要自己转换。

是自己转换的engine文件

@Dameng23333 那不应该啊,我按你升级8522转的也识别不到。是用8424转的。然后就成功了。

8522转是同样报错吗

@Dameng23333 不是onnx_graphsurgeon的版本问题吗

已经更新到最新版,转换过程中没有任何报错

@Dameng23333 `but the current platform does not support these layers due to mismatch of libnvrtc version'是不是显卡不支持

1050ti不可以吗?还是我显卡驱动的问题?

@Dameng23333 我在网上搜了一下,还真没找到这个问题,我去问问

ywjno commented

命令行输入 nvcc -V 看看cuda在Path里面配置的是哪个版本

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:32:27_Pacific_Daylight_Time_2019
Cuda compilation tools, release 10.2, V10.2.89

ywjno commented

输入 nvidia-smi

Wed Jan 25 20:07:57 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 528.02 Driver Version: 528.02 CUDA Version: 12.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... WDDM | 00000000:01:00.0 On | N/A |
|100% 46C P0 N/A / 100W | 2393MiB / 4096MiB | 55% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+

ywjno commented

贴一下 pip list

Package Version Editable project location


absl-py 1.4.0
addict 2.4.0
altair 4.2.0
appdirs 1.4.4
astor 0.8.1
astunparse 1.6.3
attrdict 2.0.1
attrs 22.2.0
Babel 2.11.0
bce-python-sdk 0.8.74
beautifulsoup4 4.11.1
blinker 1.5
cachetools 5.2.1
certifi 2022.12.7
charset-normalizer 3.0.1
click 8.1.3
colorama 0.4.6
coloredlogs 15.0.1
comtypes 1.1.14
contourpy 1.0.7
cssselect 1.2.0
cssutils 2.6.0
cycler 0.11.0
Cython 0.29.33
cython-bbox 0.1.3
decorator 5.1.1
dill 0.3.6
dxcam 0.0.5
entrypoints 0.4
et-xmlfile 1.1.0
fire 0.5.0
Flask 2.2.2
flask-babel 3.0.0
flatbuffers 23.1.4
fonttools 4.38.0
future 0.18.3
gast 0.4.0
gitdb 4.0.10
GitPython 3.1.30
google-auth 2.16.0
google-auth-oauthlib 0.4.6
google-pasta 0.2.0
graphsurgeon 0.4.6
grpcio 1.51.1
h5py 3.7.0
humanfriendly 10.0
idna 3.4
imageio 2.24.0
imgaug 0.4.0
importlib-metadata 6.0.0
itsdangerous 2.1.2
Jinja2 3.1.2
joblib 1.2.0
jsonschema 4.17.3
keras 2.11.0
kiwisolver 1.4.4
lap 0.4.0
libclang 15.0.6.1
lmdb 1.4.0
logitech-steering-wheel 1.0
lxml 4.9.2
Mako 1.2.4
Markdown 3.4.1
markdown-it-py 2.1.0
MarkupSafe 2.1.1
matplotlib 3.6.3
mdurl 0.1.2
mmcls 0.25.0 c:\users\azhen\downloads\mmclassification
mmcv 1.7.1
mpmath 1.2.1
mss 7.0.1
multiprocess 0.70.14
networkx 3.0
numpy 1.22.0
oauthlib 3.2.2
onnx 1.13.0
onnx-graphsurgeon 0.3.12
onnxruntime 1.13.1
opencv-contrib-python 4.7.0.68
opencv-python 4.7.0.68
openpyxl 3.0.10
opt-einsum 3.3.0
packaging 23.0
paddle-bfloat 0.1.7
paddleocr 2.6.1.2
paddlepaddle 2.4.1
paddlepaddle-gpu 2.4.1.post112
pandas 1.5.2
pdf2docx 0.5.6
Pillow 9.4.0
platformdirs 2.6.2
playsound 1.2.2
premailer 3.10.0
protobuf 3.20.3
pyarrow 10.0.1
pyasn1 0.4.8
pyasn1-modules 0.2.8
pyclipper 1.3.0.post4
pycocotools 2.0
pycryptodome 3.16.0
pycuda 2022.1+cuda116
pydeck 0.8.0
pygame 2.1.2
PyGetWindow 0.0.9
Pygments 2.14.0
Pympler 1.0.1
PyMuPDF 1.20.2
pynput 1.7.6
pyparsing 3.0.9
pyreadline3 3.4.1
PyRect 0.2.0
pyrsistent 0.19.3
python-dateutil 2.8.2
python-docx 0.8.11
pytools 2022.1.14
pytz 2022.7.1
pytz-deprecation-shim 0.1.0.post0
pyvjoy 1.0.1
PyWavelets 1.4.1
pywin32 305
PyYAML 6.0
rapidfuzz 2.13.7
regex 2022.10.31
requests 2.28.2
requests-oauthlib 1.3.1
rich 13.2.0
rsa 4.9
scikit-fuzzy 0.4.2
scikit-image 0.19.3
scikit-learn 1.2.0
scipy 1.10.0
semver 2.13.0
shapely 2.0.0
six 1.16.0
sklearn 0.0.post1
smmap 5.0.0
soupsieve 2.3.2.post1
streamlit 1.17.0
sv-ttk 2.4
sympy 1.11.1
tensorboard 2.11.2
tensorboard-data-server 0.6.1
tensorboard-plugin-wit 1.8.1
tensorflow 2.11.0
tensorflow-estimator 2.11.0
tensorflow-intel 2.11.0
tensorflow-io-gcs-filesystem 0.30.0
tensorrt 8.4.2.4
termcolor 2.2.0
tflite 2.10.0
threadpoolctl 3.1.0
tifffile 2022.10.10
tk 0.1.0
toml 0.10.2
toolz 0.12.0
torch 1.13.1+cu117
torchvision 0.1.6
tornado 6.2
tqdm 4.64.1
transitions 0.9.0
ttkwidgets 0.13.0
typing_extensions 4.4.0
tzdata 2022.7
tzlocal 4.2
urllib3 1.26.14
validators 0.20.0
vgamepad 0.0.8
visualdl 2.4.2
watchdog 2.2.1
Werkzeug 2.2.2
wheel 0.38.4
wrapt 1.14.1
yapf 0.32.0
zipp 3.11.0

ywjno commented

感觉pip的包有点不太对劲,比如 pycuda 2022.1+cuda116,我本地的是 pycuda 2022.2.2。其他的没仔细看 torch 1.13.1+cu117 这都版本也跟cuda的版本不一样啊

ywjno commented

要是觉得重新安装依赖包会弄坏之前的环境推荐使用 miniconda。(license的原因不推荐用anaconda)

感觉pip的包有点不太对劲,比如 pycuda 2022.1+cuda116,我本地的是 pycuda 2022.2.2。其他的没仔细看 torch 1.13.1+cu117 这都版本也跟cuda的版本不一样啊

可不可以贴一下你的 各个所需依赖版本呀? 我的跟题主的差不多, 因为pycuda安装不上, 只能从网上下载下来然后本地安装.

目前我的环境应该是部署好了, 但是, 我不知道是对还是不对, 已经可以侦测到, 不过不知到是还要设置vjoy?