From 229b21fa8c021f70d6c2ac93d6bcf161df666e12 Mon Sep 17 00:00:00 2001 From: Alex Cheema Date: Fri, 13 Feb 2026 09:41:08 -0800 Subject: [PATCH] fix: skip MTP integration test when Metal kernel unavailable on CI The test_mtp_module_with_mock_model test forces GPU evaluation via mx.isnan(), which triggers steel_gemm kernel compilation. This fails on CI's aarch64-darwin runner due to Metal toolchain incompatibility. Skip gracefully instead of failing. Co-Authored-By: Claude Opus 4.6 --- .../engines/mlx/mtp/tests/test_speculative_decode.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/exo/worker/engines/mlx/mtp/tests/test_speculative_decode.py b/src/exo/worker/engines/mlx/mtp/tests/test_speculative_decode.py index dbebe052..48846589 100644 --- a/src/exo/worker/engines/mlx/mtp/tests/test_speculative_decode.py +++ b/src/exo/worker/engines/mlx/mtp/tests/test_speculative_decode.py @@ -249,5 +249,12 @@ class TestIntegration: assert logits.shape == (1, 1, 100) assert new_hidden.shape == (1, 1, config.hidden_size) # Verify outputs are valid (not NaN) - assert not mx.any(mx.isnan(logits)) - assert not mx.any(mx.isnan(new_hidden)) + # mx.isnan forces GPU evaluation which may fail on CI runners + # with incompatible Metal toolchains (e.g. missing steel_gemm kernels) + try: + assert not mx.any(mx.isnan(logits)) + assert not mx.any(mx.isnan(new_hidden)) + except RuntimeError as e: + if "Unable to load kernel" in str(e): + pytest.skip(f"Metal kernel not available on this device: {e}") + raise