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
composable_kernel_ROCM
Commits
46f69344
"...composable_kernel_rocm.git" did not exist on "b8b2d0a6d1f6342686ee890eac64a1506d865452"
Commit
46f69344
authored
Jan 15, 2025
by
Aviral Goel
Browse files
test filters work for both examples and test
parent
b2027284
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
9 deletions
+17
-9
CMakeLists.txt
CMakeLists.txt
+5
-2
example/CMakeLists.txt
example/CMakeLists.txt
+7
-4
test/CMakeLists.txt
test/CMakeLists.txt
+5
-3
No files found.
CMakeLists.txt
View file @
46f69344
...
@@ -533,9 +533,12 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERS
...
@@ -533,9 +533,12 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERS
add_compile_options
(
-fdiagnostics-color=always
)
add_compile_options
(
-fdiagnostics-color=always
)
endif
()
endif
()
# make check runs the entire set of examples and tests
add_custom_target
(
check COMMAND
${
CMAKE_CTEST_COMMAND
}
--output-on-failure -C
${
CMAKE_CFG_INTDIR
}
)
add_custom_target
(
check COMMAND
${
CMAKE_CTEST_COMMAND
}
--output-on-failure -C
${
CMAKE_CFG_INTDIR
}
)
add_custom_target
(
smoke COMMAND
${
CMAKE_CTEST_COMMAND
}
--output-on-failure -C
${
CMAKE_CFG_INTDIR
}
-L
"SMOKE_TEST|SMOKE_EXAMPLE"
)
# make smoke runs the tests and examples that runs within 30 seconds on gfx90a
add_custom_target
(
regression COMMAND
${
CMAKE_CTEST_COMMAND
}
--output-on-failure -C
${
CMAKE_CFG_INTDIR
}
-L
"REGRESSION_TEST|REGRESSION_EXAMPLE"
)
add_custom_target
(
smoke COMMAND
${
CMAKE_CTEST_COMMAND
}
--output-on-failure -C
${
CMAKE_CFG_INTDIR
}
-L
"SMOKE_TEST"
)
# make regression runs the tests and examples that runs within 30 seconds on gfx90a
add_custom_target
(
regression COMMAND
${
CMAKE_CTEST_COMMAND
}
--output-on-failure -C
${
CMAKE_CFG_INTDIR
}
-L
"REGRESSION_TEST"
)
...
...
example/CMakeLists.txt
View file @
46f69344
...
@@ -5,6 +5,9 @@ include_directories(BEFORE
...
@@ -5,6 +5,9 @@ include_directories(BEFORE
add_custom_target
(
examples
)
add_custom_target
(
examples
)
# list of examples that are labelled as REGRESSION_EXAMPLE for make regression (runtime less than 30 seconds)
# all other tests are labelled as SMOKE_EXAMPLE
set
(
REGRESSION_EXAMPLES
set
(
REGRESSION_EXAMPLES
example_sparse_embedding3_forward_layernorm
example_sparse_embedding3_forward_layernorm
)
)
...
@@ -113,12 +116,12 @@ function(add_example_executable EXAMPLE_NAME FILE_NAME)
...
@@ -113,12 +116,12 @@ function(add_example_executable EXAMPLE_NAME FILE_NAME)
endif
()
endif
()
#message("add_example returns ${result}")
#message("add_example returns ${result}")
if
(
result EQUAL 0 AND NOT
"
${
EXAMPLE_NAME
}
"
IN_LIST REGRESSION_EXAMPLES
)
if
(
result EQUAL 0 AND NOT
"
${
EXAMPLE_NAME
}
"
IN_LIST REGRESSION_EXAMPLES
)
message
(
"adding to SMOKE EXAMPLE FILTER
${
EXAMPLE_NAME
}
"
)
#
message("adding to SMOKE EXAMPLE FILTER ${EXAMPLE_NAME}")
set_tests_properties
(
${
EXAMPLE_NAME
}
PROPERTIES LABELS
"SMOKE_
EXAMPLE
"
)
set_tests_properties
(
${
EXAMPLE_NAME
}
PROPERTIES LABELS
"SMOKE_
TEST
"
)
add_dependencies
(
smoke
${
EXAMPLE_NAME
}
)
add_dependencies
(
smoke
${
EXAMPLE_NAME
}
)
elseif
(
result EQUAL 0 AND
"
${
EXAMPLE_NAME
}
"
IN_LIST REGRESSION_EXAMPLES
)
elseif
(
result EQUAL 0 AND
"
${
EXAMPLE_NAME
}
"
IN_LIST REGRESSION_EXAMPLES
)
message
(
"Adding to REGRESSION EXAMPLE FILTER
${
EXAMPLE_NAME
}
"
)
#
message("Adding to REGRESSION EXAMPLE FILTER ${EXAMPLE_NAME}")
set_tests_properties
(
${
EXAMPLE_NAME
}
PROPERTIES LABELS
"REGRESSION_
EXAMPLE
"
)
set_tests_properties
(
${
EXAMPLE_NAME
}
PROPERTIES LABELS
"REGRESSION_
TEST
"
)
add_dependencies
(
regression
${
EXAMPLE_NAME
}
)
add_dependencies
(
regression
${
EXAMPLE_NAME
}
)
endif
()
endif
()
set
(
result
${
result
}
PARENT_SCOPE
)
set
(
result
${
result
}
PARENT_SCOPE
)
...
...
test/CMakeLists.txt
View file @
46f69344
...
@@ -7,6 +7,8 @@ include(gtest)
...
@@ -7,6 +7,8 @@ include(gtest)
add_custom_target
(
tests
)
add_custom_target
(
tests
)
# list of tests that are labelled as REGRESSION_TEST for make regression (runtime less than 30 seconds)
# all other tests are labelled as SMOKE_TEST
set
(
REGRESSION_TESTS
set
(
REGRESSION_TESTS
test_gemm_standalone_xdl_fp16
test_gemm_standalone_xdl_fp16
test_gemm_fp16
test_gemm_fp16
...
@@ -201,14 +203,14 @@ function(add_gtest_executable TEST_NAME)
...
@@ -201,14 +203,14 @@ function(add_gtest_executable TEST_NAME)
rocm_install
(
TARGETS
${
TEST_NAME
}
COMPONENT tests
)
rocm_install
(
TARGETS
${
TEST_NAME
}
COMPONENT tests
)
set
(
result 0
)
set
(
result 0
)
endif
()
endif
()
message
(
"add_gtest returns
${
result
}
"
)
#
message("add_gtest returns ${result}")
set
(
result
${
result
}
PARENT_SCOPE
)
set
(
result
${
result
}
PARENT_SCOPE
)
if
(
result EQUAL 0 AND NOT
"
${
TEST_NAME
}
"
IN_LIST REGRESSION_TESTS
)
if
(
result EQUAL 0 AND NOT
"
${
TEST_NAME
}
"
IN_LIST REGRESSION_TESTS
)
message
(
"adding to
SMOKE TEST
FILTER
${
TEST_NAME
}
"
)
#
message("adding to
smoke test
FILTER ${TEST_NAME}")
set_tests_properties
(
${
TEST_NAME
}
PROPERTIES LABELS
"SMOKE_TEST"
)
set_tests_properties
(
${
TEST_NAME
}
PROPERTIES LABELS
"SMOKE_TEST"
)
add_dependencies
(
smoke
${
TEST_NAME
}
)
add_dependencies
(
smoke
${
TEST_NAME
}
)
elseif
(
result EQUAL 0 AND
"
${
TEST_NAME
}
"
IN_LIST REGRESSION_TESTS
)
elseif
(
result EQUAL 0 AND
"
${
TEST_NAME
}
"
IN_LIST REGRESSION_TESTS
)
message
(
"Adding to REGRESSION TEST FILTER
${
TEST_NAME
}
"
)
#
message("Adding to REGRESSION TEST FILTER ${TEST_NAME}")
set_tests_properties
(
${
TEST_NAME
}
PROPERTIES LABELS
"REGRESSION_TEST"
)
set_tests_properties
(
${
TEST_NAME
}
PROPERTIES LABELS
"REGRESSION_TEST"
)
add_dependencies
(
regression
${
TEST_NAME
}
)
add_dependencies
(
regression
${
TEST_NAME
}
)
endif
()
endif
()
...
...
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