Skip to content

Commit

Permalink
Enable GEMM3M tests on supported platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-frbg authored Feb 25, 2024
1 parent 0ce794f commit ba201c1
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
19 changes: 18 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,18 @@ endif()
if (BUILD_COMPLEX16)
list (APPEND OpenBLAS_Tests zblat1 zblat2 zblat3)
endif()
message (STATUS CCOMP ${CMAKE_C_COMPILER_ID} FCOMP ${CMAKE_Fortran_COMPILER_ID})

set (USE_GEMM3M 0)
if (${ARCH} MATCHES x86|x86_64|ia64|mips)
set(USE_GEMM3M 1)
if (BUILD_COMPLEX)
list (APPEND OpenBLAS_Tests cblat3_3m)
endif ()
if (BUILD_COMPLEX16)
list (APPEND OpenBLAS_Tests zblat3_3m)
endif ()
endif ()

foreach(test_bin ${OpenBLAS_Tests})
add_executable(${test_bin} ${test_bin}.f)
target_link_libraries(${test_bin} ${OpenBLAS_LIBNAME})
Expand Down Expand Up @@ -82,4 +93,10 @@ add_test(NAME "${float_type}blas2"
COMMAND ${helper_prefix} $<TARGET_FILE:${float_type}blat2> "${PROJECT_SOURCE_DIR}/test/${float_type}blat2.dat" ${float_type_upper}BLAT2.SUMM)
add_test(NAME "${float_type}blas3"
COMMAND ${helper_prefix} $<TARGET_FILE:${float_type}blat3> "${PROJECT_SOURCE_DIR}/test/${float_type}blat3.dat" ${float_type_upper}BLAT3.SUMM)
if (USE_GEMM3M)
if ((${float_type} STREQUAL "c") OR (${float_type} STREQUAL "z"))
add_test(NAME "${float_type}blas3_3m"
COMMAND ${helper_prefix} $<TARGET_FILE:${float_type}blat3_3m> "${PROJECT_SOURCE_DIR}/test/${float_type}blat3_3m.dat" ${float_type_upper}BLAT3_3M.SUMM)
endif()
endif()
endforeach()
27 changes: 27 additions & 0 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ ifeq ($(F_COMPILER),GFORTRAN)
override FFLAGS += -fno-tree-vectorize
endif

SUPPORT_GEMM3M = 0

ifeq ($(ARCH), x86)
SUPPORT_GEMM3M = 1
endif

ifeq ($(ARCH), x86_64)
SUPPORT_GEMM3M = 1
endif

ifeq ($(ARCH), ia64)
SUPPORT_GEMM3M = 1
endif

ifeq ($(ARCH), MIPS)
SUPPORT_GEMM3M = 1
endif

ifeq ($(NOFORTRAN),1)
all ::
else
Expand Down Expand Up @@ -153,11 +171,20 @@ ifeq ($(BUILD_DOUBLE),1)
D3=dblat3
endif
ifeq ($(BUILD_COMPLEX),1)
ifeq ($(SUPPORT_GEMM3M),1)
C3=cblat3 cblat3_3m
else
C3=cblat3
endif
endif
ifeq ($(BUILD_COMPLEX16),1)
ifeq ($(SUPPORT_GEMM3M),1)
Z3=zblat3 zblat3_3m
else
Z3=zblat3
endif
endif


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

Expand Down

0 comments on commit ba201c1

Please sign in to comment.