cconvey opened a new issue, #13765:
URL: https://github.com/apache/tvm/issues/13765

   This lies somewhere between feature-request and bug-report.
   
   When writing TVMScript, it's sometimes necessary to specify certain PrimFunc 
attribute values.  E.g.: 
   ``` python
   @T.prim_func
           def foo():
               T.func_attr(
                   {
                       "global_symbol": "foo",
                       "tir.noalias": True,
                       "calling_conv": 1,  # tvm::CallingConv::kCPackedFunc
                   }
               )
   
      ...
   ```
   
   At least one such attribute is `"calling_conv"`, which in C++ land maps to 
the `tvm::CallingConv` enumeration.
   
   AFAIK, TVM currently provides no support for specifying the `"calling_conv"` 
value symbolically.  Instead, the developer needs to somehow discover that `1` 
corresponds to `kCPackedFunc`, and _hope_ that remains true in perpetuity.
   
   This will make TVMScript harder to maintain, and possibly subject to 
maintenance/debugging headaches.  TVM should support something more robust.  
For example, maybe something like `"calling_conv" : "CPackedFunc"`, or 
`"calling_conv" : T.CallingConv.kCPackedFunc`.
   
   
   
   ### Triage
   
   * needs-triage
   


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