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

CMake always wants to build for CUDA if it is at all present #77

Closed
VileLasagna opened this issue Mar 3, 2019 · 0 comments · Fixed by #78
Closed

CMake always wants to build for CUDA if it is at all present #77

VileLasagna opened this issue Mar 3, 2019 · 0 comments · Fixed by #78

Comments

@VileLasagna
Copy link
Contributor

What is the expected behavior

User should have control of whether they want to build for either platform, since you can't do both at once

What actually happens

You have no way to specify that the build is meant for HCC, if you have CUDA at all installed, for whatever reason, it tries to enable that, and if you were trying to build with HCC, the build fails

How to reproduce

Try to build using HCC, for ROC, but also have CUDA installed on your system

Environment

Observed in Arch Linux whilst converting the scripts from Experimental ROC
I have CUDA installed and bumped into this.

Proposed fix

I'm making a PR with what seems to be the simplest way to do this, I provided an additional TRY_CUDA option. if that is OFF, the find_package call is skipped. By default it is ON, so the legacy behaviour is maintained.
But really I feel like making this choice on the back of a find_package (and a find module that has already been deprecated anyway) is the wrong way to do this. Instead the correct would be a bit of a larger change and would include

set(HIPBLAS_BACKEND "hcc" CACHE STRING "Backend the hipBLAS build should use")
set_property(CACHE HIPBLAS_BACKEND PROPERTY STRINGS "hcc;cuda")

And then derive all the choices in inner branches of the build tree from querying this variable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant