shidong-ai / DNNMark

Benchmarks of Deep Neural Networks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues with CMakeLists.txt when NVCC and HCC installed

mattsinc opened this issue · comments

I have a computer that has both NVCC and HCC installed on it, but uses an AMD GPU to run applications on. When I try to run setup.sh, it takes the CUDA path because CUDA_FOUND is true (and the if/else checks CUDA_FOUND before HCC_FOUND). This is a problem because it subsequently does not find any NVIDIA GPUs on my machine, and it never tries to install the AMD version subsequently.

For me, the fix was to change "if (CUDA_FOUND)" to "if(CUDA_FOUND AND NOT(HCC_FOUND))." I'm not sure if you all would want a more robust solution about what to do in general though. I'm happy to generate a pull request for this fix if that's easiest.

Matt

Hi Matt @mattsinc ,

That's indeed a problem. Thank you very much for finding it. I think that a more general fix should be in place. Your fix seems to be only effective in your situation but won't work if someone's machine has Nvidia GPU but also installed an HCC and somehow accidentally configure the path.
So I made a fix that should work in both ways. Could you try the latest code on develop branch and let me know if the problem has been fixed?

Shi

I thought I'd already responded to this, sorry. Yes, this works and looks more general purpose. Thanks!

Matt