FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix errors and warnings with CUDA 9.0 builds by umar456 · Pull Request #2923 · arrayfire/arrayfire · GitHub

Repository navigation

Fix errors and warnings with CUDA 9.0 builds - #2923

Merged
9prady9 merged 4 commits into
arrayfire:masterfrom
umar456:old_cuda
Jun 5, 2020
Merged

9prady9 merged 4 commits into
arrayfire:masterfrom
umar456:old_cuda

Conversation

umar456 commented Jun 5, 2020

Copy link
Copy Markdown
Member
  • 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

umar456 added 3 commits June 5, 2020 01:13
* 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
umar456 added the CUDA label Jun 5, 2020
umar456 added this to the 3.7.2 milestone Jun 5, 2020

9prady9 left a comment •
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

nit: looks like this is just to make the compiler silent even though this won't be actually inlined.

9prady9 merged commit d2df83d into arrayfire:master Jun 5, 2020
umar456 deleted the old_cuda branch June 26, 2020 18:35
umar456 mentioned this pull request Jun 27, 2020
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL