CMakeLists.txt 1.09 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
if(DTYPES MATCHES "fp16" OR DTYPES MATCHES "fp32" OR NOT DEFINED DTYPES)
  add_custom_target(test_normalization)
endif()
if(DTYPES MATCHES "fp32" OR NOT DEFINED DTYPES)
  add_gtest_executable(test_layernorm2d_fp32 test_layernorm2d_fp32.cpp)
  add_gtest_executable(test_groupnorm_fp32 test_groupnorm_fp32.cpp)
  target_link_libraries(test_layernorm2d_fp32 PRIVATE utility device_normalization_instance)
  target_link_libraries(test_groupnorm_fp32 PRIVATE utility device_normalization_instance)
  add_dependencies(test_normalization test_layernorm2d_fp32)
  add_dependencies(test_normalization test_groupnorm_fp32)
endif()
if(DTYPES MATCHES "fp16" OR NOT DEFINED DTYPES)
  add_gtest_executable(test_layernorm2d_fp16 test_layernorm2d_fp16.cpp)
  add_gtest_executable(test_groupnorm_fp16 test_groupnorm_fp16.cpp)
  target_link_libraries(test_layernorm2d_fp16 PRIVATE utility device_normalization_instance)
  target_link_libraries(test_groupnorm_fp16 PRIVATE utility device_normalization_instance)
  add_dependencies(test_normalization test_layernorm2d_fp16)
  add_dependencies(test_normalization test_groupnorm_fp16)
endif()