Skip to content

Commit 14dbd5f

Browse files
juntaoclaude
andcommitted
Include mlx.metallib in release zip and bootstrap extraction
MLX compiles Metal GPU kernels into mlx.metallib at build time. The binary has a hardcoded fallback path (from the CI build directory) that won't exist on user machines. MLX's runtime search checks for a colocated mlx.metallib (same directory as the binary) first, so shipping it alongside the binary ensures it's always found. Signed-off-by: Michael Yuan <michael@secondstate.io> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e64d0f1 commit 14dbd5f

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ jobs:
9797
run: |
9898
mkdir ${{ matrix.asset-name }}
9999
cp target/release/asr ${{ matrix.asset-name }}/asr
100+
if [ "${{ matrix.backend }}" = "mlx" ]; then
101+
cp target/release/build/qwen3_asr-*/out/lib/mlx.metallib ${{ matrix.asset-name }}/
102+
fi
100103
zip -r ${{ matrix.asset-name }}.zip ${{ matrix.asset-name }}
101104
102105
- name: Upload release asset

skills/bootstrap.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ download_binary() {
100100
unzip -q "${temp_dir}/${zip_name}" -d "${temp_dir}"
101101
cp "${temp_dir}/${asset_name}/asr" "${SCRIPTS_DIR}/asr"
102102
chmod +x "${SCRIPTS_DIR}/asr"
103+
# Copy mlx.metallib if present (macOS MLX backend)
104+
if [ -f "${temp_dir}/${asset_name}/mlx.metallib" ]; then
105+
cp "${temp_dir}/${asset_name}/mlx.metallib" "${SCRIPTS_DIR}/mlx.metallib"
106+
fi
103107

104108
rm -rf "$temp_dir"
105109
echo "Binary installed to ${SCRIPTS_DIR}/asr" >&2

0 commit comments

Comments
 (0)