Skip to content

Conversation

@ifeanyipossibilities
Copy link

@ifeanyipossibilitiesifeanyipossibilities commented Aug 10, 2024

@github-actionsgithub-actionsbot added examples ggml changes relating to the ggml tensor library for machine learning Apple Metal https://en.wikipedia.org/wiki/Metal_(API) labels Aug 10, 2024
@ifeanyipossibilities
Copy link
Author

Added support to select GPU using metal on Apple Intel or Apple Silicon using --main-gpu index

Copy link
Member

@ggerganovggerganov left a 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

@mofosynemofosyne added the Review Complexity : Low Trivial changes to code that most beginner devs (or those who want a break) can tackle. e.g. UI fix label Aug 10, 2024

GGML_CALL ggml_backend_tggml_backend_reg_metal_init(constchar * params, void * user_data){
returnggml_backend_metal_init();
returnggml_backend_metal_init((int) (intptr_t) user_data);
Copy link
Member

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?

@slaren
Copy link
Member

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.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Apple Metalhttps://en.wikipedia.org/wiki/Metal_(API)examplesggmlchanges relating to the ggml tensor library for machine learningReview Complexity : LowTrivial changes to code that most beginner devs (or those who want a break) can tackle. e.g. UI fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@ifeanyipossibilities@slaren@ggerganov@mofosyne