-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
CMakeLists.txt
Outdated
find_package(CUDA REQUIRED) | ||
add_definitions(-DMSHADOW_USE_CUDA=1) | ||
if(FIRST_CUDA AND (NOT USE_OLDCMAKECUDA)) | ||
set(__cuda_toolset "7.5" "8.0" "9.0") |
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.
latest is 9.1. does the support for new cuda version have to be manually added?
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.
I don't actually know -- this was not written by me. It was moved from somewhere else in this file.
I don;t actually know what this section does. I suppose that I can add 9.1, however.
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.
@DickJC123 would you recommend how this section should be written?
add_definitions(-DMSHADOW_USE_CUDA=1) | ||
if(FIRST_CUDA AND (NOT USE_OLDCMAKECUDA)) | ||
if(CUDA_TOOLSET STREQUAL "") | ||
set(CUDA_TOOLSET "${CUDA_VERSION_STRING}") |
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.
Is the CUDA_VERSION_STRING
automagically set somewhere?
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.
yeah, in FindCUDA.cmake -- find_package(CUDA)
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.
What happens if I want to compile using Cuda 8, although my system supports cuda 9 or does not have a GPU? Would it still pick Cuda 8 according to the configuration?
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.
the old code (not written by me) defaulted to Cuda 8 no matter what unless CUDA_TOOLKIT var is set.
my change makes it so that it defaults to whatever version find_package(CUDA) finds, which is the default behavior in older versions (non FIRST_CUDA versions). this is still overridable by CUDA_TOOLKIT var. if you specify a version that way and CMake can’t find it, you get an error (CMake > 9.0 understands cuda compiling).
alternately, you can specify the cuda directory which will be picked up by find_package(CUDA). see cmake’s FindCUDA.cmake for details.
606f8cd
to
6a0ded1
Compare
6a0ded1
to
4421149
Compare
4421149
to
e1fc328
Compare
why is Windows python runs hanging? |
I'd guess that the process is crashing due to some compilation errors, thus making nosetests fail. Maybe Jenkins does not pick this crash up. Interestingly, it's happening on all 4 windows jobs. |
turns out related to project() not being at top, and thus MSVC not being turned on |
Was this PR approved by anybody or was this a self merge? |
CMake cuda build was broken, reported by @yajiedesign. Fix is in #9798 |
Description
(Brief description on what this PR is about)
Checklist
Essentials
make lint
)Changes
Comments