Skip to content

Commit 79ca32f

Browse files
committed
Attempt at fixing Tizen build
Added a define guard to stop function redefinition Signed-off-by: p-debski2 <[email protected]>
1 parent 2882b42 commit 79ca32f

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

nntrainer/tensor/cpu_backend/ggml_interface/nntr_ggml_impl/nntr_ggml_impl_fp16_fp32.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
// https://github.com/ggml-org/llama.cpp/pull/10616 for MUSA compilers , we
2929
// use uint16_t: ref https://github.com/ggml-org/llama.cpp/pull/11843
3030
//
31-
#if defined(__ARM_NEON) && \
31+
#if defined(__ARM_NEON) && defined(ENABLE_FP16) && \
3232
!(defined(__CUDACC__) && __CUDACC_VER_MAJOR__ <= 11) && !defined(__MUSACC__)
3333
#define NNTR_COMPUTE_FP16_TO_FP32(x) nntr_compute_fp16_to_fp32_impl(x)
3434
#define NNTR_COMPUTE_FP32_TO_FP16(x) nntr_compute_fp32_to_fp16_impl(x)

nntrainer/tensor/cpu_backend/ggml_interface/nntr_ggml_impl/nntr_ggml_impl_utils.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -873,6 +873,8 @@ inline static int32_t vaddvq_s32(int32x4_t v) {
873873
vgetq_lane_s32(v, 3);
874874
}
875875

876+
#if not(defined(ARMV7)) || !(ARMV7)
877+
876878
inline static float vaddvq_f32(float32x4_t v) {
877879
return vgetq_lane_f32(v, 0) + vgetq_lane_f32(v, 1) + vgetq_lane_f32(v, 2) +
878880
vgetq_lane_f32(v, 3);
@@ -894,6 +896,8 @@ inline static int32x4_t vcvtnq_s32_f32(float32x4_t v) {
894896
return res;
895897
}
896898

899+
#endif
900+
897901
inline static uint8x8_t vzip1_u8(uint8x8_t a, uint8x8_t b) {
898902
uint8x8_t res;
899903

packaging/nntrainer.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,8 @@ cp -r result %{buildroot}%{_datadir}/nntrainer/unittest/
601601
%if 0%{?enable_ggml}
602602
%{_includedir}/nntrainer/ggml_interface.h
603603
%{_includedir}/nntrainer/nntr_ggml_impl.h
604+
%{_includedir}/nntrainer/nntr_ggml_impl_common.h
605+
%{_includedir}/nntrainer/nntr_ggml_impl_utils.h
604606
%endif
605607
%{_includedir}/nntrainer/bs_thread_pool.h
606608
%{_includedir}/nntrainer/bs_thread_pool_manager.hpp

0 commit comments

Comments
 (0)