-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Added support to select GPU using metal on Apple Intel or Apple Silicon using --main-gpu index #8962
base: master
Are you sure you want to change the base?
Added support to select GPU using metal on Apple Intel or Apple Silicon using --main-gpu index #8962
Conversation
ifeanyipossibilities
commented
Aug 10, 2024
•
edited
Loading
edited
- I have read the contributing guidelines
- Self-reported review complexity:
- Low
- Medium
- High
Added support to select GPU using metal on Apple Intel or Apple Silicon using --main-gpu index |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deviceIndex
->device
- use
snake_case
- use 4 spaces indentation
@@ -3295,8 +3334,8 @@ void ggml_backend_metal_capture_next_compute(ggml_backend_t backend) { | |||
GGML_CALL ggml_backend_t ggml_backend_reg_metal_init(const char * params, void * user_data); // silence warning | |||
|
|||
GGML_CALL ggml_backend_t ggml_backend_reg_metal_init(const char * params, void * user_data) { | |||
return ggml_backend_metal_init(); | |||
return ggml_backend_metal_init((int) (intptr_t) user_data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is the user_data
set?
This is not the correct way to implement multiple device support. It would need a different buffer type for each device, and it would need to register one backend for each device. |