1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| tvm.script.ir_module class Module: @T.prim_func def te_matmul(rxplaceholder: T.Buffer[(128, 128), "float32"], rxplaceholder_1: T.Buffer[(128, 128), "float32"], matmul: T.Buffer[(128, 128), "float32"]) -> None: ... @T.prim_func def te_relu(rxplaceholder: T.Buffer[(128, 128), "float32"], relu: T.Buffer[(128, 128), "float32"]) -> None: ... @R.function def main(A: Tensor((128, 128), "float32"), B: Tensor((128, 128), "float32")) -> Tensor(None, "float32", ndim = 2): with R.dataflow(): lv = R.call_tir(te_matmul, (A, B), (128, 128), dtype="float32") lv1 = R.call_tir(te_relu, (lv,), (128, 128), dtype="float32") gv: Tensor((128, 128), "float32") = lv1 R.output(gv) return gv
|