MCPcopy Create free account
hub / github.com/apache/tvm / cast

Method cast

tests/python/relax/test_transform_fuse_ops.py:1658–1666  ·  view source on GitHub ↗
(lv: T.Buffer((T.int64(16), T.int64(16)), "float16"), compute: T.Buffer((T.int64(16), T.int64(16)), "float32"))

Source from the content-addressed store, hash-verified

1656 class Before:
1657 @T.prim_func(private=True, s_tir=True)
1658 def cast(lv: T.Buffer((T.int64(16), T.int64(16)), "float16"), compute: T.Buffer((T.int64(16), T.int64(16)), "float32")):
1659 T.func_attr({"tirx.noalias": True})
1660 # with T.sblock("root"):
1661 for i0, i1 in T.grid(T.int64(16), T.int64(16)):
1662 with T.sblock("compute"):
1663 v_i0, v_i1 = T.axis.remap("SS", [i0, i1])
1664 T.reads(lv[v_i0, v_i1])
1665 T.writes(compute[v_i0, v_i1])
1666 compute[v_i0, v_i1] = T.Cast("float32", lv[v_i0, v_i1])
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")):

Callers 15

batch_decode_paged_kvFunction · 0.45
batch_tree_attnFunction · 0.45
tree_attn_paged_kvFunction · 0.45
compute_s_gemmFunction · 0.45
compute_o_gemmFunction · 0.45
convert_pool2dMethod · 0.45
convert_dequantizeMethod · 0.45
te_geluFunction · 0.45
te_erfFunction · 0.45

Calls 1

remapMethod · 0.80

Tested by

no test coverage detected