Skip to content
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

Merged
merged 4 commits into from
Oct 21, 2018

Conversation

siju-samuel
Copy link
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.

def sum(data, axis=None, keepdims=False, exclude=False):
"""Computes the sum of array elements over given axes.

Example::
Copy link
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

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
Member

Choose a reason for hiding this comment

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

.describe(R"code(Computes the min of array elements over given axes.

)code" TVM_ADD_FILELINE)
.set_num_inputs(1)
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
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
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.

result : relay.Expr
The computed result.
"""

Copy link
Member

Choose a reason for hiding this comment

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

new new line

result : relay.Expr
The computed result.
"""

Copy link
Member

Choose a reason for hiding this comment

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

no new line

if __name__ == "__main__":
test_binary_op()
test_cmp_type()
test_binary_int_broadcast()
test_where()
test_arg_reduce()
test_multibox_prior()
Copy link
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