Skip to content

Failed assertion in ggml-metal.m #1435

@bjnortier

Description

@bjnortier

I have been testing the SwiftUI example app and I'm getting the following error in ggml-metal.m when running on iPhone and Mac:

-[MTLDebugComputeCommandEncoder setThreadgroupMemoryLength:atIndex:]:817: failed assertion `length(4) must be a multiple of 16 bytes.'

at this line:
https://github.com/ggerganov/whisper.cpp/blob/0463028bc2a5774fe7361c8ac37bef440725bcd7/ggml-metal.m#L1033

since nth is 32 and 32/32*4=4 is not a multiple of 16.

If I remove the /32 it works but I'm not sure what the correct value should be.

Also, running the app without the debugger attached doesn't seem to generate a problem (the assertion doesn't fail).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions