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] add Tuple pattern #3596

Merged
merged 8 commits into from
Sep 5, 2019
Merged

Conversation

MarisaKirisame
Copy link
Contributor

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 Reviewers.
@icemelon9 @slyubomirsky @Yulun-Yao @vinx13 can you guys help review?

Copy link
Contributor

@u99127 u99127 left a comment

Choose a reason for hiding this comment

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

Minor nits , probably one with copyright year needs to be double checked.

@@ -18,7 +18,7 @@
*/

/*!
* Copyright (c) 2018 by Contributors
* Copyright (c) 2019 by Contributors
Copy link
Contributor

Choose a reason for hiding this comment

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

In my experience such changes are usually a year range. does the ASF not need a year range here ?
git blame suggests this file was created in 2018, thus this should read copyright 2018-19 IIUC. However IANAL and the exact definition depends on project policy.

@tqchen , any thoughts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for catching this! I just wrongly assume to use the latest year whenever I update a file.

@@ -18,8 +18,8 @@
*/

/*!
* Copyright (c) 2018 by Contributors
* \file src/tvm/relay/pattern_functor.cc
* Copyright (c) 2019 by Contributors
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is a typo - however @tqchen needs to comment as he was the last one who changed this. The first commit came in 2019, so you are safe here.

@slyubomirsky
Copy link
Contributor

Very glad you added this; it will certainly be a convenience. I will give a detailed review later.

@slyubomirsky
Copy link
Contributor

High-level feedback that you probably guessed: We'll need to add test cases for the features where you added tuple patterns (type inference, the interpreter, match completeness checking, partial eval, etc.)

@MarisaKirisame
Copy link
Contributor Author

@slyubomirsky I changed the prelude zip, so it work for ti/interpreter/vm/match completeness without any additional code. Partial Eval also PE all prelude function so at least the code run and typecheck.

@jroesch
Copy link
Member

jroesch commented Jul 24, 2019

@slyubomirsky can you explicitly review cc @wweic

@slyubomirsky
Copy link
Contributor

Again, I think specific unit tests (for alpha-equality, match completeness, etc.), not just by changing the implementations of prelude functions (though that's handy too), would still be very important to have.

I have read over the implementation of the feature and do not have any issues with it, but I stress the importance of having separate tests since if something goes wrong or a later feature interacts badly with what we have, specific tests will make it much easier to identify what went wrong.

Copy link
Contributor

@wweic wweic left a comment

Choose a reason for hiding this comment

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

lgtm. I agree with @slyubomirsky, it would be good to add specific test cases for features introduced in the PR. It's also good enhancement to documentation of the features, people can learn what's the minimal example of tuple pattern.

@kevinthesun kevinthesun added the status: need update need update based on feedbacks label Jul 25, 2019
@jroesch
Copy link
Member

jroesch commented Sep 1, 2019

@MarisaKirisame and @slyubomirsky can you guys get this one over the finish line this week?

@MarisaKirisame
Copy link
Contributor Author

@jroesch @slyubomirsky I had added the test. it is now good.

@MarisaKirisame
Copy link
Contributor Author

@vinx13 @slyubomirsky @wweic @junrushao1994 can you guys give another round of review?

@slyubomirsky
Copy link
Contributor

Thanks for adding tests. LGTM

@jroesch jroesch merged commit 08d9220 into apache:master Sep 5, 2019
@MarisaKirisame MarisaKirisame deleted the tuple-pattern branch September 5, 2019 23:48
MarisaKirisame added a commit to MarisaKirisame/tvm that referenced this pull request Sep 7, 2019
* implement tuple pattern

* add tuple pattern

* lint;

* lint

* lint

* fix error

* fix

* add test
wweic pushed a commit to wweic/tvm that referenced this pull request Sep 16, 2019
* implement tuple pattern

* add tuple pattern

* lint;

* lint

* lint

* fix error

* fix

* add test
wweic pushed a commit to wweic/tvm that referenced this pull request Sep 16, 2019
* implement tuple pattern

* add tuple pattern

* lint;

* lint

* lint

* fix error

* fix

* add test
wweic pushed a commit to neo-ai/tvm that referenced this pull request Sep 16, 2019
* implement tuple pattern

* add tuple pattern

* lint;

* lint

* lint

* fix error

* fix

* add test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: need update need update based on feedbacks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants