Consequence of the resolver defect in the companion issue about optimization='metal'.
Because plv, ccorr, coh, imcoh, envcorr and powcorr have no Metal kernel and silently fall back to _compute_numpy, these six tests compare NumPy against NumPy. They pass unconditionally on any macOS with PyObjC installed, and would keep passing if a Metal kernel were added tomorrow and were completely wrong:
tests/test_sync.py:180 test_plv_metal_vs_numpy
tests/test_sync.py:287 test_ccorr_metal_vs_numpy
tests/test_sync.py:365 test_coh_metal_vs_numpy
tests/test_sync.py:440 test_imcoh_metal_vs_numpy
tests/test_sync.py:763 test_envcorr_metal_vs_numpy
tests/test_sync.py:839 test_powcorr_metal_vs_numpy
hypyp/sync/README.md:172-181 correctly marks Metal as -- for exactly these six metrics, so the tests contradict the documentation.
Additionally, tests/test_sync.py:290 documents a CCorr Metal shader that has never existed in any commit:
Uses Kahan summation with fastMath=OFF to preserve IEEE-754 compliance.
The strings Kahan and fastMath appear nowhere in hypyp/sync/kernels/, and there is no CCorr Metal shader in the history. This docstring is actively misleading — it is what makes the current state look like deleted work rather than a resolver bug.
Suggested fix: delete the six tests (or repurpose them as torch/MPS tests), remove the fabricated docstring, and — most importantly — add assert m._backend == 'metal' to the remaining real Metal value tests (pli, wpli, accorr). That assertion is what turns a silent fallback into a loud failure and prevents this class of vacuous test from reappearing.
Consequence of the resolver defect in the companion issue about
optimization='metal'.Because
plv,ccorr,coh,imcoh,envcorrandpowcorrhave no Metal kernel and silently fall back to_compute_numpy, these six tests compare NumPy against NumPy. They pass unconditionally on any macOS with PyObjC installed, and would keep passing if a Metal kernel were added tomorrow and were completely wrong:tests/test_sync.py:180test_plv_metal_vs_numpytests/test_sync.py:287test_ccorr_metal_vs_numpytests/test_sync.py:365test_coh_metal_vs_numpytests/test_sync.py:440test_imcoh_metal_vs_numpytests/test_sync.py:763test_envcorr_metal_vs_numpytests/test_sync.py:839test_powcorr_metal_vs_numpyhypyp/sync/README.md:172-181correctly marks Metal as--for exactly these six metrics, so the tests contradict the documentation.Additionally,
tests/test_sync.py:290documents a CCorr Metal shader that has never existed in any commit:The strings
KahanandfastMathappear nowhere inhypyp/sync/kernels/, and there is no CCorr Metal shader in the history. This docstring is actively misleading — it is what makes the current state look like deleted work rather than a resolver bug.Suggested fix: delete the six tests (or repurpose them as torch/MPS tests), remove the fabricated docstring, and — most importantly — add
assert m._backend == 'metal'to the remaining real Metal value tests (pli,wpli,accorr). That assertion is what turns a silent fallback into a loud failure and prevents this class of vacuous test from reappearing.