MCPcopy Index your code
hub / github.com/apache/tvm / matmul

Method matmul

tests/python/relax/test_transform_fuse_ops.py:1669–1679  ·  view source on GitHub ↗
(x: T.Buffer((T.int64(16), T.int64(16)), "float32"), lv2: T.Buffer((T.int64(16), T.int64(16)), "float32"), T_matmul: T.Buffer((T.int64(16), T.int64(16)), "float32"))

Source from the content-addressed store, hash-verified

1667
1668 @T.prim_func(private=True, s_tir=True)
1669 def matmul(x: T.Buffer((T.int64(16), T.int64(16)), "float32"), lv2: T.Buffer((T.int64(16), T.int64(16)), "float32"), T_matmul: T.Buffer((T.int64(16), T.int64(16)), "float32")):
1670 T.func_attr({"tirx.noalias": True})
1671 # with T.sblock("root"):
1672 for ax0, ax1, k in T.grid(T.int64(16), T.int64(16), T.int64(16)):
1673 with T.sblock("T_matmul"):
1674 v_ax0, v_ax1, v_k = T.axis.remap("SSR", [ax0, ax1, k])
1675 T.reads(x[v_ax0, v_k], lv2[v_k, v_ax1])
1676 T.writes(T_matmul[v_ax0, v_ax1])
1677 with T.init():
1678 T_matmul[v_ax0, v_ax1] = T.float32(0)
1679 T_matmul[v_ax0, v_ax1] = T_matmul[v_ax0, v_ax1] + x[v_ax0, v_k] * lv2[v_k, v_ax1]
1680
1681 @R.function
1682 def main(x: R.Tensor((16, 16), dtype="float32"), packed_params: R.Tuple(R.Tensor((16, 16), dtype="float16"), R.Tensor((16, 16), dtype="float16"))) -> R.Tensor((16, 16), dtype="float32"):

Callers 15

_addmmMethod · 0.45
_baddbmmMethod · 0.45
_lstm_cell_unrollMethod · 0.45
_gru_cell_unrollMethod · 0.45
_sparse_mmMethod · 0.45
_sparse_addmmMethod · 0.45
_dot_generalMethod · 0.45
matmulFunction · 0.45
forwardMethod · 0.45
_impl_v13Method · 0.45
_impl_v1Method · 0.45
_impl_v13Method · 0.45

Calls 2

remapMethod · 0.80
initMethod · 0.45

Tested by

no test coverage detected