sunggg commented on code in PR #15837:
URL: https://github.com/apache/tvm/pull/15837#discussion_r1344388136
##########
python/tvm/contrib/cutlass/build.py:
##########
@@ -862,10 +862,13 @@ def handle_matmul(self, f, op_type):
def handle_attention(self, f, op_type):
"""Annotate an attention op."""
signature = _extract_relax_function_signature(f)
+
if _get_call_node(f.body, "relax.nn.attention") is not None:
op_attrs = _get_call_node(f.body, "relax.nn.attention").attrs
elif _get_call_node(f.body, "relax.nn.attention_bias") is not None:
op_attrs = _get_call_node(f.body, "relax.nn.attention_bias").attrs
+ elif _get_call_node(f.body, "relax.nn.attention_var_len") is not None:
Review Comment:
Or another alternative could be having a single attention with a superset of
attributes for different variants of attention. Based on how the attributes are
set, we may be able to differentiate different attentions.
--
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]