MCPcopy Index your code
hub / github.com/FlashSampling/FlashSampling / run_test

Function run_test

src/fused_mm_sampling/persistent_matmul.py:771–779  ·  view source on GitHub ↗
(expect, fn, a, b, label, enabled=True)

Source from the content-addressed store, hash-verified

769
770
771def run_test(expect, fn, a, b, label, enabled=True):
772 print(f" {label}: ...", end="")
773 if enabled:
774 actual = fn(a, b)
775 passed = torch.allclose(expect, actual.to(expect.dtype), atol=1.0)
776 icon = "✅" if passed else "❌"
777 else:
778 icon = "⭕"
779 print(f"\r {label}: {icon} ")
780
781
782def validate(M, N, K, dtype):

Callers 1

validateFunction · 0.85

Calls 1

fnFunction · 0.50

Tested by

no test coverage detected