tqchen commented on code in PR #13569:
URL: https://github.com/apache/tvm/pull/13569#discussion_r1085734468


##########
include/tvm/ir/function.h:
##########
@@ -63,6 +63,43 @@ enum class CallingConv : int {
    * - Implementation: defined by device runtime(e.g. runtime/cuda)
    */
   kDeviceKernelLaunch = 2,
+  /*!
+   * \brief For functions only called by other functions within the same IR 
module.
+   *
+   * This calling convention exists to support one PrimFunc calling another 
PrimFunc
+   * within the same IRModule.
+   *
+   * Overview / Purpose:
+   *
+   *   - This calling convention is intended only for PrimFuncs whose callers 
reside in
+   *     the same IRModule.  This is the only supported use case.
+   *
+   *   - The details of the calling convention may change frequently as TVM 
evolves.
+   *     Therefore users are discouraged from attempting to use this calling 
convention
+   *     outside of the supported use case(s).
+   *
+   * Current mechanics / usage requirements:
+   *
+   *   - A PrimFunc with this calling convention will NOT undergo any of the 
signature
+   *     transformations provided by the MakePackedAPI pass.
+   *
+   *   - Supported use cases, and their corresponding unit tests, are all 
expressed as
+   *     TVMScript.
+   *
+   *   - The callsite must use `T.call_extern`.

Review Comment:
   Alternatively, perhaps we can clarify it as C calling conv, effectively pass 
things as they are, which seems to match the behavior of call_extern and 
current behavior.



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