CMakeLists.txt 1.72 KB
Newer Older
1
include_directories(BEFORE
Adam Osewski's avatar
Adam Osewski committed
2
    ${PROJECT_SOURCE_DIR}/
3
4
)

JD's avatar
JD committed
5
6
include(googletest)

7
8
add_custom_target(tests)

Chao Liu's avatar
Chao Liu committed
9
10
function(add_test_executable TEST_NAME)
    message("adding test ${TEST_NAME}")
11
    add_executable(${TEST_NAME} ${ARGN})
12
    add_test(NAME ${TEST_NAME} COMMAND $<TARGET_FILE:${TEST_NAME}>)
13
14
    add_dependencies(tests ${TEST_NAME})
    add_dependencies(check ${TEST_NAME})
15
    rocm_install(TARGETS ${TEST_NAME} COMPONENT tests)
Chao Liu's avatar
Chao Liu committed
16
endfunction(add_test_executable TEST_NAME)
17

18
19
20
21
22
23
24
include(GoogleTest)

function(add_gtest_executable TEST_NAME)
    message("adding gtest ${TEST_NAME}")
    add_executable(${TEST_NAME} ${ARGN})
    add_dependencies(tests ${TEST_NAME})
    add_dependencies(check ${TEST_NAME})
25

26
    # suppress gtest warnings
Adam Osewski's avatar
Adam Osewski committed
27
    target_compile_options(${TEST_NAME} PRIVATE -Wno-global-constructors -Wno-undef)
28
29
    target_link_libraries(${TEST_NAME} PRIVATE gtest_main)
    gtest_discover_tests(${TEST_NAME})
30
    rocm_install(TARGETS ${TEST_NAME} COMPONENT tests)
31
32
endfunction(add_gtest_executable TEST_NAME)

Chao Liu's avatar
Chao Liu committed
33
34
35
36
37
38
add_subdirectory(magic_number_division)
add_subdirectory(space_filling_curve)
add_subdirectory(conv_util)
add_subdirectory(reference_conv_fwd)
add_subdirectory(gemm)
add_subdirectory(gemm_split_k)
Chao Liu's avatar
Chao Liu committed
39
40
add_subdirectory(gemm_reduce)
add_subdirectory(batched_gemm)
41
add_subdirectory(batched_gemm_reduce)
Anthony Chang's avatar
Anthony Chang committed
42
add_subdirectory(batched_gemm_gemm)
Anthony Chang's avatar
Anthony Chang committed
43
add_subdirectory(batched_gemm_softmax_gemm)
44
add_subdirectory(batched_gemm_softmax_gemm_permute)
Chao Liu's avatar
Chao Liu committed
45
add_subdirectory(grouped_gemm)
46
add_subdirectory(reduce)
47
add_subdirectory(convnd_fwd)
48
add_subdirectory(convnd_bwd_weight)
JD's avatar
JD committed
49
add_subdirectory(convnd_bwd_data)
50
add_subdirectory(grouped_convnd_fwd)
51
add_subdirectory(block_to_ctile_map)
52
add_subdirectory(softmax)
53
add_subdirectory(normalization)
Adam Osewski's avatar
Adam Osewski committed
54
add_subdirectory(data_type)