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

Fix #4 #5

Merged
merged 4 commits into from
May 19, 2019
Merged

Fix #4 #5

merged 4 commits into from
May 19, 2019

Conversation

RMeli
Copy link
Member

@RMeli RMeli commented May 18, 2019

Should fix issue #4 (probably there is a more elegant way of doing it...).

Copy link
Contributor

@dkoes dkoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be a bit cleaner to not duplicate the code and guard the addition of new architectures under the version check.

@dkoes dkoes merged commit 55761b5 into gnina:master May 19, 2019
@RMeli
Copy link
Member Author

RMeli commented May 19, 2019

I agree. Would something like the following (untested) be better?

list(APPEND GPU_ARCHS 35 50 60 70)
if (NOT ("${CUDA_VERSION}" VERSION_LESS "10.0"))
    list(APPEND GPU_ARCHS 75)
endif()

foreach(arch ${GPU_ARCHS})
    set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -gencode arch=compute_${arch},code=sm_${arch}")
endforeach()

set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Werror cross-execution-space-call,deprecated-declarations")

@RMeli RMeli deleted the gsoc19/fix-#4 branch May 19, 2019 22:06
@dkoes
Copy link
Contributor

dkoes commented May 20, 2019

That would work, but I already pushed a different code structure.

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 this pull request may close these issues.

2 participants