Skip to content

Commit ba201c1

Browse files
authored
Enable GEMM3M tests on supported platforms
1 parent 0ce794f commit ba201c1

2 files changed

Lines changed: 45 additions & 1 deletion

File tree

test/CMakeLists.txt

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,18 @@ endif()
2121
if (BUILD_COMPLEX16)
2222
list (APPEND OpenBLAS_Tests zblat1 zblat2 zblat3)
2323
endif()
24-
message (STATUS CCOMP ${CMAKE_C_COMPILER_ID} FCOMP ${CMAKE_Fortran_COMPILER_ID})
24+
25+
set (USE_GEMM3M 0)
26+
if (${ARCH} MATCHES x86|x86_64|ia64|mips)
27+
set(USE_GEMM3M 1)
28+
if (BUILD_COMPLEX)
29+
list (APPEND OpenBLAS_Tests cblat3_3m)
30+
endif ()
31+
if (BUILD_COMPLEX16)
32+
list (APPEND OpenBLAS_Tests zblat3_3m)
33+
endif ()
34+
endif ()
35+
2536
foreach(test_bin ${OpenBLAS_Tests})
2637
add_executable(${test_bin} ${test_bin}.f)
2738
target_link_libraries(${test_bin} ${OpenBLAS_LIBNAME})
@@ -82,4 +93,10 @@ add_test(NAME "${float_type}blas2"
8293
COMMAND ${helper_prefix} $<TARGET_FILE:${float_type}blat2> "${PROJECT_SOURCE_DIR}/test/${float_type}blat2.dat" ${float_type_upper}BLAT2.SUMM)
8394
add_test(NAME "${float_type}blas3"
8495
COMMAND ${helper_prefix} $<TARGET_FILE:${float_type}blat3> "${PROJECT_SOURCE_DIR}/test/${float_type}blat3.dat" ${float_type_upper}BLAT3.SUMM)
96+
if (USE_GEMM3M)
97+
if ((${float_type} STREQUAL "c") OR (${float_type} STREQUAL "z"))
98+
add_test(NAME "${float_type}blas3_3m"
99+
COMMAND ${helper_prefix} $<TARGET_FILE:${float_type}blat3_3m> "${PROJECT_SOURCE_DIR}/test/${float_type}blat3_3m.dat" ${float_type_upper}BLAT3_3M.SUMM)
100+
endif()
101+
endif()
85102
endforeach()

test/Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@ ifeq ($(F_COMPILER),GFORTRAN)
44
override FFLAGS += -fno-tree-vectorize
55
endif
66

7+
SUPPORT_GEMM3M = 0
8+
9+
ifeq ($(ARCH), x86)
10+
SUPPORT_GEMM3M = 1
11+
endif
12+
13+
ifeq ($(ARCH), x86_64)
14+
SUPPORT_GEMM3M = 1
15+
endif
16+
17+
ifeq ($(ARCH), ia64)
18+
SUPPORT_GEMM3M = 1
19+
endif
20+
21+
ifeq ($(ARCH), MIPS)
22+
SUPPORT_GEMM3M = 1
23+
endif
24+
725
ifeq ($(NOFORTRAN),1)
826
all ::
927
else
@@ -153,11 +171,20 @@ ifeq ($(BUILD_DOUBLE),1)
153171
D3=dblat3
154172
endif
155173
ifeq ($(BUILD_COMPLEX),1)
174+
ifeq ($(SUPPORT_GEMM3M),1)
175+
C3=cblat3 cblat3_3m
176+
else
156177
C3=cblat3
157178
endif
179+
endif
158180
ifeq ($(BUILD_COMPLEX16),1)
181+
ifeq ($(SUPPORT_GEMM3M),1)
182+
Z3=zblat3 zblat3_3m
183+
else
159184
Z3=zblat3
160185
endif
186+
endif
187+
161188

162189
level3: $(B3) $(S3) $(D3) $(C3) $(Z3)
163190

0 commit comments

Comments
 (0)