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

Build failing with Metal #512

Open
grorge123 opened this issue Dec 5, 2024 · 2 comments · May be fixed by #513
Open

Build failing with Metal #512

grorge123 opened this issue Dec 5, 2024 · 2 comments · May be fixed by #513

Comments

@grorge123
Copy link

When I update to the newest commit 9578fdc, I encounter the build issue for metal. But it works for no metal or cuda.

  • Compile command
cmake .. -DSD_METAL=ON
cmake --build . --config Release
  • Cmake error message
stable-diffusion.cpp/./ggml_extend.hpp:1143:13: error: use of undeclared identifier 'ggml_backend_metal_set_n_cb'
            ggml_backend_metal_set_n_cb(backend, n_threads);

stable-diffusion.cpp/stable-diffusion.cpp:164:9: error: use of undeclared identifier 'ggml_backend_metal_log_set_callback'
        ggml_backend_metal_log_set_callback(ggml_log_callback_default, nullptr);

@stduhpf
Copy link
Contributor

stduhpf commented Dec 5, 2024

I can confirm. I think it could be related to the fact that ggml-metal.m was moved from ggml/src/ to ggml/src/ggml-metal/
(ggerganov/ggml@813a12c, ggerganov/ggml@a131a82)

Edit: ggml_backend_metal_log_set_callback() got removed by ggerganov/ggml@7588f54

@stduhpf
Copy link
Contributor

stduhpf commented Dec 5, 2024

I can build by replacing references to ggml_backend_metal_log_set_callback() with ggml_log_set() and commenting out the call to ggml_backend_metal_set_n_cb(). I couldn't find what to replace it with (edit: It should just be removed ggerganov/llama.cpp#9698).

@stduhpf stduhpf linked a pull request Dec 5, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants