ofxTensorFlow2 icon indicating copy to clipboard operation
ofxTensorFlow2 copied to clipboard

Visual Studio install

Open Jonathhhan opened this issue 2 years ago • 5 comments

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 avatar Jun 13 '22 16:06 Jonathhhan

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

Jonathhhan avatar Jun 15 '22 23:06 Jonathhhan

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

  • Execute TYPE=gpu ./scripts/download_tensorflow.sh
  • to change [https://github.com/serizba/cppflow/pull/108/commits/6b119e72abbc26ff58591291c0fd7599e259a2ff]
  • rename ofxTensorFlow2\libs\tensorflow\lib\msys to ofxTensorFlow2\libs\tensorflow\lib\vs

paul-ferragut avatar Jun 18 '22 14:06 paul-ferragut

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

Jonathhhan avatar Jun 18 '22 18:06 Jonathhhan

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:

  • keep in mind that there are some general installation steps before the sections for the individual OS. This includes pulling cppflow and libtensorflow
  • the section is at the wrong spot. You put it in the middle of the MacOS installation :P
  • points 1-3 are only for GPU usage. We do not want to cover that topic but rather point to the fact that those are needed for fast inference. Maybe our README is not clear enough it that regard.
  • points 4-6 are or can be covered in the installation scripts.
  • point 7 is covered in the section below

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.

bytosaur avatar Jun 27 '22 14:06 bytosaur

@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)?

Jonathhhan avatar Jun 27 '22 16:06 Jonathhhan