Comments (4)
I still did not solve TensorRT problem ("TF-TRT Warning: Could not find TensorRT")
WSL2, Ubuntu 22.04, RTX 3090, Python 3.11, TensorFlow 2.15.1
(I installed TensorFlow as pip install tensorflow[and-cuda]==2.15.1
)
Once I execute
python3 -c "import tensorflow.compiler as tf_cc; \
print(tf_cc.tf2tensorrt._pywrap_py_utils.get_linked_tensorrt_version())"
I get the following error
2024-05-28 11:29:40.984287: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-05-28 11:29:40.984330: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-05-28 11:29:40.984879: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-05-28 11:29:40.988008: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-05-28 11:29:41.499909: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
(8, 6, 1)
So, obviously, I need 8.6.1 version of TensorRT and I downloaded "TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-12.0.tar.gz"
After extract it, moved folder to "~/local/opt/TensorRT-8.6.1.6"
For example,
(tf_215_py_311_wsl) enhorse@DESKTOP-5950X:~/local/opt/TensorRT-8.6.1.6$ ls
bin data doc graphsurgeon include lib onnx_graphsurgeon python samples targets uff
Following Nvidia's installation instruction (https://docs.nvidia.com/deeplearning/tensorrt/install-guide/index.html#installing-tar)
I did
python3 -m pip install tensorrt-8.6.1-cp311-none-linux_x86_64.whl
python3 -m pip install tensorrt_lean-8.6.1-cp311-none-linux_x86_64.whl
python3 -m pip install tensorrt_dispatch-8.6.1-cp311-none-linux_x86_64.whl
python3 -m pip install onnx_graphsurgeon-0.3.12-py2.py3-none-any.whl
I added followings after open sudo nano ~/.bashrc
export LD_LIBRARY_PATH=/home/enhorse/local/opt/TensorRT-8.6.1.6/lib:$LD_LIBRARY_PATH
export TensorRT_ROOT=/home/enhorse/local/opt/TensorRT-8.6.1.6
When I execute the commend
strace -e open,openat python -c "import tensorflow as tf" 2>&1 | grep "libnvinfer\|TF-TRT"
I got as follows:
openat(AT_FDCWD, "/home/enhorse/local/opt/TensorRT-8.6.1.6/lib/libnvinfer.so.8.6.1", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/home/enhorse/local/opt/TensorRT-8.6.1.6/lib/libnvinfer_plugin.so.8.6.1", O_RDONLY|O_CLOEXEC) = 3
2024-05-28 11:41:21.209619: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
I still have no idea what I can do more. Is there something wrong in my installation?
from tensorflow.
@MohanKrishnaGR The standard approach of installing TensorRT directly on your Windows host might not work for WSL 2. Instead, you'll need to install it within the WSL 2 environment itself. Please make sure to follow these instructions. Within your WSL 2 environment, please print the value of LD_LIBRARY_PATH to confirm it includes the TensorRT directory and let us know?
Thank you!
from tensorflow.
@MohanKrishnaGR The library paths mentioned (/home/enhorse/local/opt/TensorRT-8.6.1.6/lib) might be incorrect or not set properly in the environment variables.
Kindly verify that and let us know?
Thank you!
from tensorflow.
Thanks, @sushreebarsa !
for
echo $LD_LIBRARY_PATH
I got:
/usr/local/cuda/lib64:/home/mohan/TensorRT-10.0.1.6/lib:
But still the TRT Warning: Could not find TensorRT exits:
(env) mohan@LAPTOP-INPO8147:~$ python3 -c "import tensorflow.compiler as tf_cc; \
print(tf_cc.tf2tensorrt._pywrap_py_utils.get_linked_tensorrt_version())"
2024-05-30 19:12:05.605386: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-05-30 19:12:05.646956: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-05-30 19:12:05.647012: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-05-30 19:12:05.647739: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-05-30 19:12:05.654095: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-05-30 19:12:06.221625: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
(8, 6, 1)
from tensorflow.
Related Issues (20)
- Efficientdet models do not work on hexagon delegate
- Tensorflow lite conversion fails for keras model in TensorFlow version: 2.16.1 HOT 1
- Unable to build TensorFlowLite GPU Delegate for Android HOT 1
- Build from source C doesn't produce .tar.gz archive HOT 1
- Aborted (core dumped) in `tf.raw_ops.ResourceSparseApplyMomentum` HOT 3
- Aborted (core dumped) in `tf.raw_ops.ResourceApplyFtrl/tf.raw_ops.ResourceApplyFtrlV2/tf.raw_ops.ResourceSparseApplyFtrl/tf.raw_ops.ResourceSparseApplyFtrlV2`
- Aborted (core dumped) in `tf.raw_ops.ResourceApplyKerasMomentum/tf.raw_ops.ResourceSparseApplyKerasMomentum` HOT 1
- Aborted (core dumped) in `tf.raw_ops.ResourceApplyPowerSign` HOT 3
- Aborted (core dumped) in `tf.raw_ops.ResourceApplyRMSProp/tf.raw_ops.ResourceSparseApplyRMSProp` HOT 1
- Aborted (core dumped) in `tf.raw_ops.ResourceSparseApplyAdadelta/tf.raw_ops.ResourceApplyAdadelta` HOT 1
- Aborted (core dumped) in `tf.raw_ops.ResourceSparseApplyAdagrad/tf.raw_ops.ResourceSparseApplyAdagradDA/tf.raw_ops.ResourceSparseApplyAdagradV2` HOT 1
- Aborted (core dumped) in `tf.raw_ops.ResourceApplyAdagrad/tf.raw_ops.ResourceApplyAdagradDA/tf.raw_ops.ResourceApplyAdagradV2`
- Aborted (core dumped) in `tf.raw_ops.ResourceApplyCenteredRMSProp/tf.raw_ops.ResourceSparseApplyCenteredRMSProp` HOT 1
- Aborted (core dumped) in `tf.raw_ops.ResourceSparseApplyProximalAdagrad` HOT 3
- Aborted (core dumped) in `tf.raw_ops.ResourceApplyAdaMax/tf.raw_ops.ResourceApplyAdam/tf.raw_ops.ResourceApplyAdamWithAmsgrad`
- Aborted (core dumped) in `tf.raw_ops.ResourceApplyAddSign` HOT 3
- Failed to build TF Lite benchmark tool on Windows
- The signatures in SavedModel do not contain serving_default when a subclass of the keras model has multiple inputs HOT 2
- MobileNetV3 quantization HOT 5
- Crash in `tf.raw_ops.ResizeNearestNeighbor/ResizeNearestNeighborGrad/ResizeArea/ResizeBicubic/ResizeBilinear` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorflow.