Skip to content

metal: drop the MFA triangular-constant probe test- fails on M1 Pro (macOS 26.5.2) and an M4 (macOS 26.6). - #2546

Open
czoli1976 wants to merge 1 commit into
sonos:mainfrom
czoli1976:fix/metal-mfa-causal
Open

metal: drop the MFA triangular-constant probe test- fails on M1 Pro (macOS 26.5.2) and an M4 (macOS 26.6).#2546
czoli1976 wants to merge 1 commit into
sonos:mainfrom
czoli1976:fix/metal-mfa-causal

Conversation

@czoli1976

@czoli1976 czoli1976 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

test_mfa_attention_causal_const_is_noop fails on macOS 26.5 — the probe it
locks down (MFA's triangular function constant alone does not mask) no longer
holds there, so cargo test -p tract-metal is red on that OS:

causal probe: lower(j<=i)=0.51085 upper(j>=i)=0.49934 full=0.08356
Error: expected triangular-const-alone == full attn, got full=0.08356253

Nothing in tract depends on it: MetalMfaSdpa passes the constant as false
and realizes causal as a bottom-right aligned [Sq,Sk] additive mask, so the
test only pinned a driver detail that Apple has since changed. This drops it and
spends the coverage where it matters instead — test_metal_mfa_sdpa_op gains
causal with Sq != Sk and a decode step against a cache, both of which the
suite was missing. Both are bit-exact against the host reference here
(max_abs=0.000000), i.e. the fused path itself is fine on macOS 26.5.

Not one machine's quirk: the probe fails with the same numbers on an M1 Pro
(macOS 26.5.2) and an M4 (macOS 26.6).

No behaviour change. cargo test -p tract-metal --release on the M1 Pro:
76 passed, 0 failed (was 1 failed); fmt and clippy clean.

🍍

The test asserted that the MFA `triangular` function constant alone does
not mask, which stopped holding on macOS 26.5: the probe now sees causal
output and the metal suite fails there. Nothing depends on that behaviour
- MetalMfaSdpa always passes the constant as false and realizes causal as
a bottom-right aligned additive mask - so the probe only pinned a driver
detail. Drop it, and cover the cases that do matter with causal Sq != Sk
and a decode step against a cache.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@czoli1976 czoli1976 changed the title metal: drop the MFA triangular-constant probe test (fails on macOS 26.5) metal: drop the MFA triangular-constant probe test- fM1 Pro (macOS 26.5.2) and an M4 (macOS 26.6). Aug 1, 2026
@czoli1976 czoli1976 changed the title metal: drop the MFA triangular-constant probe test- fM1 Pro (macOS 26.5.2) and an M4 (macOS 26.6). metal: drop the MFA triangular-constant probe test- fails on M1 Pro (macOS 26.5.2) and an M4 (macOS 26.6). Aug 1, 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