Skip to content

Commit 5e8ddc9

Browse files
authored
Merge pull request #2913 from martin-frbg/issue2910
Support cross-compiling for Apple Vortex
2 parents efd47b0 + 2e7ee7c commit 5e8ddc9

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

cmake/prebuild.cmake

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,29 @@ endif ()
416416
set(ZGEMM_UNROLL_M 4)
417417
set(ZGEMM_UNROLL_N 4)
418418
set(SYMV_P 16)
419+
elseif ("${TCORE}" STREQUAL "VORTEX")
420+
file(APPEND ${TARGET_CONF_TEMP}
421+
"#define ARMV8\n"
422+
"#define L1_CODE_SIZE\t32768\n"
423+
"#define L1_CODE_LINESIZE\t64\n"
424+
"#define L1_CODE_ASSOCIATIVE\t4\n"
425+
"#define L1_DATA_SIZE\t32768\n"
426+
"#define L1_DATA_LINESIZE\t64\n"
427+
"#define L1_DATA_ASSOCIATIVE\t4\n"
428+
"#define L2_SIZE\t5262144\n"
429+
"#define L2_LINESIZE\t64\n"
430+
"#define L2_ASSOCIATIVE\t8\n"
431+
"#define DTB_DEFAULT_ENTRIES\t64\n"
432+
"#define DTB_SIZE\t4096\n")
433+
set(SGEMM_UNROLL_M 16)
434+
set(SGEMM_UNROLL_N 4)
435+
set(DGEMM_UNROLL_M 8)
436+
set(DGEMM_UNROLL_N 4)
437+
set(CGEMM_UNROLL_M 8)
438+
set(CGEMM_UNROLL_N 4)
439+
set(ZGEMM_UNROLL_M 4)
440+
set(ZGEMM_UNROLL_N 4)
441+
set(SYMV_P 16)
419442
elseif ("${TCORE}" STREQUAL "POWER6")
420443
file(APPEND ${TARGET_CONF_TEMP}
421444
"#define L1_DATA_SIZE 32768\n"

cpuid_arm64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ void get_cpuconfig(void)
424424
sysctlbyname("hw.l1dcachesize",&value,&length,NULL,0);
425425
printf("#define L1_DATA_SIZE %d \n",value);
426426
sysctlbyname("hw.l2dcachesize",&value,&length,NULL,0);
427-
printf("#define L2_DATA_SIZE %d \n",value);
427+
printf("#define L2_SIZE %d \n",value);
428428
break;
429429
#endif
430430
}

getarch.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,6 +1222,20 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12221222
#else
12231223
#endif
12241224

1225+
#ifdef FORCE_VORTEX
1226+
#define FORCE
1227+
#define ARCHITECTURE "ARM64"
1228+
#define SUBARCHITECTURE "VORTEX"
1229+
#define SUBDIRNAME "arm64"
1230+
#define ARCHCONFIG "-DVORTEX " \
1231+
"-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
1232+
"-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
1233+
"-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=32 " \
1234+
"-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
1235+
#define LIBNAME "vortex"
1236+
#define CORENAME "VORTEX"
1237+
#endif
1238+
12251239
#ifdef FORCE_ZARCH_GENERIC
12261240
#define FORCE
12271241
#define ARCHITECTURE "ZARCH"

0 commit comments

Comments
 (0)