| @@ -20,6 +20,7 @@ option(BUILD_WITHOUT_LAPACK "Without LAPACK and LAPACKE (Only BLAS or CBLAS)" ON | |||||
| endif() | endif() | ||||
| option(BUILD_WITHOUT_CBLAS "Without CBLAS" OFF) | option(BUILD_WITHOUT_CBLAS "Without CBLAS" OFF) | ||||
| option(DYNAMIC_ARCH "Build with DYNAMIC_ARCH" OFF) | option(DYNAMIC_ARCH "Build with DYNAMIC_ARCH" OFF) | ||||
| option(DYNAMIC_OLDER "Support older cpus with DYNAMIC_ARCH" OFF) | |||||
| option(BUILD_RELAPACK "Build with ReLAPACK (recursive LAPACK" OFF) | option(BUILD_RELAPACK "Build with ReLAPACK (recursive LAPACK" OFF) | ||||
| ####### | ####### | ||||
| if(BUILD_WITHOUT_LAPACK) | if(BUILD_WITHOUT_LAPACK) | ||||
| @@ -153,6 +153,9 @@ ifeq ($(DYNAMIC_ARCH), 1) | |||||
| do $(MAKE) GOTOBLAS_MAKEFILE= -C kernel TARGET_CORE=$$d kernel || exit 1 ;\ | do $(MAKE) GOTOBLAS_MAKEFILE= -C kernel TARGET_CORE=$$d kernel || exit 1 ;\ | ||||
| done | done | ||||
| @echo DYNAMIC_ARCH=1 >> Makefile.conf_last | @echo DYNAMIC_ARCH=1 >> Makefile.conf_last | ||||
| ifeq ($(DYNAMIC_OLDER), 1) | |||||
| @echo DYNAMIC_OLDER=1 >> Makefile.conf_last | |||||
| endif | |||||
| endif | endif | ||||
| ifdef USE_THREAD | ifdef USE_THREAD | ||||
| @echo USE_THREAD=$(USE_THREAD) >> Makefile.conf_last | @echo USE_THREAD=$(USE_THREAD) >> Makefile.conf_last | ||||
| @@ -98,7 +98,7 @@ endif | |||||
| @echo Generating openblas.pc in "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)" | @echo Generating openblas.pc in "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)" | ||||
| @echo 'libdir='$(OPENBLAS_LIBRARY_DIR) > "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc" | @echo 'libdir='$(OPENBLAS_LIBRARY_DIR) > "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc" | ||||
| @echo 'includedir='$(OPENBLAS_INCLUDE_DIR) >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc" | @echo 'includedir='$(OPENBLAS_INCLUDE_DIR) >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc" | ||||
| @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" | |||||
| @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" | |||||
| @echo 'version='$(VERSION) >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc" | @echo 'version='$(VERSION) >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc" | ||||
| @echo 'extralib='$(EXTRALIB) >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc" | @echo 'extralib='$(EXTRALIB) >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc" | ||||
| @cat openblas.pc.in >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc" | @cat openblas.pc.in >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc" | ||||
| @@ -17,6 +17,11 @@ VERSION = 0.3.1.dev | |||||
| # If you want to support multiple architecture in one binary | # If you want to support multiple architecture in one binary | ||||
| # DYNAMIC_ARCH = 1 | # DYNAMIC_ARCH = 1 | ||||
| # If you want the full list of x86_64 architectures supported in DYNAMIC_ARCH | |||||
| # mode (including individual optimizied codes for PENRYN, DUNNINGTON, OPTERON, | |||||
| # OPTERON_SSE3, ATOM and NANO rather than fallbacks to older architectures) | |||||
| # DYNAMIC_OLDER = 1 | |||||
| # C compiler including binary type(32bit / 64bit). Default is gcc. | # C compiler including binary type(32bit / 64bit). Default is gcc. | ||||
| # Don't use Intel Compiler or PGI, it won't generate right codes as I expect. | # Don't use Intel Compiler or PGI, it won't generate right codes as I expect. | ||||
| # CC = gcc | # CC = gcc | ||||
| @@ -472,7 +472,18 @@ DYNAMIC_CORE = KATMAI COPPERMINE NORTHWOOD PRESCOTT BANIAS \ | |||||
| endif | endif | ||||
| ifeq ($(ARCH), x86_64) | ifeq ($(ARCH), x86_64) | ||||
| DYNAMIC_CORE = PRESCOTT CORE2 PENRYN DUNNINGTON NEHALEM OPTERON OPTERON_SSE3 BARCELONA BOBCAT ATOM NANO | |||||
| DYNAMIC_CORE = PRESCOTT CORE2 | |||||
| ifeq ($(DYNAMIC_OLDER), 1) | |||||
| DYNAMIC_CORE += PENRYN DUNNINGTON | |||||
| endif | |||||
| DYNAMIC_CORE += NEHALEM | |||||
| ifeq ($(DYNAMIC_OLDER), 1) | |||||
| DYNAMIC_CORE += OPTERON OPTERON_SSE3 | |||||
| endif | |||||
| DYNAMIC_CORE += BARCELONA | |||||
| ifeq ($(DYNAMIC_OLDER), 1) | |||||
| DYNAMIC_CORE += BOBCAT ATOM NANO | |||||
| endif | |||||
| ifneq ($(NO_AVX), 1) | ifneq ($(NO_AVX), 1) | ||||
| DYNAMIC_CORE += SANDYBRIDGE BULLDOZER PILEDRIVER STEAMROLLER EXCAVATOR | DYNAMIC_CORE += SANDYBRIDGE BULLDOZER PILEDRIVER STEAMROLLER EXCAVATOR | ||||
| endif | endif | ||||
| @@ -917,6 +928,10 @@ ifeq ($(DYNAMIC_ARCH), 1) | |||||
| CCOMMON_OPT += -DDYNAMIC_ARCH | CCOMMON_OPT += -DDYNAMIC_ARCH | ||||
| endif | endif | ||||
| ifeq ($(DYNAMIC_OLDER), 1) | |||||
| CCOMMON_OPT += -DDYNAMIC_OLDER | |||||
| endif | |||||
| ifeq ($(NO_LAPACK), 1) | ifeq ($(NO_LAPACK), 1) | ||||
| CCOMMON_OPT += -DNO_LAPACK | CCOMMON_OPT += -DNO_LAPACK | ||||
| #Disable LAPACK C interface | #Disable LAPACK C interface | ||||