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

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

8
9
add_custom_target(tests)

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

19
20
21
22
23
24
25
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})
26

27
    # suppress gtest warnings
Adam Osewski's avatar
Adam Osewski committed
28
    target_compile_options(${TEST_NAME} PRIVATE -Wno-global-constructors -Wno-undef)
29
    target_link_libraries(${TEST_NAME} PRIVATE gtest_main)
30
    add_test(NAME ${TEST_NAME} COMMAND $<TARGET_FILE:${TEST_NAME}>)
31
    rocm_install(TARGETS ${TEST_NAME} COMPONENT tests)
32
33
endfunction(add_gtest_executable TEST_NAME)

Alan Turner's avatar
Alan Turner committed
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
if(CK_BUILD_JIT_LIB)
    add_subdirectory(jit_library)
else()
    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_layernorm)
    add_subdirectory(gemm_split_k)
    add_subdirectory(gemm_reduce)
    add_subdirectory(batched_gemm)
    add_subdirectory(batched_gemm_reduce)
    add_subdirectory(batched_gemm_gemm)
    add_subdirectory(batched_gemm_softmax_gemm)
    add_subdirectory(batched_gemm_softmax_gemm_permute)
    add_subdirectory(grouped_gemm)
    add_subdirectory(reduce)
    add_subdirectory(convnd_fwd)
    add_subdirectory(convnd_bwd_data)
    add_subdirectory(grouped_convnd_fwd)
    add_subdirectory(grouped_convnd_bwd_weight)
    add_subdirectory(block_to_ctile_map)
    add_subdirectory(softmax)
    add_subdirectory(normalization)
    add_subdirectory(data_type)
    add_subdirectory(elementwise_normalization)
    add_subdirectory(batchnorm)
    add_subdirectory(contraction)
    add_subdirectory(pool_fwd)
64
65
    add_subdirectory(batched_gemm_multi_d)
    add_subdirectory(grouped_convnd_bwd_data)
66
if(GPU_TARGETS MATCHES "gfx11")
67
68
    add_subdirectory(wmma_op)
endif()