takuya-takeuchi / OpenPoseDotNet

OpenPose wrapper written in C++ and C# for Windows
MIT License
66 stars 25 forks source link

CUDA 11 Support #27

Closed tgd-git closed 2 years ago

tgd-git commented 2 years ago

Hi, thanks for this great lib! Are you planning to upgrade to CUDA 11 support?

takuya-takeuchi commented 2 years ago

@tgd-git I think cuda 11 could work but I have not ever tried because I have no Ampere GPU. And we must check whether openpose repo does support cuda 11 or not.

tgd-git commented 2 years ago

Seems openpose already supports ver 11: https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation/1_prerequisites.md

I have an idle machine with RTX 3080. If you want you could use it remotely, if that makes sense for developing?

takuya-takeuchi commented 2 years ago

I tried build with CUDA 11.3 for current openpose (1.6.0 3d057691b219dddf264c6e412a4560ac8a12dedb). It looks like to work fine. You can specify cuda 11 version like

pwsh Build.ps1 Release cuda 64 desktop 2019 113

Before do that, you must pull latest develop branch.

tgd-git commented 2 years ago

nice! can test monday morning, will report back.

tgd-git commented 2 years ago

So far i can not get it to run on RTX 3080 Ti. The build process is successfull but starting an example (Try Tutorial) fails. The problem is, it just hangs at:

Starting OpenPose demo...
Configuring OpenPose...
Starting thread(s)...
Auto-detecting all available GPUs... Detected 1 GPU(s), using 1 of them starting at GPU 0.

I tried with CUDA 11.1 first. Then deinstalled everything and tried CUDA 11.3 with "cudnn-11.3-windows-x64-v8.2.1.32". Each time from freshly cloned dev branch. Tried VS 2019 and 2017 as Release. Everytime it hangs at the same place :( Do you have any idea?

Edit: My last try was now CUDA 11.4 (cuda_11.4.1_471.41_win10.exe) with the included driver (471.41) and with "cudnn-11.4-windows-x64-v8.2.4.15". Unfortunately same outcome :(

takuya-takeuchi commented 2 years ago

perhaps, cmakelusts.txt of openpose has any trick to support build for ampere architecture. in the other words, we have to pull llatest code of openpose.

tgd-git commented 2 years ago

That worked! I checked out the v.1.7.0 commit of openpose. The symlink script fails though with several files so i have copied the dependencies manually and started the example successfully.

One minor issue i had to fix in order to build against CUDA 11.4 was the options in BuildUtils.ps1 You added CUDA options up to 11.4 in Build.ps1 but in BuildUtils.ps1 it was only up to 11.3

takuya-takeuchi commented 2 years ago

ok, I understand and will update branch to support ampere board.

takuya-takeuchi commented 2 years ago

@tgd-git I updated develop to support openpose 1.7.0 and CUDA 11.6. And improved symlink script. Please have a try.

Thanks a lot.

tgd-git commented 2 years ago

Hey, just tried the build and Try Tutorial Everything went fine and the first example runs well. I did not try other examples though. Built on RTX 3080Ti with CUDA 11.4