(
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"),
)
| 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( |
no test coverage detected