#============================================================ # Patch to fix vDSP problem with older Macs. # # Issue: https://github.com/ggml-org/whisper.cpp/issues/3072 #============================================================ --- ggml/src/ggml-cpu/binary-ops.cpp +++ ggml/src/ggml-cpu/binary-ops.cpp 2025-04-22 21:28:48 @@ -70,13 +70,17 @@ // TODO - avoid the f32-only check using type 'trait' lookup tables and row-based src-to-float conversion functions if (src0->type == GGML_TYPE_F32 && src1->type == GGML_TYPE_F32 && dst->type == GGML_TYPE_F32) { if (op == op_add) { - vDSP_op = vDSP_vadd; + /* Patch: apply cast here. */ + vDSP_op = reinterpret_cast(vDSP_vadd); } else if (op == op_sub) { - vDSP_op = vDSP_vsub; + /* Patch: apply cast here. */ + vDSP_op = reinterpret_cast(vDSP_vsub); } else if (op == op_mul) { - vDSP_op = vDSP_vmul; + /* Patch: apply cast here. */ + vDSP_op = reinterpret_cast(vDSP_vmul); } else if (op == op_div) { - vDSP_op = vDSP_vdiv; + /* Patch: apply cast here. */ + vDSP_op = reinterpret_cast(vDSP_vdiv); } } #endif