You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/05/16 08:13:44 UTC

[GitHub] [tvm] masahi opened a new pull request, #11324: [TVMScript] Support inlined function call as a sugar

masahi opened a new pull request, #11324:
URL: https://github.com/apache/tvm/pull/11324

   ```
   def index_map(i, j):
       return (i // 16, j // 16, *shared_16x16_to_ldmatrix_32x8_layout(i % 16, j % 16) )
   
   sch.transform_layout(C_warp, 0, "read", index_map)
   ```


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] masahi merged pull request #11324: [TVMScript] Support inlined function call as a sugar

Posted by GitBox <gi...@apache.org>.
masahi merged PR #11324:
URL: https://github.com/apache/tvm/pull/11324


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] masahi commented on pull request #11324: [TVMScript] Support inlined function call as a sugar

Posted by GitBox <gi...@apache.org>.
masahi commented on PR #11324:
URL: https://github.com/apache/tvm/pull/11324#issuecomment-1129615626

   @Hzfengsy Thanks for the suggestion. I wrapped the func call with `try / catch`, and added error report dump via `report_error`. 
   
   I couldn't make a good test case, but this is an example of an err msg when a users try a funky function call:
   ```
   error: Error occured when invoking the function sqrt: 
   loop of ufunc does not support argument 0 of type Var which has no callable sqrt method
    --> test_tvmscript_syntax_sugar.py:344:19
        |  
    344 |              ind = sqrt(i)
        |                    ^^^^^^^
   note: run with `TVM_BACKTRACE=1` environment variable to display a backtrace.
   ``` 


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] wrongtest commented on pull request #11324: [TVMScript] Support inlined function call as a sugar

Posted by GitBox <gi...@apache.org>.
wrongtest commented on PR #11324:
URL: https://github.com/apache/tvm/pull/11324#issuecomment-1127411076

   That seems so cool. Is this functionality under the scope of meta-programming?


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] masahi commented on pull request #11324: [TVMScript] Support inlined function call as a sugar

Posted by GitBox <gi...@apache.org>.
masahi commented on PR #11324:
URL: https://github.com/apache/tvm/pull/11324#issuecomment-1127445899

   > Is this functionality under the scope of meta-programming?
   
   yeah, I'd say this is the simplest kind of a macro. I'm literally calling the python function inside the parser.  


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org