Repository navigation
Fixes for macOS 27.2, where v0.4.0 fails to compile native attention and returns wrong results from pivoted LU, plus a round of signal-processing, linear-algebra and special-function additions. 63 commits since v0.4.0.
macOS 27.2
If you are on macOS 27.2, upgrade: v0.4.0 is affected by both of these.
- Native bridge programs compile again. The framework now rejects a bridge bundle with two or more weight files (
verifyBundleAtPath: invalid model), which brokeaf.sdpa, causal decoder blocks and fused ONNX attention. Such a bundle is retried with its weights merged into one file (#309). - A slice offset on the last axis no longer loses its offset. Two such slices at different offsets feeding matmuls in one fused program returned the wrong column or failed to compile on an M5 Pro, which made
linalg.lu_pivoted,det,slogdet,solveandinvreturn wrong or non-finite results. The compiler now lowers a last-axis-offsetslice_by_size(and socropand static gather) off the last axis;ANEFORGE_ROUTE_WIDTH_SLICES=0restores the old lowering (#311, #314).bench/slice_offset_probe.pyshows whether a machine has the underlying behaviour (#313).
Verified on an M5 Pro under macOS 27.2.1: the full on-device suite and the corpus are green. Other chips on 27.2 have not been checked. See the new "macOS 27.2" section of the FAQ.
Signal processing
dsp.hilbert(analytic signal, #265),dsp.detrend(#278), and thesawtooth,squareandchirpgenerators (#264).- Windows:
flattop,blackmanharris,nuttall,cosine,gaussian(#268). fft.irfft(#261).
Linear algebra and special functions
linalg.kron(#262),linalg.polar(#259),linalg.matrix_rankandlinalg.cond(#260).special.digammaandspecial.beta(#250),special.bessel_j1andspecial.bessel_i1(#251).
Models and LLMs
- MPNet encoders (all-mpnet-base-v2) in the sentence-transformers drop-in (#255); RoBERTa-family encoders apply the
pad_id + 1position offset (#257). load_resnetaccepts a Hugging Face repo id (#256).- Qwen2/2.5 attention biases are loaded; the dense adapter dropped them (#253).
- Deep small-dimension models no longer hit the ANE op ceiling in decode (#254).
- MoE top-k selects exactly k experts on exact fp16 ties (#298).
ONNX
MeanVarianceNormalization,Hardmaxand the hyperbolic ops (#263).onnx.coverage_reportlists a model's unsupported ops before you try to compile it (#269).
Compiler
- The compile cache is reused instead of forcing recompilation (#284).
- A
compress=request that falls back to a wider encoding now warns (#249).
Benchmarks
- Rooflines for M1 (MacBook Air), M2 Max, M4 Pro, M4 Max and M6, and a re-run of the M1 MacBook Pro.
- ANE power from the SMC rail where powermetrics reports none (#294), with follow-up fixes for chips whose rail or IOReport layout differs (#305, #307, #308).
- A run whose idle baseline was not idle is flagged, and its perf/W is withheld from the table (#306).
- Result files are strict JSON: no bare
NaN(#307, #312).
Examples
- Conway's Game of Life (#272), the Mandelbrot set (#273) and the Lorenz attractor (#274), each stepped on the ANE.
- The whisper.cpp backend exports a usable encoder bundle (#275, #276).
Install: pip install -U aneforge (pretrained loaders: pip install "aneforge[models]").