[TIR][FIX] check args size when creating prim_func by runtime::Registry#13809
[TIR][FIX] check args size when creating prim_func by runtime::Registry#13809Hzfengsy merged 1 commit intoapache:mainfrom
Conversation
|
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.
Generated by tvm-bot |
|
cc. @vinx13 |
|
Could you please add a regression test? |
Sure, I guess I should test |
|
After looking at the codebase again, it would be great if we can ensure this PackedFunc has two args. Another approach is adding Keeping PackedFunction stable and minimal will benefit the registry system and user experience. If you want to call it from cpp side, we have API here, and no need to call PackedFunction Also cc @junrushao |
|
That sounds reasonable to me :-) |
|
sorry i approved pre-maturely, after seeing @Hzfengsy 's comment, i agree with the accessment |
ddb5811 to
5dd3d96
Compare
|
I followed @Hzfengsy 's suggestion. And since no need to call PackedFunc, also testcases like |
default value for
index_dtype_overrideis null, so it would be better if the registry block ofte.CreatePrimFunccould check args size.