mirror of
https://github.com/amd/blis.git
synced 2026-04-19 23:28:52 +00:00
Merge "AOCL-Windows: Update BLIS build system" into amd-staging-milan-3.1
This commit is contained in:
@@ -10,6 +10,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin")
|
||||
|
||||
|
||||
SET(AOCL_BLIS_FAMILY "zen" CACHE STRING "AOCL BLIS family name")
|
||||
SET(OPENMP_PATH "C:\\Program Files\\LLVM\\lib" CACHE STRING "openmp library
|
||||
path")
|
||||
set(TARGET_ARCH ${AOCL_BLIS_FAMILY})
|
||||
set(AOCL_BLIS_ZEN TRUE)
|
||||
set (PYTHON_EXE "python")
|
||||
@@ -132,7 +134,7 @@ endif ()
|
||||
if (ENABLE_TRSM_PREINVERSION)
|
||||
set(BLIS_ENABLE_TRSM_PREINVERSION TRUE)
|
||||
else()
|
||||
set(BLIS_DISABLE_TRSM_PREINVERSION TRUE)
|
||||
add_definitions(-DBLIS_DISABLE_TRSM_PREINVERSION)
|
||||
endif()
|
||||
|
||||
if (ENABLE_INT_TYPE_SIZE)
|
||||
@@ -504,10 +506,16 @@ file (STRINGS "version" BLIS_VERSION)
|
||||
set(BLIS_VERSION_STRING ${BLIS_VERSION})
|
||||
add_definitions(-DBLIS_VERSION_STRING="${BLIS_VERSION_STRING}")
|
||||
|
||||
message( STATUS "OPENMP PATH:" ${OPENMP_PATH})
|
||||
link_directories("${OPENMP_PATH}")
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
add_library("${PROJECT_NAME}" SHARED ${CMAKE_SOURCE_DIR}/bli_config.h
|
||||
${CMAKE_SOURCE_DIR}/include/${TARGET_ARCH}/blis.h
|
||||
${headers})
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries("${PROJECT_NAME}" PUBLIC "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_compile_definitions("${PROJECT_NAME}" PUBLIC -DBLIS_IS_BUILDING_LIBRARY)
|
||||
set_target_properties("${PROJECT_NAME}" PROPERTIES LINKER_LANGUAGE C OUTPUT_NAME "${LIB_NAME}")
|
||||
endif()
|
||||
@@ -515,6 +523,9 @@ if(NOT BUILD_SHARED_LIBS)
|
||||
add_library("${PROJECT_NAME}" STATIC ${CMAKE_SOURCE_DIR}/bli_config.h
|
||||
${CMAKE_SOURCE_DIR}/include/${TARGET_ARCH}/blis.h
|
||||
${headers})
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries("${PROJECT_NAME}" PUBLIC "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
set_target_properties("${PROJECT_NAME}" PROPERTIES LINKER_LANGUAGE C OUTPUT_NAME "${LIB_NAME}")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -272,6 +272,14 @@
|
||||
#define sgemmt_ sgemmt
|
||||
#define zgemmt_ zgemmt
|
||||
#define cgemmt_ cgemmt
|
||||
#define sgemm_batch_ sgemm_batch
|
||||
#define dgemm_batch_ dgemm_batch
|
||||
#define cgemm_batch_ cgemm_batch
|
||||
#define zgemm_batch_ zgemm_batch
|
||||
#define saxpby_ saxpby
|
||||
#define daxpby_ daxpby
|
||||
#define caxpby_ caxpby
|
||||
#define zaxpby_ zaxpby
|
||||
#define cher2k_ cher2k
|
||||
#define zher2k_ zher2k
|
||||
#define cherk_ cherk
|
||||
|
||||
@@ -6,4 +6,5 @@ target_sources("${PROJECT_NAME}"
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_dotxf_zen_int_8.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_axpyf_zen_int_5.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_axpyf_zen_int_4.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_axpyf_zen_int_6.c
|
||||
)
|
||||
|
||||
@@ -1,99 +1,173 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
##Copyright (C) 2021, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
add_definitions(-DBLAS="AOCL")
|
||||
|
||||
add_executable(TestAminv test_aminv.c)
|
||||
target_link_libraries(TestAminv debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestAminv "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestAminv optimized "${LIB_NAME}.lib")
|
||||
|
||||
add_executable(TestAxpyv test_axpyv.c)
|
||||
target_link_libraries(TestAxpyv debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestAxpyv "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestAxpyv optimized "${LIB_NAME}.lib")
|
||||
|
||||
add_executable(TestAxpbyv test_axpbyv.c)
|
||||
target_link_libraries(TestAxpbyv debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestAxpbyv "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestAxpbyv optimized "${LIB_NAME}.lib")
|
||||
|
||||
add_executable(TestCopyv test_copyv.c)
|
||||
target_link_libraries(TestCopyv debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestCopyv "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestCopyv optimized "${LIB_NAME}.lib")
|
||||
|
||||
add_executable(TestCabs1 test_cabs1.c)
|
||||
target_link_libraries(TestCabs1 debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestCabs1 "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestCabs1 optimized "${LIB_NAME}.lib")
|
||||
|
||||
add_executable(TestDotv test_dotv.c)
|
||||
target_link_libraries(TestDotv debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestDotv "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestDotv optimized "${LIB_NAME}.lib")
|
||||
|
||||
add_executable(TestGemm test_gemm.c)
|
||||
target_link_libraries(TestGemm debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestGemm "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestGemm optimized "${LIB_NAME}.lib")
|
||||
|
||||
add_executable(TestGemmBatch test_gemm_batch.c)
|
||||
target_link_libraries(TestGemmBatch debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestGemmBatch "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestGemmBatch optimized "${LIB_NAME}.lib")
|
||||
|
||||
add_executable(TestGemm3m test_gemm3m.c)
|
||||
target_link_libraries(TestGemm3m debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestGemm3m "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestGemm3m optimized "${LIB_NAME}.lib")
|
||||
|
||||
add_executable(TestGemmt test_gemmt.c)
|
||||
target_link_libraries(TestGemmt debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestGemmt "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestGemmt optimized "${LIB_NAME}.lib")
|
||||
|
||||
add_executable(TestGemv test_gemv.c)
|
||||
target_link_libraries(TestGemv debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestGemv "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestGemv optimized "${LIB_NAME}.lib")
|
||||
|
||||
add_executable(TestGer test_ger.c)
|
||||
target_link_libraries(TestGer debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestGer "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestGer optimized "${LIB_NAME}.lib")
|
||||
|
||||
add_executable(TestHemm test_hemm.c)
|
||||
target_link_libraries(TestHemm debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestHemm "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestHemm optimized "${LIB_NAME}.lib")
|
||||
|
||||
add_executable(TestHemv test_hemv.c)
|
||||
target_link_libraries(TestHemv debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestHemv "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestHemv optimized "${LIB_NAME}.lib")
|
||||
|
||||
add_executable(TestHer test_her.c)
|
||||
target_link_libraries(TestHer debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestHer "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestHer optimized "${LIB_NAME}.lib")
|
||||
|
||||
add_executable(TestHer2 test_her2.c)
|
||||
target_link_libraries(TestHer2 debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestHer2 "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestHer2 optimized "${LIB_NAME}.lib")
|
||||
|
||||
add_executable(TestHer2k test_her2k.c)
|
||||
target_link_libraries(TestHer2k debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestHer2k "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestHer2k optimized "${LIB_NAME}.lib")
|
||||
|
||||
add_executable(TestHerk test_herk.c)
|
||||
target_link_libraries(TestHerk debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestHerk "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestHerk optimized "${LIB_NAME}.lib")
|
||||
|
||||
add_executable(TestScalv test_scalv.c)
|
||||
target_link_libraries(TestScalv debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestScalv "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestScalv optimized "${LIB_NAME}.lib")
|
||||
|
||||
add_executable(TestSwapv test_swapv.c)
|
||||
target_link_libraries(TestSwapv debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestSwapv "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestSwapv optimized "${LIB_NAME}.lib")
|
||||
|
||||
add_executable(TestTrmm test_trmm.c)
|
||||
target_link_libraries(TestTrmm debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestTrmm "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestTrmm optimized "${LIB_NAME}.lib")
|
||||
|
||||
add_executable(TestTrmv test_trmv.c)
|
||||
target_link_libraries(TestTrmv debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestTrmv "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestTrmv optimized "${LIB_NAME}.lib")
|
||||
|
||||
add_executable(TestTrsm test_trsm.c)
|
||||
target_link_libraries(TestTrsm debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestTrsm "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestTrsm optimized "${LIB_NAME}.lib")
|
||||
|
||||
add_executable(TestTrsv test_trsv.c)
|
||||
target_link_libraries(TestTrsv debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(TestTrsv "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(TestTrsv optimized "${LIB_NAME}.lib")
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2020, Advanced Micro Devices, Inc.
|
||||
Copyright (C) 2021, Advanced Micro Devices, Inc. All rights reserved..
|
||||
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
@@ -31,7 +31,11 @@
|
||||
|
||||
*/
|
||||
|
||||
#ifdef WIN32
|
||||
#include <io.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include "blis.h"
|
||||
|
||||
//#define FILE_IN_OUT
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
##Copyright (C) 2021, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
|
||||
@@ -6,7 +6,10 @@ add_executable(test_libblis "")
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
target_link_libraries(test_libblis debug "${LIB_NAME}.lib" )
|
||||
target_link_libraries(test_libblis debug "${LIB_NAME}.lib")
|
||||
if(ENABLE_OPENMP)
|
||||
target_link_libraries(test_libblis "${OPENMP_PATH}/libomp.lib")
|
||||
endif()
|
||||
target_link_libraries(test_libblis optimized "${LIB_NAME}.lib")
|
||||
|
||||
|
||||
|
||||
@@ -334,7 +334,7 @@ void libblis_test_read_ops_file( char* input_filename, test_ops_t* ops )
|
||||
|
||||
// Attempt to open input file corresponding to input_filename as
|
||||
// read-only/binary.
|
||||
input_stream = fopen( input_filename, "rb" );
|
||||
input_stream = fopen( input_filename, "r" );
|
||||
libblis_test_fopen_check_stream( input_filename, input_stream );
|
||||
|
||||
// Initialize the individual override field to FALSE.
|
||||
@@ -439,7 +439,7 @@ void libblis_test_read_params_file( char* input_filename, test_params_t* params
|
||||
|
||||
// Attempt to open input file corresponding to input_filename as
|
||||
// read-only/binary.
|
||||
input_stream = fopen( input_filename, "rb" );
|
||||
input_stream = fopen( input_filename, "r" );
|
||||
libblis_test_fopen_check_stream( input_filename, input_stream );
|
||||
|
||||
// Read the number of repeats.
|
||||
|
||||
Reference in New Issue
Block a user