From 3d7c35d615c51598b9991ced4a74d982dbda677a Mon Sep 17 00:00:00 2001 From: geohotstan <135171913+geohotstan@users.noreply.github.com> Date: Sun, 17 Aug 2025 06:24:49 +0800 Subject: [PATCH] add fuse and tc opt bug repro (#11695) * FINALLY HAVE A SMALL REPRO OH BOY * show failure in CI * cleaner? * 1 possible fix * Revert "1 possible fix" This reverts commit 9e0fd215dd165566f5e69ad2613a03e0a8ab515b. --- test/test_softmax_fusion.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/test_softmax_fusion.py b/test/test_softmax_fusion.py index 9a7efbb651..f4b848e41a 100644 --- a/test/test_softmax_fusion.py +++ b/test/test_softmax_fusion.py @@ -117,6 +117,15 @@ class TestFuse(unittest.TestCase): c = (a.sum(axis=1) + b.sum(axis=1)).fuse() self.assertListEqual(c.tolist(), [30]*16) + @unittest.skipUnless(Device.DEFAULT == "METAL", "METAL TC") + @unittest.expectedFailure # TODO: fix + def test_fuse_and_tc_opt(self): + A = Tensor.randn(8, 8).realize() + B = Tensor.randn(8, 8).realize() + C = Tensor.ones(1, 8, 8).pad(((1,1), None, None),).sum(0) + out = (C + (A @ B)).fuse() + out.realize() + class TestSoftmaxFusion(unittest.TestCase): @classmethod def setUpClass(cls):