Skip to content

Add mlx_metal_set_metallib_path() C API#117

Draft
olilarkin wants to merge 1 commit into
ml-explore:mainfrom
olilarkin:metallib-path
Draft

Add mlx_metal_set_metallib_path() C API#117
olilarkin wants to merge 1 commit into
ml-explore:mainfrom
olilarkin:metallib-path

Conversation

@olilarkin

@olilarkin olilarkin commented May 28, 2026

Copy link
Copy Markdown

What

Exposes the new mlx::core::metal::set_metallib_path() through the C interface as mlx_metal_set_metallib_path(const char* path), following the existing error-handling convention of the other mlx_metal_* wrappers.

Why

Required so Swift / other C consumers can set a custom mlx.metallib path. See the use case in the tracking issue.

Depends on

Companion PRs

Part of a three-PR chain (C++ → C → Swift):

  1. Add metal::set_metallib_path() to override the metallib search path mlx#3597 — C++ set_metallib_path
  2. Add mlx_metal_set_metallib_path() C API #117 — this PR (C API wrapper)
  3. Add GPU.setMetallibPath() for plugin bundle support mlx-swift#416 — Swift GPU.setMetallibPath()

Tracking issue: ml-explore/mlx-swift#415.

Exposes the new set_metallib_path() function through the C interface.
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.

1 participant