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
b2027284
Commit
b2027284
authored
Jan 15, 2025
by
Aviral Goel
Browse files
smoke and regression targets working with tests
parent
04dd3148
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
1 deletion
+74
-1
CMakeLists.txt
CMakeLists.txt
+5
-0
example/CMakeLists.txt
example/CMakeLists.txt
+24
-0
test/CMakeLists.txt
test/CMakeLists.txt
+45
-1
No files found.
CMakeLists.txt
View file @
b2027284
...
@@ -534,6 +534,11 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERS
...
@@ -534,6 +534,11 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERS
endif
()
endif
()
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"
)
add_custom_target
(
regression COMMAND
${
CMAKE_CTEST_COMMAND
}
--output-on-failure -C
${
CMAKE_CFG_INTDIR
}
-L
"REGRESSION_TEST|REGRESSION_EXAMPLE"
)
file
(
GLOB_RECURSE INSTANCE_FILES
"
${
PROJECT_SOURCE_DIR
}
/*/device_*_instance.cpp"
)
file
(
GLOB_RECURSE INSTANCE_FILES
"
${
PROJECT_SOURCE_DIR
}
/*/device_*_instance.cpp"
)
file
(
GLOB dir_list RELATIVE
${
PROJECT_SOURCE_DIR
}
/library/src/tensor_operation_instance/gpu
${
PROJECT_SOURCE_DIR
}
/library/src/tensor_operation_instance/gpu/*
)
file
(
GLOB dir_list RELATIVE
${
PROJECT_SOURCE_DIR
}
/library/src/tensor_operation_instance/gpu
${
PROJECT_SOURCE_DIR
}
/library/src/tensor_operation_instance/gpu/*
)
...
...
example/CMakeLists.txt
View file @
b2027284
...
@@ -5,6 +5,11 @@ include_directories(BEFORE
...
@@ -5,6 +5,11 @@ include_directories(BEFORE
add_custom_target
(
examples
)
add_custom_target
(
examples
)
set
(
REGRESSION_EXAMPLES
example_sparse_embedding3_forward_layernorm
)
function
(
add_example_dependencies EXAMPLE_NAME FILE_NAME
)
function
(
add_example_dependencies EXAMPLE_NAME FILE_NAME
)
if
(
FILE_NAME
)
if
(
FILE_NAME
)
add_dependencies
(
EXAMPLE_NAME FILE_NAME
)
add_dependencies
(
EXAMPLE_NAME FILE_NAME
)
...
@@ -107,6 +112,15 @@ function(add_example_executable EXAMPLE_NAME FILE_NAME)
...
@@ -107,6 +112,15 @@ function(add_example_executable EXAMPLE_NAME FILE_NAME)
set
(
result 0
)
set
(
result 0
)
endif
()
endif
()
#message("add_example returns ${result}")
#message("add_example returns ${result}")
if
(
result EQUAL 0 AND NOT
"
${
EXAMPLE_NAME
}
"
IN_LIST REGRESSION_EXAMPLES
)
message
(
"adding to SMOKE EXAMPLE FILTER
${
EXAMPLE_NAME
}
"
)
set_tests_properties
(
${
EXAMPLE_NAME
}
PROPERTIES LABELS
"SMOKE_EXAMPLE"
)
add_dependencies
(
smoke
${
EXAMPLE_NAME
}
)
elseif
(
result EQUAL 0 AND
"
${
EXAMPLE_NAME
}
"
IN_LIST REGRESSION_EXAMPLES
)
message
(
"Adding to REGRESSION EXAMPLE FILTER
${
EXAMPLE_NAME
}
"
)
set_tests_properties
(
${
EXAMPLE_NAME
}
PROPERTIES LABELS
"REGRESSION_EXAMPLE"
)
add_dependencies
(
regression
${
EXAMPLE_NAME
}
)
endif
()
set
(
result
${
result
}
PARENT_SCOPE
)
set
(
result
${
result
}
PARENT_SCOPE
)
endfunction
(
add_example_executable EXAMPLE_NAME
)
endfunction
(
add_example_executable EXAMPLE_NAME
)
...
@@ -189,6 +203,16 @@ function(add_example_executable_no_testing EXAMPLE_NAME FILE_NAME)
...
@@ -189,6 +203,16 @@ function(add_example_executable_no_testing EXAMPLE_NAME FILE_NAME)
set
(
result 0
)
set
(
result 0
)
endif
()
endif
()
#message("add_example returns ${result}")
#message("add_example returns ${result}")
# if(result EQUAL 0 AND NOT "${EXAMPLE_NAME}" IN_LIST REGRESSION_EXAMPLES)
# message("NO TESTING:: adding to SMOKE EXAMPLE FILTER ${EXAMPLE_NAME}")
# set_tests_properties(${EXAMPLE_NAME} PROPERTIES LABELS "SMOKE_EXAMPLE")
# add_dependencies(smoke ${EXAMPLE_NAME})
# elseif(result EQUAL 0 AND "${EXAMPLE_NAME}" IN_LIST REGRESSION_EXAMPLES)
# message("NO TESTING:: Adding to REGRESSION EXAMPLE FILTER ${EXAMPLE_NAME}")
# set_tests_properties(${EXAMPLE_NAME} PROPERTIES LABELS "REGRESSION_EXAMPLE")
# add_dependencies(regression ${EXAMPLE_NAME})
# endif()
set
(
result
${
result
}
PARENT_SCOPE
)
set
(
result
${
result
}
PARENT_SCOPE
)
endfunction
(
add_example_executable_no_testing EXAMPLE_NAME
)
endfunction
(
add_example_executable_no_testing EXAMPLE_NAME
)
...
...
test/CMakeLists.txt
View file @
b2027284
...
@@ -7,6 +7,32 @@ include(gtest)
...
@@ -7,6 +7,32 @@ include(gtest)
add_custom_target
(
tests
)
add_custom_target
(
tests
)
set
(
REGRESSION_TESTS
test_gemm_standalone_xdl_fp16
test_gemm_fp16
test_gemm_splitk
test_batched_gemm
test_gemm_universal
test_batched_gemm_softmax_gemm_fp16
test_batched_gemm_softmax_gemm_permute_fp16
test_batched_gemm_bias_softmax_gemm_permute_fp16
test_batched_gemm_softmax_gemm_permute_bf16
test_batched_gemm_bias_softmax_gemm_permute_bf16
test_grouped_gemm_splitk
test_reduce_no_index
test_reduce_with_index
test_convnd_fwd
test_convnd_bwd_data
test_grouped_convnd_fwd
test_grouped_convnd_bwd_weight
test_softmax_rank3
test_softmax_rank4
test_batchnorm_fwd_rank_4
test_batchnorm_bwd_rank_4
test_grouped_convnd_bwd_data_xdl
test_conv_tensor_rearrange
)
function
(
add_test_executable TEST_NAME
)
function
(
add_test_executable TEST_NAME
)
message
(
"adding test
${
TEST_NAME
}
"
)
message
(
"adding test
${
TEST_NAME
}
"
)
set
(
result 1
)
set
(
result 1
)
...
@@ -88,6 +114,15 @@ function(add_test_executable TEST_NAME)
...
@@ -88,6 +114,15 @@ function(add_test_executable TEST_NAME)
endif
()
endif
()
#message("add_test returns ${result}")
#message("add_test returns ${result}")
set
(
result
${
result
}
PARENT_SCOPE
)
set
(
result
${
result
}
PARENT_SCOPE
)
if
(
result EQUAL 0 AND NOT
"
${
TEST_NAME
}
"
IN_LIST REGRESSION_TESTS
)
message
(
"adding to SMOKE TEST FILTER
${
TEST_NAME
}
"
)
set_tests_properties
(
${
TEST_NAME
}
PROPERTIES LABELS
"SMOKE_TEST"
)
add_dependencies
(
smoke
${
TEST_NAME
}
)
elseif
(
result EQUAL 0 AND
"
${
TEST_NAME
}
"
IN_LIST REGRESSION_TESTS
)
message
(
"Adding to REGRESSION TEST FILTER
${
TEST_NAME
}
"
)
set_tests_properties
(
${
TEST_NAME
}
PROPERTIES LABELS
"REGRESSION_TEST"
)
add_dependencies
(
regression
${
TEST_NAME
}
)
endif
()
endfunction
()
endfunction
()
function
(
add_gtest_executable TEST_NAME
)
function
(
add_gtest_executable TEST_NAME
)
...
@@ -166,8 +201,17 @@ function(add_gtest_executable TEST_NAME)
...
@@ -166,8 +201,17 @@ 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
)
message
(
"adding to SMOKE TEST FILTER
${
TEST_NAME
}
"
)
set_tests_properties
(
${
TEST_NAME
}
PROPERTIES LABELS
"SMOKE_TEST"
)
add_dependencies
(
smoke
${
TEST_NAME
}
)
elseif
(
result EQUAL 0 AND
"
${
TEST_NAME
}
"
IN_LIST REGRESSION_TESTS
)
message
(
"Adding to REGRESSION TEST FILTER
${
TEST_NAME
}
"
)
set_tests_properties
(
${
TEST_NAME
}
PROPERTIES LABELS
"REGRESSION_TEST"
)
add_dependencies
(
regression
${
TEST_NAME
}
)
endif
()
endfunction
()
endfunction
()
add_compile_options
(
-Wno-c++20-extensions
)
add_compile_options
(
-Wno-c++20-extensions
)
...
...
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