Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
e928109c
Commit
e928109c
authored
Sep 30, 2018
by
Junru Shao
Committed by
Tianqi Chen
Sep 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[BUG] Fix incorrect libcuda.so found by cmake when multiple versions of CUDA exist (#1788)
parent
eacc2bc4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
19 deletions
+41
-19
cmake/util/FindCUDA.cmake
+10
-2
cmake/util/FindLLVM.cmake
+6
-1
cmake/util/FindROCM.cmake
+22
-16
cmake/util/FindVulkan.cmake
+3
-0
No files found.
cmake/util/FindCUDA.cmake
View file @
e928109c
...
...
@@ -56,13 +56,15 @@ macro(find_cuda use_cuda)
else
(
MSVC
)
find_library
(
_CUDA_CUDA_LIBRARY cuda
PATHS
${
CUDA_TOOLKIT_ROOT_DIR
}
PATH_SUFFIXES lib lib64 targets/x86_64-linux/lib targets/x86_64-linux/lib/stubs
)
PATH_SUFFIXES lib lib64 targets/x86_64-linux/lib targets/x86_64-linux/lib/stubs lib64/stubs
NO_DEFAULT_PATH
)
if
(
_CUDA_CUDA_LIBRARY
)
set
(
CUDA_CUDA_LIBRARY
${
_CUDA_CUDA_LIBRARY
}
)
endif
()
find_library
(
CUDA_NVRTC_LIBRARY nvrtc
PATHS
${
CUDA_TOOLKIT_ROOT_DIR
}
PATH_SUFFIXES lib lib64 targets/x86_64-linux/lib targets/x86_64-linux/lib/stubs
)
PATH_SUFFIXES lib lib64 targets/x86_64-linux/lib targets/x86_64-linux/lib/stubs lib64/stubs
NO_DEFAULT_PATH
)
find_library
(
CUDA_CUDNN_LIBRARY cudnn
${
CUDA_TOOLKIT_ROOT_DIR
}
/lib64
${
CUDA_TOOLKIT_ROOT_DIR
}
/lib
)
...
...
@@ -70,5 +72,11 @@ macro(find_cuda use_cuda)
${
CUDA_TOOLKIT_ROOT_DIR
}
/lib64
${
CUDA_TOOLKIT_ROOT_DIR
}
/lib
)
endif
(
MSVC
)
message
(
STATUS
"Found CUDA_TOOLKIT_ROOT_DIR="
${
CUDA_TOOLKIT_ROOT_DIR
}
)
message
(
STATUS
"Found CUDA_CUDA_LIBRARY="
${
CUDA_CUDA_LIBRARY
}
)
message
(
STATUS
"Found CUDA_CUDART_LIBRARY="
${
CUDA_CUDART_LIBRARY
}
)
message
(
STATUS
"Found CUDA_NVRTC_LIBRARY="
${
CUDA_NVRTC_LIBRARY
}
)
message
(
STATUS
"Found CUDA_CUDNN_LIBRARY="
${
CUDA_CUDNN_LIBRARY
}
)
message
(
STATUS
"Found CUDA_CUBLAS_LIBRARY="
${
CUDA_CUBLAS_LIBRARY
}
)
endif
(
CUDA_FOUND
)
endmacro
(
find_cuda
)
cmake/util/FindLLVM.cmake
View file @
e928109c
...
...
@@ -11,7 +11,7 @@
# - LLVM_INCLUDE_DIRS
# - LLVM_LIBS
# - LLVM_DEFINITIONS
# - TVM_LLVM_VER
IS
ON
# - TVM_LLVM_VER
SI
ON
#
macro
(
find_llvm use_llvm
)
set
(
LLVM_CONFIG
${
use_llvm
}
)
...
...
@@ -56,4 +56,9 @@ macro(find_llvm use_llvm)
separate_arguments
(
LLVM_LIBS
)
string
(
STRIP
${
TVM_LLVM_VERSION
}
TVM_LLVM_VERSION
)
endif
()
if
(
NOT LLVM_CONFIG STREQUAL
"OFF"
)
message
(
STATUS
"Found LLVM_INCLUDE_DIRS="
${
LLVM_INCLUDE_DIRS
}
)
message
(
STATUS
"Found LLVM_DEFINITIONS="
${
LLVM_DEFINITIONS
}
)
message
(
STATUS
"Found TVM_LLVM_VERSION="
${
TVM_LLVM_VERSION
}
)
endif
()
endmacro
(
find_llvm
)
cmake/util/FindROCM.cmake
View file @
e928109c
...
...
@@ -21,21 +21,27 @@ macro(find_rocm use_rocm)
if
(
IS_DIRECTORY
${
__use_rocm
}
)
set
(
__rocm_sdk
${
__use_rocm
}
)
message
(
STATUS
"Custom ROCM SDK PATH="
${
__use_rocm
}
)
elseif
(
IS_DIRECTORY $ENV{ROCM_PATH}
)
set
(
__rocm_sdk $ENV{ROCM_PATH}
)
elseif
(
IS_DIRECTORY /opt/rocm
)
set
(
__rocm_sdk /opt/rocm
)
else
()
set
(
__rocm_sdk
""
)
endif
()
elseif
(
IS_DIRECTORY $ENV{ROCM_PATH}
)
set
(
__rocm_sdk $ENV{ROCM_PATH}
)
elseif
(
IS_DIRECTORY /opt/rocm
)
set
(
__rocm_sdk /opt/rocm
)
else
()
set
(
__rocm_sdk
""
)
endif
()
if
(
__rocm_sdk
)
set
(
ROCM_INCLUDE_DIRS
${
__rocm_sdk
}
/include
)
find_library
(
ROCM_HIPHCC_LIBRARY hip_hcc
${
__rocm_sdk
}
/lib
)
find_library
(
ROCM_MIOPEN_LIBRARY MIOpen
${
__rocm_sdk
}
/lib
)
find_library
(
ROCM_ROCBLAS_LIBRARY rocblas
${
__rocm_sdk
}
/lib
)
if
(
ROCM_HIPHCC_LIBRARY
)
set
(
ROCM_FOUND TRUE
)
endif
()
endif
(
__rocm_sdk
)
if
(
__rocm_sdk
)
set
(
ROCM_INCLUDE_DIRS
${
__rocm_sdk
}
/include
)
find_library
(
ROCM_HIPHCC_LIBRARY hip_hcc
${
__rocm_sdk
}
/lib
)
find_library
(
ROCM_MIOPEN_LIBRARY MIOpen
${
__rocm_sdk
}
/lib
)
find_library
(
ROCM_ROCBLAS_LIBRARY rocblas
${
__rocm_sdk
}
/lib
)
if
(
ROCM_HIPHCC_LIBRARY
)
set
(
ROCM_FOUND TRUE
)
endif
()
endif
(
__rocm_sdk
)
if
(
ROCM_FOUND
)
message
(
STATUS
"Found ROCM_INCLUDE_DIRS="
${
ROCM_INCLUDE_DIRS
}
)
message
(
STATUS
"Found ROCM_HIPHCC_LIBRARY="
${
ROCM_HIPHCC_LIBRARY
}
)
message
(
STATUS
"Found ROCM_MIOPEN_LIBRARY="
${
ROCM_MIOPEN_LIBRARY
}
)
message
(
STATUS
"Found ROCM_ROCBLAS_LIBRARY="
${
ROCM_ROCBLAS_LIBRARY
}
)
endif
(
ROCM_FOUND
)
endmacro
(
find_rocm
)
cmake/util/FindVulkan.cmake
View file @
e928109c
...
...
@@ -51,5 +51,8 @@ macro(find_vulkan use_vulkan)
find_path
(
_spirv spirv.hpp HINTS
${
Vulkan_INCLUDE_DIRS
}
PATH_SUFFIXES vulkan spirv/unified1
)
find_path
(
_glsl_std GLSL.std.450.h HINTS
${
Vulkan_INCLUDE_DIRS
}
PATH_SUFFIXES vulkan spirv/unified1
)
list
(
APPEND Vulkan_INCLUDE_DIRS
${
_libspirv
}
${
_spirv
}
${
_glsl_std
}
)
message
(
STATUS
"Vulkan_INCLUDE_DIRS="
${
Vulkan_INCLUDE_DIRS
}
)
message
(
STATUS
"Vulkan_LIBRARY="
${
Vulkan_LIBRARY
}
)
message
(
STATUS
"Vulkan_SPIRV_TOOLS_LIBRARY="
${
Vulkan_SPIRV_TOOLS_LIBRARY
}
)
endif
(
Vulkan_FOUND
)
endmacro
(
find_vulkan
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment