-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4.22 - Failed to load the native TensorFlow runtime. #51
Comments
Have you tried the cpu build first and can confirm it works? This would eliminate one potential problem area. Couple of thoughts:
|
Hi, Yep, I also tried the CPU build and it does not work. It gives the same error. I understand it has an embedded python setup, I was using an external one to make sure the machine was capable of running 1.12.0. Seems like it is failing to find the CUDA/cuDNN installation on the machine (The Anaconda install downloads and refs local nvidia binaries for tensorflow, and does not modify the PATH variables. (It downloads 9.0,9.1 and cuDNN7.6)) Explicitly which versions of CUDA and cuDNN should be used? As 9.0 has 4 patches, and cuDNN has multiple versions too. I have installed a new OS without Python and will try the CPU version again. |
did the following on a fresh install (W10 :18362.418)
Output log has the following warnings: ERROR:
WARNING:
|
Ok, So I have narrowed down the issue a little more. I am running a i7-965x CPU which does not have AVX Support. This explains why it fails to load TF in CPU mode. However, I am able to run it on my GPU in an environment setup in conda (CUDA9.0/cuDNN7.6.0). If I set up the same environment globally, The GPU plugin still fails to load the TF library. |
Hmm interesting. I can confirm the dependencies looks the same as I have when running 1.12. I would defer to issues like: tensorflow/tensorflow#19584 and maybe try some custom wheels: https://github.com/metral/tensorflow-wheels. Potentially look into your system environment variables to make sure the 9.0 is set to the cudapath (for gpu version). Also you can downgrade the tensorflow version to pre-avx for cpu (e.g. try 1.5) which can be adjusted here: https://github.com/getnamo/tensorflow-ue4/blob/master/Content/Scripts/upymodule.json If you do have an environment working however you can disable the embedded feature by changing: https://github.com/getnamo/UnrealEnginePython/blob/master/Source/UnrealEnginePython/UnrealEnginePython.Build.cs#L13 this should lookup your global python environment instead which should run if you know it runs externally. |
Hi, Thanks for the response. here are the results AVX-Enabled machine will run the CPU and GPU plugin. Non-AVX machine: CUDA9.0 patch 4 + cudnn-9.0-windows10-x64-v7 Installing TF1.5.0 CPU by modifying the config will initalise in the basic map and return the addition and subtraction functions. in the Mnist map, it gives some errors because it is calling funcs which dont exist in 1.5.0 Installing 1.12.0 cannot init CPU as expected, It also cannot initalise the GPU version, however it is possible to initalise the GPU version of 1.12.0 on a non-avx macchine |
Ok so, to confirm the machine can build TF. I installed it via Anaconda
Windows 10
Python 3.6.9
install tensorflow-gpu=1.12.0
will grab CUDA9.0/cuDNN AND CUDA9.1 as part of the prerequisite libraries.This works. Builds and trains models in VS.
Using the plugin, It grabs TF1.12.0 and the associated dependencies, But it will not run using the same CUDA/cuDNN configuration (I have tried9.0 with various versions of cuDNN) It gives a missing library error. I have the path variable pointing to cuDNN as explained on the installation guide.
full log:
Traceback (most recent call last): File "C:\Users\Administrator\Desktop\tensorflow-ue4-examples-master\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module> from tensorflow.python.pywrap_tensorflow_internal import * File "C:\Users\Administrator\Desktop\tensorflow-ue4-examples-master\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module> _pywrap_tensorflow_internal = swig_import_helper() File "C:\Users\Administrator\Desktop\tensorflow-ue4-examples-master\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "imp.py", line 243, in load_module File "imp.py", line 343, in load_dynamic ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed. Failed to load the native TensorFlow runtime. See https://www.tensorflow.org/install/errors for some common reasons and solutions. Include the entire stack trace above this error message when asking for help. Traceback (most recent call last): File "C:\Users\Administrator\Desktop\tensorflow-ue4-examples-master\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module> from tensorflow.python.pywrap_tensorflow_internal import * File "C:\Users\Administrator\Desktop\tensorflow-ue4-examples-master\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module> _pywrap_tensorflow_internal = swig_import_helper() File "C:\Users\Administrator\Desktop\tensorflow-ue4-examples-master\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "imp.py", line 243, in load_module File "imp.py", line 343, in load_dynamic ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\Administrator\Desktop\tensorflow-ue4-examples-master\Plugins\tensorflow-ue4\Content\Scripts\TensorFlowComponent.py", line 2, in <module> import tensorflow as tf File "C:\Users\Administrator\Desktop\tensorflow-ue4-examples-master\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow\__init__.py", line 24, in <module> from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "C:\Users\Administrator\Desktop\tensorflow-ue4-examples-master\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow\python\__init__.py", line 49, in <module> from tensorflow.python import pywrap_tensorflow File "C:\Users\Administrator\Desktop\tensorflow-ue4-examples-master\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module> raise ImportError(msg) ImportError: Traceback (most recent call last): File "C:\Users\Administrator\Desktop\tensorflow-ue4-examples-master\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module> from tensorflow.python.pywrap_tensorflow_internal import * File "C:\Users\Administrator\Desktop\tensorflow-ue4-examples-master\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module> _pywrap_tensorflow_internal = swig_import_helper() File "C:\Users\Administrator\Desktop\tensorflow-ue4-examples-master\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "imp.py", line 243, in load_module File "imp.py", line 343, in load_dynamic ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed. Failed to load the native TensorFlow runtime. See https://www.tensorflow.org/install/errors for some common reasons and solutions. Include the entire stack trace above this error message when asking for help.
The text was updated successfully, but these errors were encountered: