| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -7,7 +7,7 @@ | |
|
|
||
| dependency_check(CUDA_FOUND "CUDA not found.") | ||
| if(AF_WITH_CUDNN) | ||
| dependency_check(cuDNN_FOUND "CUDA not found.") | ||
| dependency_check(cuDNN_FOUND "CUDNN not found.") | ||
| endif() | ||
|
|
||
| include(AFcuda_helpers) | ||
| Expand All | @@ -34,7 +34,7 @@ endif() | |
|
|
||
| # Find if CUDA Toolkit is at least 10.0 to use static | ||
| # lapack library. Otherwise, we have to use regular shared library | ||
| if(UNIX AND CUDA_VERSION_MAJOR VERSION_GREATER 10 OR CUDA_VERSION_MAJOR VERSION_EQUAL 10) | ||
| if(UNIX AND (CUDA_VERSION_MAJOR VERSION_GREATER 10 OR CUDA_VERSION_MAJOR VERSION_EQUAL 10)) | ||
| set(use_static_cuda_lapack ON) | ||
| else() | ||
| set(use_static_cuda_lapack OFF) | ||
| Expand All | @@ -52,7 +52,6 @@ if(UNIX) | |
| # FIXME When NVCC resolves this particular issue. | ||
| # NVCC doesn't like -l<full_path_static_lib>, hence we cannot | ||
| # use ${CMAKE_*_LIBRARY} variables in the following flags. | ||
| set(af_cuda_static_flags "-rdc=true;-dlink") | ||
| set(af_cuda_static_flags "${af_cuda_static_flags};-lculibos") | ||
| set(af_cuda_static_flags "${af_cuda_static_flags};-lcublas_static") | ||
| set(af_cuda_static_flags "${af_cuda_static_flags};-lcublasLt_static") | ||
| Expand All | @@ -71,7 +70,7 @@ if(UNIX) | |
|
|
||
| set(af_cuda_static_flags "${af_cuda_static_flags};-lcusolver_static") | ||
| else() | ||
| set(cusolver_lib "${CUDA_cusolver_LIBRARY}") | ||
| set(cusolver_lib "${CUDA_cusolver_LIBRARY}" OpenMP::OpenMP_CXX) | ||
| endif() | ||
| endif() | ||
|
|
||
| Expand All | @@ -89,12 +88,6 @@ message(STATUS "CUDA_architecture_build_targets: ${CUDA_architecture_build_targe | |
|
|
||
| set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};${cuda_architecture_flags}) | ||
|
|
||
| if(${CUDA_SEPARABLE_COMPILATION}) | ||
| # Enable relocatable device code generation for separable | ||
| # compilation which is in turn required for any device linking done. | ||
| set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-rdc=true) | ||
| endif() | ||
|
|
||
| mark_as_advanced( | ||
| CUDA_LIBRARIES_PATH | ||
| CUDA_architecture_build_targets) | ||
| Expand Down Expand Up | @@ -301,13 +294,19 @@ if(UNIX) | |
| -Wl,--start-group | ||
| ${CUDA_culibos_LIBRARY} #also a static libary | ||
| ${CUDA_cublas_static_LIBRARY} | ||
| ${CUDA_cublasLt_static_LIBRARY} | ||
| ${CUDA_cufft_static_LIBRARY} | ||
| ${CUDA_lapack_static_LIBRARY} | ||
| ${CUDA_cusparse_static_LIBRARY} | ||
| ${cusolver_static_lib} | ||
| -Wl,--end-group | ||
| ) | ||
|
|
||
| if(CUDA_VERSION VERSION_GREATER 9.5) | ||
| target_link_libraries(af_cuda_static_cuda_library | ||
| PRIVATE | ||
| ${CUDA_cublasLt_static_LIBRARY} | ||
| ${CUDA_lapack_static_LIBRARY}) | ||
|
Comment thread
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityMakes sense, these are not there prior to toolkit 10 - I should have thought about this
Sorry, something went wrong.
All reactions
|
||
| endif() | ||
|
|
||
| set(CUDA_SEPARABLE_COMPILATION ${pior_val_CUDA_SEPARABLE_COMPILATION}) | ||
| else() | ||
| target_link_libraries(af_cuda_static_cuda_library | ||
| Expand Down | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -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, | ||
|
Comment thread
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Qualitynit: looks like this is just to make the compiler silent even though this won't be actually inlined.
Sorry, something went wrong.
All reactions
|
||
| bool is_linear, | ||
| const std::string& type_str) { | ||
| UNUSED(is_linear); | ||
| std::string idx_str = std::string("idx") + std::to_string(id); | ||
| std::string info_str = std::string("in") + std::to_string(id); | ||
| Expand All | @@ -99,8 +100,8 @@ void generateShiftNodeOffsets(std::stringstream& kerStream, int id, | |
| kerStream << type_str << " *in" << id << "_ptr = in" << id << ".ptr;\n"; | ||
| } | ||
|
|
||
| void generateShiftNodeRead(std::stringstream& kerStream, int id, | ||
| const std::string& type_str) { | ||
| inline void generateShiftNodeRead(std::stringstream& kerStream, int id, | ||
| const std::string& type_str) { | ||
| kerStream << type_str << " val" << id << " = in" << id << "_ptr[idx" << id | ||
| << "];\n"; | ||
| } | ||
| Expand Down | ||
| Back | FazBrowse Home | New Git URL |
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Qualitynit: I think a better check to avoid any unexpected issues (with decimals and all against different cmake versions) with cmake is to do
On another note, I will take care of this with some other change.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.