mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-27 06:39:25 +01:00
ggml : fix loongson compile warnings
ggml-ci
This commit is contained in:
parent
d5c05821f3
commit
fd5de67bb7
@ -7404,6 +7404,9 @@ void ggml_vec_dot_q4_K_q8_K(int n, float * restrict s, size_t bs, const void * r
|
|||||||
*s = vec_extract(vsumf0, 0);
|
*s = vec_extract(vsumf0, 0);
|
||||||
|
|
||||||
#elif defined __loongarch_asx
|
#elif defined __loongarch_asx
|
||||||
|
GGML_UNUSED(kmask1);
|
||||||
|
GGML_UNUSED(kmask2);
|
||||||
|
GGML_UNUSED(kmask3);
|
||||||
|
|
||||||
const __m256i m4 = __lasx_xvreplgr2vr_b(0xF);
|
const __m256i m4 = __lasx_xvreplgr2vr_b(0xF);
|
||||||
|
|
||||||
@ -8002,6 +8005,9 @@ void ggml_vec_dot_q5_K_q8_K(int n, float * restrict s, size_t bs, const void * r
|
|||||||
*s = vec_extract(vsumf0, 0);
|
*s = vec_extract(vsumf0, 0);
|
||||||
|
|
||||||
#elif defined __loongarch_asx
|
#elif defined __loongarch_asx
|
||||||
|
GGML_UNUSED(kmask1);
|
||||||
|
GGML_UNUSED(kmask2);
|
||||||
|
GGML_UNUSED(kmask3);
|
||||||
|
|
||||||
const __m256i m4 = __lasx_xvreplgr2vr_b(0xF);
|
const __m256i m4 = __lasx_xvreplgr2vr_b(0xF);
|
||||||
const __m128i mzero = __lsx_vldi(0);
|
const __m128i mzero = __lsx_vldi(0);
|
||||||
|
5
ggml.c
5
ggml.c
@ -1594,9 +1594,10 @@ static inline void __lasx_f32cx8_store(ggml_fp16_t *x, __m256 y) {
|
|||||||
|
|
||||||
__lasx_xvst(y, arr, 0);
|
__lasx_xvst(y, arr, 0);
|
||||||
|
|
||||||
for (int i = 0; i < 8; i++)
|
for (int i = 0; i < 8; i++) {
|
||||||
x[i] = GGML_FP32_TO_FP16(arr[i]);
|
x[i] = GGML_FP32_TO_FP16(arr[i]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#define GGML_F32Cx8_LOAD(x) __lasx_f32cx8_load(x)
|
#define GGML_F32Cx8_LOAD(x) __lasx_f32cx8_load(x)
|
||||||
#define GGML_F32Cx8_STORE(x, y) __lasx_f32cx8_store(x, y)
|
#define GGML_F32Cx8_STORE(x, y) __lasx_f32cx8_store(x, y)
|
||||||
|
|
||||||
@ -1671,7 +1672,7 @@ static inline void __lasx_f32cx8_store(ggml_fp16_t *x, __m256 y) {
|
|||||||
#define GGML_F16_STEP 32
|
#define GGML_F16_STEP 32
|
||||||
#define GGML_F16_EPR 4
|
#define GGML_F16_EPR 4
|
||||||
|
|
||||||
static inline __m128 __lsx_f16x4_load(ggml_fp16_t *x) {
|
static inline __m128 __lsx_f16x4_load(const ggml_fp16_t * x) {
|
||||||
float tmp[4];
|
float tmp[4];
|
||||||
|
|
||||||
tmp[0] = GGML_FP16_TO_FP32(x[0]);
|
tmp[0] = GGML_FP16_TO_FP32(x[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user