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]reshape_like #1950

Merged
merged 4 commits into from
Oct 27, 2018
Merged

[RELAY]reshape_like #1950

merged 4 commits into from
Oct 27, 2018

Conversation

siju-samuel
Copy link
Member

#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 others in the community.

@@ -22,6 +22,14 @@ TensorType TensorTypeNode::Scalar(DataType dtype) {
return TensorTypeNode::make({}, dtype);
}

IndexExpr TensorTypeNode::Size() const {
IndexExpr size = make_const(Int(64), 1);
Copy link
Member

Choose a reason for hiding this comment

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

directly product from shape[0], when the shape.size() equals 0, return make_const(Int(32), 1);

@tqchen
Copy link
Member

tqchen commented Oct 23, 2018

@siju-samuel
Copy link
Member Author

@MarisaKirisame @slyubomirsky @nishi-t @junrushao1994 could you please help to review this PR. Thanks.

* \param num_inputs Number of input types in the args.
* \param attrs The additional attributes of the operator.
* \param reporter The reporter to report solution to.
* \return false if This relation cannot be resolved. true if this relation has been resolved.
Copy link
Contributor

Choose a reason for hiding this comment

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

cannot be -> has not been
it might be resolved later

@@ -320,6 +320,61 @@ Example::
.set_support_level(3)
.add_type_rel("Reshape", ReshapeRel);


/*!
* \brief ReshapeLikeRel Output type and shape relation evaluation function.
Copy link
Contributor

Choose a reason for hiding this comment

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

I dont really get this line

@@ -82,6 +82,9 @@ class TensorTypeNode : public BaseTensorTypeNode {
v->Visit("span", &span);
}

/*! \brief Return product of elements in the shape */
Copy link
Member

@jroesch jroesch Oct 24, 2018

Choose a reason for hiding this comment

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

Could we add one more line to the docs such as (d_1, d_2, ..., d_n) -> d1 * d_2 ... * d_n.

Pytorch does a good job of this and I think its useful for users when reading the code.

@siju-samuel
Copy link
Member Author

cc @tqchen could you please check once.

@tqchen tqchen merged commit 62a94c7 into apache:master Oct 27, 2018
@tqchen
Copy link
Member

tqchen commented Oct 27, 2018

Thanks @siju-samuel @MarisaKirisame @jroesch this is now merged

eqy pushed a commit to eqy/tvm that referenced this pull request Oct 29, 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.

4 participants