Skip to content

Commit 910d272

Browse files
author
Jayakrishna T N
committed
Fixes for build failures seen if Kleidi is disabled
1 parent ff5cd30 commit 910d272

6 files changed

+23
-23
lines changed

src/pf32-gemm/gen/pf32-gemm-32x32-minmax-asm-aarch64-neonsme.S

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// This source code is licensed under the BSD-style license found in the
77
// LICENSE file in the root directory of this source tree.
88

9-
#include "xnnpack/assembly.h"
9+
#include "src/xnnpack/assembly.h"
1010

1111
#define fpack_lhs_packed_in x0
1212
#define fpack_rhs_packed_in x1
@@ -551,4 +551,4 @@ END_FUNCTION xnn_pf32_gemm_minmax__asm_aarch64_neonsme
551551

552552
#ifdef __ELF__
553553
.section ".note.GNU-stack","",%progbits
554-
#endif
554+
#endif

src/pf32-gemm/gen/pf32-gemm-minmax-utils.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// LICENSE file in the root directory of this source tree.
88

99
#include <stdint.h>
10-
#include "xnnpack/common.h"
10+
#include "src/xnnpack/common.h"
1111

1212
#ifdef __cplusplus
1313
extern "C" {
@@ -47,4 +47,4 @@ XNN_INTERNAL void xnn_pf32_gemm_minmax__asm_aarch64_neonsme(
4747

4848
#ifdef __cplusplus
4949
} // extern "C"
50-
#endif
50+
#endif

src/pf32-gemm/gen/pf32-gemm-pack-utils-asm-aarch64-neonsme.S

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// This source code is licensed under the BSD-style license found in the
77
// LICENSE file in the root directory of this source tree.
88
9-
#include "xnnpack/assembly.h"
9+
#include "src/xnnpack/assembly.h"
1010
1111
#define fpack_rhs_head_rows 4
1212
#define fpack_rhs_tail_rows 1
@@ -408,4 +408,4 @@ END_FUNCTION xnn_pf32_pack_rhs__asm_aarch64_neonsme
408408

409409
#ifdef __ELF__
410410
.section ".note.GNU-stack","",%progbits
411-
#endif
411+
#endif

src/pf32-gemm/pf32-gemm-32x32-minmax-neonsme.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
// LICENSE file in the root directory of this source tree.
88

99
#include <stddef.h>
10-
#include "xnnpack/microparams.h"
11-
#include "pf32-gemm/gen/pf32-gemm-minmax-utils.h"
10+
#include "src/xnnpack/microparams.h"
11+
#include "src/pf32-gemm/gen/pf32-gemm-minmax-utils.h"
1212

1313
size_t xnn_pf32_gemm_minmax_ukernel_32x32__neonsme_get_mr() {
1414
return xnn_pf32_gemm_minmax_mr * xnn_pf32_get_word_sme_vl__asm_aarch64_neonsme();
@@ -24,7 +24,7 @@ void xnn_pf32_gemm_minmax_ukernel_32x32__neonsme(
2424
size_t m, size_t n, size_t k, const void* lhs_packed,
2525
const void* rhs_packed, float* dst, size_t dst_stride_row,
2626
size_t dst_stride_col,
27-
union xnn_f32_minmax_params
27+
struct xnn_f32_minmax_params
2828
minmax_params[XNN_RESTRICT XNN_MIN_ELEMENTS(1)]) {
2929

3030
xnn_pf32_gemm_minmax__asm_aarch64_neonsme(lhs_packed, rhs_packed, dst, (k/sizeof(float)), &minmax_params->scalar.max,

src/reference/packing.cc

+9-9
Original file line numberDiff line numberDiff line change
@@ -1880,6 +1880,15 @@ void xnn_pack_qu8_weights_and_biases(
18801880
packed_weights_ptr, extra_bytes, params);
18811881
}
18821882

1883+
void transpose_weights(const float* in, float* out, size_t height,
1884+
size_t width) {
1885+
for (size_t i = 0; i < height; ++i) {
1886+
for (size_t j = 0; j < width; ++j) {
1887+
out[j * height + i] = in[i * width + j];
1888+
}
1889+
}
1890+
}
1891+
18831892
#if XNN_ENABLE_KLEIDIAI
18841893
size_t xnn_packed_stride_kai_qs4_weights_and_biases_sme(
18851894
const struct xnn_gemm_config* gemm_config, size_t k, size_t unused_k_stride,
@@ -2357,15 +2366,6 @@ void xnn_pack_kai_qb4_weights_and_biases(
23572366
}
23582367
#endif // XNN_ENABLE_KLEIDIAI
23592368

2360-
void transpose_weights(const float* in, float* out, size_t height,
2361-
size_t width) {
2362-
for (size_t i = 0; i < height; ++i) {
2363-
for (size_t j = 0; j < width; ++j) {
2364-
out[j * height + i] = in[i * width + j];
2365-
}
2366-
}
2367-
}
2368-
23692369
void xnn_pack_f32_run_pack_rhs(size_t num_groups, size_t n, size_t k, size_t nr, size_t kr,
23702370
size_t sr, size_t rhs_stride, const void *rhs,
23712371
const void *bias, const void *scale, void *rhs_packed,

src/x32-pack-lh/x32-packlh-neonsme.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
#include <stdint.h>
1515
#include <stdlib.h>
1616

17-
#include "xnnpack/common.h"
18-
#include "xnnpack/math.h"
19-
#include "xnnpack/pack-lh.h"
20-
#include "pf32-gemm/gen/pf32-gemm-minmax-utils.h"
17+
#include "src/xnnpack/common.h"
18+
#include "src/xnnpack/math.h"
19+
#include "src/xnnpack/pack-lh.h"
20+
#include "src/pf32-gemm/gen/pf32-gemm-minmax-utils.h"
2121

2222
#define GET_MIN(a, b) ((a) < (b) ? (a) : (b))
2323
#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
@@ -87,4 +87,4 @@ size_t xnn_x32_pack_lhs_offset__neonsme(size_t m, size_t k, size_t mr, size_t kr
8787
(void)sr;
8888

8989
return m * k;
90-
}
90+
}

0 commit comments

Comments
 (0)