cyx-6 commented on code in PR #14649:
URL: https://github.com/apache/tvm/pull/14649#discussion_r1169354988
##########
tests/python/relax/test_codegen_cutlass.py:
##########
@@ -676,10 +676,23 @@ def get_relax_stacked_attention_module(qkv, b, s, n, h,
h_v, bias=None, qk_scale
if bias is not None:
bias = R.arg("bias", R.Tensor(bias.shape, dtype))
with R.dataflow() as frame:
- qkv_tuple = R.split(qkv, [n * h, n * h * 2], axis=2)
- q = R.reshape(qkv_tuple[0], [b, s, n, h])
- k = R.reshape(qkv_tuple[1], [b, s, n, h])
- v = R.reshape(qkv_tuple[2], [b, s, n, h_v])
+ if op == "split":
+ qkv_tuple = R.split(qkv, [n * h, n * h * 2], axis=2)
+ q = R.reshape(qkv_tuple[0], [b, s, n, h])
+ k = R.reshape(qkv_tuple[1], [b, s, n, h])
+ v = R.reshape(qkv_tuple[2], [b, s, n, h_v])
+ elif op == "strided_slice":
+ qkv_tuple = R.split(qkv, [n * h, n * h * 2], axis=2)
Review Comment:
yes, this is useless from copy and paste.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]