From efe1cf4f53a1a8562657a8644ea4cef782fdb9b8 Mon Sep 17 00:00:00 2001 From: Eric Lunderberg Date: Fri, 12 Jan 2024 22:19:08 +0000 Subject: [PATCH] [Bugfix][Cutlass] Check if function attributes is None This commit updates the cutlass annotator to check if `relax.Function.attrs` is `None` before attempting to access it. --- python/tvm/contrib/cutlass/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/tvm/contrib/cutlass/build.py b/python/tvm/contrib/cutlass/build.py index 1c0a30c62d91..80169f51640e 100644 --- a/python/tvm/contrib/cutlass/build.py +++ b/python/tvm/contrib/cutlass/build.py @@ -977,7 +977,7 @@ def handle_norm(self, f, op_type): return f.with_attrs(attrs) def visit_function_(self, f): - if "Composite" not in f.attrs: + if f.attrs is None or "Composite" not in f.attrs: body = super().visit_expr(f.body) return relax.Function(f.params, body, f.ret_struct_info, f.is_pure, f.attrs, f.span)