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
ab6ac5ac
Commit
ab6ac5ac
authored
Jun 08, 2018
by
Paul
Browse files
Make miopen backend optional
parent
c64db85f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
3 deletions
+24
-3
CMakeLists.txt
CMakeLists.txt
+7
-0
dev-requirements.txt
dev-requirements.txt
+1
-1
src/CMakeLists.txt
src/CMakeLists.txt
+2
-0
test/CMakeLists.txt
test/CMakeLists.txt
+14
-2
test/include/test.hpp
test/include/test.hpp
+0
-0
test/miopen/miopen.cpp
test/miopen/miopen.cpp
+0
-0
No files found.
CMakeLists.txt
View file @
ab6ac5ac
...
...
@@ -9,6 +9,13 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
endif
()
endif
()
if
(
CMAKE_CXX_COMPILER MATCHES
".*hcc"
)
message
(
STATUS
"Enable miopen backend"
)
set
(
RTG_ENABLE_MIOPEN On CACHE BOOL
""
)
else
()
set
(
RTG_ENABLE_MIOPEN Off CACHE BOOL
""
)
endif
()
add_compile_options
(
-std=c++14
)
list
(
APPEND CMAKE_MODULE_PATH
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake
)
...
...
dev-requirements.txt
View file @
ab6ac5ac
pfultz2/rocm-recipes
danmar/cppcheck@
ab02595be1b17035b534db655f9e119080a368bc
danmar/cppcheck@
d9f9bdda7344e80585f71141be7797055d7987f3
-f requirements.txt
src/CMakeLists.txt
View file @
ab6ac5ac
...
...
@@ -8,4 +8,6 @@ target_include_directories(rtg PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_D
add_subdirectory
(
onnx
)
add_subdirectory
(
targets/cpu
)
if
(
RTG_ENABLE_MIOPEN
)
add_subdirectory
(
targets/miopen
)
endif
()
test/CMakeLists.txt
View file @
ab6ac5ac
...
...
@@ -23,7 +23,7 @@ function(add_test_command NAME EXE)
%1
${
ARGN
}
"
)
add_test
(
NAME
${
NAME
}
COMMAND
${
WINE_CMD
}
cmd /c
"
${
CMAKE_CURRENT_BINARY_DIR
}
/test_
${
NAME
}
.cmd"
$<TARGET_FILE:
${
EXE
}
>
)
else
()
if
(
MIOPEN
_TEST_GDB
)
if
(
RTG
_TEST_GDB
)
file
(
GENERATE OUTPUT
"
${
CMAKE_CURRENT_BINARY_DIR
}
/test_
${
NAME
}
.cmake"
CONTENT
"
execute_process(COMMAND $<TARGET_FILE:
${
EXE
}
>
${
ARGN
}
RESULT_VARIABLE RESULT)
...
...
@@ -59,7 +59,8 @@ function(add_test_executable TEST_NAME)
add_dependencies
(
tests
${
TEST_NAME
}
)
add_dependencies
(
check
${
TEST_NAME
}
)
set_tests_properties
(
${
TEST_NAME
}
PROPERTIES FAIL_REGULAR_EXPRESSION
"FAILED"
)
target_link_libraries
(
${
TEST_NAME
}
rtg rtg_cpu rtg_miopen
)
target_link_libraries
(
${
TEST_NAME
}
rtg rtg_cpu
)
target_include_directories
(
${
TEST_NAME
}
PUBLIC include
)
endfunction
(
add_test_executable
)
file
(
GLOB TESTS *.cpp
)
...
...
@@ -68,3 +69,14 @@ foreach(TEST ${TESTS})
get_filename_component
(
BASE_NAME
${
TEST
}
NAME_WE
)
add_test_executable
(
test_
${
BASE_NAME
}
${
TEST
}
)
endforeach
()
if
(
RTG_ENABLE_MIOPEN
)
# miopen tests
file
(
GLOB MIOPEN_TESTS miopen/*.cpp
)
foreach
(
TEST
${
MIOPEN_TESTS
}
)
get_filename_component
(
BASE_NAME
${
TEST
}
NAME_WE
)
add_test_executable
(
test_miopen_
${
BASE_NAME
}
${
TEST
}
)
target_link_libraries
(
test_miopen_
${
BASE_NAME
}
rtg_miopen
)
endforeach
()
endif
()
test/test.hpp
→
test/
include/
test.hpp
View file @
ab6ac5ac
File moved
test/miopen.cpp
→
test/miopen
/miopen
.cpp
View file @
ab6ac5ac
File moved
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