Metal shim and context module #2

Closed
opened 2026-05-10 12:01:07 +02:00 by sleepy · 1 comment
Owner

Implement the Metal runtime bridge:

  • src/metal/shim.m — Minimal Obj-C for MTLDevice/MTLCommandQueue creation
  • src/metal/context.zig — MTLCommandBuffer pool, encoder management
  • src/metal/buffer.zig — MTLBuffer allocation from mmap'd weights
  • src/metal/pipeline.zig — MTLComputePipelineState cache
  • src/metal/README.md

Acceptance criteria:

  • Can create Metal device and command queue
  • Command buffer pooling works
  • Pipeline state caching works
  • Unit tests pass
  • No file exceeds ~400 lines

Max 2 attempts.

Implement the Metal runtime bridge: - src/metal/shim.m — Minimal Obj-C for MTLDevice/MTLCommandQueue creation - src/metal/context.zig — MTLCommandBuffer pool, encoder management - src/metal/buffer.zig — MTLBuffer allocation from mmap'd weights - src/metal/pipeline.zig — MTLComputePipelineState cache - src/metal/README.md Acceptance criteria: - Can create Metal device and command queue - Command buffer pooling works - Pipeline state caching works - Unit tests pass - No file exceeds ~400 lines Max 2 attempts.
Author
Owner

Merged via squash in PR #10.

  • Metal shim with C ABI (device, queue, buffer, pipeline)
  • Command buffer pooling
  • Pipeline state caching
  • 11/11 tests pass
  • zig build , zig build test , zig build lint
Merged via squash in PR #10. - Metal shim with C ABI (device, queue, buffer, pipeline) - Command buffer pooling - Pipeline state caching - 11/11 tests pass - `zig build` ✅, `zig build test` ✅, `zig build lint` ✅
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sleepy/sleepy-llm#2
No description provided.