zkmkarlsruhe / ofxTensorFlow2

TensorFlow 2 AI/ML library wrapper for openFrameworks
Other
109 stars 16 forks source link

Visual Studio install #20

Closed Jonathhhan closed 1 year ago

Jonathhhan commented 2 years ago

I added this to the readme:

### Windows / Visual Studio 2022

1. Install CUDA 11.7
2. Install CUDNN 8.4.1.50
3. Put the files from C:\Program Files\NVIDIA GPU Computing Toolkit\CUDNN\v8.4.1.50\bin and zlibwapi.dll from http://www.winimage.com/zLibDll/zlib123dllx64.zip into C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\bin
4. Put https://github.com/serizba/cppflow into ofxTensorFlow2\libs\cppflow
5. Put libtensorflow-gpu-windows-x86_64-2.8.0 from https://www.tensorflow.org/install/lang_c into ofxTensorFlow2\libs\tensorflow
6. Create the folder ofxTensorFlow2\libs\tensorflow\lib\vs and put the content from ofxTensorFlow2\libs\tensorflow\lib (2 files) there.
7. Run ofxTensorFlow2\scripts\download_example_models.sh

Installed it a second time to confirm that it works for me. Not sure if this is the right format, just wanted to share it because its working for me.

Jonathhhan commented 2 years ago

For using the GPU i also need to copy the nvvm folder C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\nvvm into the bin folder of the app (only in some cases). https://stackoverflow.com/questions/72499414/i-got-an-error-about-error-cant-find-libdevice-directory-cuda-dir-nvvm-libd

paul-ferragut commented 2 years ago

I managed to compile on Windows thanks to your instructions :) I needed a few more extra steps mentioned in the previous comments:

Jonathhhan commented 2 years ago

@paul-ferragut nice to hear. I added step 6 to the instructions.

bytosaur commented 2 years ago

hey there,

thank you very much for working on this. It s great that you managed to run this in Windows and using the GPU.

Here are my comments on the changes:

So in essence I think everything looks like it could be solved with two or three lines added to the installation script. I dont see a point where the windows installation is special, e.g. for mac you have to enable C++14.

Jonathhhan commented 2 years ago

@bytosaur yes, putting everything into the installation script would be much better. So maybe just a hint how to run ofxTensorFlow2 with GPU and Windows (basically the first three steps)?