Fix errors and warnings with CUDA 9.0 builds#2923
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.
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.
Makes sense, these are not there prior to toolkit 10 - I should have thought about this
| -Wl,--end-group | ||
| ) | ||
|
|
||
| if(CUDA_VERSION VERSION_GREATER 9.5) |
There was a problem hiding this comment.
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.
|
|
||
| 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.
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