From 1115a966a4921a1e4850a2267554074084b66f7d Mon Sep 17 00:00:00 2001 From: Viet-Hoa Do Date: Thu, 30 May 2024 15:26:04 +0100 Subject: [PATCH] Restructure the project * The library is move into kai directory (previously src). * All microkernels are in kai/ukernels directory. * Packing kernels for matmul will be in kai/ukernels/matmul/pack directory. Signed-off-by: Viet-Hoa Do --- CMakeLists.txt | 27 ++++++++----------- {src => kai}/kai_common.h | 0 ..._f16_f16_f16p16x1biasf16_6x16x8_neon_mla.c | 2 +- ..._f16_f16_f16p16x1biasf16_6x16x8_neon_mla.h | 0 ...ai8dxp1x8_qsi4cxp4x8_1x4x32_neon_dotprod.c | 2 +- ...ai8dxp1x8_qsi4cxp4x8_1x4x32_neon_dotprod.h | 0 ...ai8dxp1x8_qsi4cxp8x8_1x8x32_neon_dotprod.c | 2 +- ...ai8dxp1x8_qsi4cxp8x8_1x8x32_neon_dotprod.h | 0 ...2_qai8dxp4x8_qsi4cxp4x8_4x4x32_neon_i8mm.c | 2 +- ...2_qai8dxp4x8_qsi4cxp4x8_4x4x32_neon_i8mm.h | 0 ...2_qai8dxp4x8_qsi4cxp4x8_8x4x32_neon_i8mm.c | 2 +- ...2_qai8dxp4x8_qsi4cxp4x8_8x4x32_neon_i8mm.h | 0 ...2_qai8dxp4x8_qsi4cxp8x8_4x8x32_neon_i8mm.c | 2 +- ...2_qai8dxp4x8_qsi4cxp8x8_4x8x32_neon_i8mm.h | 0 ...2_qai8dxp4x8_qsi4cxp8x8_8x8x32_neon_i8mm.c | 2 +- ...2_qai8dxp4x8_qsi4cxp8x8_8x8x32_neon_i8mm.h | 0 ...tmul_clamp_f32_qai8dxp_qsi4cxp_interface.h | 0 .../pack}/kai_lhs_quant_pack_qai8dxp_f32.c | 2 +- .../pack}/kai_lhs_quant_pack_qai8dxp_f32.h | 0 ...hs_pack_kxn_f16p16x1biasf16_f16_f16_neon.c | 2 +- ...hs_pack_kxn_f16p16x1biasf16_f16_f16_neon.h | 0 .../kai_rhs_pack_nxk_qsi4cxp_qsu4cxs1s0.c | 2 +- .../kai_rhs_pack_nxk_qsi4cxp_qsu4cxs1s0.h | 0 test/common/compare.cpp | 2 +- test/common/data_format.cpp | 2 +- test/common/data_type.cpp | 2 +- test/common/int4.cpp | 2 +- test/common/matrix_portion.cpp | 2 +- test/common/printer.cpp | 2 +- test/reference/binary_elementwise.cpp | 2 +- test/reference/cast.cpp | 2 +- test/reference/fill.cpp | 2 +- test/reference/matmul.cpp | 2 +- test/reference/pack.cpp | 2 +- test/reference/quantize.cpp | 2 +- test/reference/reduce.cpp | 2 +- test/reference/transpose.cpp | 2 +- test/tests/matmul_test.cpp | 6 ++--- 38 files changed, 38 insertions(+), 43 deletions(-) rename {src => kai}/kai_common.h (100%) rename {src => kai/ukernels}/matmul/matmul_clamp_f16_f16_f16p/kai_matmul_clamp_f16_f16_f16p16x1biasf16_6x16x8_neon_mla.c (99%) rename {src => kai/ukernels}/matmul/matmul_clamp_f16_f16_f16p/kai_matmul_clamp_f16_f16_f16p16x1biasf16_6x16x8_neon_mla.h (100%) rename {src => kai/ukernels}/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp4x8_1x4x32_neon_dotprod.c (99%) rename {src => kai/ukernels}/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp4x8_1x4x32_neon_dotprod.h (100%) rename {src => kai/ukernels}/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp8x8_1x8x32_neon_dotprod.c (99%) rename {src => kai/ukernels}/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp8x8_1x8x32_neon_dotprod.h (100%) rename {src => kai/ukernels}/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_4x4x32_neon_i8mm.c (99%) rename {src => kai/ukernels}/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_4x4x32_neon_i8mm.h (100%) rename {src => kai/ukernels}/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_8x4x32_neon_i8mm.c (99%) rename {src => kai/ukernels}/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_8x4x32_neon_i8mm.h (100%) rename {src => kai/ukernels}/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_4x8x32_neon_i8mm.c (99%) rename {src => kai/ukernels}/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_4x8x32_neon_i8mm.h (100%) rename {src => kai/ukernels}/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_8x8x32_neon_i8mm.c (99%) rename {src => kai/ukernels}/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_8x8x32_neon_i8mm.h (100%) rename {src => kai/ukernels}/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp_qsi4cxp_interface.h (100%) rename {src/matmul => kai/ukernels/matmul/pack}/kai_lhs_quant_pack_qai8dxp_f32.c (99%) rename {src/matmul => kai/ukernels/matmul/pack}/kai_lhs_quant_pack_qai8dxp_f32.h (100%) rename {src/matmul => kai/ukernels/matmul/pack}/kai_rhs_pack_kxn_f16p16x1biasf16_f16_f16_neon.c (99%) rename {src/matmul => kai/ukernels/matmul/pack}/kai_rhs_pack_kxn_f16p16x1biasf16_f16_f16_neon.h (100%) rename {src/matmul => kai/ukernels/matmul/pack}/kai_rhs_pack_nxk_qsi4cxp_qsu4cxs1s0.c (99%) rename {src/matmul => kai/ukernels/matmul/pack}/kai_rhs_pack_nxk_qsi4cxp_qsu4cxs1s0.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ff56f89..822c1137 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,25 +57,25 @@ set(KLEIDIAI_WARNING_FLAGS ) set(KLEIDIAI_FILES_NEON - src/matmul/kai_lhs_quant_pack_qai8dxp_f32.c - src/matmul/kai_rhs_pack_nxk_qsi4cxp_qsu4cxs1s0.c + kai/ukernels/matmul/pack/kai_lhs_quant_pack_qai8dxp_f32.c + kai/ukernels/matmul/pack/kai_rhs_pack_nxk_qsi4cxp_qsu4cxs1s0.c ) set(KLEIDIAI_FILES_NEON_FP16 - src/matmul/kai_rhs_pack_kxn_f16p16x1biasf16_f16_f16_neon.c - src/matmul/matmul_clamp_f16_f16_f16p/kai_matmul_clamp_f16_f16_f16p16x1biasf16_6x16x8_neon_mla.c + kai/ukernels/matmul/pack/kai_rhs_pack_kxn_f16p16x1biasf16_f16_f16_neon.c + kai/ukernels/matmul/matmul_clamp_f16_f16_f16p/kai_matmul_clamp_f16_f16_f16p16x1biasf16_6x16x8_neon_mla.c ) set(KLEIDIAI_FILES_NEON_DOTPROD - src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp4x8_1x4x32_neon_dotprod.c - src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp8x8_1x8x32_neon_dotprod.c + kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp4x8_1x4x32_neon_dotprod.c + kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp8x8_1x8x32_neon_dotprod.c ) set(KLEIDIAI_FILES_NEON_I8MM - src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_4x4x32_neon_i8mm.c - src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_8x4x32_neon_i8mm.c - src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_4x8x32_neon_i8mm.c - src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_8x8x32_neon_i8mm.c + kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_4x4x32_neon_i8mm.c + kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_8x4x32_neon_i8mm.c + kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_4x8x32_neon_i8mm.c + kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_8x8x32_neon_i8mm.c ) add_library(kleidiai @@ -86,8 +86,7 @@ add_library(kleidiai ) target_include_directories(kleidiai - PUBLIC src - PRIVATE . + PUBLIC . ) target_compile_options(kleidiai @@ -142,10 +141,6 @@ if(KLEIDIAI_BUILD_TESTS) test/tests/matmul_test.cpp ) - target_include_directories(kleidiai_test - PRIVATE . - ) - target_compile_options(kleidiai_test PRIVATE ${KLEIDIAI_WARNING_FLAGS} PRIVATE -march=armv8.2-a+fp16+bf16 diff --git a/src/kai_common.h b/kai/kai_common.h similarity index 100% rename from src/kai_common.h rename to kai/kai_common.h diff --git a/src/matmul/matmul_clamp_f16_f16_f16p/kai_matmul_clamp_f16_f16_f16p16x1biasf16_6x16x8_neon_mla.c b/kai/ukernels/matmul/matmul_clamp_f16_f16_f16p/kai_matmul_clamp_f16_f16_f16p16x1biasf16_6x16x8_neon_mla.c similarity index 99% rename from src/matmul/matmul_clamp_f16_f16_f16p/kai_matmul_clamp_f16_f16_f16p16x1biasf16_6x16x8_neon_mla.c rename to kai/ukernels/matmul/matmul_clamp_f16_f16_f16p/kai_matmul_clamp_f16_f16_f16p16x1biasf16_6x16x8_neon_mla.c index c4996ebd..8c848afd 100644 --- a/src/matmul/matmul_clamp_f16_f16_f16p/kai_matmul_clamp_f16_f16_f16p16x1biasf16_6x16x8_neon_mla.c +++ b/kai/ukernels/matmul/matmul_clamp_f16_f16_f16p/kai_matmul_clamp_f16_f16_f16p16x1biasf16_6x16x8_neon_mla.c @@ -13,7 +13,7 @@ #include #include -#include "kai_common.h" +#include "kai/kai_common.h" static const size_t kai_mr = 6; static const size_t kai_nr = 16; diff --git a/src/matmul/matmul_clamp_f16_f16_f16p/kai_matmul_clamp_f16_f16_f16p16x1biasf16_6x16x8_neon_mla.h b/kai/ukernels/matmul/matmul_clamp_f16_f16_f16p/kai_matmul_clamp_f16_f16_f16p16x1biasf16_6x16x8_neon_mla.h similarity index 100% rename from src/matmul/matmul_clamp_f16_f16_f16p/kai_matmul_clamp_f16_f16_f16p16x1biasf16_6x16x8_neon_mla.h rename to kai/ukernels/matmul/matmul_clamp_f16_f16_f16p/kai_matmul_clamp_f16_f16_f16p16x1biasf16_6x16x8_neon_mla.h diff --git a/src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp4x8_1x4x32_neon_dotprod.c b/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp4x8_1x4x32_neon_dotprod.c similarity index 99% rename from src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp4x8_1x4x32_neon_dotprod.c rename to kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp4x8_1x4x32_neon_dotprod.c index 4d47ef1e..fa9a3f5c 100644 --- a/src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp4x8_1x4x32_neon_dotprod.c +++ b/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp4x8_1x4x32_neon_dotprod.c @@ -11,7 +11,7 @@ #include #include -#include "kai_common.h" +#include "kai/kai_common.h" static const size_t kai_m_step = 1; static const size_t kai_n_step = 4; diff --git a/src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp4x8_1x4x32_neon_dotprod.h b/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp4x8_1x4x32_neon_dotprod.h similarity index 100% rename from src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp4x8_1x4x32_neon_dotprod.h rename to kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp4x8_1x4x32_neon_dotprod.h diff --git a/src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp8x8_1x8x32_neon_dotprod.c b/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp8x8_1x8x32_neon_dotprod.c similarity index 99% rename from src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp8x8_1x8x32_neon_dotprod.c rename to kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp8x8_1x8x32_neon_dotprod.c index 6bff095a..17707488 100644 --- a/src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp8x8_1x8x32_neon_dotprod.c +++ b/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp8x8_1x8x32_neon_dotprod.c @@ -11,7 +11,7 @@ #include #include -#include "kai_common.h" +#include "kai/kai_common.h" static const size_t kai_m_step = 1; static const size_t kai_n_step = 8; diff --git a/src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp8x8_1x8x32_neon_dotprod.h b/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp8x8_1x8x32_neon_dotprod.h similarity index 100% rename from src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp8x8_1x8x32_neon_dotprod.h rename to kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp1x8_qsi4cxp8x8_1x8x32_neon_dotprod.h diff --git a/src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_4x4x32_neon_i8mm.c b/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_4x4x32_neon_i8mm.c similarity index 99% rename from src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_4x4x32_neon_i8mm.c rename to kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_4x4x32_neon_i8mm.c index 45f43170..ebcaaf54 100644 --- a/src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_4x4x32_neon_i8mm.c +++ b/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_4x4x32_neon_i8mm.c @@ -11,7 +11,7 @@ #include #include -#include "kai_common.h" +#include "kai/kai_common.h" static const size_t kai_m_step = 4; static const size_t kai_n_step = 4; diff --git a/src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_4x4x32_neon_i8mm.h b/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_4x4x32_neon_i8mm.h similarity index 100% rename from src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_4x4x32_neon_i8mm.h rename to kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_4x4x32_neon_i8mm.h diff --git a/src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_8x4x32_neon_i8mm.c b/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_8x4x32_neon_i8mm.c similarity index 99% rename from src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_8x4x32_neon_i8mm.c rename to kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_8x4x32_neon_i8mm.c index 293fad29..ac9ec40e 100644 --- a/src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_8x4x32_neon_i8mm.c +++ b/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_8x4x32_neon_i8mm.c @@ -11,7 +11,7 @@ #include #include -#include "kai_common.h" +#include "kai/kai_common.h" static const size_t kai_m_step = 8; static const size_t kai_n_step = 4; diff --git a/src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_8x4x32_neon_i8mm.h b/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_8x4x32_neon_i8mm.h similarity index 100% rename from src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_8x4x32_neon_i8mm.h rename to kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_8x4x32_neon_i8mm.h diff --git a/src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_4x8x32_neon_i8mm.c b/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_4x8x32_neon_i8mm.c similarity index 99% rename from src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_4x8x32_neon_i8mm.c rename to kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_4x8x32_neon_i8mm.c index 06adc07a..93c1a350 100644 --- a/src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_4x8x32_neon_i8mm.c +++ b/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_4x8x32_neon_i8mm.c @@ -11,7 +11,7 @@ #include #include -#include "kai_common.h" +#include "kai/kai_common.h" static const size_t kai_m_step = 4; static const size_t kai_n_step = 8; diff --git a/src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_4x8x32_neon_i8mm.h b/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_4x8x32_neon_i8mm.h similarity index 100% rename from src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_4x8x32_neon_i8mm.h rename to kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_4x8x32_neon_i8mm.h diff --git a/src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_8x8x32_neon_i8mm.c b/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_8x8x32_neon_i8mm.c similarity index 99% rename from src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_8x8x32_neon_i8mm.c rename to kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_8x8x32_neon_i8mm.c index 9d8153a9..2b2b1e09 100644 --- a/src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_8x8x32_neon_i8mm.c +++ b/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_8x8x32_neon_i8mm.c @@ -11,7 +11,7 @@ #include #include -#include "kai_common.h" +#include "kai/kai_common.h" static const size_t kai_m_step = 8; static const size_t kai_n_step = 8; diff --git a/src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_8x8x32_neon_i8mm.h b/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_8x8x32_neon_i8mm.h similarity index 100% rename from src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_8x8x32_neon_i8mm.h rename to kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp8x8_8x8x32_neon_i8mm.h diff --git a/src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp_qsi4cxp_interface.h b/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp_qsi4cxp_interface.h similarity index 100% rename from src/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp_qsi4cxp_interface.h rename to kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp_qsi4cxp_interface.h diff --git a/src/matmul/kai_lhs_quant_pack_qai8dxp_f32.c b/kai/ukernels/matmul/pack/kai_lhs_quant_pack_qai8dxp_f32.c similarity index 99% rename from src/matmul/kai_lhs_quant_pack_qai8dxp_f32.c rename to kai/ukernels/matmul/pack/kai_lhs_quant_pack_qai8dxp_f32.c index 6e618ccc..ffb09949 100644 --- a/src/matmul/kai_lhs_quant_pack_qai8dxp_f32.c +++ b/kai/ukernels/matmul/pack/kai_lhs_quant_pack_qai8dxp_f32.c @@ -10,7 +10,7 @@ #include #include -#include "kai_common.h" +#include "kai/kai_common.h" static const size_t kai_num_bytes_per_multiplier = sizeof(float); static const size_t kai_num_bytes_per_offset = sizeof(int32_t); diff --git a/src/matmul/kai_lhs_quant_pack_qai8dxp_f32.h b/kai/ukernels/matmul/pack/kai_lhs_quant_pack_qai8dxp_f32.h similarity index 100% rename from src/matmul/kai_lhs_quant_pack_qai8dxp_f32.h rename to kai/ukernels/matmul/pack/kai_lhs_quant_pack_qai8dxp_f32.h diff --git a/src/matmul/kai_rhs_pack_kxn_f16p16x1biasf16_f16_f16_neon.c b/kai/ukernels/matmul/pack/kai_rhs_pack_kxn_f16p16x1biasf16_f16_f16_neon.c similarity index 99% rename from src/matmul/kai_rhs_pack_kxn_f16p16x1biasf16_f16_f16_neon.c rename to kai/ukernels/matmul/pack/kai_rhs_pack_kxn_f16p16x1biasf16_f16_f16_neon.c index 4bf04303..50c04ad3 100644 --- a/src/matmul/kai_rhs_pack_kxn_f16p16x1biasf16_f16_f16_neon.c +++ b/kai/ukernels/matmul/pack/kai_rhs_pack_kxn_f16p16x1biasf16_f16_f16_neon.c @@ -11,7 +11,7 @@ #include #include -#include "kai_common.h" +#include "kai/kai_common.h" static const size_t kai_nr = 16; static const size_t kai_kr = 1; diff --git a/src/matmul/kai_rhs_pack_kxn_f16p16x1biasf16_f16_f16_neon.h b/kai/ukernels/matmul/pack/kai_rhs_pack_kxn_f16p16x1biasf16_f16_f16_neon.h similarity index 100% rename from src/matmul/kai_rhs_pack_kxn_f16p16x1biasf16_f16_f16_neon.h rename to kai/ukernels/matmul/pack/kai_rhs_pack_kxn_f16p16x1biasf16_f16_f16_neon.h diff --git a/src/matmul/kai_rhs_pack_nxk_qsi4cxp_qsu4cxs1s0.c b/kai/ukernels/matmul/pack/kai_rhs_pack_nxk_qsi4cxp_qsu4cxs1s0.c similarity index 99% rename from src/matmul/kai_rhs_pack_nxk_qsi4cxp_qsu4cxs1s0.c rename to kai/ukernels/matmul/pack/kai_rhs_pack_nxk_qsi4cxp_qsu4cxs1s0.c index aed8a5f4..41d3fcdb 100644 --- a/src/matmul/kai_rhs_pack_nxk_qsi4cxp_qsu4cxs1s0.c +++ b/kai/ukernels/matmul/pack/kai_rhs_pack_nxk_qsi4cxp_qsu4cxs1s0.c @@ -10,7 +10,7 @@ #include #include -#include "kai_common.h" +#include "kai/kai_common.h" static const size_t kai_num_bytes_sum_rhs = sizeof(int32_t); static const size_t kai_num_bytes_multiplier_rhs = sizeof(float); diff --git a/src/matmul/kai_rhs_pack_nxk_qsi4cxp_qsu4cxs1s0.h b/kai/ukernels/matmul/pack/kai_rhs_pack_nxk_qsi4cxp_qsu4cxs1s0.h similarity index 100% rename from src/matmul/kai_rhs_pack_nxk_qsi4cxp_qsu4cxs1s0.h rename to kai/ukernels/matmul/pack/kai_rhs_pack_nxk_qsi4cxp_qsu4cxs1s0.h diff --git a/test/common/compare.cpp b/test/common/compare.cpp index 9dcfb104..91b6bc66 100644 --- a/test/common/compare.cpp +++ b/test/common/compare.cpp @@ -12,7 +12,7 @@ #include #include -#include "src/kai_common.h" +#include "kai/kai_common.h" #include "test/common/bfloat16.hpp" #include "test/common/data_format.hpp" #include "test/common/data_type.hpp" diff --git a/test/common/data_format.cpp b/test/common/data_format.cpp index a69a085d..a16269e9 100644 --- a/test/common/data_format.cpp +++ b/test/common/data_format.cpp @@ -9,7 +9,7 @@ #include #include -#include "src/kai_common.h" +#include "kai/kai_common.h" #include "test/common/data_type.hpp" #include "test/reference/round.hpp" diff --git a/test/common/data_type.cpp b/test/common/data_type.cpp index 95209750..44f594af 100644 --- a/test/common/data_type.cpp +++ b/test/common/data_type.cpp @@ -9,7 +9,7 @@ #include #include -#include "src/kai_common.h" +#include "kai/kai_common.h" namespace kai::test { diff --git a/test/common/int4.cpp b/test/common/int4.cpp index ae0a5998..5f8afef5 100644 --- a/test/common/int4.cpp +++ b/test/common/int4.cpp @@ -9,7 +9,7 @@ #include #include -#include "kai_common.h" +#include "kai/kai_common.h" namespace kai::test { diff --git a/test/common/matrix_portion.cpp b/test/common/matrix_portion.cpp index e7c42bf1..6b975ec7 100644 --- a/test/common/matrix_portion.cpp +++ b/test/common/matrix_portion.cpp @@ -9,7 +9,7 @@ #include #include -#include "src/kai_common.h" +#include "kai/kai_common.h" #include "test/common/rect.hpp" #include "test/reference/round.hpp" diff --git a/test/common/printer.cpp b/test/common/printer.cpp index 320f7244..7d7144d8 100644 --- a/test/common/printer.cpp +++ b/test/common/printer.cpp @@ -9,7 +9,7 @@ #include #include -#include "src/kai_common.h" +#include "kai/kai_common.h" #include "test/common/bfloat16.hpp" #include "test/common/data_format.hpp" #include "test/common/data_type.hpp" diff --git a/test/reference/binary_elementwise.cpp b/test/reference/binary_elementwise.cpp index c5c61a66..d5abd26c 100644 --- a/test/reference/binary_elementwise.cpp +++ b/test/reference/binary_elementwise.cpp @@ -11,7 +11,7 @@ #include #include -#include "src/kai_common.h" +#include "kai/kai_common.h" #include "test/common/data_type.hpp" #include "test/common/float16.hpp" #include "test/common/int4.hpp" diff --git a/test/reference/cast.cpp b/test/reference/cast.cpp index 1eae56df..21486c05 100644 --- a/test/reference/cast.cpp +++ b/test/reference/cast.cpp @@ -8,7 +8,7 @@ #include #include -#include "kai_common.h" +#include "kai/kai_common.h" #include "test/common/bfloat16.hpp" #include "test/common/data_type.hpp" #include "test/common/memory.hpp" diff --git a/test/reference/fill.cpp b/test/reference/fill.cpp index 238397c0..d58ab6ce 100644 --- a/test/reference/fill.cpp +++ b/test/reference/fill.cpp @@ -13,7 +13,7 @@ #include #include -#include "src/kai_common.h" +#include "kai/kai_common.h" #include "test/common/bfloat16.hpp" #include "test/common/data_format.hpp" #include "test/common/data_type.hpp" diff --git a/test/reference/matmul.cpp b/test/reference/matmul.cpp index 803fa23b..984982a2 100644 --- a/test/reference/matmul.cpp +++ b/test/reference/matmul.cpp @@ -10,7 +10,7 @@ #include #include -#include "src/kai_common.h" +#include "kai/kai_common.h" #include "test/common/data_format.hpp" #include "test/common/data_type.hpp" #include "test/common/float16.hpp" diff --git a/test/reference/pack.cpp b/test/reference/pack.cpp index a61efff8..261d7a53 100644 --- a/test/reference/pack.cpp +++ b/test/reference/pack.cpp @@ -14,7 +14,7 @@ #include #include -#include "src/kai_common.h" +#include "kai/kai_common.h" #include "test/common/data_format.hpp" #include "test/common/data_type.hpp" #include "test/reference/quantize.hpp" diff --git a/test/reference/quantize.cpp b/test/reference/quantize.cpp index 141892b2..213328d5 100644 --- a/test/reference/quantize.cpp +++ b/test/reference/quantize.cpp @@ -13,7 +13,7 @@ #include #include -#include "src/kai_common.h" +#include "kai/kai_common.h" #include "test/common/data_type.hpp" #include "test/common/int4.hpp" #include "test/common/memory.hpp" diff --git a/test/reference/reduce.cpp b/test/reference/reduce.cpp index dff4cf69..0e83b9bf 100644 --- a/test/reference/reduce.cpp +++ b/test/reference/reduce.cpp @@ -10,7 +10,7 @@ #include #include -#include "src/kai_common.h" +#include "kai/kai_common.h" #include "test/common/data_format.hpp" #include "test/common/data_type.hpp" #include "test/common/int4.hpp" diff --git a/test/reference/transpose.cpp b/test/reference/transpose.cpp index bee2182a..95cbc8e2 100644 --- a/test/reference/transpose.cpp +++ b/test/reference/transpose.cpp @@ -11,7 +11,7 @@ #include #include -#include "kai_common.h" +#include "kai/kai_common.h" #include "test/common/data_type.hpp" namespace kai::test { diff --git a/test/tests/matmul_test.cpp b/test/tests/matmul_test.cpp index 544d17e9..65c5f603 100644 --- a/test/tests/matmul_test.cpp +++ b/test/tests/matmul_test.cpp @@ -20,9 +20,9 @@ #include #include -#include "src/kai_common.h" -#include "src/matmul/kai_rhs_pack_kxn_f16p16x1biasf16_f16_f16_neon.h" -#include "src/matmul/matmul_clamp_f16_f16_f16p/kai_matmul_clamp_f16_f16_f16p16x1biasf16_6x16x8_neon_mla.h" +#include "kai/kai_common.h" +#include "kai/ukernels/matmul/matmul_clamp_f16_f16_f16p/kai_matmul_clamp_f16_f16_f16p16x1biasf16_6x16x8_neon_mla.h" +#include "kai/ukernels/matmul/pack/kai_rhs_pack_kxn_f16p16x1biasf16_f16_f16_neon.h" #include "test/common/compare.hpp" #include "test/common/data_format.hpp" #include "test/common/data_type.hpp" -- GitLab