Fixes for dynamic_arch. almost there
This commit is contained in:
parent
251715d9ef
commit
d798487213
|
@ -153,6 +153,22 @@ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Zi")
|
|||
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
|
||||
endif()
|
||||
|
||||
#ifeq ($(DYNAMIC_ARCH), 1)
|
||||
# @$(MAKE) -C kernel commonlibs || exit 1
|
||||
# @for d in $(DYNAMIC_CORE) ; \
|
||||
# do $(MAKE) GOTOBLAS_MAKEFILE= -C kernel TARGET_CORE=$$d kernel || exit 1 ;\
|
||||
# done
|
||||
# @echo DYNAMIC_ARCH=1 >> Makefile.conf_last
|
||||
#endif
|
||||
if (${DYNAMIC_ARCH})
|
||||
add_subdirectory(kernel)
|
||||
foreach(TARGET_CORE ${DYNAMIC_CORE})
|
||||
message("${TARGET_CORE}")
|
||||
list(APPEND TARGET_OBJS "$<TARGET_OBJECTS:kernel_${TARGET_CORE}>")
|
||||
endforeach()
|
||||
endif ()
|
||||
|
||||
|
||||
# add objects to the openblas lib
|
||||
add_library(${OpenBLAS_LIBNAME} SHARED ${LA_SOURCES} ${LAPACKE_SOURCES} ${TARGET_OBJS} ${OpenBLAS_DEF_FILE})
|
||||
|
||||
|
@ -210,20 +226,6 @@ set_target_properties(${OpenBLAS_LIBNAME} PROPERTIES
|
|||
#endif
|
||||
###
|
||||
|
||||
#ifeq ($(DYNAMIC_ARCH), 1)
|
||||
# @$(MAKE) -C kernel commonlibs || exit 1
|
||||
# @for d in $(DYNAMIC_CORE) ; \
|
||||
# do $(MAKE) GOTOBLAS_MAKEFILE= -C kernel TARGET_CORE=$$d kernel || exit 1 ;\
|
||||
# done
|
||||
# @echo DYNAMIC_ARCH=1 >> Makefile.conf_last
|
||||
#endif
|
||||
if (${DYNAMIC_ARCH})
|
||||
add_subdirectory(kernel)
|
||||
foreach(TARGET_CORE ${DYNAMIC_CORE})
|
||||
list(APPEND TARGET_OBJS "$<TARGET_OBJECTS:kernel_${DYNAMIC_CORE}>")
|
||||
endforeach()
|
||||
endif ()
|
||||
|
||||
#ifdef USE_THREAD
|
||||
# @echo USE_THREAD=$(USE_THREAD) >> Makefile.conf_last
|
||||
#endif
|
||||
|
|
|
@ -202,6 +202,8 @@ function(GenerateNamedObjects sources_in)
|
|||
if (use_cblas)
|
||||
set(obj_name "cblas_${obj_name}")
|
||||
list(APPEND obj_defines "CBLAS")
|
||||
elseif (NOT "${obj_name}" MATCHES "${TSUFFIX}")
|
||||
set(obj_name "${obj_name}${TSUFFIX}")
|
||||
endif ()
|
||||
|
||||
list(APPEND obj_defines "ASMNAME=${FU}${obj_name};ASMFNAME=${FU}${obj_name}${BU};NAME=${obj_name}${BU};CNAME=${obj_name};CHAR_NAME=\"${obj_name}${BU}\";CHAR_CNAME=\"${obj_name}\"")
|
||||
|
@ -225,7 +227,7 @@ function(GenerateNamedObjects sources_in)
|
|||
|
||||
# create a copy of the source to avoid duplicate obj filename problem with ar.exe
|
||||
get_filename_component(source_extension ${source_file} EXT)
|
||||
set(new_source_file "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${obj_name}${TSUFFIX}${source_extension}")
|
||||
set(new_source_file "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${obj_name}${source_extension}")
|
||||
if (IS_ABSOLUTE ${source_file})
|
||||
set(old_source_file ${source_file})
|
||||
else ()
|
||||
|
|
|
@ -4,6 +4,7 @@ include_directories(${PROJECT_SOURCE_DIR})
|
|||
|
||||
# Makefile
|
||||
function (build_core TARGET_CORE KDIR TSUFFIX KERNEL_DEFINITIONS)
|
||||
set (OPENBLAS_SRC "")
|
||||
include("${PROJECT_SOURCE_DIR}/cmake/kernel.cmake")
|
||||
if (${DYNAMIC_ARCH})
|
||||
include("${PROJECT_SOURCE_DIR}/cmake/system.cmake")
|
||||
|
@ -475,18 +476,18 @@ endfunction ()
|
|||
|
||||
if (${DYNAMIC_ARCH})
|
||||
foreach(TARGET_CORE ${DYNAMIC_CORE})
|
||||
set(KERNEL_DEFINITIONS "-DBUILD_KERNEL -DTABLE_NAME=gotoblas_${TARGET_CORE}")
|
||||
set(BUILD_KERNEL 1)
|
||||
set(KDIR "")
|
||||
set(TSUFFIX "_${TARGET_CORE}")
|
||||
set(KERNEL_DEFINITIONS "-DBUILD_KERNEL -DTABLE_NAME=gotoblas_${TARGET_CORE} -DTS=${TSUFFIX}")
|
||||
build_core("${TARGET_CORE}" "${KDIR}" "${TSUFFIX}" "${KERNEL_DEFINITIONS}")
|
||||
endforeach()
|
||||
else ()
|
||||
set(KERNEL_DEFINITIONS "")
|
||||
set(TARGET_CONF_DIR ${PROJECT_BINARY_DIR})
|
||||
set(TARGET_CORE ${CORE})
|
||||
set(KDIR "")
|
||||
set(TSUFFIX "")
|
||||
set(KERNEL_DEFINITIONS "")
|
||||
build_core("${TARGET_CORE}" "${KDIR}" "${TSUFFIX}" "${KERNEL_DEFINITIONS}")
|
||||
endif ()
|
||||
|
||||
|
|
Loading…
Reference in New Issue