-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[RELAY]reshape_like #1950
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
Conversation
a770faf to
dd0f642
Compare
src/relay/ir/type.cc
Outdated
| } | ||
|
|
||
| IndexExpr TensorTypeNode::Size() const { | ||
| IndexExpr size = make_const(Int(64), 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.
directly product from shape[0], when the shape.size() equals 0, return make_const(Int(32), 1);
|
@siju-samuel please request reviews from https://github.com/dmlc/tvm/blob/master/CONTRIBUTORS.md#reviewers |
|
@MarisaKirisame @slyubomirsky @nishi-t @junrushao1994 could you please help to review this PR. Thanks. |
src/relay/op/tensor/transform.cc
Outdated
| * \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. |
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.
cannot be -> has not been
it might be resolved later
src/relay/op/tensor/transform.cc
Outdated
|
|
||
|
|
||
| /*! | ||
| * \brief ReshapeLikeRel Output type and shape relation evaluation function. |
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.
I dont really get this line
354586f to
52041cf
Compare
include/tvm/relay/type.h
Outdated
| v->Visit("span", &span); | ||
| } | ||
|
|
||
| /*! \brief Return product of elements in the 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.
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.
797b5ea to
57bfe43
Compare
|
cc @tqchen could you please check once. |
|
Thanks @siju-samuel @MarisaKirisame @jroesch 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 others in the community.