support lowering CONST(VIEW) in lowerer (#8785)

This commit is contained in:
qazal
2025-01-28 05:04:41 -05:00
committed by GitHub
parent 80089536e5
commit e8be8a5835
2 changed files with 7 additions and 3 deletions

View File

@@ -92,8 +92,7 @@ class TestVerifyAST(unittest.TestCase):
buf = UOp(Ops.DEFINE_GLOBAL, dtypes.float.ptr(), (), 0)
a = UOp.const(dtypes.int, 0).replace(src=(UOp(Ops.VIEW, dtypes.void, (UOp(Ops.DEVICE, arg="CLANG"),), ShapeTracker.from_shape(())),))
st = UOp.store(buf, ShapeTracker.from_shape(()).to_uop(), a.cast(dtypes.float))
# lowerer asserts because it does not remove ShapeTracker on CONST(VIEW(DEVICE))
with self.assertRaises(AssertionError): helper_test_verify_ast(st)
helper_test_verify_ast(st)
if __name__ == '__main__':
unittest.main()