Skip to content

Replace init_backend with ggml_backend_init_best#1259

Open
WhyNotHugo wants to merge 1 commit intoleejet:masterfrom
WhyNotHugo:simplified-loading
Open

Replace init_backend with ggml_backend_init_best#1259
WhyNotHugo wants to merge 1 commit intoleejet:masterfrom
WhyNotHugo:simplified-loading

Conversation

@WhyNotHugo
Copy link

ggml now provides a function to initialise the best available backend. Use that instead of duplicating similar logic locally.

ggml now provides a function to initialise the best available backend.
Use that instead of duplicating similar logic locally.
@wbruna
Copy link
Contributor

wbruna commented Feb 7, 2026

Looks like #1184 would supersede this.

@WhyNotHugo
Copy link
Author

My goal with this (and a few follow-up PRs) is to allow compiling stable-diffusion in a way that's usable with ggml compiled with GGML_BACKEND_DL, so that it can be shipped with distribution packages which ship separate packages for each backend.

For this, I'd avoid the backend-specific functions (e.g.: ggml_backend_cpu_init) and replace them with calls such as ggml_backend_dev_by_name("CPU").

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 this pull request may close these issues.

2 participants