Spaces:
Sleeping
Sleeping
Piotr Kubaj
commited on
Commit
·
3a1d5ca
1
Parent(s):
3b46fdc
ggml-impl.h: fix build on POWER9 (llama/12855)
Browse fileserror: ISO C++17 does not allow 'register' storage class specifier
- ggml/src/ggml-impl.h +4 -4
ggml/src/ggml-impl.h
CHANGED
|
@@ -362,8 +362,8 @@ GGML_API void ggml_aligned_free(void * ptr, size_t size);
|
|
| 362 |
#define GGML_FP32_TO_FP16(x) GGML_COMPUTE_FP32_TO_FP16(x)
|
| 363 |
|
| 364 |
static inline float ggml_compute_fp16_to_fp32(ggml_fp16_t h) {
|
| 365 |
-
|
| 366 |
-
|
| 367 |
__asm__(
|
| 368 |
"mtfprd %0,%2\n"
|
| 369 |
"xscvhpdp %0,%0\n"
|
|
@@ -375,8 +375,8 @@ GGML_API void ggml_aligned_free(void * ptr, size_t size);
|
|
| 375 |
}
|
| 376 |
|
| 377 |
static inline ggml_fp16_t ggml_compute_fp32_to_fp16(float f) {
|
| 378 |
-
|
| 379 |
-
|
| 380 |
__asm__( /* xscvdphp can work on double or single precision */
|
| 381 |
"xscvdphp %0,%2\n"
|
| 382 |
"mffprd %1,%0\n" :
|
|
|
|
| 362 |
#define GGML_FP32_TO_FP16(x) GGML_COMPUTE_FP32_TO_FP16(x)
|
| 363 |
|
| 364 |
static inline float ggml_compute_fp16_to_fp32(ggml_fp16_t h) {
|
| 365 |
+
float f;
|
| 366 |
+
double d;
|
| 367 |
__asm__(
|
| 368 |
"mtfprd %0,%2\n"
|
| 369 |
"xscvhpdp %0,%0\n"
|
|
|
|
| 375 |
}
|
| 376 |
|
| 377 |
static inline ggml_fp16_t ggml_compute_fp32_to_fp16(float f) {
|
| 378 |
+
double d;
|
| 379 |
+
ggml_fp16_t r;
|
| 380 |
__asm__( /* xscvdphp can work on double or single precision */
|
| 381 |
"xscvdphp %0,%2\n"
|
| 382 |
"mffprd %1,%0\n" :
|