masahi commented on code in PR #14150:
URL: https://github.com/apache/tvm/pull/14150#discussion_r1123793756


##########
python/tvm/contrib/cutlass/gen_tensor_op.py:
##########
@@ -652,4 +653,25 @@ def get_batch_stride(stride_annot, arg0_idx, arg1_idx, 
arg0_axis_idx, arg1_axis_
         code = instantiate_conv2d_template(attrs, func_args)
         return CodegenResult(code, headers)
 
+    elif "attention" in func_name:
+        headers.append("kernel_forward.h")
+        attrs["num_batches"] = str(int(annotations["num_batches"]))
+        attrs["num_queries"] = str(int(annotations["num_queries"]))
+        attrs["num_keys"] = str(int(annotations["num_keys"]))
+        attrs["num_heads"] = str(int(annotations["num_heads"]))
+        attrs["head_dim"] = str(int(annotations["head_dim"]))

Review Comment:
   Feel free to update `substitute_template(...)` to get rid off 
`str(int(...))` stuff. I can also do it later otherwise.



-- 
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]

Reply via email to