Skip to content

[RELAY]Reduce ops sum/max/min/mean/prod#1927

Merged
tqchen merged 4 commits intoapache:masterfrom
siju-samuel:relay_reduce_ops
Oct 21, 2018
Merged

[RELAY]Reduce ops sum/max/min/mean/prod#1927
tqchen merged 4 commits intoapache:masterfrom
siju-samuel:relay_reduce_ops

Conversation

@siju-samuel
Copy link
Copy Markdown
Member

#1799
Level 4 Ops

  • sum
  • max
  • min
  • mean
  • prod

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.

Comment thread 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::
Copy link
Copy Markdown
Member

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

Comment thread 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) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread 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)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.set_attrs_type_key,

@tqchen tqchen added the status: need update need update based on feedbacks label Oct 18, 2018
@tqchen tqchen self-assigned this Oct 18, 2018
@tqchen
Copy link
Copy Markdown
Member

tqchen commented Oct 20, 2018

please rebase against master after #1934 to make use of the newly introduced API and add test-case to make sure text format works.

Comment thread python/tvm/relay/op/reduce.py Outdated
result : relay.Expr
The computed result.
"""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new new line

Comment thread python/tvm/relay/op/reduce.py Outdated
result : relay.Expr
The computed result.
"""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no new line

Comment thread tests/python/relay/test_op_level4.py Outdated
test_binary_int_broadcast()
test_where()
test_arg_reduce()
test_multibox_prior()
Copy link
Copy Markdown
Member

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

@tqchen tqchen merged commit 02a8be1 into apache:master Oct 21, 2018
@tqchen tqchen added status: accepted and removed status: need update need update based on feedbacks labels Oct 21, 2018
FrozenGene pushed a commit to FrozenGene/tvm that referenced this pull request Dec 27, 2018
wweic pushed a commit to neo-ai/tvm that referenced this pull request Feb 20, 2019
wweic pushed a commit to neo-ai/tvm that referenced this pull request Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants