-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[RELAY]prelu op support #2016
[RELAY]prelu op support #2016
Conversation
@srkreddy1238 @nishi-t @slyubomirsky @yuruofeifei @MarisaKirisame Could you please help in reviewing this PR. TIA |
LGTM, good test coverage |
src/relay/op/nn/nn.cc
Outdated
CHECK(ndim == 4) | ||
<< "Input data should be 4D, but got " << ndim; | ||
|
||
CHECK(reporter->Assert(param->axis < make_const(Int(64), ndim))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should avoid the abusive use of symbolic Assert, specifically, since param->axis is int, which means we can directly check int relations. Assert is only needed if one of the input expression is symbolic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be a common mistake pattern in recent PRs, can you add more comments to Assert to actually document the possible misuse cases and the intention of the API?
src/relay/op/nn/nn.cc
Outdated
CHECK(param != nullptr); | ||
|
||
size_t ndim = data->shape.size(); | ||
CHECK(ndim == 4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This operator don't need to have this restriction
0f73318
to
6e9984b
Compare
Thanks @slyubomirsky @siju-samuel this is now merged |
#1799
Thanks for contributing to TVM! Please refer to guideline https://docs.tvm.ai/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from Reviewers.