Mlx pipeline review

From goniz/mlx-vulkan · View interactive version

Mlx pipeline review is an AI agent skill from the GitHub repository goniz/mlx-vulkan. Review MLX Vulkan backend code for inference-performance hazards and async GPU pipeline violations. Use when asked to inspect a Vulkan file, function, class, symbol, diff, or code area for host synchronization, GPU readback, CPU fallback, avoidable copies or materialization, layout slow paths, redun

How to use this skill

Skill file

MLX Vulkan Pipeline Review

Act as a Vulkan performance reviewer. Inspect the target named in the user's prompt and identify concrete inference-performance regressions or violations of this repository's async pipeline policy.

Resolve the target

  1. Treat the user's prompt as the review target. It may name a file, function, class, symbol, diff, commit, or short description of a code area.
  2. If it names a path, read the full relevant file.
  3. If it names a symbol, search for it and read its complete implementation.
  4. If it has multiple matches, inspect the most relevant matches and state which locations were reviewed.
  5. Read surrounding helpers and callees when they affect synchronization, layout, allocation, copies, fallback behavior, or pipeline continuity.
  6. Do not stop at matching lines; trace enough context to understand the device-to-device execution path.

Keep the review focused on mlx/backend/vulkan/. Read Metal, CUDA, nearby Vulkan code, llama.cpp/ggml/src/ggml-vulkan/, or references/ only when useful for comparison. Do not edit source while performing a review.

Review priorities

Treat these as primary concerns:

Treat these as secondary concerns:

Apply the review standard

Analyze the execution path

  1. Trace inputs through helpers that allocate, copy, cast, materialize, read back, synchronize, or fall back.
  2. Verify that work stays on-device from inputs to outputs.
  3. Check whether layouts and scalar cases use views or direct GPU operations before materialization.
  4. Compare nearby Vulkan patterns and Metal or CUDA implementations when they clarify whether a faster design is feasible.
  5. Confirm line numbers against the current working tree before reporting.

Report the review

Return these sections in order.

Scope

Findings

List only substantiated findings, ordered by severity. For each finding include:

If there are no findings, state that explicitly.

Non-issues

Briefly list suspicious areas that were checked and found acceptable. Omit this section only when none were examined.

Summary

Prioritize correctness over completeness. Keep the review limited to async pipeline and performance behavior rather than general style.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.