Skip to content
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

CUDA Version: 12.0 #101

Open
Ishihara-Masabumi opened this issue Jul 23, 2023 · 3 comments
Open

CUDA Version: 12.0 #101

Ishihara-Masabumi opened this issue Jul 23, 2023 · 3 comments
Assignees
Labels
nvidiaproblems NVIDIA/CUDA problems with host system tensorflow problems Problems caused by the tensorflow framework

Comments

@Ishihara-Masabumi
Copy link

My PC has GPU of which CUDA Version is 12.0.
But it seems not to be used.
Please tell me how to use CUDA Version: 12.0.

@Ishihara-Masabumi
Copy link
Author

The next command generated the following image, which is saying the frame rage is 0.46
/MocapNET2LiveWebcamDemo --from shuffle.webm --openpose --frames 375

Screenshot from 2023-07-24 05-50-15

@AmmarkoV AmmarkoV self-assigned this Jul 25, 2023
@AmmarkoV AmmarkoV added the nvidiaproblems NVIDIA/CUDA problems with host system label Jul 25, 2023
@AmmarkoV
Copy link
Collaborator

This is a common problem with #105 which will be answered here

@AmmarkoV AmmarkoV added the tensorflow problems Problems caused by the tensorflow framework label Jul 25, 2023
@AmmarkoV
Copy link
Collaborator

AmmarkoV commented Jul 25, 2023

MocapNET needs a version of the libtensorflow2.x C library. The version of tensorflow defines what version of CUDA is compatible or not, MocapNET does not directly need or use any CUDA version.

What needs to be done for CUDA/GPU support thus it to replace the folder dependencies/libtensorflow with a good working tensorflow version/build that includes the correct CUDA version support. If GPU support is malfunctioning/not present MocapNET will fall back to CPU execution, which has the side effect that the 2D joint estimator will run much slower. This is the reason for the very low framerate on the 2D joint estimation you observed.
By default the 2D joint estimator runs on the GPU and the 3D estimation on the CPU. If you dont use --openpose and use --forth as a commandline argument you can use a much lighter 2D joint estimator that runs fine on CPU only builds albeit at lower accuracy.

To the best of my knowledge CUDA 12 is not supported by tensorflow AT ALL at the moment as seen from their official list here :
https://www.tensorflow.org/install/source#gpu

screen-2023-07-25-13-44-11

As you might imagine I am not a Google or NVIDIA employee so unfortunately I cannot do a lot about their version compatibility etc.

The best that can be done seems to be CUDA 11.8 with Tensorflow 2.13 .
Please understand that this is a problem at the level of Google/NVIDIA and not mine / MocapNET's fault

Now the latest C library for Tensorflow 2 that can be downloaded pre-compiled from here :
https://www.tensorflow.org/install/lang_c
seems to be 2.11 which means CUDA 11.2
If you wish to use this instead of the default please change the initialize.sh script to point to your desired version

Now to make things work on your CUDA 12 machine
I think this can be done in three ways :

  1. Compile tensorflow from source from its github repository.
    I provide a script that automates some of the steps however building tensorflow is very hard since it uses the bazel system and has a ton of quirks ( e.g. specific versions of bazel work with specific versions of tensorflow which work with specific versions of CUDA etc. ) There is an excellent talk called Making Package Maintainers Cry that describes these problems.
  2. Wait for an official release of a future version of Tensorflow that will be compatible with CUDA 12
  3. Maybe install docker with NVIDIA support and use the docker script provided to make a docker container with virtualized lower "versions" of CUDA that on the backend on the host system uses CUDA 12

Once again I am sorry for the inconvenience but if Google and NVIDIA with their huge budgets can't fix their compatibility issues I sure can't :) further more unfortunately my development PC has a really old GPU (GTX1050) at the moment, so I am not able to reproduce an environment with CUDA 12 to try and help fixing this myself!

screen-2023-07-25-13-50-49

Looking forward to your comments and further questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nvidiaproblems NVIDIA/CUDA problems with host system tensorflow problems Problems caused by the tensorflow framework
Projects
None yet
Development

No branches or pull requests

2 participants