mirror of
https://github.com/OpenMathLib/OpenBLAS
synced 2026-05-31 00:45:48 +08:00
Add support for Ampere AmpereOne processors
This commit is contained in:
@@ -191,22 +191,12 @@ endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Detect Ampere AmpereOne(ampere1) processors.
|
||||
# Detect Ampere AmpereOne(ampere1,ampere1a) processors.
|
||||
ifeq ($(CORE), AMPERE1)
|
||||
ifeq (1, $(filter 1,$(GCCVERSIONGTEQ12) $(ISCLANG)))
|
||||
CCOMMON_OPT += -march=armv8.6-a -mtune=ampere1
|
||||
CCOMMON_OPT += -march=armv8.6-a+crypto+crc+fp16+sha3+rng
|
||||
ifneq ($(F_COMPILER), NAG)
|
||||
FCOMMON_OPT += -march=armv8.6-a -mtune=ampere1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Detect Ampere AmpereOne(ampere1a) processors.
|
||||
ifeq ($(CORE), AMPERE1A)
|
||||
ifeq (1, $(filter 1,$(GCCVERSIONGTEQ13) $(ISCLANG)))
|
||||
CCOMMON_OPT += -march=armv8.6-a -mtune=ampere1a
|
||||
ifneq ($(F_COMPILER), NAG)
|
||||
FCOMMON_OPT += -march=armv8.6-a -mtune=ampere1a
|
||||
FCOMMON_OPT += -march=armv8.6-a+crypto+crc+fp16+sha3+rng
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -80,7 +80,6 @@ size_t length64=sizeof(value64);
|
||||
// Ampere
|
||||
#define CPU_EMAG8180 10
|
||||
#define CPU_AMPERE1 25
|
||||
#define CPU_AMPERE1A 26
|
||||
// Apple
|
||||
#define CPU_VORTEX 13
|
||||
// Fujitsu
|
||||
@@ -114,8 +113,7 @@ static char *cpuname[] = {
|
||||
"FT2000",
|
||||
"CORTEXA76",
|
||||
"NEOVERSEV2",
|
||||
"AMPERE1",
|
||||
"AMPERE1A"
|
||||
"AMPERE1"
|
||||
};
|
||||
|
||||
static char *cpuname_lower[] = {
|
||||
@@ -341,10 +339,8 @@ int detect(void)
|
||||
else if (strstr(cpu_implementer, "0x50") && strstr(cpu_part, "0x000"))
|
||||
return CPU_EMAG8180;
|
||||
else if (strstr(cpu_implementer, "0xc0")) {
|
||||
if (strstr(cpu_part, "0xac3"))
|
||||
if (strstr(cpu_part, "0xac3") || strstr(cpu_part, "0xac4"))
|
||||
return CPU_AMPERE1;
|
||||
else if (strstr(cpu_part, "0xac4"))
|
||||
return CPU_AMPERE1A;
|
||||
}
|
||||
// Fujitsu
|
||||
else if (strstr(cpu_implementer, "0x46") && strstr(cpu_part, "0x001"))
|
||||
@@ -697,7 +693,6 @@ void get_cpuconfig(void)
|
||||
break;
|
||||
|
||||
case CPU_AMPERE1:
|
||||
case CPU_AMPERE1A:
|
||||
printf("#define %s\n", cpuname[d]);
|
||||
printf("#define L1_CODE_SIZE 16384\n");
|
||||
printf("#define L1_CODE_LINESIZE 64\n");
|
||||
|
||||
19
getarch.c
19
getarch.c
@@ -159,7 +159,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
/* #define FORCE_CK860FV */
|
||||
/* #define FORCE_GENERIC */
|
||||
/* #define FORCE_AMPERE1 */
|
||||
/* #define FORCE_AMPERE1A */
|
||||
|
||||
#ifdef FORCE_P2
|
||||
#define FORCE
|
||||
@@ -1603,27 +1602,11 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
"-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
|
||||
"-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
|
||||
"-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8 " \
|
||||
"-march=armv8.6-a -mtune=ampere1"
|
||||
"-march=armv8.6-a+crypto+crc+fp16+sha3+rng"
|
||||
#define LIBNAME "ampere1"
|
||||
#define CORENAME "AMPERE1"
|
||||
#endif
|
||||
|
||||
#ifdef FORCE_AMPERE1A
|
||||
#define FORCE
|
||||
#define ARCHITECTURE "ARM64"
|
||||
#define SUBARCHITECTURE "AMPERE1A"
|
||||
#define SUBDIRNAME "arm64"
|
||||
#define ARCHCONFIG "-DAMPERE1A " \
|
||||
"-DL1_CODE_SIZE=16384 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=4 " \
|
||||
"-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=4 " \
|
||||
"-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
|
||||
"-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
|
||||
"-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8 " \
|
||||
"-march=armv8.6-a -mtune=ampere1a"
|
||||
#define LIBNAME "ampere1a"
|
||||
#define CORENAME "AMPERE1A"
|
||||
#endif
|
||||
|
||||
#ifdef FORCE_THUNDERX3T110
|
||||
#define ARMV8
|
||||
#define FORCE
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
include $(KERNELDIR)/KERNEL.NEOVERSEN1
|
||||
2
param.h
2
param.h
@@ -3635,7 +3635,7 @@ is a big desktop or server with abundant cache rather than a phone or embedded d
|
||||
#define CGEMM_DEFAULT_R 4096
|
||||
#define ZGEMM_DEFAULT_R 4096
|
||||
|
||||
#elif defined(AMPERE1) || defined(AMPERE1A)
|
||||
#elif defined(AMPERE1)
|
||||
|
||||
#if defined(XDOUBLE) || defined(DOUBLE)
|
||||
#define SWITCH_RATIO 8
|
||||
|
||||
Reference in New Issue
Block a user