diff --git a/CMakeLists.txt b/CMakeLists.txt index 5aecb07e23eb309b0400ee77dc98c65421495b08..d57926a2d29bf2b0208783239030adcc76f8b47b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -301,17 +301,19 @@ if(KLEIDIAI_BUILD_TESTS) target_compile_options(kleidiai_test_framework PUBLIC ${KLEIDIAI_WARNING_FLAGS} - PUBLIC $<$>:-march=armv8.2-a+fp16+bf16${KLEIDIAI_INTERNAL_EXTRA_ARCH}> + PUBLIC $<$>:-march=armv8-a${KLEIDIAI_INTERNAL_EXTRA_ARCH}> ) if(MSVC) set_source_files_properties(test/common/bfloat16_asm.S PROPERTIES LANGUAGE ASM_MARMASM) set_source_files_properties(test/common/float16_asm.S PROPERTIES LANGUAGE ASM_MARMASM) set_source_files_properties(test/common/round_asm.S PROPERTIES LANGUAGE ASM_MARMASM) + else() + set_source_files_properties(test/common/float16_asm.S PROPERTIES COMPILE_OPTIONS "-march=armv8.2-a+fp16${KLEIDIAI_INTERNAL_EXTRA_ARCH}") + set_source_files_properties(test/common/bfloat16_asm.S PROPERTIES COMPILE_OPTIONS "-march=armv8.2-a+fp16+bf16${KLEIDIAI_INTERNAL_EXTRA_ARCH}") + set_source_files_properties(test/common/sme.cpp PROPERTIES COMPILE_OPTIONS "-fno-tree-vectorize;-march=armv8.2-a+sve${KLEIDIAI_INTERNAL_EXTRA_ARCH}") endif() - set_source_files_properties(test/common/sme.cpp PROPERTIES COMPILE_OPTIONS "-fno-tree-vectorize;-march=armv8.2-a+sve${KLEIDIAI_INTERNAL_EXTRA_ARCH}") - target_link_libraries(kleidiai_test_framework PUBLIC kleidiai ) diff --git a/kai/ukernels/matmul/matmul_clamp_f32_bf16p_bf16p/kai_matmul_clamp_f32_bf16p8x4_bf16p12x4b_8x12_neon_mmla.h b/kai/ukernels/matmul/matmul_clamp_f32_bf16p_bf16p/kai_matmul_clamp_f32_bf16p8x4_bf16p12x4b_8x12_neon_mmla.h index 251977e1fbff576714590a9c330e452ce3851952..6599981c6c313b7edd45eafb10afe72abff639be 100644 --- a/kai/ukernels/matmul/matmul_clamp_f32_bf16p_bf16p/kai_matmul_clamp_f32_bf16p8x4_bf16p12x4b_8x12_neon_mmla.h +++ b/kai/ukernels/matmul/matmul_clamp_f32_bf16p_bf16p/kai_matmul_clamp_f32_bf16p8x4_bf16p12x4b_8x12_neon_mmla.h @@ -1,15 +1,11 @@ // -// SPDX-FileCopyrightText: Copyright 2024 Arm Limited and/or its affiliates +// SPDX-FileCopyrightText: Copyright 2024-2025 Arm Limited and/or its affiliates // // SPDX-License-Identifier: Apache-2.0 // #pragma once -#if !defined(__aarch64__) || !defined(__ARM_FEATURE_BF16_VECTOR_ARITHMETIC) -#error This file must be compiled for AArch64, FEAT_BF16. -#else // Architectural features check. - #include #include @@ -124,5 +120,3 @@ void kai_run_matmul_clamp_f32_bf16p8x4_bf16p12x4b_8x12_neon_mmla( #ifdef __cplusplus } // extern "C" #endif // __cplusplus - -#endif // Architectural features check. diff --git a/test/BUILD.bazel b/test/BUILD.bazel index 9019364a1f10c9fdc530aa6269337f963b60b6c6..652563b93ac5a059361b0e28954cfdb44719a405 100644 --- a/test/BUILD.bazel +++ b/test/BUILD.bazel @@ -8,6 +8,7 @@ load( "//:kai_defs.bzl", "kai_cpu_bf16", "kai_cpu_fp16", + "kai_cpu_neon", "kai_cpu_sme", "kai_cxx_library", "kai_cxxopts", @@ -50,7 +51,7 @@ kai_cxx_library( name = "reference", srcs = glob(["reference/*.cpp"]), hdrs = glob(["reference/*.hpp"]), - cpu_uarch = kai_cpu_bf16() + kai_cpu_fp16(), + cpu_uarch = kai_cpu_neon(), deps = [ ":common", ], @@ -59,7 +60,7 @@ kai_cxx_library( cc_test( name = "kleidiai_test", srcs = glob(["tests/*.cpp"]), - copts = kai_cxxopts(kai_cpu_bf16() + kai_cpu_fp16()), + copts = kai_cxxopts(kai_cpu_neon()), includes = [], linkstatic = True, visibility = ["//visibility:public"],