-
Notifications
You must be signed in to change notification settings - Fork 29
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 and autodetect gpu #70
base: master
Are you sure you want to change the base?
Conversation
Thanks for the submission! Everything looks fine, however I would really like to maintain the option of easily compiling for just one architecture. This is vital for development, because 80 second recompilation times are just too long. Eventually I will write a proper CMake script with different DEBUG/RELEASE flags, but in the meantime could you adapt your Makefile to allow for one architecture? Thanks! |
@unzvfu Here's a redone attempt that uses cmake. (cmake has lovely cuda support, including gpu detection) Give it a spin and let me know what you think? |
Great, thanks heaps for that! There are still one or two things to add, but you've made an excellent start. As I see it, we still need to fix
|
@unzvfu I think I addressed you concerns. |
@jkrauska Excellent! Nearly there: I realise my description above of when |
@unzvfu your description was perfect, I was sloppy. fixed. |
@jkrauska Related to what I said above, it seems the configuration of
So
|
Actually I think you can fix this by just specifying |
@unzvfu yes. I've included what I think is the correct incantation for ld. -L GTEST_INCLUDE_DIR and -lgtest |
merge from upstream
@jkrauska Any idea what to do fix the following? The problem is that the Cuda SDK installation is at
|
@jkrauska An unrelated thing: previous behaviour was to run the test suite at the end of |
Can you establish how or why a bad /usr/bin/nvcc exists? I'd try to remove it. CMake is trying to make good decisions and it's getting mixed messages... |
@unzvfu can we omit the auto-run-test behavior? you cannot run the tests without first generating the inputs. (or having previous inputs) Currently the inputs take a long time to create. |
set(EXECUTABLE_OUTPUT_PATH "${PROJECT_BINARY_DIR}/bin") | ||
|
||
# CUDA | ||
find_package(CUDA REQUIRED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to https://cmake.org/cmake/help/v3.15/module/FindCUDA.html, by listing CUDA
up there in project
, this find_package
should be unnecessary. Maybe this is a source of some of cmake's confusion?
Good call! |
@jkrauska I don't disagree that removing |
Change in Makefile to support up to Turing GPUs.
NVIDIA Reference
WARNING: Creates binaries 7X larger and makes build 7X slower but supports 6X the GPUs families.