From c4eb30a04c2c32211ec01077eed028ca9f805714 Mon Sep 17 00:00:00 2001 From: Francis Lam Date: Wed, 17 Jul 2024 13:27:04 -0700 Subject: [PATCH] test/test_linearizer_failures: add a new beautiful_mnist one (#5531) * test/test_linearizer_failures: add a new beautiful_mnist one this one is from a DEPTH=2 fuzz_linearizer search * add GPU to test_failure_40 --------- Co-authored-by: chenyu --- test/test_linearizer_failures.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test_linearizer_failures.py b/test/test_linearizer_failures.py index b3c67f7671..92b567cded 100644 --- a/test/test_linearizer_failures.py +++ b/test/test_linearizer_failures.py @@ -331,6 +331,13 @@ class TestLinearizerFailures(unittest.TestCase): for axis in [0,1,2,3,4,5]: opts = [Opt(op=OptOps.TC, axis=axis, amt=2)] helper_test_lin(Kernel(ast), opts=opts, failed_platforms=[]) + def test_failure_40(self): + # beautiful mnist kernel number 3: + # fuzz: PYTHONPATH=. METAL=1 FUZZ_ALL_ACTIONS=1 DEPTH=2 DEBUG=2 FUZZ_NTH=3 python3 ./test/external/fuzz_linearizer.py --logfile /tmp/beautiful_mnist.kernels.txt + ast = LazyOp(op=MetaOps.SINK, src=(LazyOp(op=BufferOps.STORE, src=(LazyOp(op=BinaryOps.ADD, src=(LazyOp(op=ReduceOps.SUM, src=(LazyOp(op=BufferOps.CONST, src=(), arg=ConstBuffer(val=1, dtype=dtypes.int, st=ShapeTracker(views=(View(shape=(60001, 119999), strides=(0, 0), offset=0, mask=((0, 60001), (59999, 119999)), contiguous=False), View(shape=(60000, 60000), strides=(1, 120000), offset=0, mask=None, contiguous=False))))),), arg=(1,)), LazyOp(op=BufferOps.CONST, src=(), arg=ConstBuffer(val=-1, dtype=dtypes.int, st=ShapeTracker(views=(View(shape=(60000, 1), strides=(0, 0), offset=0, mask=None, contiguous=False),))))), arg=None),), arg=MemBuffer(idx=0, dtype=dtypes.int, st=ShapeTracker(views=(View(shape=(60000, 1), strides=(1, 0), offset=0, mask=None, contiguous=True),)))),), arg=None) + for amt in [16,32]: + opts = [Opt(op=OptOps.GROUPTOP, axis=0, amt=amt), Opt(op=OptOps.UNROLL, axis=0, amt=0)] + helper_test_lin(Kernel(ast), opts=opts, failed_platforms=["METAL", "GPU"]) # END METAL=1 ./examples/beautiful_mnist.py failures if __name__ == '__main__':