mirror of
https://github.com/amd/blis.git
synced 2026-04-19 23:28:52 +00:00
CMake: Adding new portable CMake system.
- A completely new system, made to be closer to Make system. AMD-Internal: [CPUPL-2748] Change-Id: I83232786406cdc4f0a0950fb6ac8f551e5968529
This commit is contained in:
1755
CMakeLists.txt
1755
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
206
addon/CMakeLists.txt
Normal file
206
addon/CMakeLists.txt
Normal file
@@ -0,0 +1,206 @@
|
||||
##Copyright (C) 2023, Advanced Micro Devices, Inc ##
|
||||
|
||||
# Writing a function that will be used to generate the required object
|
||||
# libraries for the required addons.
|
||||
function(generate_addon_targets addon_target)
|
||||
# Collect all subdirectory paths that have at least one file with suffix in ADDON_C99_SUFS list.
|
||||
get_filepaths_with_suffixes(LOCAL_SOURCE_C99_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${addon_target}" "${ADDON_C99_SUFS}")
|
||||
# We want to break the files above in 2 categories, files in kernel directory and the rest.
|
||||
# Only list files in kernel directory.
|
||||
set(LOCAL_KERNEL_FILES_C99 ${LOCAL_SOURCE_FILES})
|
||||
list(FILTER LOCAL_KERNEL_FILES_C99 INCLUDE REGEX ${addon_target}/kernels/)
|
||||
# All C99 files, except of the ones in kernels directory.
|
||||
list(REMOVE_ITEM LOCAL_SOURCE_C99_FILES ${LOCAL_KERNEL_FILES_C99})
|
||||
|
||||
# Collect all subdirectory paths that have at least one file with suffix in ADDON_H99_SUFS list.
|
||||
get_dirpaths_with_suffixes(CADDONINCFLAGS "${CMAKE_CURRENT_SOURCE_DIR}/${addon_target}" "${ADDON_H99_SUFS}")
|
||||
|
||||
# Only generate the object library if there is at least one source file.
|
||||
list(LENGTH LOCAL_SOURCE_C99_FILES size)
|
||||
if(size GREATER 0)
|
||||
# Create an object library using the source file list above.
|
||||
add_library(${addon_target}_C99_ADDON
|
||||
OBJECT
|
||||
${LOCAL_SOURCE_C99_FILES}
|
||||
)
|
||||
# Include the corresponding make_defs.cmake that holds the required compiler options.
|
||||
include(${CMAKE_SOURCE_DIR}/config/${BLIS_CONFIG_FAMILY}/make_defs.cmake)
|
||||
# Use PRIVATE keyword for option setting since we do not want the properties to propagate in other targets.
|
||||
# mimicing get-addon-c99flags-for
|
||||
target_compile_options(${addon_target}_C99_ADDON
|
||||
PRIVATE
|
||||
# load-var-for,COPTFLAGS
|
||||
${COPTFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CDBGFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CWARNFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CMISCFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CLANGFLAGS}
|
||||
# in get-addon-c99flags-for
|
||||
${BUILD_SYMFLAGS}
|
||||
)
|
||||
target_compile_definitions(${addon_target}_C99_ADDON
|
||||
PRIVATE
|
||||
# in get-noopt-cflags-for
|
||||
${CPPROCFLAGS}
|
||||
# in get-noopt-cflags-for
|
||||
${VERS_DEF}
|
||||
# in get-addon-c99flags-for
|
||||
${BUILD_CPPFLAGS}
|
||||
)
|
||||
target_include_directories(${addon_target}_C99_ADDON
|
||||
BEFORE
|
||||
PRIVATE
|
||||
# in get-noopt-cflags-for
|
||||
${CINFLAGS}
|
||||
# in get-addon-c99flags-for
|
||||
${CADDONINCFLAGS}
|
||||
)
|
||||
if(THREADING_MODEL STREQUAL "openmp")
|
||||
# Equivalent to CTHREADFLAGS in get-noopt-cflags-for
|
||||
target_link_libraries(${addon_target}_C99_ADDON PRIVATE OpenMP::OpenMP_C)
|
||||
elseif(THREADING_MODEL STREQUAL "pthreads")
|
||||
# in get-noopt-cflags-for
|
||||
target_compile_options(${addon_target}_C99_ADDON PRIVATE ${CTHREADFLAGS})
|
||||
endif()
|
||||
if(BUILD_SHARED_LIBS)
|
||||
# Equivalent to CPICFLAGS in get-noopt-cflags-for
|
||||
set_target_properties(${addon_target}_C99_ADDON PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
add_dependencies(${addon_target}_C99_ADDON flat-header)
|
||||
# Put all those targets under object-libs-targets folder name so that they appear all together in IDE.
|
||||
set_target_properties(${addon_target}_C99_ADDON PROPERTIES FOLDER object-libs-targets)
|
||||
endif()
|
||||
|
||||
# Only generate the object library if there is at least one source file.
|
||||
list(LENGTH LOCAL_KERNEL_FILES_C99 size)
|
||||
if(size GREATER 0)
|
||||
# Create an object library using the kernel source file list above.
|
||||
add_library(${addon_target}_C99_KERNEL_ADDON
|
||||
OBJECT
|
||||
${LOCAL_KERNEL_FILES_C99}
|
||||
)
|
||||
# Include the corresponding make_defs.cmake that holds the required compiler options.
|
||||
include(${CMAKE_SOURCE_DIR}/config/${BLIS_CONFIG_FAMILY}/make_defs.cmake)
|
||||
# Use PRIVATE keyword for option setting since we do not want the properties to propagate in other targets.
|
||||
# mimicing get-addon-c99flags-for
|
||||
target_compile_options(${addon_target}_C99_KERNEL_ADDON
|
||||
PRIVATE
|
||||
# load-var-for,CKOPTFLAGS
|
||||
${CKOPTFLAGS}
|
||||
# load-var-for,CKVECFLAGS
|
||||
${CKVECFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CDBGFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CWARNFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CMISCFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CLANGFLAGS}
|
||||
# in get-addon-kernel-c99flags-for
|
||||
${BUILD_SYMFLAGS}
|
||||
)
|
||||
target_compile_definitions(${addon_target}_C99_KERNEL_ADDON
|
||||
PRIVATE
|
||||
# in get-noopt-cflags-for
|
||||
${CPPROCFLAGS}
|
||||
# in get-noopt-cflags-for
|
||||
${VERS_DEF}
|
||||
# in get-addon-kernel-c99flags-for
|
||||
${BUILD_CPPFLAGS}
|
||||
)
|
||||
target_include_directories(${addon_target}_C99_KERNEL_ADDON
|
||||
BEFORE
|
||||
PRIVATE
|
||||
# in get-noopt-cflags-for
|
||||
${CINFLAGS}
|
||||
# in get-addon-kernel-c99flags-for
|
||||
${CADDONINCFLAGS}
|
||||
)
|
||||
if(THREADING_MODEL STREQUAL "openmp")
|
||||
# Equivalent to CTHREADFLAGS in get-noopt-cflags-for
|
||||
target_link_libraries(${addon_target}_C99_KERNEL_ADDON PRIVATE OpenMP::OpenMP_C)
|
||||
elseif(THREADING_MODEL STREQUAL "pthreads")
|
||||
# in get-noopt-cflags-for
|
||||
target_compile_options(${addon_target}_C99_KERNEL_ADDON PRIVATE ${CTHREADFLAGS})
|
||||
endif()
|
||||
if(BUILD_SHARED_LIBS)
|
||||
# Equivalent to CPICFLAGS in get-noopt-cflags-for
|
||||
set_target_properties(${addon_target}_C99_KERNEL_ADDON PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
add_dependencies(${addon_target}_C99_KERNEL_ADDON flat-header)
|
||||
# Put all those targets under object-libs-targets folder name so that they appear all together in IDE.
|
||||
set_target_properties(${addon_target}_C99_KERNEL_ADDON PROPERTIES FOLDER object-libs-targets)
|
||||
endif()
|
||||
|
||||
# Collect all subdirectory paths that have at least one file with suffix in ADDON_CXX_SUFS list.
|
||||
get_filepaths_with_suffixes(LOCAL_SOURCE_CXX_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${addon_target}" "${ADDON_CXX_SUFS}")
|
||||
|
||||
# Only generate the object library if there is at least one source file.
|
||||
list(LENGTH LOCAL_SOURCE_CXX_FILES size)
|
||||
if(size GREATER 0)
|
||||
# Create an object library using the source file list above.
|
||||
add_library(${addon_target}_CXX_ADDON
|
||||
OBJECT
|
||||
${LOCAL_SOURCE_CXX_FILES}
|
||||
)
|
||||
|
||||
# Use PRIVATE keyword for option setting since we do not want the properties to propagate in other targets.
|
||||
# mimicing get-addon-cxxflags-for
|
||||
target_compile_options(${addon_target}_CXX_ADDON
|
||||
PRIVATE
|
||||
# load-var-for,COPTFLAGS
|
||||
${COPTFLAGS}
|
||||
# get-noopt-cxxflags-for
|
||||
${CDBGFLAGS}
|
||||
# get-noopt-cxxflags-for
|
||||
${CWARNFLAGS}
|
||||
# get-noopt-cxxflags-for
|
||||
${CMISCFLAGS}
|
||||
# get-noopt-cxxflags-for
|
||||
${CXXLANGFLAGS}
|
||||
# in get-addon-cxxflags-for
|
||||
${BUILD_SYMFLAGS}
|
||||
)
|
||||
target_compile_definitions(${addon_target}_CXX_ADDON
|
||||
PRIVATE
|
||||
# in get-noopt-cflags-for
|
||||
${CPPROCFLAGS}
|
||||
# in get-noopt-cflags-for
|
||||
${VERS_DEF}
|
||||
# in get-addon-cxxflags-for
|
||||
${BUILD_CPPFLAGS}
|
||||
)
|
||||
target_include_directories(${addon_target}_CXX_ADDON
|
||||
BEFORE
|
||||
PRIVATE
|
||||
# in get-noopt-cflags-for
|
||||
${CINFLAGS}
|
||||
# in get-addon-cxxflags-for
|
||||
${CADDONINCFLAGS}
|
||||
)
|
||||
if(THREADING_MODEL STREQUAL "openmp")
|
||||
# Equivalent to CTHREADFLAGS in get-noopt-cflags-for
|
||||
target_link_libraries(${addon_target}_CXX_ADDON PRIVATE OpenMP::OpenMP_C)
|
||||
elseif(THREADING_MODEL STREQUAL "pthreads")
|
||||
# in get-noopt-cflags-for
|
||||
target_compile_options(${addon_target}_CXX_ADDON PRIVATE ${CTHREADFLAGS})
|
||||
endif()
|
||||
if(BUILD_SHARED_LIBS)
|
||||
# Equivalent to CPICFLAGS in get-noopt-cflags-for
|
||||
set_target_properties(${addon_target}_CXX_ADDON PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
add_dependencies(${addon_target}_CXX_ADDON flat-header)
|
||||
# Put all those targets under object-libs-targets folder name so that they appear all together in IDE.
|
||||
set_target_properties(${addon_target}_CXX_ADDON PROPERTIES FOLDER object-libs-targets)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Generate targets for each of the addons.
|
||||
foreach(ADDON ${ENABLE_ADDON})
|
||||
generate_addon_targets(${ADDON})
|
||||
endforeach()
|
||||
@@ -1,10 +1,59 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved. ##
|
||||
##Copyright (C) 2020-2023, Advanced Micro Devices, Inc. All rights reserved. ##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/aocldtl.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/aocldtl_blis.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/aoclfal.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/aoclflist.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/aoclos.c
|
||||
)
|
||||
# Collect all subdirectory paths that have at least one file with suffix in AOCLDTL_SRC_SUFS list.
|
||||
get_filepaths_with_suffixes(LOCAL_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR} "${AOCLDTL_SRC_SUFS}")
|
||||
|
||||
# Create an object library using the source file list above.
|
||||
add_library(AOCL_DTL
|
||||
OBJECT
|
||||
${LOCAL_SOURCE_FILES}
|
||||
)
|
||||
|
||||
# Include the corresponding make_defs.cmake that holds the required compiler options.
|
||||
include(${CMAKE_SOURCE_DIR}/config/${BLIS_CONFIG_FAMILY}/make_defs.cmake)
|
||||
# Use PRIVATE keyword for option setting since we do not want the properties to propagate in other targets.
|
||||
# mimicing get-aocldtl-cflags-for
|
||||
target_compile_options(AOCL_DTL
|
||||
PRIVATE
|
||||
# load-var-for,COPTFLAGS
|
||||
${COPTFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CDBGFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CWARNFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CMISCFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CLANGFLAGS}
|
||||
# in get-aocldtl-cflags-for
|
||||
${BUILD_SYMFLAGS}
|
||||
)
|
||||
target_compile_definitions(AOCL_DTL
|
||||
PRIVATE
|
||||
# in get-noopt-cflags-for
|
||||
${VERS_DEF}
|
||||
# in get-aocldtl-cflags-for
|
||||
${BUILD_CPPFLAGS}
|
||||
# in get-aocldtl-cflags-for
|
||||
${CPPROCFLAGS}
|
||||
)
|
||||
target_include_directories(AOCL_DTL
|
||||
BEFORE
|
||||
PRIVATE
|
||||
# in get-noopt-cflags-for
|
||||
${CINFLAGS}
|
||||
)
|
||||
if(THREADING_MODEL STREQUAL "openmp")
|
||||
# Equivalent to CTHREADFLAGS in get-noopt-cflags-for
|
||||
target_link_libraries(AOCL_DTL PRIVATE OpenMP::OpenMP_C)
|
||||
elseif(THREADING_MODEL STREQUAL "pthreads")
|
||||
# in get-noopt-cflags-for
|
||||
target_compile_options(AOCL_DTL PRIVATE ${CTHREADFLAGS})
|
||||
endif()
|
||||
if(BUILD_SHARED_LIBS)
|
||||
# Equivalent to CPICFLAGS in get-noopt-cflags-for
|
||||
set_target_properties(AOCL_DTL PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
add_dependencies(AOCL_DTL flat-header)
|
||||
# Put all those targets under object-libs-targets folder name so that they appear all together in IDE.
|
||||
set_target_properties(AOCL_DTL PROPERTIES FOLDER object-libs-targets)
|
||||
|
||||
@@ -1,13 +1,131 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
##Copyright (C) 2020-2023, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
set(F2C_LIB "libf2c")
|
||||
# Comments:
|
||||
# - DIST_PATH is assumed to not exist if BLIS_INSTALL_PATH is given.
|
||||
# - We must use recursively expanded assignment for LIB_PATH and INC_PATH in
|
||||
# the second case because CONFIG_NAME is not yet set.
|
||||
if(NOT DEFINED BLIS_INSTALL_PATH)
|
||||
set(DIST_PATH ${CMAKE_BINARY_DIR})
|
||||
set(LIB_PATH ${DIST_PATH}/lib/${BLIS_CONFIG_FAMILY})
|
||||
set(INC_PATH ${DIST_PATH}/include/${BLIS_CONFIG_FAMILY})
|
||||
else()
|
||||
set(LIB_PATH ${BLIS_INSTALL_PATH}/lib)
|
||||
set(INC_PATH ${BLIS_INSTALL_PATH}/include/blis)
|
||||
endif()
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/f2c)
|
||||
# Include the corresponding make_defs.cmake that holds the required compiler options.
|
||||
include(${CMAKE_SOURCE_DIR}/config/${BLIS_CONFIG_FAMILY}/make_defs.cmake)
|
||||
|
||||
# Generate F2C library
|
||||
add_library("${F2C_LIB}" STATIC )
|
||||
set_target_properties("${PROJECT_NAME}" PROPERTIES LINKER_LANGUAGE C)
|
||||
# Create a static library using the sources in f2c directory.
|
||||
file(GLOB f2c_sources LIST_DIRECTORIES false ${CMAKE_CURRENT_SOURCE_DIR}/f2c/*.c)
|
||||
add_library(f2c STATIC ${f2c_sources})
|
||||
target_compile_options(f2c
|
||||
PRIVATE
|
||||
# load-var-for,COPTFLAGS
|
||||
${COPTFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CDBGFLAGS}
|
||||
${CWARNFLAGS}
|
||||
${CPICFLAGS}
|
||||
${CMISCFLAGS}
|
||||
${CLANGFLAGS}
|
||||
# Suppress warnings about uninitialized functions
|
||||
-Wno-maybe-uninitialized -Wno-parentheses -Wfatal-errors
|
||||
)
|
||||
target_compile_definitions(f2c
|
||||
PRIVATE
|
||||
# in get-noopt-cflags-for
|
||||
${VERS_DEF}
|
||||
${CPPROCFLAGS}
|
||||
-DHAVE_BLIS_H
|
||||
)
|
||||
target_include_directories(f2c
|
||||
BEFORE
|
||||
PRIVATE
|
||||
# Add local header paths
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/f2c
|
||||
# and the path to blis.h
|
||||
${INC_PATH}
|
||||
)
|
||||
target_link_libraries(f2c PRIVATE ${LDFLAGS})
|
||||
if(THREADING_MODEL STREQUAL "openmp")
|
||||
target_link_libraries(f2c PRIVATE OpenMP::OpenMP_C)
|
||||
endif()
|
||||
# Put all those targets under blastest-targets-targets folder name so that they appear all together in IDE.
|
||||
set_target_properties(f2c PROPERTIES FOLDER blastest-targets)
|
||||
add_dependencies(f2c flat-header)
|
||||
|
||||
# Gather all local source files.
|
||||
file(GLOB blastest_sources LIST_DIRECTORIES false ${CMAKE_CURRENT_SOURCE_DIR}/src/*.c)
|
||||
list(TRANSFORM blastest_sources REPLACE ${CMAKE_CURRENT_SOURCE_DIR}/src/ "")
|
||||
|
||||
add_subdirectory(f2c)
|
||||
add_subdirectory(src)
|
||||
# Create one executable for each of the sources.
|
||||
foreach(source ${blastest_sources})
|
||||
string(REPLACE .c "" exec_name ${source})
|
||||
add_executable(${exec_name}.x src/${source})
|
||||
target_compile_options(${exec_name}.x
|
||||
PRIVATE
|
||||
# load-var-for,COPTFLAGS
|
||||
${COPTFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CDBGFLAGS}
|
||||
${CWARNFLAGS}
|
||||
${CPICFLAGS}
|
||||
${CMISCFLAGS}
|
||||
${CLANGFLAGS}
|
||||
# Suppress warnings about uninitialized functions
|
||||
-Wno-parentheses -Wno-maybe-uninitialized
|
||||
)
|
||||
target_compile_definitions(${exec_name}.x
|
||||
PRIVATE
|
||||
# in get-noopt-cflags-for
|
||||
${VERS_DEF}
|
||||
${CPPROCFLAGS}
|
||||
-DHAVE_BLIS_H
|
||||
)
|
||||
target_include_directories(${exec_name}.x
|
||||
BEFORE
|
||||
PRIVATE
|
||||
# Add local header paths
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/f2c
|
||||
# and the path to blis.h
|
||||
${INC_PATH}
|
||||
)
|
||||
target_link_libraries(${exec_name}.x PRIVATE f2c libblis ${LDFLAGS})
|
||||
if(THREADING_MODEL STREQUAL "openmp")
|
||||
target_link_libraries(${exec_name}.x PRIVATE OpenMP::OpenMP_C)
|
||||
endif()
|
||||
set_target_properties(${exec_name}.x PROPERTIES CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
# Put all those targets under blastest-targets-targets folder name so that they appear all together in IDE.
|
||||
set_target_properties(${exec_name}.x PROPERTIES FOLDER blastest-targets)
|
||||
# Add a target for running the tests. Rules are different for level-1 APIs, compared to levels 2 and 3.
|
||||
if(${exec_name} MATCHES 1)
|
||||
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/out.${exec_name}
|
||||
COMMAND ${exec_name}.x > ${CMAKE_BINARY_DIR}/out.${exec_name}
|
||||
COMMENT "Running ${exec_name}.x with output redirected to ${CMAKE_BINARY_DIR}/out.${exec_name}"
|
||||
DEPENDS ${exec_name}.x
|
||||
WORKING_DIRECTORY $<TARGET_FILE_DIR:libblis>
|
||||
VERBATIM
|
||||
)
|
||||
else()# name has 2 or 3
|
||||
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/out.${exec_name}
|
||||
COMMAND ${exec_name}.x < ${CMAKE_CURRENT_SOURCE_DIR}/input/${exec_name}.in
|
||||
COMMENT "Running ${exec_name}.x with output saved to ${CMAKE_BINARY_DIR}/out.${exec_name}"
|
||||
DEPENDS ${exec_name}.x
|
||||
WORKING_DIRECTORY $<TARGET_FILE_DIR:libblis>
|
||||
VERBATIM
|
||||
)
|
||||
endif()
|
||||
add_custom_target(run-${exec_name} DEPENDS ${CMAKE_BINARY_DIR}/out.${exec_name})
|
||||
# Put all those targets under blastest-targets-targets folder name so that they appear all together in IDE.
|
||||
set_target_properties(run-${exec_name} PROPERTIES FOLDER blastest-targets)
|
||||
list(APPEND test_executables "run-${exec_name}")
|
||||
endforeach()
|
||||
|
||||
add_custom_target(testblas DEPENDS ${test_executables})
|
||||
add_custom_target(checkblas
|
||||
COMMAND ${Python_EXECUTABLE} ${CMAKE_SOURCE_DIR}/build/cmake/check-blastest.py ${CMAKE_BINARY_DIR}
|
||||
DEPENDS testblas
|
||||
)
|
||||
# Put all those targets under blastest-targets-targets folder name so that they appear all together in IDE.
|
||||
set_target_properties(testblas checkblas PROPERTIES FOLDER blastest-targets)
|
||||
@@ -1,59 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${F2C_LIB}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/abs.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/acos.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/asin.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/atan.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/atn2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/close.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cnjg.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cos.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cosh.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/dim.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/div.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/dolio.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/endfile.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/epsilon.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/err.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/exit_.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/exp.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/fmt.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/fmtlib.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/h_dnnt.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hl_cmp.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/i_dnnt.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/i_len.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/imag.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/int.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/l_cmp.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lg10.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/log.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lread.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lwrite.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mod.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nint.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/open.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/pow.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/prod.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rdfmt.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rewind.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rsfe.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/s_cmp.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/s_copy.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/s_stop.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sfe.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sig_die.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sign.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sin.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sinh.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sqrt.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tan.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tanh.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/util.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/wref.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/wrtfmt.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/wsfe.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/wsle.c
|
||||
)
|
||||
@@ -28,6 +28,7 @@ use or performance of this software.
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#include <io.h>
|
||||
#define access _access
|
||||
#endif
|
||||
#include "f2c.h"
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
add_executable(cblat1 cblat1.c)
|
||||
target_link_libraries(cblat1 PRIVATE "${F2C_LIB}" "${LIB_NAME}.lib" )
|
||||
|
||||
add_executable(cblat2 cblat2.c)
|
||||
target_link_libraries(cblat2 PRIVATE "${F2C_LIB}" "${LIB_NAME}.lib" )
|
||||
|
||||
add_executable(cblat3 cblat3.c)
|
||||
target_link_libraries(cblat3 PRIVATE "${F2C_LIB}" "${LIB_NAME}.lib" )
|
||||
|
||||
add_executable(dblat1 dblat1.c)
|
||||
target_link_libraries(dblat1 PRIVATE "${F2C_LIB}" "${LIB_NAME}.lib" )
|
||||
|
||||
add_executable(dblat2 dblat2.c)
|
||||
target_link_libraries(dblat2 PRIVATE "${F2C_LIB}" "${LIB_NAME}.lib" )
|
||||
|
||||
add_executable(dblat3 dblat3.c)
|
||||
target_link_libraries(dblat3 PRIVATE "${F2C_LIB}" "${LIB_NAME}.lib" )
|
||||
|
||||
add_executable(sblat1 sblat1.c)
|
||||
target_link_libraries(sblat1 PRIVATE "${F2C_LIB}" "${LIB_NAME}.lib" )
|
||||
|
||||
add_executable(sblat2 sblat2.c)
|
||||
target_link_libraries(sblat2 PRIVATE "${F2C_LIB}" "${LIB_NAME}.lib" )
|
||||
|
||||
add_executable(sblat3 sblat3.c)
|
||||
target_link_libraries(sblat3 PRIVATE "${F2C_LIB}" "${LIB_NAME}.lib" )
|
||||
|
||||
add_executable(zblat1 zblat1.c)
|
||||
target_link_libraries(zblat1 PRIVATE "${F2C_LIB}" "${LIB_NAME}.lib" )
|
||||
|
||||
add_executable(zblat2 zblat2.c)
|
||||
target_link_libraries(zblat2 PRIVATE "${F2C_LIB}" "${LIB_NAME}.lib" )
|
||||
|
||||
add_executable(zblat3 zblat3.c)
|
||||
target_link_libraries(zblat3 PRIVATE "${F2C_LIB}" "${LIB_NAME}.lib" )
|
||||
@@ -1,58 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2023, Advanced Micro Devices, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef BLIS_CONFIG_H
|
||||
#define BLIS_CONFIG_H
|
||||
|
||||
#cmakedefine AOCL_DYNAMIC
|
||||
|
||||
#cmakedefine AOCL_BLIS_ZEN
|
||||
|
||||
#cmakedefine BLIS_ENABLE_OPENMP
|
||||
|
||||
#cmakedefine BLIS_ENABLE_JRIR_SLAB
|
||||
|
||||
#cmakedefine BLIS_ENABLE_JRIR_RR
|
||||
|
||||
#cmakedefine BLIS_ENABLE_PBA_POOLS
|
||||
|
||||
#cmakedefine BLIS_ENABLE_SBA_POOLS
|
||||
|
||||
#cmakedefine BLIS_ENABLE_MEM_TRACING
|
||||
|
||||
#cmakedefine BLIS_INT_TYPE_SIZE @INT_TYPE_SIZE@
|
||||
|
||||
#cmakedefine BLIS_BLAS_INT_TYPE_SIZE @BLAS_INT_TYPE_SIZE@
|
||||
|
||||
#cmakedefine BLIS_ENABLE_BLAS
|
||||
|
||||
#cmakedefine BLIS_ENABLE_CBLAS
|
||||
|
||||
#cmakedefine BLIS_ENABLE_MIXED_DT
|
||||
|
||||
#cmakedefine BLIS_ENABLE_MIXED_DT_EXTRA_MEM
|
||||
|
||||
#cmakedefine BLIS_ENABLE_SUP_HANDLING
|
||||
|
||||
#cmakedefine BLIS_ENABLE_MEMKIND
|
||||
|
||||
#cmakedefine BLIS_ENABLE_TRSM_PREINVERSION
|
||||
|
||||
#cmakedefine BLIS_ENABLE_PRAGMA_OMP_SIMD
|
||||
|
||||
#cmakedefine BLIS_ENABLE_SANDBOX
|
||||
|
||||
#cmakedefine BLIS_ENABLE_SHARED
|
||||
|
||||
#cmakedefine BLIS_ENABLE_COMPLEX_RETURN_INTEL
|
||||
|
||||
#cmakedefine DISABLE_BLIS_ARCH_TYPE
|
||||
|
||||
#cmakedefine DISABLE_BLIS_MODEL_TYPE
|
||||
|
||||
#cmakedefine __blis_arch_type_name "@rename_blis_arch_type@"
|
||||
|
||||
#cmakedefine __blis_model_type_name "@rename_blis_model_type@"
|
||||
|
||||
#endif
|
||||
17
build/cmake/bli_addon.h.in
Normal file
17
build/cmake/bli_addon.h.in
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2023, Advanced Micro Devices, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef BLIS_ADDON_H
|
||||
#define BLIS_ADDON_H
|
||||
|
||||
#if ${ENABLE_ADDONS_01}
|
||||
#define BLIS_ENABLE_ADDONS
|
||||
#else
|
||||
#define BLIS_DISABLE_ADDONS
|
||||
#endif
|
||||
|
||||
// Enabled addons
|
||||
${ADDON_LIST_INCLUDES}
|
||||
|
||||
#endif
|
||||
183
build/cmake/bli_config.h.in
Normal file
183
build/cmake/bli_config.h.in
Normal file
@@ -0,0 +1,183 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2023, Advanced Micro Devices, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef BLIS_CONFIG_H
|
||||
#define BLIS_CONFIG_H
|
||||
|
||||
// Enabled configuration "family" (config_name)
|
||||
${CONFIG_NAME_DEFINE}
|
||||
|
||||
// Enabled sub-configurations (config_list)
|
||||
${CONFIG_LIST_DEFINES}
|
||||
|
||||
// Enabled kernel sets (kernel_list)
|
||||
${KERNEL_LIST_DEFINES}
|
||||
|
||||
//This macro is enabled only for ZEN family configurations.
|
||||
//This enables us to use different cache-blocking sizes for TRSM instead of common level-3 cache-block sizes.
|
||||
#if ${ENABLE_AOCL_ZEN_01}
|
||||
#define AOCL_BLIS_ZEN
|
||||
#endif
|
||||
|
||||
#if ${ENABLE_AOCL_DYNAMIC_01}
|
||||
#define AOCL_DYNAMIC
|
||||
#endif
|
||||
|
||||
#if ${ENABLE_SYSTEM_01}
|
||||
#define BLIS_ENABLE_SYSTEM
|
||||
#else
|
||||
#define BLIS_DISABLE_SYSTEM
|
||||
#endif
|
||||
|
||||
#if ${ENABLE_OPENMP_01}
|
||||
#define BLIS_ENABLE_OPENMP
|
||||
#endif
|
||||
|
||||
#if ${ENABLE_PTHREADS_01}
|
||||
#define BLIS_ENABLE_PTHREADS
|
||||
#endif
|
||||
|
||||
#if ${ENABLE_JRIR_SLAB_01}
|
||||
#define BLIS_ENABLE_JRIR_SLAB
|
||||
#endif
|
||||
|
||||
#if ${ENABLE_JRIR_RR_01}
|
||||
#define BLIS_ENABLE_JRIR_RR
|
||||
#endif
|
||||
|
||||
#if ${ENABLE_PBA_POOLS_01}
|
||||
#define BLIS_ENABLE_PBA_POOLS
|
||||
#else
|
||||
#define BLIS_DISABLE_PBA_POOLS
|
||||
#endif
|
||||
|
||||
#if ${ENABLE_SBA_POOLS_01}
|
||||
#define BLIS_ENABLE_SBA_POOLS
|
||||
#else
|
||||
#define BLIS_DISABLE_SBA_POOLS
|
||||
#endif
|
||||
|
||||
#if ${ENABLE_MEM_TRACING_01}
|
||||
#define BLIS_ENABLE_MEM_TRACING
|
||||
#else
|
||||
#define BLIS_DISABLE_MEM_TRACING
|
||||
#endif
|
||||
|
||||
#if ${INT_TYPE_SIZE} == 64
|
||||
#define BLIS_INT_TYPE_SIZE 64
|
||||
#elif ${INT_TYPE_SIZE} == 32
|
||||
#define BLIS_INT_TYPE_SIZE 32
|
||||
#else
|
||||
// determine automatically
|
||||
#endif
|
||||
|
||||
#if ${BLAS_INT_TYPE_SIZE} == 64
|
||||
#define BLIS_BLAS_INT_TYPE_SIZE 64
|
||||
#elif ${BLAS_INT_TYPE_SIZE} == 32
|
||||
#define BLIS_BLAS_INT_TYPE_SIZE 32
|
||||
#else
|
||||
// determine automatically
|
||||
#endif
|
||||
|
||||
#ifndef BLIS_ENABLE_BLAS
|
||||
#ifndef BLIS_DISABLE_BLAS
|
||||
#if ${ENABLE_BLAS_01}
|
||||
#define BLIS_ENABLE_BLAS
|
||||
#else
|
||||
#define BLIS_DISABLE_BLAS
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef BLIS_ENABLE_CBLAS
|
||||
#ifndef BLIS_DISABLE_CBLAS
|
||||
#if ${ENABLE_CBLAS_01}
|
||||
#define BLIS_ENABLE_CBLAS
|
||||
#else
|
||||
#define BLIS_DISABLE_CBLAS
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// If the CBLAS compatibility layer was enabled while the BLAS layer
|
||||
// was not enabled, we must enable the BLAS layer here. Also undefine
|
||||
// BLIS_DISABLE_BLAS to ensure consistency.
|
||||
#ifdef BLIS_ENABLE_CBLAS
|
||||
#ifndef BLIS_ENABLE_BLAS
|
||||
#define BLIS_ENABLE_BLAS
|
||||
#endif
|
||||
#undef BLIS_DISABLE_BLAS
|
||||
#endif // BLIS_ENABLE_CBLAS
|
||||
|
||||
#ifndef BLIS_ENABLE_MIXED_DT
|
||||
#ifndef BLIS_DISABLE_MIXED_DT
|
||||
#if ${ENABLE_MIXED_DT_01}
|
||||
#define BLIS_ENABLE_MIXED_DT
|
||||
#else
|
||||
#define BLIS_DISABLE_MIXED_DT
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef BLIS_ENABLE_MIXED_DT_EXTRA_MEM
|
||||
#ifndef BLIS_DISABLE_MIXED_DT_EXTRA_MEM
|
||||
#if ${ENABLE_MIXED_DT_EXTRA_MEM_01}
|
||||
#define BLIS_ENABLE_MIXED_DT_EXTRA_MEM
|
||||
#else
|
||||
#define BLIS_DISABLE_MIXED_DT_EXTRA_MEM
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ${ENABLE_SUP_HANDLING_01}
|
||||
#define BLIS_ENABLE_SUP_HANDLING
|
||||
#else
|
||||
#define BLIS_DISABLE_SUP_HANDLING
|
||||
#endif
|
||||
|
||||
#if ${ENABLE_MEMKIND_01}
|
||||
#define BLIS_ENABLE_MEMKIND
|
||||
#else
|
||||
#define BLIS_DISABLE_MEMKIND
|
||||
#endif
|
||||
|
||||
#if ${ENABLE_TRSM_PREINVERSION_01}
|
||||
#define BLIS_ENABLE_TRSM_PREINVERSION
|
||||
#else
|
||||
#define BLIS_DISABLE_TRSM_PREINVERSION
|
||||
#endif
|
||||
|
||||
#if ${ENABLE_PRAGMA_OMP_SIMD_01}
|
||||
#define BLIS_ENABLE_PRAGMA_OMP_SIMD
|
||||
#else
|
||||
#define BLIS_DISABLE_PRAGMA_OMP_SIMD
|
||||
#endif
|
||||
|
||||
#if ${ENABLE_SANDBOX_01}
|
||||
#define BLIS_ENABLE_SANDBOX
|
||||
#else
|
||||
#define BLIS_DISABLE_SANDBOX
|
||||
#endif
|
||||
|
||||
#if ${ENABLE_SHARED_01}
|
||||
#define BLIS_ENABLE_SHARED
|
||||
#else
|
||||
#define BLIS_DISABLE_SHARED
|
||||
#endif
|
||||
|
||||
#if ${COMPLEX_RETURN_INTEL_01}
|
||||
#define BLIS_ENABLE_COMPLEX_RETURN_INTEL
|
||||
#else
|
||||
#define BLIS_DISABLE_COMPLEX_RETURN_INTEL
|
||||
#endif
|
||||
|
||||
#if ${DISABLE_BLIS_ARCH_TYPE_01}
|
||||
#define DISABLE_BLIS_ARCH_TYPE
|
||||
#define DISABLE_BLIS_MODEL_TYPE
|
||||
#endif
|
||||
|
||||
#define __blis_arch_type_name "${RENAME_BLIS_ARCH_TYPE}"
|
||||
#define __blis_model_type_name "${RENAME_BLIS_MODEL_TYPE}"
|
||||
|
||||
#endif
|
||||
31
build/cmake/check-blastest.py
Normal file
31
build/cmake/check-blastest.py
Normal file
@@ -0,0 +1,31 @@
|
||||
##Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
# Import modules
|
||||
import os
|
||||
import sys
|
||||
|
||||
def check_blastest():
|
||||
results_file_path = sys.argv[1]
|
||||
results_directory = os.listdir(results_file_path)
|
||||
has_failure = False
|
||||
is_empty = False
|
||||
for fname in results_directory:
|
||||
if os.path.isfile(results_file_path + os.sep + fname) and "out" in fname:
|
||||
file = open(results_file_path + os.sep + fname, 'r')
|
||||
# read all content of a file
|
||||
content = file.read()
|
||||
if content == "":
|
||||
is_empty = True
|
||||
# check if string present in a file
|
||||
if "*****" in content:
|
||||
has_failure = True
|
||||
if has_failure:
|
||||
print("\033[0;31m At least one BLAS test failed. :( \033[0m")
|
||||
print("\033[0;31m Please see the corresponding out.* for details. \033[0m")
|
||||
elif is_empty:
|
||||
print("\033[0;31m At least one BLAS test resulted without a PASS. :( \033[0m")
|
||||
print("\033[0;31m Please ensure that the corresponding out.* was generated correctly. \033[0m")
|
||||
else:
|
||||
print("\033[0;32m All BLAS tests passed! \033[0m")
|
||||
|
||||
check_blastest()
|
||||
22
build/cmake/check-blistest.py
Normal file
22
build/cmake/check-blistest.py
Normal file
@@ -0,0 +1,22 @@
|
||||
##Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
# Import modules
|
||||
import os
|
||||
import sys
|
||||
|
||||
def check_blistest():
|
||||
results_file = sys.argv[1]
|
||||
with open(results_file, 'r') as file:
|
||||
# read all content of a file
|
||||
content = file.read()
|
||||
# check if string present in a file
|
||||
if "FAILURE" in content:
|
||||
print("\033[0;31m At least one BLIS test failed. :( \033[0m")
|
||||
print("\033[0;31m Please see the corresponding output.testsuite* for details. \033[0m")
|
||||
elif not "PASS" in content:
|
||||
print("\033[0;31m No BLIS test resulted in PASS. :( \033[0m")
|
||||
print("\033[0;31m Please ensure that the corresponding output.testsuite* was generated correctly. \033[0m")
|
||||
else:
|
||||
print("\033[0;32m All BLIS tests passed! \033[0m")
|
||||
|
||||
check_blistest()
|
||||
305
build/cmake/config_print.py
Normal file
305
build/cmake/config_print.py
Normal file
@@ -0,0 +1,305 @@
|
||||
##Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
# Import modules
|
||||
import os
|
||||
import sys
|
||||
|
||||
def main():
|
||||
# Obtain the script name.
|
||||
path, script_name = os.path.split(sys.argv[0])
|
||||
print( " " )
|
||||
print( " %s" % script_name )
|
||||
print( " " )
|
||||
print( " Configure BLIS's CMake system for compilation using a specified" )
|
||||
print( " configuration directory." )
|
||||
print( " " )
|
||||
print( " Usage:" )
|
||||
print( " " )
|
||||
print( " cmake .. [Options] -DBLIS_CONFIG_FAMILY=confname" )
|
||||
print( " " )
|
||||
print(" Arguments:")
|
||||
print(" ")
|
||||
print(" confname The name of the sub-directory inside of the 'config'")
|
||||
print(" directory containing the desired BLIS configuration.")
|
||||
print(" Currently, only amdzen, zen, zen2, zen3, zen4 and generic")
|
||||
print(" configuration options are supported.")
|
||||
print(" Note that confname MUST be specified; if it is not,")
|
||||
print(" configure will complain. To build a completely generic")
|
||||
print(" implementation, use the 'generic' configuration.")
|
||||
print(" ")
|
||||
print( " Options:" )
|
||||
print( " " )
|
||||
print( " -DCMAKE_INSTALL_PREFIX=PREFIX" )
|
||||
print( " " )
|
||||
print( " The common installation prefix for all files." )
|
||||
print( " If this option is not given, PREFIX defaults to '/usr/local/'." )
|
||||
print( " on UNIX and c:/Program Files/${PROJECT_NAME} on Windows." )
|
||||
print( " " )
|
||||
print( " -DENABLE_DEBUG=DEBUG" )
|
||||
print( " " )
|
||||
print( " Enable debugging symbols in the library." )
|
||||
print( " DEBUG is 'off' by default. If argument" )
|
||||
print( " DEBUG is given as 'opt', then optimization flags are" )
|
||||
print( " kept in the framework, otherwise optimization is" )
|
||||
print( " turned off. Available options are 'opt', 'noopt' and 'off'." )
|
||||
print( " " )
|
||||
print( " --disable-static, --enable-static" )
|
||||
print( " " )
|
||||
print( " Disable (enabled by default) building BLIS as a static" )
|
||||
print( " library. If the static library build is disabled, the" )
|
||||
print( " shared library build must remain enabled." )
|
||||
print( " " )
|
||||
print( " --disable-shared, --enable-shared" )
|
||||
print( " " )
|
||||
print( " Disable (enabled by default) building BLIS as a shared" )
|
||||
print( " library. If the shared library build is disabled, the" )
|
||||
print( " static library build must remain enabled." )
|
||||
print( " " )
|
||||
print( " -DEXPORT_SHARED=[SYMBOLS]" )
|
||||
print( " " )
|
||||
print( " Specify the subset of library symbols that are exported" )
|
||||
print( " within a shared library. Valid values for SYMBOLS are:" )
|
||||
print( " 'public' (the default) and 'all'. By default, only" )
|
||||
print( " functions and variables that belong to public APIs are" )
|
||||
print( " exported in shared libraries. However, the user may" )
|
||||
print( " instead export all symbols in BLIS, even those that were" )
|
||||
print( " intended for internal use only. Note that the public APIs" )
|
||||
print( " encompass all functions that almost any user would ever" )
|
||||
print( " want to call, including the BLAS/CBLAS compatibility APIs" )
|
||||
print( " as well as the basic and expert interfaces to the typed" )
|
||||
print( " and object APIs that are unique to BLIS. Also note that" )
|
||||
print( " changing this option to 'all' will have no effect in some" )
|
||||
print( " environments, such as when compiling with clang on" )
|
||||
print( " Windows." )
|
||||
print( " " )
|
||||
print( " -DENABLE_THREADING=MODEL" )
|
||||
print( " " )
|
||||
print( " Enable threading in the library, using threading model" )
|
||||
print( " MODEL={openmp, pthreads, no}. If MODEL=no threading will be" )
|
||||
print( " disabled. The default is 'no'." )
|
||||
print( " " )
|
||||
print( " -DENABLE_SYSTEM=ON or -DENABLE_SYSTEM=OFF")
|
||||
print( " " )
|
||||
print( " Enable conventional operating system support, such as" )
|
||||
print( " pthreads for thread-safety. The default state is enabled." )
|
||||
print( " However, in rare circumstances you may wish to configure" )
|
||||
print( " BLIS for use with a minimal or nonexistent operating" )
|
||||
print( " system (e.g. hardware simulators). In these situations," )
|
||||
print( " -DENABLE_SYSTEM=OFF may be used to jettison all compile-time" )
|
||||
print( " and link-time dependencies outside of the standard C" )
|
||||
print( " library. When disabled, this option also forces the use" )
|
||||
print( " of -DENABLE_THREADING=no." )
|
||||
print( " " )
|
||||
print( " -DENABLE_PBA_POOLS=ON or -DENABLE_PBA_POOLS=OFF" )
|
||||
print( " -DENABLE_SBA_POOLS=ON or -DENABLE_SBA_POOLS=OFF" )
|
||||
print( " " )
|
||||
print( " Disable (enabled by default) use of internal memory pools" )
|
||||
print( " within the packing block allocator (pba) and/or the small" )
|
||||
print( " block allocator (sba). The former is used to allocate" )
|
||||
print( " memory used to pack submatrices while the latter is used" )
|
||||
print( " to allocate control/thread tree nodes and thread" )
|
||||
print( " communicators. Both allocations take place in the context" )
|
||||
print( " of level-3 operations. When the pba is disabled, the" )
|
||||
print( " malloc()-like function specified by BLIS_MALLOC_POOL is" )
|
||||
print( " called on-demand whenever a packing block is needed, and" )
|
||||
print( " when the sba is disabled, the malloc()-like function" )
|
||||
print( " specified by BLIS_MALLOC_INTL is called whenever a small" )
|
||||
print( " block is needed, with the two allocators calling free()-" )
|
||||
print( " like functions BLIS_FREE_POOL and BLIS_FREE_INTL," )
|
||||
print( " respectively when blocks are released. When enabled," )
|
||||
print( " either or both pools are populated via the same functions" )
|
||||
print( " mentioned previously, and henceforth blocks are checked" )
|
||||
print( " out and in. The library quickly reaches a state in which" )
|
||||
print( " it no longer needs to call malloc() or free(), even" )
|
||||
print( " across many separate level-3 operation invocations." )
|
||||
print( " " )
|
||||
print( " -DENABLE_MEM_TRACING=ON or -DENABLE_MEM_TRACING=OFF" )
|
||||
print( " " )
|
||||
print( " Enable (disable by default) output to stdout that traces" )
|
||||
print( " the allocation and freeing of memory, including the names" )
|
||||
print( " of the functions that triggered the allocation/freeing." )
|
||||
print( " Enabling this option WILL NEGATIVELY IMPACT PERFORMANCE." )
|
||||
print( " Please use only for informational/debugging purposes." )
|
||||
print( " " )
|
||||
print( " -DINT_SIZE=SIZE" )
|
||||
print( " " )
|
||||
print( " Set the size (in bits) of internal BLIS integers and" )
|
||||
print( " integer types used in native BLIS interfaces. The" )
|
||||
print( " default integer type size is architecture dependent." )
|
||||
print( " (Hint: You can always find this value printed at the" )
|
||||
print( " beginning of the testsuite output.)" )
|
||||
print( " " )
|
||||
print( " -DBLAS_TYPE_SIZE=SIZE" )
|
||||
print( " " )
|
||||
print( " Set the size (in bits) of integer types in external" )
|
||||
print( " BLAS and CBLAS interfaces, if enabled. The default" )
|
||||
print( " integer type size used in BLAS/CBLAS is 32 bits." )
|
||||
print( " " )
|
||||
print( " -DENABLE_BLAS=ON or -DENABLE_BLAS=OFF" )
|
||||
print( " " )
|
||||
print( " Disable (enabled by default) building the BLAS" )
|
||||
print( " compatibility layer." )
|
||||
print( " " )
|
||||
print( " -DENABLE_CBLAS=ON or -DENABLE_CBLAS=OFF" )
|
||||
print( " " )
|
||||
print( " Enable (disabled by default) building the CBLAS" )
|
||||
print( " compatibility layer. This automatically enables the" )
|
||||
print( " BLAS compatibility layer as well." )
|
||||
print( " " )
|
||||
print( " -DENABLE_MIXED_DT=ON or -DENABLE_MIXED_DT=OFF" )
|
||||
print( " " )
|
||||
print( " Disable (enabled by default) support for mixing the" )
|
||||
print( " storage domain and/or storage precision of matrix" )
|
||||
print( " operands for the gemm operation, as well as support" )
|
||||
print( " for computing in a precision different from one or" )
|
||||
print( " both of matrices A and B." )
|
||||
print( " " )
|
||||
print( " -DENABLE_MIXED_DT_EXTRA_MEM=ON or -DENABLE_MIXED_DT_EXTRA_MEM=OFF" )
|
||||
print( " " )
|
||||
print( " Disable (enabled by default) support for additional" )
|
||||
print( " mixed datatype optimizations that require temporarily" )
|
||||
print( " allocating extra memory--specifically, a single m x n" )
|
||||
print( " matrix (per application thread) whose storage datatype" )
|
||||
print( " is equal to the computation datatype. This option may" )
|
||||
print( " only be enabled when mixed domain/precision support is" )
|
||||
print( " enabled." )
|
||||
print( " " )
|
||||
print( " -DENABLE_SUP_HANDLING=ON or -DENABLE_SUP_HANDLING=OFF" )
|
||||
print( " " )
|
||||
print( " Disable (enabled by default) handling of small/skinny" )
|
||||
print( " matrix problems via separate code branches. When disabled," )
|
||||
print( " these small/skinny level-3 operations will be performed by" )
|
||||
print( " the conventional implementation, which is optimized for" )
|
||||
print( " medium and large problems. Note that what qualifies as" )
|
||||
print( " \"small\" depends on thresholds that may vary by sub-" )
|
||||
print( " configuration." )
|
||||
print( " " )
|
||||
print( " -DENABLE_ADDON=\"NAME1[;NAME2;...]\" (Linux only)")
|
||||
print( " " )
|
||||
print( " Enable the code provided by an addon. An addon consists" )
|
||||
print( " of a separate directory of code that provides additional" )
|
||||
print( " APIs, implementations, and/or operations that would" )
|
||||
print( " otherwise not be present within a build of BLIS." )
|
||||
print( " To enable a single addon named NAME1, set -DENABLE_ADDON=NAME1." )
|
||||
print( " To enable multiple addons, a ';'-separated list enclosed in \"\"")
|
||||
print( " needs to be provided. For example, -DENABLE_ADDON=\"NAME1;NAME2\".")
|
||||
print(" By default, no addons are enabled.")
|
||||
print( " " )
|
||||
# Sandbox functionality is currently disabled in CMake.
|
||||
#print( " -DENABLE_SANDBOX=NAME" )
|
||||
#print( " " )
|
||||
#print( " Enable a separate sandbox implementation of gemm. This" )
|
||||
#print( " option disables BLIS's conventional gemm implementation" )
|
||||
#print( " (which shares common infrastructure with other level-3" )
|
||||
#print( " operations) and instead compiles and uses the code in" )
|
||||
#print( " the NAME directory, which is expected to be a sub-" )
|
||||
#print( " directory of 'sandbox'. By default, no sandboxes are" )
|
||||
#print( " enabled." )
|
||||
#print( " " )
|
||||
print( " -DENABLE_MEMKIND=ON or -DENABLE_MEMKIND=OFF" )
|
||||
print( " " )
|
||||
print( " Forcibly enable or disable the use of libmemkind's" )
|
||||
print( " hbw_malloc() and hbw_free() as substitutes for malloc()" )
|
||||
print( " and free(), respectively, when allocating memory for" )
|
||||
print( " BLIS's memory pools, which are used to manage buffers" )
|
||||
print( " into which matrices are packed. The default behavior" )
|
||||
print( " for this option is environment-dependent; if configure" )
|
||||
print( " detects the presence of libmemkind, libmemkind is used" )
|
||||
print( " by default, and otherwise it is not used by default." )
|
||||
print( " " )
|
||||
print( " -DTHREAD_PART_JRIR=METHOD" )
|
||||
print( " " )
|
||||
print( " Request a method of assigning micropanels to threads in" )
|
||||
print( " the JR and IR loops. Valid values for METHOD are 'slab'" )
|
||||
print( " and 'rr'. Using 'slab' assigns (as much as possible)" )
|
||||
print( " contiguous regions of micropanels to each thread while" )
|
||||
print( " using 'rr' assigns micropanels to threads in a round-" )
|
||||
print( " robin fashion. The chosen method also applies during" )
|
||||
print( " the packing of A and B. The default method is 'slab'." )
|
||||
print( " NOTE: Specifying this option constitutes a request," )
|
||||
print( " which may be ignored in select situations if the" )
|
||||
print( " implementation has a good reason to do so." )
|
||||
print( " " )
|
||||
print( " -DENABLE_TRSM_PREINVERSION=ON or -DENABLE_TRSM_PREINVERSION=OFF" )
|
||||
print( " " )
|
||||
print( " Disable (enabled by default) pre-inversion of triangular" )
|
||||
print( " matrix diagonals when performing trsm. When pre-inversion" )
|
||||
print( " is enabled, diagonal elements are inverted outside of the" )
|
||||
print( " microkernel (e.g. during packing) so that the microkernel" )
|
||||
print( " can use multiply instructions. When disabled, division" )
|
||||
print( " instructions are used within the microkernel. Executing" )
|
||||
print( " these division instructions within the microkernel will" )
|
||||
print( " incur a performance penalty, but numerical robustness will" )
|
||||
print( " improve for certain cases involving denormal numbers that" )
|
||||
print( " would otherwise result in overflow in the pre-inverted" )
|
||||
print( " values." )
|
||||
print( " " )
|
||||
print( " -DFORCE_VERSION_STRING=STRING" )
|
||||
print( " " )
|
||||
print( " Force configure to use an arbitrary version string" )
|
||||
print( " STRING. This option may be useful when repackaging" )
|
||||
print( " custom versions of BLIS by outside organizations." )
|
||||
print( " " )
|
||||
print( " -DCOMPLEX_RETURN=gnu or -DCOMPLEX_RETURN=intel or -DCOMPLEX_RETURN=default" )
|
||||
print( " " )
|
||||
print( " Specify the way in which complex numbers are returned" )
|
||||
print( " from Fortran functions, either \"gnu\" (return in" )
|
||||
print( " registers) or \"intel\" (return via hidden argument)." )
|
||||
print( " By default COMPLEX_RETURNis set to 'default' and we" )
|
||||
print( " attempt to determine the return type from the compiler." )
|
||||
print( " Otherwise, the default is \"gnu\"." )
|
||||
print( " " )
|
||||
print( " -DENABLE_AOCL_DYNAMIC=ON or -DENABLE_AOCL_DYNAMIC=OFF" )
|
||||
print( " " )
|
||||
print( " Disable (Enabled by default) dynamic selection of number of" )
|
||||
print( " threads used to solve the given problem." )
|
||||
print( " Range of optimum number of threads will be [1, num_threads]," )
|
||||
print( " where \"num_threads\" is number of threads set by the application." )
|
||||
print( " Num_threads is derived from either environment variable" )
|
||||
print( " OMP_NUM_THREADS or BLIS_NUM_THREADS' or bli_set_num_threads() API." )
|
||||
print( " " )
|
||||
print( " -DDISABLE_BLIS_ARCH_TYPE=ON or -DDISABLE_BLIS_ARCH_TYPE=OFF" )
|
||||
print( " " )
|
||||
print( " Disable (Enabled by default) support for BLIS_ARCH_TYPE and BLIS_MODEL_TYPE" )
|
||||
print( " environment variables, which allows user to select" )
|
||||
print( " architecture specific code path and optimizations at runtime." )
|
||||
print( " If disabled, in builds with multiple code paths, BLIS" )
|
||||
print( " will still select path and optimizations automatically." )
|
||||
print( " " )
|
||||
print( " -DRENAME_BLIS_ARCH_TYPE=STRING" )
|
||||
print( " " )
|
||||
print( " Change environment variable used to select architecture specific" )
|
||||
print( " code path from BLIS_ARCH_TYPE to STRING" )
|
||||
print( " " )
|
||||
print( " -DRENAME_BLIS_MODEL_TYPE=STRING" )
|
||||
print( " " )
|
||||
print( " Change environment variable used to select architecture model specific" )
|
||||
print( " optimizations from BLIS_MODEL_TYPE to STRING" )
|
||||
print( " " )
|
||||
print( " -DENABLE_NO_UNDERSCORE_API=OFF" )
|
||||
print( " " )
|
||||
print( " Export APIs without underscore" )
|
||||
print( " " )
|
||||
print( " -DENABLE_UPPERCASE_API=OFF" )
|
||||
print( " " )
|
||||
print( " Export APIs with uppercase" )
|
||||
print( " " )
|
||||
print( " " )
|
||||
print( " Additional CMake Variables:" )
|
||||
print( " " )
|
||||
print( " CMAKE_C_COMPILER Specifies the C compiler to use." )
|
||||
print( " CMAKE_CXX_COMPILER Specifies the C++ compiler to use (sandbox only)." )
|
||||
print( " CMAKE_Fortran_COMPILER Specifies the Fortran compiler to use (only to determine --complex-return)." )
|
||||
print( " COMPILE_OPTIONS Specifies additional compiler flags to use." )
|
||||
print( " COMPILE_DEFINITIONS Specifies additional preprocessor definitions to use." )
|
||||
print( " LINK_OPTIONS Specifies additional linker flags to use." )
|
||||
print( " " )
|
||||
print( " Note that not all compilers are compatible with a given" )
|
||||
print( " configuration." )
|
||||
|
||||
# Return from main().
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
409
build/cmake/read_registry.py
Normal file
409
build/cmake/read_registry.py
Normal file
@@ -0,0 +1,409 @@
|
||||
##Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
# Import modules
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
|
||||
def canonicalize_ws(str):
|
||||
# Remove leading and trailing whitespace.
|
||||
str = str.strip()
|
||||
# Remove duplicate spaces between words.
|
||||
res = " ".join(str.split())
|
||||
# Update the input argument.
|
||||
return res
|
||||
|
||||
|
||||
def is_singleton(str):
|
||||
rval = False
|
||||
count_str = " "
|
||||
for item in str.split():
|
||||
count_str = count_str + "x"
|
||||
if count_str == "x":
|
||||
rval = True
|
||||
return rval
|
||||
|
||||
|
||||
def is_singleton_family(familyname, memberlist):
|
||||
rval = False
|
||||
if is_singleton(memberlist):
|
||||
if memberlist == familyname:
|
||||
rval = True
|
||||
return rval
|
||||
|
||||
|
||||
def is_in_list(word, str):
|
||||
rval = False
|
||||
for item in str.split():
|
||||
if item == word:
|
||||
rval = True
|
||||
break
|
||||
return rval
|
||||
|
||||
|
||||
def assign_key_value(array, key, value):
|
||||
array.update({key: value})
|
||||
|
||||
|
||||
def query_array(array, key):
|
||||
value = array.get(key)
|
||||
return value
|
||||
|
||||
|
||||
def remove_from_list(strike_words, list):
|
||||
flist = ""
|
||||
for item in list.split():
|
||||
# Filter out any list item that matches any of the strike words.
|
||||
if not is_in_list(item, strike_words):
|
||||
flist = " ".join([flist, item])
|
||||
flist = canonicalize_ws(flist)
|
||||
# Return the filtered list.
|
||||
return flist
|
||||
|
||||
def replace_curconfig_configset(klisttmp, curconfig, configset):
|
||||
tmplist = list(klisttmp.split(" "))
|
||||
ind = tmplist.index(curconfig)
|
||||
tmplist.remove(curconfig)
|
||||
tmplist.insert(ind, configset)
|
||||
newlist = " ".join(map(str, tmplist))
|
||||
return newlist
|
||||
|
||||
def rm_duplicate_words(str):
|
||||
res = " ".join(str.split()[::-1])
|
||||
res = " ".join(dict.fromkeys(res.split()))
|
||||
str = " ".join(res.split()[::-1])
|
||||
return str
|
||||
|
||||
def pass_config_kernel_registries(filename, passnum):
|
||||
global config_blist
|
||||
global indirect_blist
|
||||
global config_registry
|
||||
global kernel_registry
|
||||
# first argument: the file containing the configuration registry.
|
||||
# second argument: the pass number: 0 or 1. Pass 0 builds the
|
||||
# indirect config blacklist (indirect_blist) ONLY. Pass 1 actually
|
||||
# begins populating the config and kernel registries, and assumes
|
||||
# the indirect_blist has already been created.
|
||||
# Initialize a list of indirect blacklisted configurations for the
|
||||
# current iteration. These are configurations that are invalidated by
|
||||
# the removal of blacklisted configurations. For example, if haswell
|
||||
# is registered as needing the 'haswell' and 'zen' kernel sets:
|
||||
# haswell: haswell/haswell/zen
|
||||
# and 'zen' was blacklisted because of the compiler version, then the
|
||||
# 'haswell' configuration must be omitted from the registry, as it no
|
||||
# longer has all of the kernel sets it was expecting.
|
||||
if passnum == 0:
|
||||
indirect_blist = ""
|
||||
# For convenience, merge the original and indirect blacklists.
|
||||
# NOTE: During pass 0, all_blist is equal to config_blist, since
|
||||
# indirect_blist is still empty.
|
||||
all_blist = config_blist + indirect_blist
|
||||
# Disable support for indirect blacklisting by returning early during
|
||||
# pass 0. See issue #214 for details [1]. Basically, I realized that
|
||||
# indirect blacklisting is not needed in the use case that I envisioned
|
||||
# in the real-life example above. If a subconfiguration such as haswell
|
||||
# is defined to require the zen kernel set, it implies that the zen
|
||||
# kernels can be compiled with haswell compiler flags. That is, just
|
||||
# because the zen subconfig (and its compiler flags) is blacklisted
|
||||
# does not mean that the haswell subconfig cannot compile the zen
|
||||
# kernels with haswell-specific flags.
|
||||
# [1] https://github.com/flame/blis/issues/214
|
||||
if passnum == 0:
|
||||
return
|
||||
|
||||
cfg = open(filename, "r+")
|
||||
while True:
|
||||
line = cfg.readline()
|
||||
if not line:
|
||||
break
|
||||
|
||||
# We've stripped out leading whitespace and trailing comments. If
|
||||
# the line is now empty, then we can skip it altogether.
|
||||
if re.match(r'\n', line) or re.match(r'#', line):
|
||||
continue
|
||||
|
||||
# Read the config name and config list for the current line.
|
||||
cname, list = line.split(':')
|
||||
cname = cname.strip()
|
||||
list = list.strip()
|
||||
# If we encounter a slash, it means the name of the configuration
|
||||
# and the kernel set needed by that configuration are different.
|
||||
if list.find("/") != -1:
|
||||
clist = ""
|
||||
klist = ""
|
||||
# The sub-configuration name is always the first sub-word in
|
||||
# the slash-separated compound word.
|
||||
# Delete the sub-configuration name from the front of the
|
||||
# string, leaving the slash-separated kernel names (or just
|
||||
# the kernel name, if there is only one).
|
||||
# Replace the slashes with spaces to transform the string
|
||||
# into a space-separated list of kernel names.
|
||||
list = list.replace("/", " ")
|
||||
config, kernels = list.split(" ", 1)
|
||||
|
||||
clist = clist + config
|
||||
klist = klist + kernels
|
||||
else:
|
||||
clist = list
|
||||
klist = list
|
||||
|
||||
# Strip out whitespace from the config name and config/kernel list
|
||||
# on each line.
|
||||
cname = canonicalize_ws(cname)
|
||||
clist = canonicalize_ws(clist)
|
||||
klist = canonicalize_ws(klist)
|
||||
# Next, we prepare to:
|
||||
# - pass 0: inspect klist for blacklisted configurations, which may
|
||||
# reveal configurations as needing to be indirectly blacklisted.
|
||||
# - pass 1: compare cname to the blacklists and commit clist/klist
|
||||
# to their respective registries, as appropriate.
|
||||
# Handle singleton and umbrella configuration entries separately.
|
||||
if is_singleton_family(cname, clist):
|
||||
# Singleton configurations/families.
|
||||
# Note: for singleton families, clist contains one item, which
|
||||
# always equals cname, but klist could contain more than one
|
||||
# item.
|
||||
# Only consider updating the indirect blacklist (pass 0) or
|
||||
# committing clist and klist to the registries (pass 1) if the
|
||||
# configuration name (cname) is not blacklisted.
|
||||
if not is_in_list(cname, all_blist):
|
||||
if passnum == 0:
|
||||
# Even if the cname isn't blacklisted, one of the requisite
|
||||
# kernels might be, so we need to check klist for blacklisted
|
||||
# items. If we find one, we must assume that the entire entry
|
||||
# must be thrown out. (Ideally, we would simply fall back to
|
||||
# reference code for the blacklisted kernels, but that is not
|
||||
# at all straightforward under the current configuration
|
||||
# system architecture.) Thus, we add cname to the indirect
|
||||
# blacklist.
|
||||
for item in klist.split():
|
||||
if is_in_list(item, config_blist):
|
||||
indirect_blist = indirect_blist + cname
|
||||
break
|
||||
if passnum == 1:
|
||||
# Store the clist to the cname key of the config registry.
|
||||
# config_registry[${cname}]=${clist}
|
||||
assign_key_value(config_registry, cname, clist)
|
||||
if passnum == 1:
|
||||
# Store the klist to the cname key of the kernel registry.
|
||||
# kernel_registry[${cname}]=${klist}
|
||||
assign_key_value(kernel_registry, cname, klist)
|
||||
else:
|
||||
# Umbrella configurations/families.
|
||||
# First we check cname, which should generally not be blacklisted
|
||||
# for umbrella families, but we check anyway just to be safe.
|
||||
if not is_in_list(cname, all_blist):
|
||||
if passnum == 1:
|
||||
# Check each item in the clist and klist. (At this point,
|
||||
# clist == klist.) If any sub-config is blacklisted, we
|
||||
# omit it from clist and klist.
|
||||
for item in clist.split():
|
||||
if is_in_list(item, all_blist):
|
||||
clist = remove_from_list(item, clist)
|
||||
klist = remove_from_list(item, klist)
|
||||
# Store the config and kernel lists to entries that
|
||||
# corresponds to the config name.
|
||||
assign_key_value(config_registry, cname, clist)
|
||||
assign_key_value(kernel_registry, cname, klist)
|
||||
cfg.close()
|
||||
if passnum == 0:
|
||||
# Assign the final indirect blacklist (with whitespace removed).
|
||||
indirect_blist = canonicalize_ws(indirect_blist)
|
||||
|
||||
|
||||
def read_registry_file(filename):
|
||||
global config_registry
|
||||
global kernel_registry
|
||||
# Execute an initial pass through the config_registry file so that
|
||||
# we can accumulate a list of indirectly blacklisted configurations,
|
||||
# if any.
|
||||
pass_config_kernel_registries(filename, 0)
|
||||
# Now that the indirect_blist has been created, make a second pass
|
||||
# through the 'config_registry' file, this time creating the actual
|
||||
# config and kernel registry data structures.
|
||||
pass_config_kernel_registries(filename, 1)
|
||||
# Now we must go back through the config_registry and subsitute any
|
||||
# configuration families with their constituents' members. Each time
|
||||
# one of these substitutions occurs, we set a flag that causes us to
|
||||
# make one more pass. (Subsituting a singleton definition does not
|
||||
# prompt additional iterations.) This process stops when a full pass
|
||||
# does not result in any subsitution.
|
||||
|
||||
iterate_again = 1
|
||||
while iterate_again == 1:
|
||||
iterate_again = 0
|
||||
for cr_var in config_registry:
|
||||
config = cr_var
|
||||
clist = query_array(config_registry, config)
|
||||
# The entries that define singleton families should never need any substitution.
|
||||
if is_singleton_family(config, clist):
|
||||
continue
|
||||
for mem in clist.split():
|
||||
mems_mem = query_array(config_registry, mem)
|
||||
# If mems_mem is empty string, then mem was not found as a key
|
||||
# in the config list associative array. In that case, we continue
|
||||
# and will echo an error later in the script.
|
||||
if not (mems_mem and mems_mem.strip()):
|
||||
continue
|
||||
if mem != mems_mem:
|
||||
clist = query_array(config_registry, config)
|
||||
# Replace the current config with its constituent config set,
|
||||
# canonicalize whitespace, and then remove duplicate config
|
||||
# set names, if they exist. Finally, update the config registry
|
||||
# with the new config list.
|
||||
#newclist = replace_curconfig_configset(clist, mem, mems_mem)
|
||||
newclist = re.sub(r"\b{}\b".format(mem), mems_mem, clist)
|
||||
newclist = canonicalize_ws(newclist)
|
||||
newclist = rm_duplicate_words(newclist)
|
||||
assign_key_value(config_registry, config, newclist)
|
||||
# Since we performed a substitution and changed the config
|
||||
# list, mark the iteration flag to continue another round,
|
||||
# but only if the config (mem) value is NOT present
|
||||
# in the list of sub-configs. If it is present, then further
|
||||
# substitution may not necessarily be needed this round.
|
||||
if not is_in_list(mem, mems_mem):
|
||||
iterate_again = 1
|
||||
# Similar to what we just did for the config_registry, we now iterate
|
||||
# through the kernel_registry and substitute any configuration families
|
||||
# in the kernel list (right side of ':') with the members of that
|
||||
# family's kernel set. This process continues iteratively, as before,
|
||||
# until all families have been replaced with singleton configurations'
|
||||
# kernel sets.
|
||||
iterate_again = 1
|
||||
while iterate_again == 1:
|
||||
iterate_again = 0
|
||||
for kr_var in kernel_registry:
|
||||
config = kr_var
|
||||
klist = query_array(kernel_registry, config)
|
||||
# The entries that define singleton families should never need
|
||||
# any substitution. In the kernel registry, we know it's a
|
||||
# singleton entry when the cname occurs somewhere in the klist.
|
||||
# (This is slightly different than the same test in the config
|
||||
# registry, where we test that clist is one word and that
|
||||
# clist == cname.)
|
||||
if is_in_list(config, klist):
|
||||
# echo "debug: '${config}' not found in '${klist}'; skipping."
|
||||
continue
|
||||
for ker in klist.split():
|
||||
kers_ker = query_array(kernel_registry, ker)
|
||||
# If kers_ker is empty string, then ker was not found as a key
|
||||
# in the kernel registry. While not common, this can happen
|
||||
# when ker identifies a kernel set that does not correspond to
|
||||
# any configuration. (Example: armv7a and armv8a kernel sets are
|
||||
# used by cortexa* configurations, but do not correspond to their
|
||||
# own configurations.)
|
||||
if not (kers_ker and kers_ker.strip()):
|
||||
continue
|
||||
# If the current config/kernel (ker) differs from its singleton kernel
|
||||
# entry (kers_ker), then that singleton entry was specified to use
|
||||
# a different configuration's kernel set. Thus, we need to replace the
|
||||
# occurrence in the current config/kernel name with that of the kernel
|
||||
# set it needs.
|
||||
if ker != kers_ker:
|
||||
klisttmp = query_array(kernel_registry, config)
|
||||
# Replace the current config with its requisite kernels,
|
||||
# canonicalize whitespace, and then remove duplicate kernel
|
||||
# set names, if they exist. Finally, update the kernel registry
|
||||
# with the new kernel list.
|
||||
#newklist = replace_curconfig_configset(klisttmp, ker, kers_ker)
|
||||
newklist = re.sub(r"\b{}\b".format(ker), kers_ker, klisttmp)
|
||||
newklist = canonicalize_ws(newklist)
|
||||
newklist = rm_duplicate_words(newklist)
|
||||
assign_key_value(kernel_registry, config, newklist)
|
||||
# Since we performed a substitution and changed the kernel
|
||||
# list, mark the iteration flag to continue another round,
|
||||
# unless we just substituted using a singleton family
|
||||
# definition, in which case we don't necessarily need to
|
||||
# iterate further this round.
|
||||
if not is_in_list(ker, kers_ker):
|
||||
iterate_again = 1
|
||||
|
||||
|
||||
def build_kconfig_registry(familyname):
|
||||
global config_registry
|
||||
global kernel_registry
|
||||
global kconfig_registry
|
||||
clist = query_array(config_registry, familyname)
|
||||
for config in clist.split():
|
||||
# Look up the kernels for the current sub-configuration.
|
||||
kernels = query_array(kernel_registry, config)
|
||||
for kernel in kernels.split():
|
||||
# Add the sub-configuration to the list associated with the kernel.
|
||||
# Query the current sub-configs for the current ${kernel}.
|
||||
cur_configs = query_array(kconfig_registry, kernel)
|
||||
# Add the current sub-configuration to the list of sub-configs we just queried.
|
||||
if cur_configs and cur_configs.strip():
|
||||
cur_configs = " ".join([cur_configs, config])
|
||||
cur_configs = cur_configs.strip()
|
||||
else:
|
||||
cur_configs = config
|
||||
newvalue = canonicalize_ws(cur_configs)
|
||||
# Update the array.
|
||||
assign_key_value(kconfig_registry, kernel, newvalue)
|
||||
|
||||
|
||||
def lastWord(string):
|
||||
# finding the index of last space
|
||||
index = string.rfind(" ")
|
||||
# last word
|
||||
return string[index + 1:]
|
||||
|
||||
|
||||
|
||||
config_blist = ""
|
||||
indirect_blist = ""
|
||||
config_registry = {}
|
||||
kernel_registry = {}
|
||||
kconfig_registry = {}
|
||||
|
||||
def process_config():
|
||||
# Obtain the script name.
|
||||
cwd = os.getcwd()
|
||||
path, arch = os.path.split(sys.argv[1])
|
||||
target_file = os.path.join(sys.argv[2], 'config_registry')
|
||||
|
||||
read_registry_file(target_file)
|
||||
|
||||
config_list = query_array(config_registry, arch)
|
||||
kernel_list = query_array(kernel_registry, arch)
|
||||
|
||||
build_kconfig_registry(arch)
|
||||
|
||||
config_list = " ".join(config_list.split())
|
||||
kernel_list = " ".join(kernel_list.split())
|
||||
|
||||
# We use a sorted version of kernel_list so that it ends up matching the
|
||||
# display order of the kconfig_registry above.
|
||||
kernel_list_sort = kernel_list
|
||||
|
||||
kconfig_map = ""
|
||||
for kernel in kernel_list_sort.split():
|
||||
configs = query_array(kconfig_registry, kernel)
|
||||
|
||||
has_one_kernel = is_singleton(configs)
|
||||
contains_kernel = is_in_list(kernel, configs)
|
||||
|
||||
# Check if the list is a singleton.
|
||||
if has_one_kernel:
|
||||
reducedclist = configs
|
||||
# Check if the list contains a sub-config name that matches the kernel.
|
||||
elif contains_kernel:
|
||||
reducedclist = kernel
|
||||
# Otherwise, use the last name.
|
||||
else:
|
||||
last_config = lastWord(configs)
|
||||
reducedclist = last_config
|
||||
|
||||
# Create a new "kernel:subconfig" pair and add it to the kconfig_map
|
||||
# list, removing whitespace.
|
||||
new_pair = kernel+':'+reducedclist
|
||||
kconfig_map = " ".join([kconfig_map, new_pair])
|
||||
kconfig_map = canonicalize_ws(kconfig_map)
|
||||
|
||||
config = " ; ".join([config_list, kernel_list, kconfig_map])
|
||||
return config
|
||||
|
||||
|
||||
# Function call for config family names
|
||||
CONFIG = process_config()
|
||||
print(CONFIG)
|
||||
122
build/cmake/subdir_helper_functions.cmake
Normal file
122
build/cmake/subdir_helper_functions.cmake
Normal file
@@ -0,0 +1,122 @@
|
||||
##Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
# Create a list of keywords for files that need to be ignored by the system.
|
||||
file(READ ${CMAKE_SOURCE_DIR}/build/gen-make-frags/ignore_list IGNORE_LIST)
|
||||
string(REPLACE "\n" ";" IGNORE_LIST ${IGNORE_LIST})
|
||||
|
||||
# Create a list of suffixes for files that need to be compiled to create the library.
|
||||
file(READ ${CMAKE_SOURCE_DIR}/build/gen-make-frags/suffix_list SUFFIX_LIST)
|
||||
string(REPLACE "\n" ";" SUFFIX_LIST ${SUFFIX_LIST})
|
||||
|
||||
#--------------------------------------------
|
||||
# SUFFIX LISTS
|
||||
#--------------------------------------------
|
||||
# Source suffixes.
|
||||
set(CONFIG_SRC_SUFS "c")
|
||||
set(KERNELS_SRC_SUFS "c;s;S")
|
||||
set(FRAME_SRC_SUFS "c")
|
||||
|
||||
set(AOCLDTL_SRC_SUFS "c")
|
||||
set(ADDON_C99_SUFS "c")
|
||||
set(ADDON_CXX_SUFS "cc;cpp;cxx")
|
||||
set(ADDON_SRC_SUFS "${ADDON_C99_SUFS};${ADDON_CXX_SUFS}")
|
||||
|
||||
set(SANDBOX_C99_SUFS "c")
|
||||
set(SANDBOX_CXX_SUFS "cc;cpp;cxx")
|
||||
set(SANDBOX_SRC_SUFS "${SANDBOX_C99_SUFS};${SANDBOX_CXX_SUFS}")
|
||||
|
||||
# Header suffixes.
|
||||
set(FRAME_HDR_SUFS "h")
|
||||
|
||||
set(AOCLDTL_HDR_SUFS "h")
|
||||
set(ADDON_H99_SUFS "h")
|
||||
set(ADDON_HXX_SUFS "hh;hpp;hxx")
|
||||
set(ADDON_HDR_SUFS "${ADDON_H99_SUFS};${ADDON_HXX_SUFS}")
|
||||
|
||||
set(SANDBOX_H99_SUFS "h")
|
||||
set(SANDBOX_HXX_SUFS "hh;hpp;hxx")
|
||||
set(SANDBOX_HDR_SUFS "$(SANDBOX_H99_SUFS);$(SANDBOX_HXX_SUFS)")
|
||||
|
||||
# Combine all header suffixes and remove duplicates.
|
||||
set(ALL_HDR_SUFS "${FRAME_HDR_SUFS};${ADDON_HDR_SUFS};${SANDBOX_HDR_SUFS};${AOCLDTL_HDR_SUFS}")
|
||||
list(REMOVE_DUPLICATES ALL_HDR_SUFS)
|
||||
|
||||
set(ALL_H99_SUFS "${FRAME_HDR_SUFS};${ADDON_HDR_SUFS};${SANDBOX_H99_SUFS};${AOCLDTL_HDR_SUFS}")
|
||||
list(REMOVE_DUPLICATES ALL_H99_SUFS)
|
||||
|
||||
#--------------------------------------------
|
||||
# Important sets of header files and paths
|
||||
#--------------------------------------------
|
||||
# Get a list of all sub-directories of a given directory
|
||||
macro(get_dirpaths_with_suffixes result curdir sufflist)
|
||||
set(dirlist "")
|
||||
# dirlist will have all files which are below this directory.
|
||||
file(GLOB_RECURSE children LIST_DIRECTORIES true ${curdir}/*)
|
||||
# Adding current directory in the list.
|
||||
list(PREPEND children ${curdir})
|
||||
# Filter out anything that is not a directory.
|
||||
foreach(child ${children})
|
||||
if(IS_DIRECTORY ${child})
|
||||
set(HAS_SUFF_FILE "false")
|
||||
foreach(suff ${sufflist})
|
||||
file(GLOB suff_files LIST_DIRECTORIES false ${child}/*\.${suff})
|
||||
list(LENGTH suff_files list_size)
|
||||
if(NOT (${list_size} STREQUAL 0))
|
||||
set(HAS_SUFF_FILE "true")
|
||||
# If there is at least one file with a specific suffix break from for-loop.
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
# If there is at least one *.suff file, add directory path in the list.
|
||||
if(HAS_SUFF_FILE STREQUAL "true")
|
||||
list(APPEND dirlist "${child}/")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
# Get the name of the current directory, after removing the source directory
|
||||
# from the name, so that we can exclude the files that are part of the ignore
|
||||
# list even if the blis directory is located in a directory with a name that
|
||||
# would be ignored.
|
||||
string(REPLACE "${CMAKE_SOURCE_DIR}/" "" curdirsimple ${curdir})
|
||||
# Filter out anything that is part of the IGNORE_LIST.
|
||||
foreach(item ${IGNORE_LIST})
|
||||
list(FILTER dirlist EXCLUDE REGEX ${curdirsimple}.*/${item}/)
|
||||
endforeach()
|
||||
list(APPEND ${result} ${dirlist})
|
||||
endmacro()
|
||||
|
||||
# Get a list of all source files of a given directory based on the suffix list.
|
||||
# Returns a list which can be transfored to a string when needed
|
||||
# from high level CMake.
|
||||
macro(get_filepaths_with_suffixes result curdir sufflist)
|
||||
set(sourcelist "")
|
||||
# Get the name of the current directory, after removing the source directory
|
||||
# from the name, so that we can exclude the files that are part of the ignore
|
||||
# list even if the blis directory is located in a directory with a name that
|
||||
# would be ignored.
|
||||
string(REPLACE "${CMAKE_SOURCE_DIR}/" "" curdirsimple ${curdir})
|
||||
foreach(suff ${sufflist})
|
||||
# dirlist will have all files which are below this directory.
|
||||
file(GLOB_RECURSE suff_files LIST_DIRECTORIES false ${curdir}/*\.${suff})
|
||||
# Filter out anything that is part of the IGNORE_LIST.
|
||||
foreach(item ${IGNORE_LIST})
|
||||
list(FILTER suff_files EXCLUDE REGEX ${curdirsimple}.*/${item}/)
|
||||
endforeach()
|
||||
list(APPEND sourcelist "${suff_files}")
|
||||
endforeach()
|
||||
list(APPEND ${result} ${sourcelist})
|
||||
endmacro()
|
||||
|
||||
# Choose correct sub-configurarion name for the given kernel set.
|
||||
# Behaves similary to get-config-for-kset.
|
||||
macro(get_config_for_kernel_from_kconfig_map config kernel kconfig_map)
|
||||
set(conf ${kconfig_map})
|
||||
# Since kconfig_map has as elements pairs of the form kernel:config,
|
||||
# to find the element with the corresponding config we need to filter
|
||||
# with respect to the kernel first.
|
||||
list(FILTER conf INCLUDE REGEX ${kernel}:)
|
||||
# Now that the list has only one element, we can remove the part
|
||||
# of kernel: and then we will be left with config.
|
||||
list(TRANSFORM conf REPLACE ${kernel}: "")
|
||||
list(APPEND ${config} ${conf})
|
||||
endmacro()
|
||||
@@ -1,28 +1,187 @@
|
||||
##Copyright (C) 2022, Advanced Micro Devices, Inc. All rights reserved. ##
|
||||
##Copyright (C) 2022-2023, Advanced Micro Devices, Inc ##
|
||||
|
||||
if(${TARGET_ARCH} STREQUAL zen4)
|
||||
message("The configuration is : ${TARGET_ARCH}")
|
||||
add_subdirectory(zen4)
|
||||
elseif(${TARGET_ARCH} STREQUAL zen3)
|
||||
message("The configuration is : ${TARGET_ARCH}")
|
||||
add_subdirectory(zen3)
|
||||
elseif(${TARGET_ARCH} STREQUAL zen2)
|
||||
message("The configuration is : ${TARGET_ARCH}")
|
||||
add_subdirectory(zen2)
|
||||
elseif(${TARGET_ARCH} STREQUAL zen)
|
||||
message("The configuration is : ${TARGET_ARCH}")
|
||||
add_subdirectory(zen)
|
||||
elseif(${TARGET_ARCH} STREQUAL amdzen)
|
||||
message("The configuration is : ${TARGET_ARCH}")
|
||||
add_subdirectory(generic)
|
||||
add_subdirectory(zen)
|
||||
add_subdirectory(zen2)
|
||||
add_subdirectory(zen3)
|
||||
add_subdirectory(zen4)
|
||||
elseif(${TARGET_ARCH} STREQUAL haswell)
|
||||
message("The configuration is : ${TARGET_ARCH}")
|
||||
add_subdirectory(haswell)
|
||||
else(${TARGET_ARCH} STREQUAL generic)
|
||||
message("The configuration is : ${TARGET_ARCH}")
|
||||
add_subdirectory(generic)
|
||||
endif()
|
||||
# Writing a function that will be used to generate the required object
|
||||
# libraries for the required configs.
|
||||
function(generate_config_targets config_target)
|
||||
# Collect all subdirectory paths that have at least one file with suffix in CONFIG_SRC_SUFS list.
|
||||
get_filepaths_with_suffixes(LOCAL_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${config_target}" "${CONFIG_SRC_SUFS}")
|
||||
|
||||
# Create an object library using the source file list above.
|
||||
add_library(${config_target}_CONFIG
|
||||
OBJECT
|
||||
${LOCAL_SOURCE_FILES}
|
||||
)
|
||||
# Include the corresponding make_defs.cmake that holds the required compiler options.
|
||||
include(${CMAKE_SOURCE_DIR}/config/${config_target}/make_defs.cmake)
|
||||
# Use PRIVATE keyword for option setting since we do not want the properties to propagate in other targets.
|
||||
# mimicing get-config-cflags-for
|
||||
target_compile_options(${config_target}_CONFIG
|
||||
PRIVATE
|
||||
# load-var-for,COPTFLAGS
|
||||
${COPTFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CDBGFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CWARNFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CMISCFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CLANGFLAGS}
|
||||
# in get-config-cflags-for
|
||||
${BUILD_SYMFLAGS}
|
||||
)
|
||||
target_compile_definitions(${config_target}_CONFIG
|
||||
PRIVATE
|
||||
# in get-noopt-cflags-for
|
||||
${CPPROCFLAGS}
|
||||
# in get-noopt-cflags-for
|
||||
${VERS_DEF}
|
||||
# in get-config-cflags-for
|
||||
${BUILD_CPPFLAGS}
|
||||
)
|
||||
target_include_directories(${config_target}_CONFIG
|
||||
BEFORE
|
||||
PRIVATE
|
||||
# in get-noopt-cflags-for
|
||||
${CINFLAGS}
|
||||
)
|
||||
if(THREADING_MODEL STREQUAL "openmp")
|
||||
# Equivalent to CTHREADFLAGS in get-noopt-cflags-for
|
||||
target_link_libraries(${config_target}_CONFIG PRIVATE OpenMP::OpenMP_C)
|
||||
elseif(THREADING_MODEL STREQUAL "pthreads")
|
||||
# in get-noopt-cflags-for
|
||||
target_compile_options(${config_target}_CONFIG PRIVATE ${CTHREADFLAGS})
|
||||
endif()
|
||||
if(BUILD_SHARED_LIBS)
|
||||
# Equivalent to CPICFLAGS in get-noopt-cflags-for
|
||||
set_target_properties(${config_target}_CONFIG PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
add_dependencies(${config_target}_CONFIG flat-header)
|
||||
# Put all those targets under object-libs-targets folder name so that they appear all together in IDE.
|
||||
set_target_properties(${config_target}_CONFIG PROPERTIES FOLDER object-libs-targets)
|
||||
|
||||
# Create on object library using the corresponding reference kernel initialization file.
|
||||
add_library(${config_target}_REFINIT
|
||||
OBJECT
|
||||
${CMAKE_SOURCE_DIR}/ref_kernels/bli_cntx_ref.c
|
||||
)
|
||||
# Use PRIVATE keyword for option setting since we do not want the properties to propagate in other targets.
|
||||
# mimicing get-refinit-cflags-for
|
||||
target_compile_options(${config_target}_REFINIT
|
||||
PRIVATE
|
||||
# load-var-for,COPTFLAGS
|
||||
${COPTFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CDBGFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CWARNFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CMISCFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CLANGFLAGS}
|
||||
# in get-refinit-cflags-for
|
||||
${BUILD_SYMFLAGS}
|
||||
)
|
||||
target_compile_definitions(${config_target}_REFINIT
|
||||
PRIVATE
|
||||
# get-noopt-cflags-for
|
||||
${CPPROCFLAGS}
|
||||
# in get-noopt-cflags-for
|
||||
${VERS_DEF}
|
||||
# in get-refinit-cflags-for
|
||||
${BUILD_CPPFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CPPROCFLAGS}
|
||||
# in get-refinit-cflags-for
|
||||
-DBLIS_CNAME=${config_target}
|
||||
)
|
||||
target_include_directories(${config_target}_REFINIT
|
||||
BEFORE
|
||||
PRIVATE
|
||||
# in get-noopt-cflags-for
|
||||
${CINFLAGS}
|
||||
)
|
||||
if(THREADING_MODEL STREQUAL "openmp")
|
||||
# Equivalent to CTHREADFLAGS in get-noopt-cflags-for
|
||||
target_link_libraries(${config_target}_REFINIT PRIVATE OpenMP::OpenMP_C)
|
||||
elseif(THREADING_MODEL STREQUAL "pthreads")
|
||||
# in get-noopt-cflags-for
|
||||
target_compile_options(${config_target}_REFINIT PRIVATE ${CTHREADFLAGS})
|
||||
endif()
|
||||
if(BUILD_SHARED_LIBS)
|
||||
# Equivalent to CPICFLAGS in get-noopt-cflags-for
|
||||
set_target_properties(${config_target}_REFINIT PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
add_dependencies(${config_target}_REFINIT flat-header)
|
||||
# Put all those targets under object-libs-targets folder name so that they appear all together in IDE.
|
||||
set_target_properties(${config_target}_REFINIT PROPERTIES FOLDER object-libs-targets)
|
||||
|
||||
# Collect all subdirectory paths that have at least one file with suffix in KERNELS_SRC_SUFS list.
|
||||
set(REFKERN_PATH ${CMAKE_SOURCE_DIR}/ref_kernels)
|
||||
get_filepaths_with_suffixes(LOCAL_REFKERN_FILES ${REFKERN_PATH} ${KERNELS_SRC_SUFS})
|
||||
# Remove bli_cntx_ref.c from source list.
|
||||
list(FILTER LOCAL_REFKERN_FILES EXCLUDE REGEX bli_cntx_ref.c)
|
||||
|
||||
# Create on object library using the corresponding reference implementations being targeted.
|
||||
add_library(${config_target}_REFKERN
|
||||
OBJECT
|
||||
${LOCAL_REFKERN_FILES}
|
||||
)
|
||||
# Use PRIVATE keyword for option setting since we do not want the properties to propagate in other targets.
|
||||
# mimicing get-refkern-cflags-for
|
||||
target_compile_options(${config_target}_REFKERN
|
||||
PRIVATE
|
||||
# load-var-for,CROPTFLAGS
|
||||
${CROPTFLAGS}
|
||||
# load-var-for,CRVECFLAGS
|
||||
${CRVECFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CDBGFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CWARNFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CMISCFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CLANGFLAGS}
|
||||
# in get-refkernel-cflags-for
|
||||
${COMPSIMDFLAGS}
|
||||
# in get-refkern-cflags-for
|
||||
${BUILD_SYMFLAGS}
|
||||
)
|
||||
target_compile_definitions(${config_target}_REFKERN
|
||||
PRIVATE
|
||||
# in get-noopt-cflags-for
|
||||
${CPPROCFLAGS}
|
||||
# in get-noopt-cflags-for
|
||||
${VERS_DEF}
|
||||
# in get-refkern-cflags-for
|
||||
-DBLIS_CNAME=${config_target}
|
||||
# in get-refkern-cflags-for
|
||||
${BUILD_CPPFLAGS}
|
||||
)
|
||||
target_include_directories(${config_target}_REFKERN
|
||||
BEFORE
|
||||
PRIVATE
|
||||
# in get-noopt-cflags-for
|
||||
${CINFLAGS}
|
||||
)
|
||||
if(THREADING_MODEL STREQUAL "openmp")
|
||||
# Equivalent to CTHREADFLAGS in get-noopt-cflags-for
|
||||
target_link_libraries(${config_target}_REFKERN PRIVATE OpenMP::OpenMP_C)
|
||||
elseif(THREADING_MODEL STREQUAL "pthreads")
|
||||
# in get-noopt-cflags-for
|
||||
target_compile_options(${config_target}_REFKERN PRIVATE ${CTHREADFLAGS})
|
||||
endif()
|
||||
if(BUILD_SHARED_LIBS)
|
||||
# Equivalent to CPICFLAGS in get-noopt-cflags-for
|
||||
set_target_properties(${config_target}_REFKERN PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
add_dependencies(${config_target}_REFKERN flat-header)
|
||||
# Put all those targets under object-libs-targets folder name so that they appear all together in IDE.
|
||||
set_target_properties(${config_target}_REFKERN PROPERTIES FOLDER object-libs-targets)
|
||||
endfunction()
|
||||
|
||||
# Generate targets for each of the configs.
|
||||
foreach(CONF ${CONFIG_LIST})
|
||||
generate_config_targets(${CONF})
|
||||
endforeach()
|
||||
24
config/amdzen/make_defs.cmake
Normal file
24
config/amdzen/make_defs.cmake
Normal file
@@ -0,0 +1,24 @@
|
||||
##Copyright (C) 2023, Advanced Micro Devices, Inc ##
|
||||
|
||||
# For architecture independent files we still need to define
|
||||
# the required flags.
|
||||
if(MSVC)
|
||||
if(NOT ("${CMAKE_BUILD_TYPE}" MATCHES "Release"))
|
||||
set(CDBGFLAGS /Zo)
|
||||
endif()
|
||||
if("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
|
||||
set(COPTFLAGS /Od)
|
||||
else() # Release or RelWithDebInfo
|
||||
set(COPTFLAGS /O2)
|
||||
endif()
|
||||
else()
|
||||
if(NOT (DEBUG_TYPE STREQUAL "off"))
|
||||
set(CDBGFLAGS -g)
|
||||
endif()
|
||||
|
||||
if(DEBUG_TYPE STREQUAL "noopt")
|
||||
set(COPTFLAGS -O0)
|
||||
else() # off or opt
|
||||
set(COPTFLAGS -O3)
|
||||
endif()
|
||||
endif()
|
||||
@@ -1,5 +0,0 @@
|
||||
##Copyright (C) 2021, Advanced Micro Devices, Inc. All rights reserved. ##
|
||||
|
||||
target_sources("${PROJECT_NAME}" PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_cntx_init_generic.c
|
||||
)
|
||||
40
config/generic/make_defs.cmake
Normal file
40
config/generic/make_defs.cmake
Normal file
@@ -0,0 +1,40 @@
|
||||
##Copyright (C) 2023, Advanced Micro Devices, Inc ##
|
||||
|
||||
if(NOT WIN32)
|
||||
if(NOT (DEBUG_TYPE STREQUAL "off"))
|
||||
set(CDBGFLAGS -g)
|
||||
endif()
|
||||
|
||||
if(DEBUG_TYPE STREQUAL "noopt")
|
||||
set(COPTFLAGS -O0)
|
||||
else() # off or opt
|
||||
set(COPTFLAGS -O3)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Flags specific to optimized kernels.
|
||||
if(MSVC)
|
||||
set(CKOPTFLAGS ${COPTFLAGS})
|
||||
else()
|
||||
set(CKOPTFLAGS ${COPTFLAGS} -O3)
|
||||
endif()
|
||||
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
# Placeholder in case we want to add gcc-specific flags.
|
||||
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "icc")
|
||||
# Placeholder in case we want to add icc-specific flags.
|
||||
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
# Placeholder in case we want to add clang-specific flags.
|
||||
else()
|
||||
message(FATAL_ERROR "gcc, icc, or clang is required for this configuration.")
|
||||
endif()
|
||||
|
||||
# Flags specific to reference kernels.
|
||||
set(CROPTFLAGS ${CKOPTFLAGS})
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
set(CRVECFLAGS ${CKVECFLAGS})
|
||||
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
set(CRVECFLAGS ${CKVECFLAGS})
|
||||
else()
|
||||
set(CRVECFLAGS ${CKVECFLAGS})
|
||||
endif()
|
||||
@@ -1,21 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved. ##
|
||||
|
||||
set(FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_cntx_init_haswell.c
|
||||
)
|
||||
|
||||
set(SUBDIRECTORIES "")
|
||||
set(RELATIVE_PATH "haswell")
|
||||
|
||||
#Add all subdirectories
|
||||
foreach(VAR ${SUBDIRECTORIES})
|
||||
add_subdirectory(${VAR})
|
||||
endforeach()
|
||||
|
||||
if(FILES)
|
||||
#Add source files to target
|
||||
target_sources("${PROJECT_NAME}" PRIVATE ${FILES})
|
||||
|
||||
#Install our source files
|
||||
install(FILES ${FILES} DESTINATION ${RELATIVE_PATH})
|
||||
endif()
|
||||
@@ -1,5 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved. ##
|
||||
|
||||
target_sources("${PROJECT_NAME}" PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_cntx_init_zen.c
|
||||
)
|
||||
49
config/zen/amd_config.cmake
Normal file
49
config/zen/amd_config.cmake
Normal file
@@ -0,0 +1,49 @@
|
||||
##Copyright (C) 2023, Advanced Micro Devices, Inc ##
|
||||
|
||||
if(NOT WIN32)
|
||||
if(NOT (DEBUG_TYPE STREQUAL "off"))
|
||||
set(CDBGFLAGS -g)
|
||||
endif()
|
||||
|
||||
if(DEBUG_TYPE STREQUAL "noopt")
|
||||
set(COPTFLAGS -O0)
|
||||
else() # off or opt
|
||||
set(COPTFLAGS -O2 -fomit-frame-pointer)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Flags specific to optimized kernels.
|
||||
# NOTE: The -fomit-frame-pointer option is needed for some kernels because
|
||||
# they make explicit use of the rbp register.
|
||||
if(MSVC)
|
||||
set(COPTFLAGS /Oy)
|
||||
set(CKOPTFLAGS ${COPTFLAGS})
|
||||
else()
|
||||
set(CKOPTFLAGS ${COPTFLAGS} -O3)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
set(CKVECFLAGS -mavx2 -mfma -mno-fma4 -mno-tbm -mno-xop -mno-lwp)
|
||||
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
set(CKVECFLAGS -mavx2 -mfpmath=sse -mfma)
|
||||
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
set(CKVECFLAGS -mavx2 -mfpmath=sse -mfma -mno-fma4 -mno-tbm -mno-xop -mno-lwp)
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version OUTPUT_VARIABLE clang_full_version_string)
|
||||
string(REGEX MATCH "^[^\n]*" CLANG_VERSION_STRING "${clang_full_version_string}")
|
||||
string(REGEX MATCHALL "(AOCC.LLVM)" CLANG_STRING "${CLANG_VERSION_STRING}")
|
||||
if("${CLANG_STRING}" MATCHES "(AOCC.LLVM)")
|
||||
list(APPEND CKVECFLAGS -mllvm -disable-licm-vrp)
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "gcc or clang are required for this configuration.")
|
||||
endif()
|
||||
|
||||
# Flags specific to reference kernels.
|
||||
set(CROPTFLAGS ${CKOPTFLAGS})
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
set(CRVECFLAGS ${CKVECFLAGS} -funsafe-math-optimizations -ffp-contract=fast)
|
||||
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
set(CRVECFLAGS ${CKVECFLAGS} -funsafe-math-optimizations -ffp-contract=fast)
|
||||
else()
|
||||
set(CRVECFLAGS ${CKVECFLAGS})
|
||||
endif()
|
||||
39
config/zen/make_defs.cmake
Normal file
39
config/zen/make_defs.cmake
Normal file
@@ -0,0 +1,39 @@
|
||||
##Copyright (C) 2023, Advanced Micro Devices, Inc ##
|
||||
|
||||
# Include file containing common flags for all AMD architectures
|
||||
include(${CMAKE_SOURCE_DIR}/config/zen/amd_config.cmake)
|
||||
if(NOT WIN32)
|
||||
if(NOT (DEBUG_TYPE STREQUAL "off"))
|
||||
set(CDBGFLAGS -g)
|
||||
endif()
|
||||
|
||||
if(DEBUG_TYPE STREQUAL "noopt")
|
||||
set(COPTFLAGS -O0)
|
||||
else() # off or opt
|
||||
set(COPTFLAGS -O3)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Flags specific to optimized kernels.
|
||||
# NOTE: The -fomit-frame-pointer option is needed for some kernels because
|
||||
# they make explicit use of the rbp register.
|
||||
if(MSVC)
|
||||
set(CKOPTFLAGS ${COPTFLAGS} /Oy)
|
||||
else()
|
||||
set(CKOPTFLAGS ${COPTFLAGS} -fomit-frame-pointer)
|
||||
endif()
|
||||
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
list(APPEND CKVECFLAGS -march=znver1)
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.0.0)
|
||||
list(APPEND CKOPTFLAGS -fno-tree-partial-pre -fno-tree-pre -fno-tree-loop-vectorize -fno-gcse)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Flags specific to reference kernels.
|
||||
set(CROPTFLAGS ${CKOPTFLAGS})
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
set(CRVECFLAGS ${CKVECFLAGS})
|
||||
else()
|
||||
set(CRVECFLAGS ${CKVECFLAGS})
|
||||
endif()
|
||||
@@ -1,6 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved. ##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_cntx_init_zen2.c
|
||||
)
|
||||
76
config/zen2/make_defs.cmake
Normal file
76
config/zen2/make_defs.cmake
Normal file
@@ -0,0 +1,76 @@
|
||||
##Copyright (C) 2023, Advanced Micro Devices, Inc ##
|
||||
|
||||
# Include file containing common flags for all AMD architectures
|
||||
include(${CMAKE_SOURCE_DIR}/config/zen/amd_config.cmake)
|
||||
if(NOT WIN32)
|
||||
if(NOT (DEBUG_TYPE STREQUAL "off"))
|
||||
set(CDBGFLAGS -g)
|
||||
endif()
|
||||
|
||||
if(DEBUG_TYPE STREQUAL "noopt")
|
||||
set(COPTFLAGS -O0)
|
||||
else() # off or opt
|
||||
set(COPTFLAGS -O3)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Flags specific to optimized kernels.
|
||||
# NOTE: The -fomit-frame-pointer option is needed for some kernels because
|
||||
# they make explicit use of the rbp register.
|
||||
if(MSVC)
|
||||
set(CKOPTFLAGS ${COPTFLAGS} /Oy)
|
||||
else()
|
||||
set(CKOPTFLAGS ${COPTFLAGS} -fomit-frame-pointer)
|
||||
endif()
|
||||
|
||||
# gcc or clang version must be at least 4.0
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.0.0)
|
||||
# gcc 9.0 or later
|
||||
list(APPEND CKVECFLAGS -march=znver2)
|
||||
list(APPEND CKOPTFLAGS -fno-tree-partial-pre -fno-tree-pre -fno-tree-loop-vectorize -fno-gcse)
|
||||
else()
|
||||
# If gcc is older than 9.1.0 but at least 6.1.0, then we can use -march=znver1
|
||||
# as the fallback option.
|
||||
list(APPEND CKVECFLAGS -march=znver1 -mno-avx256-split-unaligned-store)
|
||||
list(APPEND CRVECFLAGS -march=znver1 -mno-avx256-split-unaligned-store)
|
||||
endif()
|
||||
endif() # gcc
|
||||
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
# AOCC clang has various formats for the version line
|
||||
# AOCC.LLVM.2.0.0.B191.2019_07_19 clang version 8.0.0 (CLANG: Jenkins AOCC_2_0_0-Build#191) (based on LLVM AOCC.LLVM.2.0.0.B191.2019_07_19)
|
||||
# AOCC.LLVM.2.1.0.B1030.2019_11_12 clang version 9.0.0 (CLANG: Build#1030) (based on LLVM AOCC.LLVM.2.1.0.B1030.2019_11_12)
|
||||
# AMD clang version 10.0.0 (CLANG: AOCC_2.2.0-Build#93 2020_06_25) (based on LLVM Mirror.Version.10.0.0)
|
||||
# AMD clang version 11.0.0 (CLANG: AOCC_2.3.0-Build#85 2020_11_10) (based on LLVM Mirror.Version.11.0.0)
|
||||
# AMD clang version 12.0.0 (CLANG: AOCC_3.0.0-Build#2 2020_11_05) (based on LLVM Mirror.Version.12.0.0)
|
||||
# AMD clang version 14.0.0 (CLANG: AOCC_4.0.0-Build#98 2022_06_15) (based on LLVM Mirror.Version.14.0.0)
|
||||
|
||||
# For our purpose we just want to know if it version 2x or 3x or 4x
|
||||
|
||||
# But also set these in case we are using upstream LLVM clang
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version OUTPUT_VARIABLE clang_full_version_string)
|
||||
string(REGEX MATCH "^[^\n]*" CLANG_VERSION_STRING "${clang_full_version_string}")
|
||||
string(REGEX MATCHALL "(AOCC_2|AOCC_3|AOCC_4|AOCC|LLVM|clang)" CLANG_STRING "${CLANG_VERSION_STRING}")
|
||||
string(REGEX REPLACE ".*clang version ([0-9]+\\.[0-9]+).*" "\\1" CLANG_VERSION "${CLANG_VERSION_STRING}")
|
||||
|
||||
if("${CLANG_STRING}" MATCHES "AOCC_4")
|
||||
# AOCC version 4x we will enable znver2
|
||||
list(APPEND CKVECFLAGS -march=znver2)
|
||||
elseif("${CLANG_STRING}" MATCHES "AOCC_3")
|
||||
# AOCC version 3x we will enable znver2
|
||||
list(APPEND CKVECFLAGS -march=znver2)
|
||||
elseif("${CLANG_STRING}" MATCHES "(AOCC_2|LLVM)")
|
||||
# AOCC version 2x we will enable znver2
|
||||
list(APPEND CKVECFLAGS -march=znver2)
|
||||
elseif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.0.0)
|
||||
# LLVM clang 9.0 or later
|
||||
list(APPEND CKVECFLAGS -march=znver2)
|
||||
else()
|
||||
list(APPEND CKVECFLAGS -march=znver1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Flags specific to reference kernels.
|
||||
set(CROPTFLAGS ${CKOPTFLAGS})
|
||||
set(CRVECFLAGS ${CKVECFLAGS})
|
||||
@@ -1,7 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc ##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_cntx_init_zen3.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_family_zen3.h
|
||||
)
|
||||
90
config/zen3/make_defs.cmake
Normal file
90
config/zen3/make_defs.cmake
Normal file
@@ -0,0 +1,90 @@
|
||||
##Copyright (C) 2023, Advanced Micro Devices, Inc ##
|
||||
|
||||
# FLAGS that are specific to the 'zen3' architecture are added here.
|
||||
# FLAGS that are common for all the AMD architectures are present in
|
||||
# config/zen/amd_config.mk.
|
||||
|
||||
# Include file containing common flags for all AMD architectures
|
||||
include(${CMAKE_SOURCE_DIR}/config/zen/amd_config.cmake)
|
||||
|
||||
# --- Determine the C compiler and related flags ---
|
||||
if(NOT WIN32)
|
||||
if(NOT (DEBUG_TYPE STREQUAL "off"))
|
||||
set(CDBGFLAGS -g)
|
||||
endif()
|
||||
|
||||
if(DEBUG_TYPE STREQUAL "noopt")
|
||||
set(COPTFLAGS -O0)
|
||||
else() # off or opt
|
||||
set(COPTFLAGS -O3)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Flags specific to optimized kernels.
|
||||
# NOTE: The -fomit-frame-pointer option is needed for some kernels because
|
||||
# they make explicit use of the rbp register.
|
||||
if(MSVC)
|
||||
set(CKOPTFLAGS ${COPTFLAGS} /Oy)
|
||||
else()
|
||||
set(CKOPTFLAGS ${COPTFLAGS} -fomit-frame-pointer)
|
||||
endif()
|
||||
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 11.0.0)
|
||||
# gcc 11.0 or later
|
||||
list(APPEND CKVECFLAGS -march=znver3)
|
||||
# Update CKOPTFLAGS for gcc to use O3 optimization without
|
||||
# -ftree-pre and -ftree-partial-pre flag. These flag results
|
||||
# in suboptimal code generation for instrinsic based kernels.
|
||||
# The -ftree-loop-vectorize results in inefficient code gen
|
||||
# for amd optimized l1 kernels based on instrinsics.
|
||||
list(APPEND CKOPTFLAGS -fno-tree-partial-pre -fno-tree-pre -fno-tree-loop-vectorize -fno-gcse)
|
||||
elseif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.0.0)
|
||||
# gcc 9.0 or later
|
||||
list(APPEND CKVECFLAGS -march=znver2)
|
||||
list(APPEND CKOPTFLAGS -fno-tree-partial-pre -fno-tree-pre -fno-tree-loop-vectorize -fno-gcse)
|
||||
else()
|
||||
# If gcc is older than 9.1.0 but at least 6.1.0, then we can use -march=znver1
|
||||
# as the fallback option.
|
||||
list(APPEND CKVECFLAGS -march=znver1 -mno-avx256-split-unaligned-store)
|
||||
list(APPEND CRVECFLAGS -march=znver1 -mno-avx256-split-unaligned-store)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
# AOCC clang has various formats for the version line
|
||||
# AOCC.LLVM.2.0.0.B191.2019_07_19 clang version 8.0.0 (CLANG: Jenkins AOCC_2_0_0-Build#191) (based on LLVM AOCC.LLVM.2.0.0.B191.2019_07_19)
|
||||
# AOCC.LLVM.2.1.0.B1030.2019_11_12 clang version 9.0.0 (CLANG: Build#1030) (based on LLVM AOCC.LLVM.2.1.0.B1030.2019_11_12)
|
||||
# AMD clang version 10.0.0 (CLANG: AOCC_2.2.0-Build#93 2020_06_25) (based on LLVM Mirror.Version.10.0.0)
|
||||
# AMD clang version 11.0.0 (CLANG: AOCC_2.3.0-Build#85 2020_11_10) (based on LLVM Mirror.Version.11.0.0)
|
||||
# AMD clang version 12.0.0 (CLANG: AOCC_3.0.0-Build#2 2020_11_05) (based on LLVM Mirror.Version.12.0.0)
|
||||
# AMD clang version 14.0.0 (CLANG: AOCC_4.0.0-Build#98 2022_06_15) (based on LLVM Mirror.Version.14.0.0)
|
||||
|
||||
# For our purpose we just want to know if it version 2x or 3x or 4x
|
||||
|
||||
# But also set these in case we are using upstream LLVM clang
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version OUTPUT_VARIABLE clang_full_version_string)
|
||||
string(REGEX MATCH "^[^\n]*" CLANG_VERSION_STRING "${clang_full_version_string}")
|
||||
string(REGEX MATCHALL "(AOCC_2|AOCC_3|AOCC_4|AOCC|LLVM|clang)" CLANG_STRING "${CLANG_VERSION_STRING}")
|
||||
string(REGEX REPLACE ".*clang version ([0-9]+\\.[0-9]+).*" "\\1" CLANG_VERSION "${CLANG_VERSION_STRING}")
|
||||
|
||||
if("${CLANG_STRING}" MATCHES "AOCC_4")
|
||||
# AOCC version 4x we will enable znver3
|
||||
list(APPEND CKVECFLAGS -march=znver3)
|
||||
elseif("${CLANG_STRING}" MATCHES "AOCC_3")
|
||||
# AOCC version 3x we will enable znver3
|
||||
list(APPEND CKVECFLAGS -march=znver3)
|
||||
elseif("${CLANG_STRING}" MATCHES "(AOCC_2|LLVM)")
|
||||
# AOCC version 2x we will enable znver2
|
||||
list(APPEND CKVECFLAGS -march=znver2)
|
||||
elseif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.0.0)
|
||||
# LLVM clang 9.0 or later
|
||||
list(APPEND CKVECFLAGS -march=znver2)
|
||||
else()
|
||||
list(APPEND CKVECFLAGS -march=znver1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Flags specific to reference kernels.
|
||||
set(CROPTFLAGS ${CKOPTFLAGS})
|
||||
set(CRVECFLAGS ${CKVECFLAGS})
|
||||
@@ -1,7 +0,0 @@
|
||||
##Copyright (C) 2022, Advanced Micro Devices, Inc ##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_cntx_init_zen4.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_family_zen4.h
|
||||
)
|
||||
112
config/zen4/make_defs.cmake
Normal file
112
config/zen4/make_defs.cmake
Normal file
@@ -0,0 +1,112 @@
|
||||
##Copyright (C) 2023, Advanced Micro Devices, Inc ##
|
||||
|
||||
# FLAGS that are specific to the 'zen4' architecture are added here.
|
||||
# FLAGS that are common for all the AMD architectures are present in
|
||||
# config/zen/amd_config.mk.
|
||||
|
||||
# Include file containing common flags for all AMD architectures
|
||||
include(${CMAKE_SOURCE_DIR}/config/zen/amd_config.cmake)
|
||||
if(NOT WIN32)
|
||||
if(NOT (DEBUG_TYPE STREQUAL "off"))
|
||||
set(CDBGFLAGS -g)
|
||||
endif()
|
||||
|
||||
if(DEBUG_TYPE STREQUAL "noopt")
|
||||
set(COPTFLAGS -O0)
|
||||
else() # off or opt
|
||||
set(COPTFLAGS -O3)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Flags specific to optimized kernels.
|
||||
# NOTE: The -fomit-frame-pointer option is needed for some kernels because
|
||||
# they make explicit use of the rbp register.
|
||||
if(MSVC)
|
||||
set(CKOPTFLAGS ${COPTFLAGS} /Oy)
|
||||
else()
|
||||
set(CKOPTFLAGS ${COPTFLAGS} -fomit-frame-pointer)
|
||||
endif()
|
||||
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0.0)
|
||||
# gcc 13.0 or later
|
||||
list(APPEND CKVECFLAGS -march=znver4)
|
||||
list(APPEND CRVECFLAGS -march=znver4)
|
||||
# Update CKOPTFLAGS for gcc to use O3 optimization without
|
||||
# -ftree-pre and -ftree-partial-pre flag. These flag results
|
||||
# in suboptimal code generation for instrinsic based kernels.
|
||||
# The -ftree-loop-vectorize results in inefficient code gen
|
||||
# for amd optimized l1 kernels based on instrinsics.
|
||||
list(APPEND CKOPTFLAGS -fno-tree-partial-pre -fno-tree-pre -fno-tree-loop-vectorize)
|
||||
elseif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 11.0.0)
|
||||
# gcc 11.0 or later
|
||||
list(APPEND CKVECFLAGS -march=znver3 -mavx512f -mavx512dq -mavx512bw -mavx512vl -mavx512vnni -mavx512bf16)
|
||||
list(APPEND CRVECFLAGS -march=znver3)
|
||||
list(APPEND CKOPTFLAGS -fno-tree-partial-pre -fno-tree-pre -fno-tree-loop-vectorize)
|
||||
elseif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.0.0)
|
||||
# gcc 9.0 or later
|
||||
list(APPEND CKVECFLAGS -march=znver2 -mavx512f -mavx512dq -mavx512bw -mavx512vl -mavx512vnni)
|
||||
list(APPEND CRVECFLAGS -march=znver2)
|
||||
list(APPEND CKOPTFLAGS -fno-tree-partial-pre -fno-tree-pre -fno-tree-loop-vectorize)
|
||||
elseif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0.0)
|
||||
# gcc 8.0 or later
|
||||
list(APPEND CKVECFLAGS -march=znver1 -mavx512f -mavx512dq -mavx512bw -mavx512vl -mavx512vnni)
|
||||
list(APPEND CRVECFLAGS -march=znver1)
|
||||
else()
|
||||
# If gcc is older than 8.0.0 but at least 6.1.0, then we can use -march=znver1
|
||||
# as the fallback option.
|
||||
list(APPEND CKVECFLAGS -march=znver1 -mno-avx256-split-unaligned-store)
|
||||
list(APPEND CRVECFLAGS -march=znver1 -mno-avx256-split-unaligned-store)
|
||||
endif()
|
||||
endif() # gcc
|
||||
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
# AOCC clang has various formats for the version line
|
||||
|
||||
# AOCC.LLVM.2.0.0.B191.2019_07_19 clang version 8.0.0 (CLANG: Jenkins AOCC_2_0_0-Build#191) (based on LLVM AOCC.LLVM.2.0.0.B191.2019_07_19)
|
||||
# AOCC.LLVM.2.1.0.B1030.2019_11_12 clang version 9.0.0 (CLANG: Build#1030) (based on LLVM AOCC.LLVM.2.1.0.B1030.2019_11_12)
|
||||
# AMD clang version 10.0.0 (CLANG: AOCC_2.2.0-Build#93 2020_06_25) (based on LLVM Mirror.Version.10.0.0)
|
||||
# AMD clang version 11.0.0 (CLANG: AOCC_2.3.0-Build#85 2020_11_10) (based on LLVM Mirror.Version.11.0.0)
|
||||
# AMD clang version 12.0.0 (CLANG: AOCC_3.0.0-Build#2 2020_11_05) (based on LLVM Mirror.Version.12.0.0)
|
||||
# AMD clang version 14.0.0 (CLANG: AOCC_4.0.0-Build#98 2022_06_15) (based on LLVM Mirror.Version.14.0.0)
|
||||
# For our purpose we just want to know if it version 2x or 3x or 4x
|
||||
|
||||
# But also set these in case we are using upstream LLVM clang
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version OUTPUT_VARIABLE clang_full_version_string)
|
||||
string(REGEX MATCH "^[^\n]*" CLANG_VERSION_STRING "${clang_full_version_string}")
|
||||
string(REGEX MATCHALL "(AOCC_2|AOCC_3|AOCC_4|AOCC|LLVM|clang)" CLANG_STRING "${CLANG_VERSION_STRING}")
|
||||
string(REGEX REPLACE ".*clang version ([0-9]+\\.[0-9]+).*" "\\1" CLANG_VERSION "${CLANG_VERSION_STRING}")
|
||||
|
||||
if("${CLANG_STRING}" MATCHES "AOCC_4")
|
||||
# AOCC version 4x we will enable znver4
|
||||
list(APPEND CKVECFLAGS -march=znver4 -falign-loops=64)
|
||||
list(APPEND CRVECFLAGS -march=znver4)
|
||||
elseif("${CLANG_STRING}" MATCHES "AOCC_3")
|
||||
# AOCC version 3x we will enable znver3
|
||||
list(APPEND CKVECFLAGS -march=znver3 -mavx512f -mavx512dq -mavx512bw -mavx512vl -mavx512vnni -mavx512bf16 -falign-loops=64)
|
||||
list(APPEND CRVECFLAGS -march=znver3)
|
||||
elseif("${CLANG_STRING}" MATCHES "(AOCC_2|LLVM)")
|
||||
# AOCC version 2x we will enable znver2
|
||||
list(APPEND CKVECFLAGS -march=znver2 -mavx512f -mavx512dq -mavx512bw -mavx512vl -mavx512vnni)
|
||||
list(APPEND CRVECFLAGS -march=znver2)
|
||||
elseif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0.0)
|
||||
# LLVM clang 16.0 or later
|
||||
list(APPEND CKVECFLAGS -march=znver4 -falign-loops=64)
|
||||
list(APPEND CRVECFLAGS -march=znver4)
|
||||
elseif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0.0)
|
||||
# LLVM clang 13.0 or later
|
||||
list(APPEND CKVECFLAGS -march=znver3 -mavx512f -mavx512dq -mavx512bw -mavx512vl -mavx512vnni -mavx512bf16 -falign-loops=64)
|
||||
list(APPEND CRVECFLAGS -march=znver3)
|
||||
elseif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.0.0)
|
||||
# LLVM clang 9.0 or later
|
||||
list(APPEND CKVECFLAGS -march=znver2 -mavx512f -mavx512dq -mavx512bw -mavx512vl -mavx512vnni -mavx512bf16 -falign-loops=64)
|
||||
list(APPEND CRVECFLAGS -march=znver2)
|
||||
else()
|
||||
list(APPEND CKVECFLAGS -march=znver1 -mavx512f -mavx512dq -mavx512bw -mavx512vl -mavx512vnni -falign-loops=64)
|
||||
list(APPEND CRVECFLAGS -march=znver1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Flags specific to reference kernels.
|
||||
set(CROPTFLAGS ${CKOPTFLAGS})
|
||||
set(CRVECFLAGS ${CKVECFLAGS})
|
||||
217
docs/CMakeBuildSystem.md
Normal file
217
docs/CMakeBuildSystem.md
Normal file
@@ -0,0 +1,217 @@
|
||||
## Contents
|
||||
|
||||
* **[Contents](CMakeBuildSystem.md#contents)**
|
||||
* **[Introduction](CMakeBuildSystem.md#introduction)**
|
||||
* **[Step 1: Chose a framework configuration](CMakeBuildSystem.md#step-1-choose-a-framework-configuration)**
|
||||
* **[Step 2: Configuring CMake](CMakeBuildSystem.md#step-2-configuring-cmake)**
|
||||
* **[Step 3: Compilation](CMakeBuildSystem.md#step-3-compilation)**
|
||||
* **[Step 4: Installation](CMakeBuildSystem.md#step-4-installation)**
|
||||
* **[Compiling with BLIS](CMakeBuildSystem.md#compiling-with-blis)**
|
||||
* **[Uninstalling](CMakeBuildSystem.md#uninstalling)**
|
||||
* **[Available targets](CMakeBuildSystem.md#available-targets)**
|
||||
* **[Adding configurations](CMakeBuildSystem.md#adding-configurations)**
|
||||
* **[Some examples](CMakeBuildSystem.md#some-examples)**
|
||||
* **[Final notes](CMakeBuildSystem.md#final-notes)**
|
||||
|
||||
## Introduction
|
||||
|
||||
This document describes how to use CMake to build and install a BLIS library to your local system.
|
||||
|
||||
The BLIS CMake system is based on the [Make build system](BuildSystem.md) and is designed for use with both Linux and Windows. Other requirements are:
|
||||
|
||||
* CMake (3.15.0 or higher)
|
||||
* Python (3.4 or later for python3)
|
||||
* GNU `make` (3.81 or later) on Linux
|
||||
* Visual Studio 17 2022 on Windows
|
||||
* a working C99 compiler (gcc or clang on Linux and clang-cl **only** on Windows)
|
||||
|
||||
Note that, on Windows, BLIS implements basic pthreads functionality automatically, so a POSIX threads is not required. On Linux, the implementation is the same to the one of the Make system.
|
||||
|
||||
CMake is used to build out of source so we need to start by creating a build directory from which we will do the configuration and build steps. Since there is a directory called blis/build, the build directory must have a different name. Here is an example on how to create the directory:
|
||||
```
|
||||
$ mkdir build_blis
|
||||
$ cd build_blis
|
||||
```
|
||||
|
||||
## Step 1: Choose a framework configuration
|
||||
|
||||
The first step is to choose the appropriate BLIS configuration. As on the Make build system, the user must decide which configuration to use or whether automatic hardware detection should be used to determine the configuration. Currently only the following configurations are supported:
|
||||
|
||||
* amdzen
|
||||
* zen
|
||||
* zen2
|
||||
* zen3
|
||||
* zen4
|
||||
* generic
|
||||
|
||||
Instructions on how to add a configuration on the CMake system, are provided in a later section.
|
||||
|
||||
### Multithreading
|
||||
|
||||
As in Make system, multithreading in BLIS is disabled by default. To configure cmake so that OpenMP is used, please use `-DTHREADING_MODEL=openmp`. All available options can be found if cmake-gui is used, or by running
|
||||
```
|
||||
cmake .. -DPRINT_CONFIGURE_HELP=ON
|
||||
```
|
||||
|
||||
## Step 2: Configuring CMake
|
||||
|
||||
### Choosing a generator
|
||||
|
||||
This is a reminder on how to configure CMake to use a specific generator:
|
||||
```
|
||||
cmake -G <generator_of_choice>
|
||||
```
|
||||
|
||||
On Linux "Unix Makefiles" is used by default and `-G <generator_of_choice>` can be omitted.
|
||||
|
||||
On Windows, specify Visual Studio generator using
|
||||
```
|
||||
cmake -G "Visual Studio 17 2022"
|
||||
```
|
||||
|
||||
For the rest of this documentation, we will use the platform-agnostic commands to build the libraries, but the usual make commands can be used instead. On the following command snippets we ommit specifying the generator, but one can use their prefered way of building using common CMake practices.
|
||||
|
||||
### Choosing a configuration
|
||||
|
||||
This step is equivalent to running `./configure <confname>` using the Make system. In this case, simply run:
|
||||
```
|
||||
cmake .. -DBLIS_CONFIG_FAMILY=<confname>
|
||||
```
|
||||
If the provided configuration is not supported, an error will be thrown and a message with the available configurations will be printed.
|
||||
|
||||
To configure based on your hardware, you can configure using
|
||||
```
|
||||
cmake .. -DBLIS_CONFIG_FAMILY=auto
|
||||
```
|
||||
Please note that when `auto` is used as a configuration option, the `generic` configuration will be chosen by default on non-AMD hardware.
|
||||
|
||||
### Specifying a prefix path for installation
|
||||
|
||||
We remind users that to specify the installation prefix in cmake, one needs to configure using `CMAKE_INSTALL_PREFIX` variable:
|
||||
```
|
||||
cmake .. -DBLIS_CONFIG_FAMILY=auto -DCMAKE_INSTALL_PREFIX=<prefix>
|
||||
```
|
||||
This will cause libraries to eventually be installed to `<prefix>/lib` and headers will be installed to `<prefix>/include/blis`.
|
||||
|
||||
Options to specify the library install and the header install separately, like in Make system, is not currently supported by the CMake equivalent.
|
||||
|
||||
## Step 3: Compilation
|
||||
|
||||
Once configuration is finished and the corresponding platform-dependent build files have been generated, you can proceed to building the library.
|
||||
To build the library in a platform agnostic way use:
|
||||
```
|
||||
cmake --build . --config Release
|
||||
```
|
||||
For a verbose build, you can use:
|
||||
```
|
||||
cmake --build . --verbose --config Release
|
||||
```
|
||||
To build in parallel on a multicore system, you can use:
|
||||
```
|
||||
cmake --build . --config Release -j<n>
|
||||
```
|
||||
where `<n>` is the number of jobs allowed to run simultaneously by this command.
|
||||
|
||||
Note that on Linux, if Makefiles are used, the above is equivalent to running
|
||||
```
|
||||
make -j<n>
|
||||
```
|
||||
|
||||
## Step 4: Installation
|
||||
|
||||
The BLIS library resides in your chosen build directory, say `blis/build_blis` and the generated header files are in `blis/build_blis/include/<confname>`. To install the library and the header files associated with it, you can use:
|
||||
```
|
||||
cmake --build . --target install
|
||||
```
|
||||
This will install the libraries and header files and create the corresponding symbolic links of the shared libraries in the path specified in `CMAKE_INSTALL_PREFIX`.
|
||||
|
||||
Note that on Linux, if Makefiles are used, the above is equivalent to running
|
||||
```
|
||||
make install
|
||||
```
|
||||
|
||||
## Uninstalling
|
||||
|
||||
Please note that CMake does not provide functionality to uninstall targets.
|
||||
|
||||
## Available targets
|
||||
|
||||
The BLIS CMake system aims to be combatible with the current `make` system. For that reason, it implements the same targets for the generation of libraries and the tests. The table of avalable targets can be found below.
|
||||
|
||||
| target | Description |
|
||||
|:----------------|:---------------------------------------------------|
|
||||
| `all` | Execute `libs` target. |
|
||||
| `libs` | Compile BLIS as a static and/or shared library (depending on CMake options). |
|
||||
| `test` | Execute `checkblis` and `checkblas` targets. |
|
||||
| `check` | Execute `checkblis-fast` and `checkblas` targets. |
|
||||
| `checkblis` | Execute `testblis` and characterize the results to `stdout`. |
|
||||
| `checkblis-fast`| Execute `testblis-fast` and characterize the results to `stdout`. |
|
||||
| `checkblis-md` | Execute `testblis-md` and characterize the results to `stdout`. |
|
||||
| `checkblis-salt`| Execute `testblis-salt` and characterize the results to `stdout`. |
|
||||
| `checkblas` | Execute `testblas` and characterize the results to `stdout`. |
|
||||
| `testblis` | Run the BLIS testsuite with default parameters (runs for 2-8 minutes). |
|
||||
| `testblis-fast` | Run the BLIS testsuite with "fast" parameters (runs for a few seconds). |
|
||||
| `testblis-md` | Run the BLIS testsuite for `gemm` with full mixing of datatypes (runs for 10-30 seconds). |
|
||||
| `testblis-salt` | Run the BLIS testsuite while simulating application-level threading (runs for a few seconds). |
|
||||
| `testsuite` | Same as `testblis`. |
|
||||
| `testblas` | Run the BLAS test drivers with default parameters (runs for a few seconds). |
|
||||
|
||||
### Running the testsuites.
|
||||
* On Linux all targets can be build and run in `build_blis` directory.
|
||||
* On Windows, when Visual Studio has been used as a generator, one can build and run the blis API related tests from testsuite directory and blas API tests from blastest directory.
|
||||
|
||||
## Adding configurations
|
||||
|
||||
ToDo
|
||||
|
||||
## Some examples
|
||||
|
||||
In this section we provide some examples for users that are familiar with the build system based in Makefiles and want to try the new CMake system.
|
||||
|
||||
**_NOTE:_**
|
||||
The CMake system generates the shared libraries by default. To build the static libraries, you need to specify the corresponding CMake variable below
|
||||
```
|
||||
cmake .. -DBUILD_SHARED_LIBS=OFF -DBLIS_CONFIG_FAMILY=amdzen
|
||||
```
|
||||
The same generated header `blis.h` can be used when using the library.
|
||||
|
||||
For shared libraries on Windows, one can easily import the symbols by defining the macro `-DBLIS_EXPORT=__declspec(dllimport)` while building the application,
|
||||
but this is not necessary if static data symbols and objects are not used.
|
||||
|
||||
### Example 1: multi-threaded LP64 libraries for amdzen configuration using clang compiler
|
||||
|
||||
* With configure script:
|
||||
```
|
||||
CC=clang ./configure --enable-threading=openmp --int-size=32 --blas-int-size=32 amdzen
|
||||
```
|
||||
|
||||
* With CMake on Linux:
|
||||
```
|
||||
cmake .. -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang -DENABLE_THREADING=openmp -DINT_SIZE=32 -DBLAS_INT_SIZE=32 -DBLIS_CONFIG_FAMILY=amdzen
|
||||
```
|
||||
|
||||
* With CMake on Windows:
|
||||
```
|
||||
cmake .. -G "Visual Studio 17 2022" -TClangCl -DENABLE_THREADING=openmp -DINT_SIZE=32 -DBLAS_INT_SIZE=32 -DBLIS_CONFIG_FAMILY=amdzen -DOpenMP_libomp_LIBRARY="path_to_openmp_library"
|
||||
```
|
||||
|
||||
### Example 2: single-threaded ILP64 libraries for amdzen configuration with aocl_gemm addon enabled and default compiler
|
||||
|
||||
* With configure script:
|
||||
```
|
||||
./configure --enable-threading=no --int-size=64 --blas-int-size=64 --enable-addon=aocl_gemm amdzen
|
||||
```
|
||||
|
||||
* With CMake on Linux:
|
||||
```
|
||||
cmake .. -DENABLE_THREADING=no -DINT_SIZE=64 -DBLAS_INT_SIZE=64 -DENABLE_ADDON=aocl_gemm -DBLIS_CONFIG_FAMILY=amdzen
|
||||
```
|
||||
|
||||
* With CMake on Windows:
|
||||
```
|
||||
cmake .. -G "Visual Studio 17 2022" -TClangCl -DENABLE_THREADING=no -DINT_SIZE=64 -DBLAS_INT_SIZE=64 -DENABLE_ADDON=aocl_gemm -DBLIS_CONFIG_FAMILY=amdzen
|
||||
```
|
||||
|
||||
## Conclusion
|
||||
|
||||
The BLIS CMake system is developed and maintained by AMD. You can contact us on the email-id toolchainsupport@amd.com. You can also raise any issue/suggestion on the git-hub repository at https://github.com/amd/blis/issues.
|
||||
@@ -1,11 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved. ##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l0_check.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l0_fpa.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l0_oapi.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l0_tapi.c
|
||||
)
|
||||
|
||||
add_subdirectory(copysc)
|
||||
@@ -1,6 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved. ##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_copysc.c
|
||||
)
|
||||
@@ -1,14 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved. ##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1v_check.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1v_fpa.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1v_oapi.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1v_oapi_ba.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1v_oapi_ex.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1v_tapi.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1v_tapi_ba.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1v_tapi_ex.c
|
||||
)
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved. ##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1d_check.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1d_fpa.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1d_oapi.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1d_oapi_ba.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1d_oapi_ex.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1d_tapi.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1d_tapi_ba.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1d_tapi_ex.c
|
||||
)
|
||||
@@ -1,13 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1f_check.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1f_fpa.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1f_oapi.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1f_oapi_ba.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1f_oapi_ex.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1f_tapi.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1f_tapi_ba.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1f_tapi_ex.c
|
||||
)
|
||||
@@ -1,21 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1m_check.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1m_fpa.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1m_oapi.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1m_oapi_ba.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1m_oapi_ex.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1m_tapi.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1m_tapi_ba.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1m_tapi_ex.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l1m_unb_var1.c
|
||||
)
|
||||
|
||||
set(SUBDIRECTORIES "packm" "unpackm")
|
||||
|
||||
#Add all subdirectories
|
||||
foreach(VAR ${SUBDIRECTORIES})
|
||||
add_subdirectory(${VAR})
|
||||
endforeach()
|
||||
@@ -1,27 +0,0 @@
|
||||
##Copyright (C) 2020 - 2023, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_packm_blk_var1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_packm_blk_var1_md.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_packm_check.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_packm_cntl.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_packm_cxk.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_packm_cxk_1er.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_packm_cxk_3mis.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_packm_cxk_4mi.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_packm_cxk_rih.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_packm_init.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_packm_int.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_packm_part.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_packm_struc_cxk.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_packm_struc_cxk_1er.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_packm_struc_cxk_3mis.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_packm_struc_cxk_4mi.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_packm_struc_cxk_md.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_packm_struc_cxk_rih.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_packm_thrinfo.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_packm_unb_var1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_pack_full.c
|
||||
)
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_unpackm_blk_var1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_unpackm_check.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_unpackm_cntl.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_unpackm_cxk.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_unpackm_int.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_unpackm_unb_var1.c
|
||||
)
|
||||
@@ -1,20 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l2_check.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l2_fpa.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l2_oapi.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l2_oapi_ba.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l2_oapi_ex.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l2_tapi.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l2_tapi_ba.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l2_tapi_ex.c
|
||||
)
|
||||
|
||||
set(SUBDIRECTORIES "gemv" "ger" "hemv" "her" "her2" "trmv" "trsv")
|
||||
|
||||
#Add all subdirectories
|
||||
foreach(VAR ${SUBDIRECTORIES})
|
||||
add_subdirectory(${VAR})
|
||||
endforeach()
|
||||
@@ -1,27 +0,0 @@
|
||||
##Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemv_unb_var1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemv_unb_var2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemv_var_oapi.c
|
||||
)
|
||||
|
||||
# Select AMD specific sources for AMD configurations.
|
||||
if(${TARGET_ARCH} STREQUAL zen OR
|
||||
${TARGET_ARCH} STREQUAL zen2 OR
|
||||
${TARGET_ARCH} STREQUAL zen3 OR
|
||||
${TARGET_ARCH} STREQUAL zen4 OR
|
||||
${TARGET_ARCH} STREQUAL amdzen)
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemv_unf_var1_amd.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemv_unf_var2_amd.c
|
||||
)
|
||||
else()
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemv_unf_var1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemv_unf_var2.c
|
||||
)
|
||||
endif()
|
||||
@@ -1,9 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_ger_unb_var1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_ger_unb_var2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_ger_var_oapi.c
|
||||
)
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
##Copyright (C) 2022, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_hemv_unb_var1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_hemv_unb_var2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_hemv_unb_var3.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_hemv_unb_var4.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_hemv_unf_var1a.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_hemv_unf_var3a.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_hemv_var_oapi.c
|
||||
)
|
||||
|
||||
# Select AMD specific sources for AMD configurations.
|
||||
if(${TARGET_ARCH} STREQUAL zen OR
|
||||
${TARGET_ARCH} STREQUAL zen2 OR
|
||||
${TARGET_ARCH} STREQUAL zen3 OR
|
||||
${TARGET_ARCH} STREQUAL zen4 OR
|
||||
${TARGET_ARCH} STREQUAL amdzen)
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_hemv_unf_var1_amd.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_hemv_unf_var3_amd.c
|
||||
)
|
||||
else()
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_hemv_unf_var1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_hemv_unf_var3.c
|
||||
)
|
||||
endif()
|
||||
@@ -1,25 +0,0 @@
|
||||
##Copyright (C) 2022, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_her_var_oapi.c
|
||||
)
|
||||
|
||||
# Select AMD specific sources for AMD configurations.
|
||||
if(${TARGET_ARCH} STREQUAL zen OR
|
||||
${TARGET_ARCH} STREQUAL zen2 OR
|
||||
${TARGET_ARCH} STREQUAL zen3 OR
|
||||
${TARGET_ARCH} STREQUAL zen4 OR
|
||||
${TARGET_ARCH} STREQUAL amdzen)
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_her_unb_var1_amd.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_her_unb_var2_amd.c
|
||||
)
|
||||
else()
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_her_unb_var1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_her_unb_var2.c
|
||||
)
|
||||
endif()
|
||||
@@ -1,29 +0,0 @@
|
||||
##Copyright (C) 2022, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_her2_unb_var1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_her2_unb_var2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_her2_unb_var3.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_her2_unb_var4.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_her2_var_oapi.c
|
||||
)
|
||||
|
||||
# Select AMD specific sources for AMD configurations.
|
||||
if(${TARGET_ARCH} STREQUAL zen OR
|
||||
${TARGET_ARCH} STREQUAL zen2 OR
|
||||
${TARGET_ARCH} STREQUAL zen3 OR
|
||||
${TARGET_ARCH} STREQUAL zen4 OR
|
||||
${TARGET_ARCH} STREQUAL amdzen)
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_her2_unf_var1_amd.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_her2_unf_var4_amd.c
|
||||
)
|
||||
else()
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_her2_unf_var1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_her2_unf_var4.c
|
||||
)
|
||||
endif()
|
||||
@@ -1,7 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_symv.h
|
||||
)
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_syr.h
|
||||
)
|
||||
@@ -1,7 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_syr2.h
|
||||
)
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trmv_unb_var1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trmv_unb_var2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trmv_unf_var1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trmv_unf_var2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trmv_var_oapi.c
|
||||
)
|
||||
@@ -1,27 +0,0 @@
|
||||
##Copyright (C) 2022, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trsv_unb_var1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trsv_unb_var2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trsv_var_oapi.c
|
||||
)
|
||||
|
||||
# Select AMD specific sources for AMD configurations.
|
||||
if(${TARGET_ARCH} STREQUAL zen OR
|
||||
${TARGET_ARCH} STREQUAL zen2 OR
|
||||
${TARGET_ARCH} STREQUAL zen3 OR
|
||||
${TARGET_ARCH} STREQUAL zen4 OR
|
||||
${TARGET_ARCH} STREQUAL amdzen)
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trsv_unf_var1_amd.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trsv_unf_var2_amd.c
|
||||
)
|
||||
else()
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trsv_unf_var1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trsv_unf_var2.c
|
||||
)
|
||||
endif()
|
||||
@@ -1,53 +0,0 @@
|
||||
##Copyright (C) 2022-23, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_blocksize.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_check.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_cntl.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_direct.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_oapi.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_oapi_ba.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_oapi_ex.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_packm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_prune.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_sup.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_sup_packm_a.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_sup_packm_b.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_sup_packm_var.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_sup_ref.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_sup_var12.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_sup_var1n2m.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_tapi.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_tapi_ba.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_tapi_ex.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_thrinfo.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_ukr_fpa.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_ukr_oapi.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_ukr_tapi.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_smart_threading.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_compute.c
|
||||
)
|
||||
# Select AMD specific sources for AMD configurations.
|
||||
if(${TARGET_ARCH} STREQUAL zen OR
|
||||
${TARGET_ARCH} STREQUAL zen2 OR
|
||||
${TARGET_ARCH} STREQUAL zen3 OR
|
||||
${TARGET_ARCH} STREQUAL zen4 OR
|
||||
${TARGET_ARCH} STREQUAL amdzen)
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_sup_int_amd.c
|
||||
)
|
||||
else()
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_sup_int.c
|
||||
)
|
||||
endif()
|
||||
|
||||
set(SUBDIRECTORIES "gemm" "hemm" "her2k" "herk" "symm" "syr2k" "syrk" "trmm" "trmm3" "trsm" "gemmt")
|
||||
|
||||
#Add all subdirectories
|
||||
foreach(VAR ${SUBDIRECTORIES})
|
||||
add_subdirectory(${VAR})
|
||||
endforeach()
|
||||
@@ -1,35 +0,0 @@
|
||||
##Copyright (C) 2022, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemm_blk_var1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemm_blk_var2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemm_blk_var3.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemm_cntl.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemm_int.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemm_ker_var1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemm_ker_var2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemm_ker_var2_md.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemm_md.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemm_md_c2r_ref.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemm_packab.c
|
||||
)
|
||||
|
||||
# Select AMD specific sources for AMD configurations.
|
||||
if(${TARGET_ARCH} STREQUAL zen OR
|
||||
${TARGET_ARCH} STREQUAL zen2 OR
|
||||
${TARGET_ARCH} STREQUAL zen3 OR
|
||||
${TARGET_ARCH} STREQUAL zen4 OR
|
||||
${TARGET_ARCH} STREQUAL amdzen)
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemm_front_amd.c
|
||||
)
|
||||
else()
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemm_front.c
|
||||
)
|
||||
endif()
|
||||
|
||||
add_subdirectory(ind)
|
||||
@@ -1,6 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemm4mb_ker_var2.c
|
||||
)
|
||||
@@ -1,25 +0,0 @@
|
||||
##Copyright (C) 2020-2023, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmt_front.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmt_ker_var2.c
|
||||
)
|
||||
|
||||
# Select AMD specific sources for AMD configurations.
|
||||
if(${TARGET_ARCH} STREQUAL zen OR
|
||||
${TARGET_ARCH} STREQUAL zen2 OR
|
||||
${TARGET_ARCH} STREQUAL zen3 OR
|
||||
${TARGET_ARCH} STREQUAL zen4 OR
|
||||
${TARGET_ARCH} STREQUAL amdzen)
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmt_sup_var1n2m_amd.c
|
||||
)
|
||||
else()
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmt_sup_var1n2m.c
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_hemm_front.c
|
||||
)
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_her2k_front.c
|
||||
)
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_herk_front.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_herk_l_ker_var2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_herk_u_ker_var2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_herk_x_ker_var2.c
|
||||
)
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_symm_front.c
|
||||
)
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_syr2k_front.c
|
||||
)
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_syrk_front.c
|
||||
)
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
##Copyright (C) 2020-22, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trmm_ll_ker_var2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trmm_lu_ker_var2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trmm_rl_ker_var2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trmm_ru_ker_var2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trmm_xx_ker_var2.c
|
||||
)
|
||||
# Select AMD specific sources for AMD configurations.
|
||||
if(${TARGET_ARCH} STREQUAL zen OR
|
||||
${TARGET_ARCH} STREQUAL zen2 OR
|
||||
${TARGET_ARCH} STREQUAL zen3 OR
|
||||
${TARGET_ARCH} STREQUAL zen4 OR
|
||||
${TARGET_ARCH} STREQUAL amdzen)
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trmm_front_amd.c
|
||||
)
|
||||
else()
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trmm_front.c
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trmm3_front.c
|
||||
)
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trsm_blk_var1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trsm_blk_var2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trsm_blk_var3.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trsm_cntl.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trsm_front.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trsm_int.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trsm_ll_ker_var2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trsm_lu_ker_var2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trsm_packab.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trsm_rl_ker_var2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trsm_ru_ker_var2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trsm_xx_ker_var2.c
|
||||
)
|
||||
|
||||
@@ -1,20 +1,100 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
add_subdirectory("thread")
|
||||
add_subdirectory("base")
|
||||
add_subdirectory("0")
|
||||
add_subdirectory("1")
|
||||
add_subdirectory("1d")
|
||||
add_subdirectory("1f")
|
||||
add_subdirectory("1m")
|
||||
add_subdirectory("2")
|
||||
add_subdirectory("3")
|
||||
add_subdirectory("compat")
|
||||
add_subdirectory("ind")
|
||||
add_subdirectory("util")
|
||||
##Copyright (C) 2020-2023, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
# Collect all subdirectory paths that have at least one file with suffix in FRAME_SRC_SUFS list.
|
||||
get_filepaths_with_suffixes(LOCAL_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR} "${FRAME_SRC_SUFS}")
|
||||
|
||||
# AMD has optimized some of the framework files, these optimizations
|
||||
# may not be compatible with other platforms.
|
||||
#
|
||||
# In order to keep main framework code independent of AMD changes,e
|
||||
# AMD has duplicated the files and updated them for example
|
||||
# frame/compact/bla_gemm.c : generic framework file
|
||||
# frame/compact/bla_gemm_amd.c : AMD optimized framework file
|
||||
# Based on the archiecture we choose correct files
|
||||
if(ENABLE_AOCL_ZEN)
|
||||
# Build is being done for AMD platforms, remove the objects which
|
||||
# don't have amd suffix (for which exists AMD specific implementation).
|
||||
# Create a copy of the source files so that we can do regex matching.
|
||||
set(TEMP_SOURCE_LIST ${LOCAL_SOURCE_FILES})
|
||||
# Create a list with all the files that have _amd. in the name.
|
||||
list(FILTER TEMP_SOURCE_LIST INCLUDE REGEX "_amd\.c$")
|
||||
# Remove _amd from all items in the list. This will leave us with all
|
||||
# source files, for which an AMD-optimized file exists.
|
||||
list(TRANSFORM TEMP_SOURCE_LIST REPLACE "_amd\.c$" "\.c")
|
||||
list(REMOVE_ITEM LOCAL_SOURCE_FILES ${TEMP_SOURCE_LIST})
|
||||
else()
|
||||
# Build is done for non AMD platforms, remove the amd specific files.
|
||||
list(FILTER LOCAL_SOURCE_FILES EXCLUDE REGEX "_amd\.c$")
|
||||
endif()
|
||||
|
||||
# Remove frame/compat/f2c/bla_xerbla_array.c from the list when building on Windows
|
||||
# to avoid duplicate symbols issue when we use BLIS with LIBFLAME.
|
||||
# This is a hack and the symbol should be removed from LIBFLAME instead.
|
||||
list(FILTER LOCAL_SOURCE_FILES EXCLUDE REGEX "bla_xerbla_array\.c$")
|
||||
|
||||
# Add corresponding definitions for API that is being exported.
|
||||
if(WIN32)
|
||||
if(ENABLE_NO_UNDERSCORE_API)
|
||||
set(EXPORT_API_DEFS "-DENABLE_NO_UNDERSCORE_API")
|
||||
endif()
|
||||
if(ENABLE_UPPERCASE_API)
|
||||
list(APPEND EXPORT_API_DEFS "-DBLIS_ENABLE_UPPERCASE_API")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Create an object library using the source file list above.
|
||||
add_library(FRAME
|
||||
OBJECT
|
||||
${LOCAL_SOURCE_FILES}
|
||||
)
|
||||
|
||||
# Include the corresponding make_defs.cmake that holds the required compiler options.
|
||||
include(${CMAKE_SOURCE_DIR}/config/${BLIS_CONFIG_FAMILY}/make_defs.cmake)
|
||||
# Use PRIVATE keyword for option setting since we do not want the properties to propagate in other targets.
|
||||
# mimicing get-frame-cflags-for
|
||||
target_compile_options(FRAME
|
||||
PRIVATE
|
||||
# load-var-for,COPTFLAGS
|
||||
${COPTFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CDBGFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CWARNFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CMISCFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CLANGFLAGS}
|
||||
# in get-frame-cflags-for
|
||||
${BUILD_SYMFLAGS}
|
||||
)
|
||||
target_compile_definitions(FRAME
|
||||
PRIVATE
|
||||
# get-noopt-cflags-for
|
||||
${CPPROCFLAGS}
|
||||
# in get-noopt-cflags-for
|
||||
${VERS_DEF}
|
||||
# in get-frame-cflags-for
|
||||
${BUILD_CPPFLAGS}
|
||||
# Windows-specific definitions
|
||||
${EXPORT_API_DEFS}
|
||||
)
|
||||
target_include_directories(FRAME
|
||||
BEFORE
|
||||
PRIVATE
|
||||
# in get-noopt-cflags-for
|
||||
${CINFLAGS}
|
||||
)
|
||||
if(THREADING_MODEL STREQUAL "openmp")
|
||||
# Equivalent to CTHREADFLAGS in get-noopt-cflags-for
|
||||
target_link_libraries(FRAME PRIVATE OpenMP::OpenMP_C)
|
||||
elseif(THREADING_MODEL STREQUAL "pthreads")
|
||||
# in get-noopt-cflags-for
|
||||
target_compile_options(FRAME PRIVATE ${CTHREADFLAGS})
|
||||
endif()
|
||||
if(BUILD_SHARED_LIBS)
|
||||
# Equivalent to CPICFLAGS in get-noopt-cflags-for
|
||||
set_target_properties(FRAME PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
add_dependencies(FRAME flat-header)
|
||||
# Put all those targets under object-libs-targets folder name so that they appear all together in IDE.
|
||||
set_target_properties(FRAME PROPERTIES FOLDER object-libs-targets)
|
||||
@@ -1,10 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_LIST_DIR}/bli_castm.c
|
||||
${CMAKE_CURRENT_LIST_DIR}/bli_castnzm.c
|
||||
${CMAKE_CURRENT_LIST_DIR}/bli_castv.c
|
||||
)
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_LIST_DIR}/bli_obj_check.c
|
||||
${CMAKE_CURRENT_LIST_DIR}/bli_part_check.c
|
||||
)
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_LIST_DIR}/bli_dlamch.c
|
||||
${CMAKE_CURRENT_LIST_DIR}/bli_lsame.c
|
||||
${CMAKE_CURRENT_LIST_DIR}/bli_slamch.c
|
||||
)
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_LIST_DIR}/bli_projm.c
|
||||
${CMAKE_CURRENT_LIST_DIR}/bli_projv.c
|
||||
)
|
||||
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
##Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_amin.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_asum.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_gemm3m.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_gemmt.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_ger.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_hemm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_hemv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_her.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_her2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_her2k.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_herk.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_nrm2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_symm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_symv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_syr.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_syr2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_syr2k.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_syrk.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_trmm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_trmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_trsv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_gemm_batch.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_axpby.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_omatcopy.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_imatcopy.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_omatcopy2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_omatadd.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_gemm_pack_get_size.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_gemm_pack.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_gemm_compute.c
|
||||
)
|
||||
|
||||
# Select AMD specific sources for AMD configurations.
|
||||
if(${TARGET_ARCH} STREQUAL zen OR
|
||||
${TARGET_ARCH} STREQUAL zen2 OR
|
||||
${TARGET_ARCH} STREQUAL zen3 OR
|
||||
${TARGET_ARCH} STREQUAL zen4 OR
|
||||
${TARGET_ARCH} STREQUAL amdzen)
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_amax_amd.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_axpy_amd.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_copy_amd.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_dot_amd.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_gemm_amd.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_gemv_amd.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_scal_amd.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_swap_amd.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_trsm_amd.c
|
||||
)
|
||||
else()
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_amax.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_axpy.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_copy.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_dot.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_gemm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_gemv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_scal.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_swap.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_trsm.c
|
||||
)
|
||||
endif()
|
||||
|
||||
#Add all subdirectories
|
||||
# add_subdirectory(attic)
|
||||
# add_subdirectory(blis)
|
||||
add_subdirectory(cblas)
|
||||
add_subdirectory(check)
|
||||
add_subdirectory(f2c)
|
||||
@@ -1,41 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_gbmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_gbmv.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_hbmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_hbmv.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_hpmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_hpmv.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_hpr.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_hpr.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_hpr2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_hpr2.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_rot.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_rot.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_rotg.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_rotg.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_rotm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_rotm.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_rotmg.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_rotmg.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_sbmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_sbmv.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_spmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_spmv.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_spr.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_spr.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_spr2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_spr2.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_tbmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_tbmv.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_tbsv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_tbsv.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_tpmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_tpmv.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_tpsv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_tpsv.h
|
||||
)
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
if(UNIX)
|
||||
add_subdirectory(thread)
|
||||
endif()
|
||||
@@ -1,9 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/b77_thread.c
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
#Add all subdirectories
|
||||
add_subdirectory(f77_sub)
|
||||
add_subdirectory(src)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/f77_amax_sub.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/f77_amin_sub.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/f77_asum_sub.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/f77_dot_sub.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/f77_nrm2_sub.c
|
||||
)
|
||||
@@ -1,169 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_caxpy.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ccopy.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_cdotc_sub.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_cdotu_sub.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_cgbmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_cgemm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_cgemv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_cgerc.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_cgeru.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_chbmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_chemm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_chemv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_cher.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_cher2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_cher2k.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_cherk.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_chpmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_chpr.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_chpr2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_cscal.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_csscal.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_cswap.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_csymm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_csyr2k.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_csyrk.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ctbmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ctbsv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ctpmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ctpsv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ctrmm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ctrmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ctrsm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ctrsv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dasum.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_daxpy.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dcopy.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ddot.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dgbmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dgemm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dgemv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dger.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dnrm2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_drot.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_drotg.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_drotm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_drotmg.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dsbmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dscal.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dsdot.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dspmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dspr.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dspr2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dswap.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dsymm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dsymv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dsyr.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dsyr2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dsyr2k.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dsyrk.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dtbmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dtbsv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dtpmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dtpsv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dtrmm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dtrmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dtrsm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dtrsv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dzasum.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dznrm2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_globals.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_icamax.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_idamax.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_isamax.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_izamax.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_icamin.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_idamin.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_isamin.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_izamin.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_sasum.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_saxpy.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_scasum.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_scnrm2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_scopy.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_sdot.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_sdsdot.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_sgbmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_sgemm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_sgemv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_sger.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_snrm2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_srot.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_srotg.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_srotm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_srotmg.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ssbmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_sscal.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_sspmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_sspr.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_sspr2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_sswap.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ssymm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ssymv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ssyr.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ssyr2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ssyr2k.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ssyrk.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_stbmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_stbsv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_stpmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_stpsv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_strmm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_strmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_strsm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_strsv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_xerbla.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zaxpy.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zcopy.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zdotc_sub.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zdotu_sub.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zdscal.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zgbmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zgemm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zgemv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zgerc.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zgeru.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zhbmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zhemm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zhemv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zher.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zher2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zher2k.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zherk.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zhpmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zhpr.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zhpr2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zscal.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zswap.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zsymm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zsyr2k.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zsyrk.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ztbmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ztbsv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ztpmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ztpsv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ztrmm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ztrmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ztrsm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_ztrsv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_cgemmt.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dgemmt.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_sgemmt.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zgemmt.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_sgemm_batch.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dgemm_batch.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_cgemm_batch.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zgemm_batch.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_saxpby.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_daxpby.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_caxpby.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zaxpby.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_cgemm3m.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_zgemm3m.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_dcabs1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cblas_scabs1.c
|
||||
)
|
||||
@@ -1,27 +0,0 @@
|
||||
##Copyright (C) 2020-23, Advanced Micro Devices, Inc. All rights reserved. ##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_gemm_check.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_gemmt_check.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_gemv_check.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_ger_check.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_hemm_check.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_hemv_check.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_her2_check.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_her2k_check.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_her_check.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_herk_check.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_symm_check.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_symv_check.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_syr2_check.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_syr2k_check.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_syr_check.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_syrk_check.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_trmm_check.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_trmv_check.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_trsm_check.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_trsv_check.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_gemm3m_check.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_gemm_compute_check.h
|
||||
)
|
||||
@@ -1,31 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_cabs1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_gbmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_hbmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_hpmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_hpr.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_hpr2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_lsame.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_rot.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_rotg.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_rotm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_rotmg.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_sbmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_spmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_spr.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_spr2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_tbmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_tbsv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_tpmv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_tpsv.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_xerbla.c
|
||||
)
|
||||
|
||||
#Add all subdirectories
|
||||
add_subdirectory(util)
|
||||
|
||||
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_c_abs.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_c_div.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_d_abs.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_d_cnjg.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_d_imag.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_d_sign.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_f__cabs.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_r_abs.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_r_cnjg.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_r_imag.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_r_sign.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_z_abs.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bla_z_div.c
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
#ifdef BLIS_IS_BUILDING_LIBRARY
|
||||
#define BLIS_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define BLIS_EXPORT __declspec(dllimport)
|
||||
#define BLIS_EXPORT
|
||||
#endif
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 4
|
||||
#define BLIS_EXPORT __attribute__ ((visibility ("default")))
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_ind.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_ind.c
|
||||
)
|
||||
|
||||
set(SUBDIRECTORIES "cntx" "oapi" "tapi" )
|
||||
|
||||
#Add all subdirectories
|
||||
foreach(VAR ${SUBDIRECTORIES})
|
||||
add_subdirectory(${VAR})
|
||||
endforeach()
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_cntx_ind_stage.c
|
||||
)
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_3m4m1m_oapi.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_ind_oapi.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_nat_oapi.c
|
||||
)
|
||||
@@ -1,8 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_ind_tapi.c
|
||||
)
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_ind_ukr.h
|
||||
)
|
||||
@@ -1,23 +0,0 @@
|
||||
##Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_compute_decor_openmp.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_compute_decor_single.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_decor_openmp.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_decor_pthreads.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_decor_single.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_sup_decor_openmp.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_sup_decor_pthreads.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_l3_sup_decor_single.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_pthread.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_thrcomm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_thrcomm_openmp.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_thrcomm_pthreads.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_thrcomm_single.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_thread.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_thrinfo.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_thrinfo_sup.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_pack_full_decor_openmp.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_pack_full_decor_single.c
|
||||
)
|
||||
@@ -1,17 +0,0 @@
|
||||
##Copyright (C) 2022, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_util_check.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_util_fpa.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_util_oapi.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_util_oapi_ba.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_util_oapi_ex.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_util_tapi.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_util_tapi_ba.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_util_tapi_ex.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_util_unb_var1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_util_update.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_util_api_wrap.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_util_progress.c
|
||||
)
|
||||
@@ -1,10 +1,79 @@
|
||||
##Copyright (C) 2022, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
##Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
add_subdirectory(haswell)
|
||||
add_subdirectory(zen)
|
||||
# Writing a function that will be used to generate the required object
|
||||
# libraries for the required kernels.
|
||||
function(generate_kernel_targets kernel_target)
|
||||
# Collect all subdirectory paths that have at least one file with suffix in KERNELS_SRC_SUFS list.
|
||||
get_filepaths_with_suffixes(LOCAL_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${kernel_target}" "${KERNELS_SRC_SUFS}")
|
||||
|
||||
if(${TARGET_ARCH} STREQUAL zen4 OR
|
||||
${TARGET_ARCH} STREQUAL amdzen)
|
||||
add_subdirectory(skx)
|
||||
add_subdirectory(zen4)
|
||||
endif()
|
||||
# Choose correct sub-configurarion name for the given kernel set.
|
||||
get_config_for_kernel_from_kconfig_map(LOCAL_CONFIG ${kernel_target} "${KCONFIG_MAP}")
|
||||
|
||||
# Only generate the object library if there is at least one source file.
|
||||
list(LENGTH LOCAL_SOURCE_FILES size)
|
||||
if(size GREATER 0)
|
||||
# Create an object library using the source file list above.
|
||||
add_library(${kernel_target}_KERNELS
|
||||
OBJECT
|
||||
${LOCAL_SOURCE_FILES}
|
||||
)
|
||||
# Include the corresponding make_defs.cmake that holds the required compiler options.
|
||||
include(${CMAKE_SOURCE_DIR}/config/${LOCAL_CONFIG}/make_defs.cmake)
|
||||
# Use PRIVATE keyword for option setting since we do not want the properties to propagate in other targets.
|
||||
# mimicing get-kernel-cflags-for
|
||||
target_compile_options(${kernel_target}_KERNELS
|
||||
PRIVATE
|
||||
# load-var-for,CKOPTFLAGS
|
||||
${CKOPTFLAGS}
|
||||
# load-var-for,CKVECFLAGS
|
||||
${CKVECFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CDBGFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CWARNFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CMISCFLAGS}
|
||||
# get-noopt-cflags-for
|
||||
${CLANGFLAGS}
|
||||
# in get-kernel-cflags-for
|
||||
${COMPSIMDFLAGS}
|
||||
# in get-kernel-cflags-for
|
||||
${BUILD_SYMFLAGS}
|
||||
)
|
||||
target_compile_definitions(${kernel_target}_KERNELS
|
||||
PRIVATE
|
||||
# in get-noopt-cflags-for
|
||||
${CPPROCFLAGS}
|
||||
# in get-noopt-cflags-for
|
||||
${VERS_DEF}
|
||||
# in get-kernel-cflags-for
|
||||
${BUILD_CPPFLAGS}
|
||||
)
|
||||
target_include_directories(${kernel_target}_KERNELS
|
||||
BEFORE
|
||||
PRIVATE
|
||||
# in get-noopt-cflags-for
|
||||
${CINFLAGS}
|
||||
)
|
||||
if(THREADING_MODEL STREQUAL "openmp")
|
||||
# Equivalent to CTHREADFLAGS in get-noopt-cflags-for
|
||||
target_link_libraries(${kernel_target}_KERNELS PRIVATE OpenMP::OpenMP_C)
|
||||
elseif(THREADING_MODEL STREQUAL "pthreads")
|
||||
# in get-noopt-cflags-for
|
||||
target_compile_options(${kernel_target}_KERNELS PRIVATE ${CTHREADFLAGS})
|
||||
endif()
|
||||
if(BUILD_SHARED_LIBS)
|
||||
# Equivalent to CPICFLAGS in get-noopt-cflags-for
|
||||
set_target_properties(${kernel_target}_KERNELS PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
add_dependencies(${kernel_target}_KERNELS flat-header)
|
||||
# Put all those targets under object-libs-targets folder name so that they appear all together in IDE.
|
||||
set_target_properties(${kernel_target}_KERNELS PROPERTIES FOLDER object-libs-targets)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Generate targets for each of the kernels present
|
||||
# in the kernel list.
|
||||
foreach(KERN ${KERNEL_LIST})
|
||||
generate_kernel_targets(${KERN})
|
||||
endforeach()
|
||||
@@ -1,16 +0,0 @@
|
||||
##Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
add_library(haswell_3
|
||||
OBJECT
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemm_haswell_asm_d6x8.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemm_haswell_asm_d8x6.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmtrsm_l_haswell_asm_d6x8.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmtrsm_u_haswell_asm_d6x8.c
|
||||
)
|
||||
|
||||
target_compile_options(haswell_3 PRIVATE /arch:AVX2)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(haswell_3 PUBLIC -DBLIS_IS_BUILDING_LIBRARY)
|
||||
endif()
|
||||
|
||||
add_subdirectory(sup)
|
||||
@@ -1,19 +0,0 @@
|
||||
##Copyright (C) 2020-2023, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
add_library(haswell_3sup
|
||||
OBJECT
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rd_haswell_asm_d6x8m.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rd_haswell_asm_d6x8n.c
|
||||
#${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rd_haswell_asm_s6x16m.c
|
||||
#${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rd_haswell_asm_s6x16n.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_haswell_asm_d6x8m.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_haswell_asm_d6x8n.c
|
||||
#${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_haswell_asm_s6x16m.c
|
||||
#${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_haswell_asm_s6x16n.c
|
||||
)
|
||||
target_compile_options(haswell_3sup PRIVATE /arch:AVX2)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(haswell_3sup PUBLIC -DBLIS_IS_BUILDING_LIBRARY)
|
||||
endif()
|
||||
add_subdirectory(d6x8)
|
||||
#add_subdirectory(s6x16)
|
||||
@@ -1,23 +0,0 @@
|
||||
##Copyright (C) 2020-2023, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
add_library(haswell_3supd6x8
|
||||
OBJECT
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_r_haswell_ref_dMx1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rd_haswell_asm_dMx1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rd_haswell_asm_dMx2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rd_haswell_asm_dMx4.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rd_haswell_asm_dMx8.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_haswell_asm_dMx1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_haswell_asm_dMx2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_haswell_asm_dMx3.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_haswell_asm_dMx4.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_haswell_asm_dMx5.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_haswell_asm_dMx6.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_haswell_asm_dMx7.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_haswell_asm_dMx8.c
|
||||
)
|
||||
|
||||
target_compile_options(haswell_3supd6x8 PRIVATE /arch:AVX2)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(haswell_3supd6x8 PUBLIC -DBLIS_IS_BUILDING_LIBRARY)
|
||||
endif()
|
||||
@@ -1,20 +0,0 @@
|
||||
##Copyright (C) 2020-2021, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_r_haswell_ref_sMx1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rd_haswell_asm_sMx1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rd_haswell_asm_sMx12.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rd_haswell_asm_sMx16.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rd_haswell_asm_sMx2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rd_haswell_asm_sMx4.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rd_haswell_asm_sMx8.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_haswell_asm_sMx12.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_haswell_asm_sMx16.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_haswell_asm_sMx2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_haswell_asm_sMx4.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_haswell_asm_sMx6.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_haswell_asm_sMx8.c
|
||||
)
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
##Copyright (C) 2020-2021, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
add_subdirectory(3)
|
||||
add_subdirectory(1m)
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
##Copyright (C) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
add_library(skx_3
|
||||
OBJECT
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_dgemm_skx_asm_16x14.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_sgemm_skx_asm_32x12_l2.c
|
||||
)
|
||||
target_compile_options(skx_3 PRIVATE /arch:AVX2 /arch:AVX512)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(skx_3 PUBLIC -DBLIS_IS_BUILDING_LIBRARY)
|
||||
endif()
|
||||
@@ -1,4 +0,0 @@
|
||||
##Copyright (C) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
remove_definitions(/arch:AVX2)
|
||||
|
||||
add_subdirectory(3)
|
||||
@@ -1,24 +0,0 @@
|
||||
##Copyright (C) 2022, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
add_library(zen_1
|
||||
OBJECT
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_amaxv_zen_int.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_axpbyv_zen_int.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_axpbyv_zen_int10.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_axpyv_zen_int.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_axpyv_zen_int10.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_copyv_zen_int.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_dotv_zen_int.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_dotv_zen_int10.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_dotxv_zen_int.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_scalv_zen_int.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_scalv_zen_int10.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_setv_zen_int.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_swapv_zen_int8.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_norm2_zen_int.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_scal2v_zen_int.c
|
||||
)
|
||||
target_compile_options(zen_1 PRIVATE /arch:AVX2)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(zen_1 PUBLIC -DBLIS_IS_BUILDING_LIBRARY)
|
||||
endif()
|
||||
@@ -1,16 +0,0 @@
|
||||
##Copyright (C) 2020-2022, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
add_library(zen_1f
|
||||
OBJECT
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_axpyf_zen_int_8.c
|
||||
${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
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_axpy2v_zen_int.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_dotxaxpyf_zen_int_8.c
|
||||
)
|
||||
target_compile_options(zen_1f PRIVATE /arch:AVX2)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(zen_1f PUBLIC -DBLIS_IS_BUILDING_LIBRARY)
|
||||
endif()
|
||||
@@ -1,25 +0,0 @@
|
||||
##Copyright (C) 2022, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
add_library(zen_2
|
||||
OBJECT
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemv_zen_ref.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_her2_zen_int_4.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemv_zen_int_4.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_her_zen_int_amd.c
|
||||
)
|
||||
target_compile_options(zen_2 PRIVATE /arch:AVX2)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(zen_2 PUBLIC -DBLIS_IS_BUILDING_LIBRARY)
|
||||
endif()
|
||||
# For any other TARGET_ARCH, it would fail to configure.
|
||||
# Select AMD specific sources for AMD configurations.
|
||||
#[=[if(${TARGET_ARCH} STREQUAL zen OR
|
||||
${TARGET_ARCH} STREQUAL zen2 OR
|
||||
${TARGET_ARCH} STREQUAL zen3 OR
|
||||
${TARGET_ARCH} STREQUAL zen4 OR
|
||||
${TARGET_ARCH} STREQUAL amdzen)
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_her_zen_int_amd.c
|
||||
)
|
||||
endif()]=]
|
||||
@@ -1,18 +0,0 @@
|
||||
##Copyright (C) 2020-2023, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
add_library(zen_3
|
||||
OBJECT
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemm_small.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemm_tiny.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_trsm_small.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_dgemm_avx2_k1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_zgemm_avx2_k1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_zgemm_zen_2x6.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_zgemmtrsm_l_2x6.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_zgemmtrsm_u_2x6.c
|
||||
)
|
||||
target_compile_options(zen_3 PRIVATE /arch:AVX2)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(zen_3 PUBLIC -DBLIS_IS_BUILDING_LIBRARY)
|
||||
endif()
|
||||
add_subdirectory(sup)
|
||||
@@ -1,24 +0,0 @@
|
||||
##Copyright (C) 2020-2023, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
add_library(zen_3_sup
|
||||
OBJECT
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rd_zen_asm_s6x16.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rd_zen_asm_s6x16m.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rd_zen_asm_s6x16n.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rd_zen_asm_z3x4.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rd_zen_asm_z3x4m.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rd_zen_asm_z3x4n.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_zen_asm_c3x8.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_zen_asm_c3x8m.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_zen_asm_c3x8n.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_zen_asm_s6x16.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_zen_asm_s6x16m.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_zen_asm_s6x16n.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_zen_asm_z3x4.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_zen_asm_z3x4m.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_gemmsup_rv_zen_asm_z3x4n.c
|
||||
)
|
||||
target_compile_options(zen_3_sup PRIVATE /arch:AVX2)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(zen_3_sup PUBLIC -DBLIS_IS_BUILDING_LIBRARY)
|
||||
endif()
|
||||
@@ -1,11 +0,0 @@
|
||||
##Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
|
||||
set(SUBDIRECTORIES "1" "1f" "2" "3" "util")
|
||||
|
||||
#Add all subdirectories
|
||||
foreach(VAR ${SUBDIRECTORIES})
|
||||
add_subdirectory(${VAR})
|
||||
endforeach()
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
##Copyright (C) 2021, Advanced Micro Devices, Inc. All rights reserved.##
|
||||
|
||||
target_sources("${PROJECT_NAME}"
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bli_thresh_funcs_zen.c
|
||||
)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user