Browse Source

Merge pull request #5342 from martin-frbg/cmake_ampere

Add CMake build settings for the Ampere One cpu
pull/5348/head
Martin Kroeker GitHub 3 months ago
parent
commit
b78d1dc0ae
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
2 changed files with 39 additions and 0 deletions
  1. +12
    -0
      cmake/cc.cmake
  2. +27
    -0
      cmake/prebuild.cmake

+ 12
- 0
cmake/cc.cmake View File

@@ -236,6 +236,18 @@ if (${CORE} STREQUAL NEOVERSEN1)
endif ()
endif ()

if (${CORE} STREQUAL AMPEREONE)
if (NOT DYNAMIC_ARCH)
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVC")
set (CCOMMON_OPT "${CCOMMON_OPT} -tp=neoverse-n1")
elseif (${GCC_VERSION} VERSION_GREATER 12.1)
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.6-a+crypto+crc+fp16+sha3+rng -mtune=ampereone")
else ()
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.6-a+fp16")
endif()
endif ()
endif ()

if (${CORE} STREQUAL ARMV8SVE)
if (NOT DYNAMIC_ARCH)
if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)


+ 27
- 0
cmake/prebuild.cmake View File

@@ -1195,6 +1195,33 @@ endif ()
set(ZGEMM_UNROLL_M 4)
set(ZGEMM_UNROLL_N 4)
set(SYMV_P 16)
elseif ("${TCORE}" STREQUAL "AMPEREONE")
file(APPEND ${TARGET_CONF_TEMP}
"#define L1_CODE_SIZE\t16384\n"
"#define L1_CODE_LINESIZE\t64\n"
"#define L1_CODE_ASSOCIATIVE\t4\n"
"#define L1_DATA_SIZE\t65536\n"
"#define L1_DATA_LINESIZE\t64\n"
"#define L1_DATA_ASSOCIATIVE\t4\n"
"#define L2_SIZE\t2097152\n\n"
"#define L2_LINESIZE\t64\n"
"#define L2_ASSOCIATIVE\t8\n"
"#define DTB_DEFAULT_ENTRIES\t64\n"
"#define DTB_SIZE\t4096\n"
"#define HAVE_VFPV4\n"
"#define HAVE_VFPV3\n"
"#define HAVE_VFP\n"
"#define HAVE_NEON\n"
"#define ARMV8\n")
set(SGEMM_UNROLL_M 16)
set(SGEMM_UNROLL_N 4)
set(DGEMM_UNROLL_M 8)
set(DGEMM_UNROLL_N 4)
set(CGEMM_UNROLL_M 8)
set(CGEMM_UNROLL_N 4)
set(ZGEMM_UNROLL_M 4)
set(ZGEMM_UNROLL_N 4)
set(SYMV_P 16)
elseif ("${TCORE}" STREQUAL "VORTEX")
file(APPEND ${TARGET_CONF_TEMP}
"#define ARMV8\n"


Loading…
Cancel
Save