diff --git a/python/tvm/relay/testing/py_converter.py b/python/tvm/relay/testing/py_converter.py index 50f473aea1f2..1ec85faea619 100644 --- a/python/tvm/relay/testing/py_converter.py +++ b/python/tvm/relay/testing/py_converter.py @@ -88,7 +88,7 @@ def convert(self, prog: Expr): body.append(Assign([Name(OUTPUT_VAR_NAME, Store())], prog_body)) global __MAJOR__, __MINOR__ - if __MAJOR__ == 3 and __MINOR__ == 8: + if __MAJOR__ == 3 and __MINOR__ >= 8: return ast.fix_missing_locations(ast.Module(body=body, type_ignores=[])) else: return ast.fix_missing_locations(ast.Module(body=body)) @@ -224,7 +224,7 @@ def create_def(self, func_name: str, arguments: [str], body): inner_args = [ast.arg(argument, None) for argument in arguments] global __MAJOR__, __MINOR__ - if __MAJOR__ == 3 and __MINOR__ == 8: + if __MAJOR__ == 3 and __MINOR__ >= 8: arguments = ast.arguments([], inner_args, None, [], [], None, []) else: arguments = ast.arguments(inner_args, None, [], [], None, [])