-
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]Reduce ops sum/max/min/mean/prod #1927
Conversation
python/tvm/relay/op/reduce.py
Outdated
def sum(data, axis=None, keepdims=False, exclude=False): | ||
"""Computes the sum of array elements over given axes. | ||
|
||
Example:: |
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.
remove example for now, as this is not executable for now
src/relay/op/tensor/reduce.cc
Outdated
if (data == nullptr) return false; | ||
CHECK(static_cast<int>(data->shape.size()) != 0); | ||
std::vector<IndexExpr> in_shape; | ||
for (auto i : data->shape) { |
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.
src/relay/op/tensor/reduce.cc
Outdated
.describe(R"code(Computes the min of array elements over given axes. | ||
|
||
)code" TVM_ADD_FILELINE) | ||
.set_num_inputs(1) |
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.
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.
.set_attrs_type_key,
21acafe
to
620fd9e
Compare
please rebase against master after #1934 to make use of the newly introduced API and add test-case to make sure text format works. |
7e8c505
to
bf62afc
Compare
python/tvm/relay/op/reduce.py
Outdated
result : relay.Expr | ||
The computed result. | ||
""" | ||
|
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.
new new line
python/tvm/relay/op/reduce.py
Outdated
result : relay.Expr | ||
The computed result. | ||
""" | ||
|
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.
no new line
tests/python/relay/test_op_level4.py
Outdated
if __name__ == "__main__": | ||
test_binary_op() | ||
test_cmp_type() | ||
test_binary_int_broadcast() | ||
test_where() | ||
test_arg_reduce() | ||
test_multibox_prior() |
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.
multibox_prior does not belong to this file
d2a39df
to
755ae67
Compare
#1799
Level 4 Ops
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 others in the community.