The questions of using TVM

I meet this question when I repeat the example from MLC: @tvm.script.ir_module AttributeError: module ‘tvm.script’ has no attribute ‘ir_module’ TVM version is 0.8.dev0. The code is as follows:

import numpy as np

import tvm

from tvm.ir.module import IRModule

from tvm.script import tir as T

@tvm.script.ir_module

class MyModule:

@T.prim_func

def main(a: T.handle, b: T.handle):
    # We exchange data between function by handles, which are similar to pointer.
    T.func_attr({"global_symbol": "main", "tir.noalias": True})
    # Create buffer from handles.
    A = T.match_buffer(a, (8,), dtype="float32")
    B = T.match_buffer(b, (8,), dtype="float32")
    for i in range(8):
        # A block is an abstraction for computation.
        with T.block("B"):
            # Define a spatial block iterator and bind it to value i.
            vi = T.axis.spatial(8, i)
            B[vi] = A[vi] + 1.0

ir_module = MyModule

print(type(ir_module))

print(ir_module.script())