-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[TIR][FIX] check args size when creating prim_func by runtime::Registry #13809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.