diff --git a/python/tvm/tir/stmt.py b/python/tvm/tir/stmt.py index 2a2c652c52399..de200d5eabdd5 100644 --- a/python/tvm/tir/stmt.py +++ b/python/tvm/tir/stmt.py @@ -326,15 +326,17 @@ class Allocate(Stmt): """ def __init__(self, buffer_var, dtype, extents, condition, body, annotations=None, span=None): + if annotations is None: + annotations = dict() self.__init_handle_by_constructor__( - _ffi_api.Allocate, + _ffi_api.Allocate, # type: ignore buffer_var, dtype, extents, condition, body, annotations, - span, # type: ignore + span, )