-
Notifications
You must be signed in to change notification settings - Fork 545
Fix errors and warnings with CUDA 9.0 builds #2923
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
Conversation
* The rdc and dlink flags are not required because they are added by CMake for separable compilation and static linking respectively * Add guards around libs that are not included in the CUDA 9.0 Toolkit * Only link with OpenMP when linking with cuSOLVER dynamically * Fix error message when CUDNN is not found
* Address casts from double to __half which are missing in 9.0 * Thrust return_temporary_buffer function can accept void* pointers in older versions of Thrust. Use raw_pointer_cast to pass the pointer to memFree * cublasGemmEx doesn't exist in CUDA 9.0. Add ifdefs to guard against older builds * __float2half is not a host function so it needs to be removed from mean * Add template instantiation for memFree to accept void* pointers
CUSOLVER_CHECK error message printed "CUBLAS Error" instead of CUSOLVER Error
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 have checked with toolkits 10 with separable ON and OFF on my system again just to be sure. Surprisingly it does work without the flags. I clearly remember it giving issues earlier. Perhaps, the reorganization I did w.r.t sources of cuda::{thrus,scan} and the static lib cleared out an indirect issue.
target_link_libraries(af_cuda_static_cuda_library | ||
PRIVATE | ||
${CUDA_cublasLt_static_LIBRARY} | ||
${CUDA_lapack_static_LIBRARY}) |
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.
Makes sense, these are not there prior to toolkit 10 - I should have thought about this
${CUDA_cusparse_static_LIBRARY} | ||
${cusolver_static_lib} | ||
-Wl,--end-group | ||
) | ||
|
||
if(CUDA_VERSION VERSION_GREATER 9.5) |
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.
nit: I think a better check to avoid any unexpected issues (with decimals and all against different cmake versions) with cmake is to do
if(CUDA_VERSION_MAJOR VERSION_GREATER 9)
On another note, I will take care of this with some other change.
@@ -71,8 +71,9 @@ void generateBufferRead(std::stringstream& kerStream, int id, | |||
<< "];\n"; | |||
} | |||
|
|||
void generateShiftNodeOffsets(std::stringstream& kerStream, int id, | |||
bool is_linear, const std::string& type_str) { | |||
inline void generateShiftNodeOffsets(std::stringstream& kerStream, int id, |
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.
nit: looks like this is just to make the compiler silent even though this won't be actually inlined.
by CMake for separable compilation and static linking respectively
Toolkit
in older versions of Thrust. Use raw_pointer_cast to pass the
pointer to memFree
against older builds
from mean
CUSOLVER Error