Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
0e144f05
Unverified
Commit
0e144f05
authored
Jul 09, 2023
by
Artur Wojcik
Committed by
GitHub
Jul 08, 2023
Browse files
bump up CMake minimum version required to 3.15 (#1888)
parent
c04fbc92
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
19 deletions
+13
-19
CMakeLists.txt
CMakeLists.txt
+1
-7
src/onnx/CMakeLists.txt
src/onnx/CMakeLists.txt
+1
-1
src/targets/gpu/CMakeLists.txt
src/targets/gpu/CMakeLists.txt
+3
-3
src/targets/gpu/driver/CMakeLists.txt
src/targets/gpu/driver/CMakeLists.txt
+1
-1
src/tf/CMakeLists.txt
src/tf/CMakeLists.txt
+1
-1
test/CMakeLists.txt
test/CMakeLists.txt
+5
-5
test/verify/CMakeLists.txt
test/verify/CMakeLists.txt
+1
-1
No files found.
CMakeLists.txt
View file @
0e144f05
...
...
@@ -21,7 +21,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#####################################################################################
cmake_minimum_required
(
VERSION 3.
5
)
cmake_minimum_required
(
VERSION 3.
15 FATAL_ERROR
)
if
(
"
${
CMAKE_SOURCE_DIR
}
"
STREQUAL
"
${
CMAKE_BINARY_DIR
}
"
)
message
(
FATAL_ERROR
"The binary and source directroy cannot be the same"
)
...
...
@@ -91,12 +91,6 @@ set(MIGRAPHX_ENABLE_FPGA Off CACHE BOOL "")
set
(
CMAKE_CXX_STANDARD_DEFAULT
""
)
add_compile_options
(
$<$<COMPILE_LANGUAGE:CXX>:-std=c++17>
)
if
(
${
CMAKE_VERSION
}
VERSION_LESS
"3.12.0"
)
set
(
CONFIGURE_DEPENDS
)
else
()
set
(
CONFIGURE_DEPENDS CONFIGURE_DEPENDS
)
endif
()
list
(
APPEND CMAKE_MODULE_PATH
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake
)
include
(
EnableCompilerWarnings
)
include
(
ROCMClangTidy
)
...
...
src/onnx/CMakeLists.txt
View file @
0e144f05
...
...
@@ -30,7 +30,7 @@ target_compile_options(onnx-proto PRIVATE -w)
target_link_libraries
(
onnx-proto PRIVATE
${
PROTOBUF_LIBRARY
}
)
set_target_properties
(
onnx-proto PROPERTIES POSITION_INDEPENDENT_CODE On
)
file
(
GLOB ONNX_SRCS
${
CONFIGURE_DEPENDS
}
*.cpp
)
file
(
GLOB ONNX_SRCS CONFIGURE_DEPENDS *.cpp
)
add_library
(
migraphx_onnx
${
ONNX_SRCS
}
)
target_include_directories
(
migraphx_onnx PRIVATE include
)
set_target_properties
(
migraphx_onnx PROPERTIES EXPORT_NAME onnx
)
...
...
src/targets/gpu/CMakeLists.txt
View file @
0e144f05
...
...
@@ -42,12 +42,12 @@ else()
endif
()
include
(
Embed
)
file
(
GLOB KERNEL_FILES
${
CONFIGURE_DEPENDS
}
file
(
GLOB KERNEL_FILES CONFIGURE_DEPENDS
${
CMAKE_CURRENT_SOURCE_DIR
}
/kernels/include/migraphx/kernels/*.hpp
)
message
(
STATUS
"KERNEL_FILES:
${
KERNEL_FILES
}
"
)
add_embed_library
(
migraphx_kernels
${
KERNEL_FILES
}
)
file
(
GLOB DEVICE_GPU_SRCS
${
CONFIGURE_DEPENDS
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/device/*.cpp
)
file
(
GLOB DEVICE_GPU_SRCS CONFIGURE_DEPENDS
${
CMAKE_CURRENT_SOURCE_DIR
}
/device/*.cpp
)
add_library
(
migraphx_device
${
DEVICE_GPU_SRCS
}
)
add_library
(
compile_for_gpu INTERFACE
)
...
...
@@ -84,7 +84,7 @@ target_link_libraries(kernel_file_check compile_for_gpu)
rocm_clang_tidy_check
(
kernel_file_check
)
file
(
GLOB JIT_GPU_SRCS
${
CONFIGURE_DEPENDS
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/jit/*.cpp
)
file
(
GLOB JIT_GPU_SRCS CONFIGURE_DEPENDS
${
CMAKE_CURRENT_SOURCE_DIR
}
/jit/*.cpp
)
add_library
(
migraphx_gpu
abs.cpp
analyze_streams.cpp
...
...
src/targets/gpu/driver/CMakeLists.txt
View file @
0e144f05
...
...
@@ -22,7 +22,7 @@
# THE SOFTWARE.
#####################################################################################
file
(
GLOB GPU_DRIVER_SRCS
${
CONFIGURE_DEPENDS
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/*.cpp
)
file
(
GLOB GPU_DRIVER_SRCS CONFIGURE_DEPENDS
${
CMAKE_CURRENT_SOURCE_DIR
}
/*.cpp
)
add_executable
(
gpu-driver
${
GPU_DRIVER_SRCS
}
)
...
...
src/tf/CMakeLists.txt
View file @
0e144f05
...
...
@@ -42,7 +42,7 @@ target_compile_options(tf-proto PRIVATE -w)
target_link_libraries
(
tf-proto PRIVATE
${
PROTOBUF_LIBRARY
}
)
set_target_properties
(
tf-proto PROPERTIES POSITION_INDEPENDENT_CODE On
)
file
(
GLOB TF_SRCS
${
CONFIGURE_DEPENDS
}
*.cpp
)
file
(
GLOB TF_SRCS CONFIGURE_DEPENDS *.cpp
)
add_library
(
migraphx_tf
${
TF_SRCS
}
)
migraphx_generate_export_header
(
migraphx_tf
)
target_include_directories
(
migraphx_tf PRIVATE include
)
...
...
test/CMakeLists.txt
View file @
0e144f05
...
...
@@ -112,7 +112,7 @@ function(add_test_executable TEST_NAME)
target_include_directories
(
${
TEST_NAME
}
PUBLIC include
)
endfunction
(
add_test_executable
)
file
(
GLOB TESTS
${
CONFIGURE_DEPENDS
}
*.cpp
)
file
(
GLOB TESTS CONFIGURE_DEPENDS *.cpp
)
foreach
(
TEST
${
TESTS
}
)
get_filename_component
(
BASE_NAME
${
TEST
}
NAME_WE
)
...
...
@@ -122,7 +122,7 @@ endforeach()
if
(
MIGRAPHX_ENABLE_GPU
)
# gpu tests
file
(
GLOB GPU_TESTS
${
CONFIGURE_DEPENDS
}
gpu/*.cpp
)
file
(
GLOB GPU_TESTS CONFIGURE_DEPENDS gpu/*.cpp
)
foreach
(
TEST
${
GPU_TESTS
}
)
get_filename_component
(
BASE_NAME
${
TEST
}
NAME_WE
)
...
...
@@ -141,7 +141,7 @@ endif()
if
(
MIGRAPHX_ENABLE_FPGA
)
# fpga tests
file
(
GLOB FPGA_TESTS
${
CONFIGURE_DEPENDS
}
fpga/*.cpp
)
file
(
GLOB FPGA_TESTS CONFIGURE_DEPENDS fpga/*.cpp
)
foreach
(
TEST
${
FPGA_TESTS
}
)
get_filename_component
(
BASE_NAME
${
TEST
}
NAME_WE
)
...
...
@@ -191,7 +191,7 @@ endif()
# multitarget test
if
(
MIGRAPHX_ENABLE_GPU AND MIGRAPHX_ENABLE_CPU AND MIGRAPHX_ENABLE_FPGA
)
set
(
TEST_MULTI_TARGET_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/multi_target
)
file
(
GLOB MULTI_TARGET_TESTS
${
CONFIGURE_DEPENDS
}
${
TEST_MULTI_TARGET_DIR
}
/*.cpp
)
file
(
GLOB MULTI_TARGET_TESTS CONFIGURE_DEPENDS
${
TEST_MULTI_TARGET_DIR
}
/*.cpp
)
foreach
(
MULTI_TARGET_TEST
${
MULTI_TARGET_TESTS
}
)
get_filename_component
(
BASE_NAME
${
MULTI_TARGET_TEST
}
NAME_WE
)
...
...
@@ -221,7 +221,7 @@ function(test_header NAME HEADER)
endfunction
()
function
(
test_headers PREFIX
)
file
(
GLOB HEADERS
${
CONFIGURE_DEPENDS
}
${
ARGN
}
)
file
(
GLOB HEADERS CONFIGURE_DEPENDS
${
ARGN
}
)
foreach
(
HEADER
${
HEADERS
}
)
file
(
RELATIVE_PATH HEADER_REL
${
CMAKE_SOURCE_DIR
}
${
HEADER
}
)
...
...
test/verify/CMakeLists.txt
View file @
0e144f05
...
...
@@ -22,7 +22,7 @@
# THE SOFTWARE.
#####################################################################################
file
(
GLOB VERIFY_TESTS
${
CONFIGURE_DEPENDS
}
*.cpp
)
file
(
GLOB VERIFY_TESTS CONFIGURE_DEPENDS *.cpp
)
add_executable
(
test_verify
${
VERIFY_TESTS
}
)
add_dependencies
(
tests test_verify
)
...
...
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