Uh oh!
There was an error while loading. Please reload this page.
[TVMScript] Allow parameters in @T.prim_func definition - #11062
[TVMScript] Allow parameters in @T.prim_func definition#11062Lunderberg wants to merge 2 commits into
Conversation
This extends the existing `@T.prim_func` decorator to accept a keyword-only argument `@T.prim_func(params=param_dict)`, defining a string to object mapping. This mapping allows variables inside a PrimFunc to refer to values set outside the `PrimFunc` definition.
Lunderberg
commented
Apr 19, 2022
I was thinking of this as complementary to the existing The advantage of using the |
junrushao
commented
Apr 19, 2022
@Hzfengsy has some preliminary work on metaprogramming. Would you mind sharing? |
Lunderberg
commented
Apr 21, 2022
@junrushao1994 Not sure if you're asking me or @Hzfengsy on it, but I'm certainly okay with sharing. This was useful in some test cases I was sketching out, and figured it would be good to start a conversation on it. |
junrushao
commented
Apr 21, 2022
Oh sorry for the confusion! I was asking Siyuan |
Hzfengsy
commented
Apr 22, 2022
Here is a related PR: #11097 |
Lunderberg
commented
Apr 26, 2022
Closing in favor of #11097, any deltas can be added in later PRs. |
This extends the existing
@T.prim_funcdecorator to accept a keyword-only argument@T.prim_func(params=param_dict), defining a string to object mapping. This mapping can be used to refer to external parameters from within thePrimFuncdefinition.