Skip to content

Commit 6c2d90b

Browse files
authored
Move some DYNAMIC_ARCH targets to new DYNAMIC_OLDER option
1 parent 0297b32 commit 6c2d90b

File tree

5 files changed

+26
-2
lines changed

5 files changed

+26
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ option(BUILD_WITHOUT_LAPACK "Without LAPACK and LAPACKE (Only BLAS or CBLAS)" ON
2020
endif()
2121
option(BUILD_WITHOUT_CBLAS "Without CBLAS" OFF)
2222
option(DYNAMIC_ARCH "Build with DYNAMIC_ARCH" OFF)
23+
option(DYNAMIC_OLDER "Support older cpus with DYNAMIC_ARCH" OFF)
2324
option(BUILD_RELAPACK "Build with ReLAPACK (recursive LAPACK" OFF)
2425
#######
2526
if(BUILD_WITHOUT_LAPACK)

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ ifeq ($(DYNAMIC_ARCH), 1)
153153
do $(MAKE) GOTOBLAS_MAKEFILE= -C kernel TARGET_CORE=$$d kernel || exit 1 ;\
154154
done
155155
@echo DYNAMIC_ARCH=1 >> Makefile.conf_last
156+
ifeq ($(DYNAMIC_OLDER), 1)
157+
@echo DYNAMIC_OLDER=1 >> Makefile.conf_last
158+
endif
156159
endif
157160
ifdef USE_THREAD
158161
@echo USE_THREAD=$(USE_THREAD) >> Makefile.conf_last

Makefile.install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ endif
9898
@echo Generating openblas.pc in "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)"
9999
@echo 'libdir='$(OPENBLAS_LIBRARY_DIR) > "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc"
100100
@echo 'includedir='$(OPENBLAS_INCLUDE_DIR) >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc"
101-
@echo 'openblas_config= USE_64BITINT='$(USE_64BITINT) 'DYNAMIC_ARCH='$(DYNAMIC_ARCH) 'NO_CBLAS='$(NO_CBLAS) 'NO_LAPACK='$(NO_LAPACK) 'NO_LAPACKE='$(NO_LAPACKE) 'NO_AFFINITY='$(NO_AFFINITY) 'USE_OPENMP='$(USE_OPENMP) $(CORE) 'MAX_THREADS='$(NUM_THREADS)>> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc"
101+
@echo 'openblas_config= USE_64BITINT='$(USE_64BITINT) 'DYNAMIC_ARCH='$(DYNAMIC_ARCH) 'DYNAMIC_OLDER='$(DYNAMIC_OLDER) 'NO_CBLAS='$(NO_CBLAS) 'NO_LAPACK='$(NO_LAPACK) 'NO_LAPACKE='$(NO_LAPACKE) 'NO_AFFINITY='$(NO_AFFINITY) 'USE_OPENMP='$(USE_OPENMP) $(CORE) 'MAX_THREADS='$(NUM_THREADS)>> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc"
102102
@echo 'version='$(VERSION) >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc"
103103
@echo 'extralib='$(EXTRALIB) >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc"
104104
@cat openblas.pc.in >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc"

Makefile.rule

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ VERSION = 0.3.1.dev
1717
# If you want to support multiple architecture in one binary
1818
# DYNAMIC_ARCH = 1
1919

20+
# If you want the full list of x86_64 architectures supported in DYNAMIC_ARCH
21+
# mode (including individual optimizied codes for PENRYN, DUNNINGTON, OPTERON,
22+
# OPTERON_SSE3, ATOM and NANO rather than fallbacks to older architectures)
23+
# DYNAMIC_OLDER = 1
24+
2025
# C compiler including binary type(32bit / 64bit). Default is gcc.
2126
# Don't use Intel Compiler or PGI, it won't generate right codes as I expect.
2227
# CC = gcc

Makefile.system

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,18 @@ DYNAMIC_CORE = KATMAI COPPERMINE NORTHWOOD PRESCOTT BANIAS \
472472
endif
473473

474474
ifeq ($(ARCH), x86_64)
475-
DYNAMIC_CORE = PRESCOTT CORE2 PENRYN DUNNINGTON NEHALEM OPTERON OPTERON_SSE3 BARCELONA BOBCAT ATOM NANO
475+
DYNAMIC_CORE = PRESCOTT CORE2
476+
ifeq ($(DYNAMIC_OLDER), 1)
477+
DYNAMIC_CORE += PENRYN DUNNINGTON
478+
endif
479+
DYNAMIC_CORE += NEHALEM
480+
ifeq ($(DYNAMIC_OLDER), 1)
481+
DYNAMIC_CORE += OPTERON OPTERON_SSE3
482+
endif
483+
DYNAMIC_CORE += BARCELONA
484+
ifeq ($(DYNAMIC_OLDER), 1)
485+
DYNAMIC_CORE += BOBCAT ATOM NANO
486+
endif
476487
ifneq ($(NO_AVX), 1)
477488
DYNAMIC_CORE += SANDYBRIDGE BULLDOZER PILEDRIVER STEAMROLLER EXCAVATOR
478489
endif
@@ -917,6 +928,10 @@ ifeq ($(DYNAMIC_ARCH), 1)
917928
CCOMMON_OPT += -DDYNAMIC_ARCH
918929
endif
919930

931+
ifeq ($(DYNAMIC_OLDER), 1)
932+
CCOMMON_OPT += -DDYNAMIC_OLDER
933+
endif
934+
920935
ifeq ($(NO_LAPACK), 1)
921936
CCOMMON_OPT += -DNO_LAPACK
922937
#Disable LAPACK C interface

0 commit comments

Comments
 (0)