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

Method decode

tests/python/relax/test_codegen_cutlass.py:1267–1297  ·  view source on GitHub ↗
(
            A: T.Buffer((T.int64(64), T.int64(64)), "int8"),
            B: T.Buffer((T.int64(128),), "float16"),
            decode_1: T.Buffer((T.int64(64), T.int64(128)), "float16"),
        )

Source from the content-addressed store, hash-verified

1265 class Module:
1266 @T.prim_func(s_tir=True)
1267 def decode(
1268 A: T.Buffer((T.int64(64), T.int64(64)), "int8"),
1269 B: T.Buffer((T.int64(128),), "float16"),
1270 decode_1: T.Buffer((T.int64(64), T.int64(128)), "float16"),
1271 ):
1272 T.func_attr({"tirx.noalias": True})
1273 # with T.sblock("root"):
1274 for i, j in T.grid(T.int64(64), T.int64(128)):
1275 with T.sblock("decode"):
1276 v_i, v_j = T.axis.remap("SS", [i, j])
1277 T.reads(A[v_i, v_j // T.int64(2)], B[v_j])
1278 T.writes(decode_1[v_i, v_j])
1279 decode_1[v_i, v_j] = (
1280 T.Cast(
1281 "float16",
1282 T.shift_right(
1283 T.shift_left(
1284 T.bitwise_and(
1285 T.shift_right(
1286 T.Cast("int32", A[v_i, v_j // T.int64(2)]),
1287 T.Cast("int32", v_j % T.int64(2)) * 4,
1288 ),
1289 15,
1290 ),
1291 28,
1292 ),
1293 28,
1294 ),
1295 )
1296 * B[v_j]
1297 )
1298
1299 @T.prim_func(s_tir=True)
1300 def encode(

Callers 5

postFunction · 0.45
_requestMethod · 0.45
comment_failureMethod · 0.45
_compile_ccFunction · 0.45
mainFunction · 0.45

Calls 1

remapMethod · 0.80

Tested by

no test coverage detected