File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -851,17 +851,15 @@ static inline __vector float __lzs_f16cx4_load(const ggml_fp16_t * x) {
851851 tmp [i ] = GGML_FP16_TO_FP32 (x [i ]);
852852 }
853853
854- // TODO: change to const pointer instead (see #12846)
855- // this is only a workaround to the compile error but its unreadable
856- return vec_xl (0 , & (tmp [0 ]));
854+ // note: keep type-cast here to prevent compiler bugs (see #12846)
855+ return vec_xl (0 , (const float * )(tmp ));
857856}
858857
859858static inline void __lzs_f16cx4_store (ggml_fp16_t * x , __vector float y ) {
860859 float arr [4 ];
861860
862- // TODO: change to const pointer instead (see #12846)
863- // this is only a workaround to the compile error but its unreadable
864- vec_xst (y , 0 , & (arr [0 ]));
861+ // note: keep type-cast here to prevent compiler bugs (see #12846)
862+ vec_xst (y , 0 , (float * )(arr ));
865863
866864 for (int i = 0 ; i < 4 ; i ++ ) {
867865 x [i ] = GGML_FP32_TO_FP16 (arr [i ]);
You can’t perform that action at this time.
0 commit comments