From cc6b2740e2c805c6fb1969ec486d72546d87ef38 Mon Sep 17 00:00:00 2001 From: Rohit Goswami Date: Sun, 28 Apr 2024 17:05:19 +0000 Subject: [PATCH] BLD: Add more hostcpu flags --- meson.build | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index 1f8cfaa2a..881e0ad4d 100644 --- a/meson.build +++ b/meson.build @@ -84,23 +84,27 @@ conf_data = configuration_data() is_win = host_machine.system() == 'windows' or host_machine.system() == 'cygwin' conf_data.set('OS_WINDOWS', is_win) hostcpu = host_machine.cpu_family() +conf_data.set('ARCH', hostcpu.to_upper()) defarch_array = [ # {'system': ['windows', 'cygwin'], 'def': ['OS_WINDOWS']}, {'cpu': ['aarch64'], 'def': ['ARCH_ARGM64']}, {'cpu': ['alpha'], 'def': ['ARCH_ALPHA']}, - {'cpu': ['arm'], 'def': ['ARCH_ARM']}, - {'cpu': ['x86_64'], 'def': ['INTEL_AMD']}, + {'cpu': ['arm'], 'def': ['ARCH_ARM', 'USE_TRMM']}, + {'cpu': ['x86_64'], 'def': ['INTEL_AMD', 'USE_GEMM3M', 'USE_DIRECT_SGEMM']}, {'cpu': ['s390x'], 'def': ['ARCH_ZARCH', 'ZARCH']}, - {'cpu': ['ia64'], 'def': ['ARCH_IA64']}, + {'cpu': ['ia64'], 'def': ['ARCH_IA64', 'USE_GEMM3M']}, {'cpu': ['sparc'], 'def': ['ARCH_SPARC']}, {'cpu': ['mips'], 'def': ['ARCH_MIPS']}, - {'cpu': ['mips64'], 'def': ['ARCH_MIPS64']}, + {'cpu': ['mips64'], 'def': ['ARCH_MIPS64', 'USE_TRMM']}, {'cpu': ['loongarch64'], 'def': ['ARCH_LOONGARCH64']}, - {'cpu': ['riscv64'], 'def': ['ARCH_RISCV64']}, + {'cpu': ['riscv64'], 'def': ['ARCH_RISCV64', 'USE_TRMM']}, {'cpu': ['ppc64', 'ppc'], 'def': ['ARCH_POWER', 'POWER']}, + {'cpu': ['generic'], 'def': ['USE_TRMM']}, ] +# TODO(rg): Handle the kenel architectures later + foreach arch : defarch_array is_cpu = hostcpu in arch['cpu'] foreach def : arch['def']