Skip to content

Find SwiftPM metallib bundle near test binary#3767

Closed
RNT56 wants to merge 1 commit into
ml-explore:mainfrom
RNT56:upstream-pr/swiftpm-metallib-bundle-lookup
Closed

Find SwiftPM metallib bundle near test binary#3767
RNT56 wants to merge 1 commit into
ml-explore:mainfrom
RNT56:upstream-pr/swiftpm-metallib-bundle-lookup

Conversation

@RNT56

@RNT56 RNT56 commented Jun 25, 2026

Copy link
Copy Markdown

Summary

  • search the test binary directory and its parents for the SwiftPM resource bundle
  • handle the case where Bundle.allBundles already contains the SwiftPM resource bundle itself
  • keep the existing main-bundle, bundle-resource, framework, colocated, and METAL_PATH fallback behavior

Validation

  • git diff --check upstream/main...upstream-pr/swiftpm-metallib-bundle-lookup
  • downstream mlx-swift SwiftPM resource branch builds MLX and produces platform-specific default.metallib resources; runtime loading of those resources depends on this lookup change

@RNT56

RNT56 commented Jun 25, 2026

Copy link
Copy Markdown
Author

This is the small MLX-side lookup change needed for the SwiftPM default.metallib resource work in mlx-swift.

It keeps the existing lookup behavior and adds the SwiftPM resource bundle case. That should let the mlx-swift packaging PR use an upstream MLX commit once this lands.

Local validation:

  • git diff --check upstream/main...upstream-pr/swiftpm-metallib-bundle-lookup
  • downstream mlx-swift packaging branch builds MLX and produces platform-specific default.metallib resources

@RNT56

RNT56 commented Jun 25, 2026

Copy link
Copy Markdown
Author

I realized this is effectively the same automatic lookup approach as #3562, which was already superseded by the explicit metallib path API in #3597. I’ll close this and move the SwiftPM packaging work to that API route instead.

@RNT56 RNT56 closed this Jun 25, 2026
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