Spaces:
Running
Running
Commit
·
8a74c6b
1
Parent(s):
bb47d22
Fixes #12823 (llama/12830)
Browse files* Including limits file on AIX
* Fixes #12823
ggml/src/ggml-cpu/simd-mappings.h
CHANGED
|
@@ -392,7 +392,11 @@ static inline void __avx_f32cx8_store(ggml_fp16_t *x, __m256 y) {
|
|
| 392 |
#define GGML_F16_VEC_LOAD(p, i) (i & 0x1) ? \
|
| 393 |
vec_extract_fp32_from_shorth(vec_xl(0, p - GGML_F16_EPR)) : \
|
| 394 |
vec_extract_fp32_from_shortl(vec_xl(0, p))
|
| 395 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 396 |
#define GGML_F16_VEC_STORE(p, r, i) \
|
| 397 |
if (i & 0x1) \
|
| 398 |
vec_xst(vec_pack_to_short_fp32(r[i - GGML_ENDIAN_BYTE(1)], \
|
|
|
|
| 392 |
#define GGML_F16_VEC_LOAD(p, i) (i & 0x1) ? \
|
| 393 |
vec_extract_fp32_from_shorth(vec_xl(0, p - GGML_F16_EPR)) : \
|
| 394 |
vec_extract_fp32_from_shortl(vec_xl(0, p))
|
| 395 |
+
static inline unsigned char ggml_endian_byte(int i) {
|
| 396 |
+
uint16_t tmp_val = 1;
|
| 397 |
+
return ((unsigned char *)&tmp_val)[i];
|
| 398 |
+
}
|
| 399 |
+
#define GGML_ENDIAN_BYTE(i) ggml_endian_byte(i)
|
| 400 |
#define GGML_F16_VEC_STORE(p, r, i) \
|
| 401 |
if (i & 0x1) \
|
| 402 |
vec_xst(vec_pack_to_short_fp32(r[i - GGML_ENDIAN_BYTE(1)], \
|