Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation Error: Use of Undeclared Identifier 'MTLGPUFamilyApple7' and 'MTLGPUFamilyApple6' #2717

Open
iabheejit opened this issue Jan 9, 2025 · 0 comments

Comments

@iabheejit
Copy link

I'm encountering compilation errors when trying to build whisper.cpp on macOS. The errors are related to the use of undeclared identifiers MTLGPUFamilyApple7 and MTLGPUFamilyApple6 in the ggml-metal.m file.

Expected Behavior: The project should compile successfully without any errors.

Actual Behavior: The following errors are encountered during compilation:

[ 15%] Built target ggml-base
[ 17%] Building C object ggml/src/ggml-metal/CMakeFiles/ggml-metal.dir/ggml-metal.m.o
//whisper/whisper.cpp/ggml/src/ggml-metal/ggml-metal.m:63:73: error:
use of undeclared identifier 'MTLGPUFamilyApple7'
ctx->has_simdgroup_reduction = [ctx->mtl_device supportsFamily:MTLGPUFamilyApple7];
^
//whisper/whisper.cpp/ggml/src/ggml-metal/ggml-metal.m:66:65: error:
use of undeclared identifier 'MTLGPUFamilyApple7'
ctx->has_simdgroup_mm = [ctx->mtl_device supportsFamily:MTLGPUFamilyApple7];
^
//whisper/whisper.cpp/ggml/src/ggml-metal/ggml-metal.m:69:60: error:
use of undeclared identifier 'MTLGPUFamilyApple6'
ctx->has_bfloat |= [ctx->mtl_device supportsFamily:MTLGPUFamilyApple6];
^
//whisper/whisper.cpp/ggml/src/ggml-metal/ggml-metal.m:2251:44: error:
use of undeclared identifier 'MTLGPUFamilyApple7'
if ([device supportsFamily:MTLGPUFamilyApple7] &&
^
//whisper/whisper.cpp/ggml/src/ggml-metal/ggml-metal.m:2594:44: error:
use of undeclared identifier 'MTLGPUFamilyApple7'
if ([device supportsFamily:MTLGPUFamilyApple7] &&
^
5 errors generated.
make[2]: *** [ggml/src/ggml-metal/CMakeFiles/ggml-metal.dir/ggml-metal.m.o] Error 1
make[1]: *** [ggml/src/ggml-metal/CMakeFiles/ggml-metal.dir/all] Error 2
make: *** [all] Error 2
Environment:

macOS version: 13.7.1 (22H221)
Xcode version: Version 15.2 (15C500b)
whisper.cpp commit hash: b82d305

Any guidance on how to resolve this would be greatly appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant