message(STATUS "Accelerate framework found")
set(WHISPER_EXTRA_LIBS ${WHISPER_EXTRA_LIBS} ${ACCELERATE_FRAMEWORK})
- set(WHISPER_EXTRA_FLAGS ${WHISPER_EXTRA_FLAGS} -DGGML_USE_ACCELERATE)
+ set(WHISPER_EXTRA_FLAGS ${WHISPER_EXTRA_FLAGS} -DGGML_USE_ACCELERATE -DACCELERATE_NEW_LAPACK -DACCELERATE_LAPACK_ILP64)
else()
message(FATAL_ERROR "Accelerate framework not found")
endif()
# Mac M1 - include Accelerate framework
ifeq ($(UNAME_S),Darwin)
CFLAGS += -DGGML_USE_ACCELERATE
+ CFLAGS += -DACCELERATE_NEW_LAPACK
+ CFLAGS += -DACCELERATE_LAPACK_ILP64
LDFLAGS += -framework Accelerate
endif
endif
static struct ggml_cgraph * whisper_build_graph_conv(
whisper_context & wctx,
- whisper_state & wstate,
- const int mel_offset) {
+ whisper_state & wstate) {
const auto & model = wctx.model;
const auto & hparams = model.hparams;
{
auto & alloc = wstate.alloc_conv.alloc;
- ggml_cgraph * gf = whisper_build_graph_conv(wctx, wstate, mel_offset);
+ ggml_cgraph * gf = whisper_build_graph_conv(wctx, wstate);
if (!ggml_gallocr_alloc_graph(alloc, gf)) {
// should never happen as we pre-allocate the memory
{
bool ok = whisper_allocr_graph_init(state->alloc_conv, ctx->backend,
[&]() {
- return whisper_build_graph_conv(*ctx, *state, 0);
+ return whisper_build_graph_conv(*ctx, *state);
});
if (!ok) {