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
acbedb7d
Commit
acbedb7d
authored
Dec 13, 2023
by
Paul
Browse files
Add cmake for onnx tests
parent
a60bdb67
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
12 deletions
+17
-12
test/CMakeLists.txt
test/CMakeLists.txt
+1
-12
test/onnx/CMakeLists.txt
test/onnx/CMakeLists.txt
+16
-0
No files found.
test/CMakeLists.txt
View file @
acbedb7d
...
...
@@ -78,18 +78,7 @@ endif()
# Onnx test
set
(
TEST_ONNX_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/onnx
)
file
(
GLOB ONNX_TESTS
${
TEST_ONNX_DIR
}
/*.cpp
)
foreach
(
ONNX_TEST
${
ONNX_TESTS
}
)
get_filename_component
(
BASE_NAME
${
ONNX_TEST
}
NAME_WE
)
set
(
TEST_NAME test_
${
BASE_NAME
}
)
add_executable
(
${
TEST_NAME
}
${
ONNX_TEST
}
)
rocm_clang_tidy_check
(
${
TEST_NAME
}
)
target_link_libraries
(
${
TEST_NAME
}
migraphx_onnx migraphx_ref
)
target_include_directories
(
${
TEST_NAME
}
PUBLIC include
)
add_test
(
NAME
${
TEST_NAME
}
COMMAND $<TARGET_FILE:
${
TEST_NAME
}
> WORKING_DIRECTORY
${
TEST_ONNX_DIR
}
)
rocm_mark_as_test
(
${
TEST_NAME
}
)
endforeach
()
add_subdirectory
(
onnx
)
# tf test
set
(
TEST_TF_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/tf
)
...
...
test/onnx/CMakeLists.txt
0 → 100644
View file @
acbedb7d
function
(
add_onnx_test TEST_NAME
)
add_executable
(
${
TEST_NAME
}
${
ARGN
}
)
rocm_clang_tidy_check
(
${
TEST_NAME
}
)
target_link_libraries
(
${
TEST_NAME
}
migraphx_onnx migraphx_ref
)
target_include_directories
(
${
TEST_NAME
}
PUBLIC ../include include
)
add_test
(
NAME
${
TEST_NAME
}
COMMAND $<TARGET_FILE:
${
TEST_NAME
}
> WORKING_DIRECTORY
${
TEST_ONNX_DIR
}
)
rocm_mark_as_test
(
${
TEST_NAME
}
)
endfunction
()
file
(
GLOB ONNX_PARSE_TESTS CONFIGURE_DEPENDS parse/*.cpp
)
add_onnx_test
(
test_onnx_test
${
ONNX_PARSE_TESTS
}
)
add_onnx_test
(
test_verify_onnx verify_onnx.cpp
)
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