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
"src/git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "bd85a76cade2c7b268d92fa9ff3d53768877e407"
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 @@
...
@@ -21,7 +21,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
# THE SOFTWARE.
#####################################################################################
#####################################################################################
cmake_minimum_required
(
VERSION 3.
5
)
cmake_minimum_required
(
VERSION 3.
15 FATAL_ERROR
)
if
(
"
${
CMAKE_SOURCE_DIR
}
"
STREQUAL
"
${
CMAKE_BINARY_DIR
}
"
)
if
(
"
${
CMAKE_SOURCE_DIR
}
"
STREQUAL
"
${
CMAKE_BINARY_DIR
}
"
)
message
(
FATAL_ERROR
"The binary and source directroy cannot be the same"
)
message
(
FATAL_ERROR
"The binary and source directroy cannot be the same"
)
...
@@ -91,12 +91,6 @@ set(MIGRAPHX_ENABLE_FPGA Off CACHE BOOL "")
...
@@ -91,12 +91,6 @@ set(MIGRAPHX_ENABLE_FPGA Off CACHE BOOL "")
set
(
CMAKE_CXX_STANDARD_DEFAULT
""
)
set
(
CMAKE_CXX_STANDARD_DEFAULT
""
)
add_compile_options
(
$<$<COMPILE_LANGUAGE:CXX>:-std=c++17>
)
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
)
list
(
APPEND CMAKE_MODULE_PATH
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake
)
include
(
EnableCompilerWarnings
)
include
(
EnableCompilerWarnings
)
include
(
ROCMClangTidy
)
include
(
ROCMClangTidy
)
...
...
src/onnx/CMakeLists.txt
View file @
0e144f05
...
@@ -30,7 +30,7 @@ target_compile_options(onnx-proto PRIVATE -w)
...
@@ -30,7 +30,7 @@ target_compile_options(onnx-proto PRIVATE -w)
target_link_libraries
(
onnx-proto PRIVATE
${
PROTOBUF_LIBRARY
}
)
target_link_libraries
(
onnx-proto PRIVATE
${
PROTOBUF_LIBRARY
}
)
set_target_properties
(
onnx-proto PROPERTIES POSITION_INDEPENDENT_CODE On
)
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
}
)
add_library
(
migraphx_onnx
${
ONNX_SRCS
}
)
target_include_directories
(
migraphx_onnx PRIVATE include
)
target_include_directories
(
migraphx_onnx PRIVATE include
)
set_target_properties
(
migraphx_onnx PROPERTIES EXPORT_NAME onnx
)
set_target_properties
(
migraphx_onnx PROPERTIES EXPORT_NAME onnx
)
...
...
src/targets/gpu/CMakeLists.txt
View file @
0e144f05
...
@@ -42,12 +42,12 @@ else()
...
@@ -42,12 +42,12 @@ else()
endif
()
endif
()
include
(
Embed
)
include
(
Embed
)
file
(
GLOB KERNEL_FILES
${
CONFIGURE_DEPENDS
}
file
(
GLOB KERNEL_FILES CONFIGURE_DEPENDS
${
CMAKE_CURRENT_SOURCE_DIR
}
/kernels/include/migraphx/kernels/*.hpp
)
${
CMAKE_CURRENT_SOURCE_DIR
}
/kernels/include/migraphx/kernels/*.hpp
)
message
(
STATUS
"KERNEL_FILES:
${
KERNEL_FILES
}
"
)
message
(
STATUS
"KERNEL_FILES:
${
KERNEL_FILES
}
"
)
add_embed_library
(
migraphx_kernels
${
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
(
migraphx_device
${
DEVICE_GPU_SRCS
}
)
add_library
(
compile_for_gpu INTERFACE
)
add_library
(
compile_for_gpu INTERFACE
)
...
@@ -84,7 +84,7 @@ target_link_libraries(kernel_file_check compile_for_gpu)
...
@@ -84,7 +84,7 @@ target_link_libraries(kernel_file_check compile_for_gpu)
rocm_clang_tidy_check
(
kernel_file_check
)
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
add_library
(
migraphx_gpu
abs.cpp
abs.cpp
analyze_streams.cpp
analyze_streams.cpp
...
...
src/targets/gpu/driver/CMakeLists.txt
View file @
0e144f05
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
# THE SOFTWARE.
# 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
add_executable
(
gpu-driver
${
GPU_DRIVER_SRCS
}
${
GPU_DRIVER_SRCS
}
)
)
...
...
src/tf/CMakeLists.txt
View file @
0e144f05
...
@@ -42,7 +42,7 @@ target_compile_options(tf-proto PRIVATE -w)
...
@@ -42,7 +42,7 @@ target_compile_options(tf-proto PRIVATE -w)
target_link_libraries
(
tf-proto PRIVATE
${
PROTOBUF_LIBRARY
}
)
target_link_libraries
(
tf-proto PRIVATE
${
PROTOBUF_LIBRARY
}
)
set_target_properties
(
tf-proto PROPERTIES POSITION_INDEPENDENT_CODE On
)
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
}
)
add_library
(
migraphx_tf
${
TF_SRCS
}
)
migraphx_generate_export_header
(
migraphx_tf
)
migraphx_generate_export_header
(
migraphx_tf
)
target_include_directories
(
migraphx_tf PRIVATE include
)
target_include_directories
(
migraphx_tf PRIVATE include
)
...
...
test/CMakeLists.txt
View file @
0e144f05
...
@@ -112,7 +112,7 @@ function(add_test_executable TEST_NAME)
...
@@ -112,7 +112,7 @@ function(add_test_executable TEST_NAME)
target_include_directories
(
${
TEST_NAME
}
PUBLIC include
)
target_include_directories
(
${
TEST_NAME
}
PUBLIC include
)
endfunction
(
add_test_executable
)
endfunction
(
add_test_executable
)
file
(
GLOB TESTS
${
CONFIGURE_DEPENDS
}
*.cpp
)
file
(
GLOB TESTS CONFIGURE_DEPENDS *.cpp
)
foreach
(
TEST
${
TESTS
}
)
foreach
(
TEST
${
TESTS
}
)
get_filename_component
(
BASE_NAME
${
TEST
}
NAME_WE
)
get_filename_component
(
BASE_NAME
${
TEST
}
NAME_WE
)
...
@@ -122,7 +122,7 @@ endforeach()
...
@@ -122,7 +122,7 @@ endforeach()
if
(
MIGRAPHX_ENABLE_GPU
)
if
(
MIGRAPHX_ENABLE_GPU
)
# gpu tests
# gpu tests
file
(
GLOB GPU_TESTS
${
CONFIGURE_DEPENDS
}
gpu/*.cpp
)
file
(
GLOB GPU_TESTS CONFIGURE_DEPENDS gpu/*.cpp
)
foreach
(
TEST
${
GPU_TESTS
}
)
foreach
(
TEST
${
GPU_TESTS
}
)
get_filename_component
(
BASE_NAME
${
TEST
}
NAME_WE
)
get_filename_component
(
BASE_NAME
${
TEST
}
NAME_WE
)
...
@@ -141,7 +141,7 @@ endif()
...
@@ -141,7 +141,7 @@ endif()
if
(
MIGRAPHX_ENABLE_FPGA
)
if
(
MIGRAPHX_ENABLE_FPGA
)
# fpga tests
# fpga tests
file
(
GLOB FPGA_TESTS
${
CONFIGURE_DEPENDS
}
fpga/*.cpp
)
file
(
GLOB FPGA_TESTS CONFIGURE_DEPENDS fpga/*.cpp
)
foreach
(
TEST
${
FPGA_TESTS
}
)
foreach
(
TEST
${
FPGA_TESTS
}
)
get_filename_component
(
BASE_NAME
${
TEST
}
NAME_WE
)
get_filename_component
(
BASE_NAME
${
TEST
}
NAME_WE
)
...
@@ -191,7 +191,7 @@ endif()
...
@@ -191,7 +191,7 @@ endif()
# multitarget test
# multitarget test
if
(
MIGRAPHX_ENABLE_GPU AND MIGRAPHX_ENABLE_CPU AND MIGRAPHX_ENABLE_FPGA
)
if
(
MIGRAPHX_ENABLE_GPU AND MIGRAPHX_ENABLE_CPU AND MIGRAPHX_ENABLE_FPGA
)
set
(
TEST_MULTI_TARGET_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/multi_target
)
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
}
)
foreach
(
MULTI_TARGET_TEST
${
MULTI_TARGET_TESTS
}
)
get_filename_component
(
BASE_NAME
${
MULTI_TARGET_TEST
}
NAME_WE
)
get_filename_component
(
BASE_NAME
${
MULTI_TARGET_TEST
}
NAME_WE
)
...
@@ -221,7 +221,7 @@ function(test_header NAME HEADER)
...
@@ -221,7 +221,7 @@ function(test_header NAME HEADER)
endfunction
()
endfunction
()
function
(
test_headers PREFIX
)
function
(
test_headers PREFIX
)
file
(
GLOB HEADERS
${
CONFIGURE_DEPENDS
}
${
ARGN
}
)
file
(
GLOB HEADERS CONFIGURE_DEPENDS
${
ARGN
}
)
foreach
(
HEADER
${
HEADERS
}
)
foreach
(
HEADER
${
HEADERS
}
)
file
(
RELATIVE_PATH HEADER_REL
${
CMAKE_SOURCE_DIR
}
${
HEADER
}
)
file
(
RELATIVE_PATH HEADER_REL
${
CMAKE_SOURCE_DIR
}
${
HEADER
}
)
...
...
test/verify/CMakeLists.txt
View file @
0e144f05
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
# THE SOFTWARE.
# THE SOFTWARE.
#####################################################################################
#####################################################################################
file
(
GLOB VERIFY_TESTS
${
CONFIGURE_DEPENDS
}
*.cpp
)
file
(
GLOB VERIFY_TESTS CONFIGURE_DEPENDS *.cpp
)
add_executable
(
test_verify
${
VERIFY_TESTS
}
)
add_executable
(
test_verify
${
VERIFY_TESTS
}
)
add_dependencies
(
tests test_verify
)
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