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

Conditions updated to cover better user scenarios #4951

Merged
merged 7 commits into from
Mar 5, 2020

Conversation

ANSHUMAN87
Copy link
Contributor

@tqchen , @ZihengJiang, @jroesch, @merrymercy

Sorry if i miss any one who is relevant to this component.

Copy link
Member

@tqchen tqchen left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution, please add a regression test case to show what the new scenario did the PR cover

@tqchen tqchen added status: need review status: need test case need test cases to cover the change labels Feb 27, 2020
@ANSHUMAN87
Copy link
Contributor Author

Thanks for the contribution, please add a regression test case to show what the new scenario did the PR cover

@tqchen : I have uploaded test cases for the scenarios. Thanks!

@tqchen
Copy link
Member

tqchen commented Feb 29, 2020

cc @slyubomirsky @MarisaKirisame @zhiics please help to take a look

@MarisaKirisame
Copy link
Contributor

There is a neat trick to test for commutative bug.
In the test file, redefine alpha_equal to call type_analysis.alpha_equal twice, assert that the result is the same (whether argument flipped or not), then return the result.
Can you do this?

@ANSHUMAN87
Copy link
Contributor Author

@MarisaKirisame , @zhiics : Thanks for your efforts in reviewing code and your valuable comments. I have handled all your comments. Please correct me if i am mistaken anyplace. Thanks!

@MarisaKirisame
Copy link
Contributor

can you, in tests/python/relay/test_pass_alpha_equal.py
def test_alpha_equal(x, y):
xy = alpha_equal(x, y)
yx = alpha_equal(y, x)
assert xy == yx
return xy

and use test_alpha_equal for those tests?

@ANSHUMAN87
Copy link
Contributor Author

can you, in tests/python/relay/test_pass_alpha_equal.py
def test_alpha_equal(x, y):
xy = alpha_equal(x, y)
yx = alpha_equal(y, x)
assert xy == yx
return xy

and use test_alpha_equal for those tests?

@MarisaKirisame : Thanks for such detailed description. I got your point from the last comment. But one of these scenarios is special. It was not possible to hit from python test cases. That is the reason i added in cpp test case. And i believe that the unit test cases should be in cpp, not in python, as the back-end implementations are in cpp. Python test cases should be used for functional tests. But that is my belief. I hope i didn't misunderstood your comment. Please help me clarify if i am mistaken. Thanks a lot!

@MarisaKirisame
Copy link
Contributor

I agree that they should be in C++, but can you add such function hook there?

@ANSHUMAN87
Copy link
Contributor Author

I agree that they should be in C++, but can you add such function hook there?

@MarisaKirisame : Thanks! I have made changes as per your comments, please check!

Copy link
Member

@zhiics zhiics left a comment

Choose a reason for hiding this comment

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

LGTM. One nitpick.

tests/python/relay/test_pass_alpha_equal.py Outdated Show resolved Hide resolved
@ANSHUMAN87
Copy link
Contributor Author

@zhiics : Thanks for approving PR! I have made changes as per your feedback. Please check. Thanks!

@tqchen tqchen merged commit fe74b37 into apache:master Mar 5, 2020
@tqchen tqchen added status: accepted and removed status: need review status: need test case need test cases to cover the change labels Mar 5, 2020
@tqchen
Copy link
Member

tqchen commented Mar 9, 2020

This PR is among one of the PRs affected by the github squash commit bug. We take every contribution serious in the TVM community. The community has decided to use revert/redo approach to amend the contributions as per #5015

@ANSHUMAN87 Please let us know if you would like us to revert the PR and resend the contribution. Thank you

@tqchen tqchen mentioned this pull request Mar 9, 2020
5 tasks
@ANSHUMAN87
Copy link
Contributor Author

This PR is among one of the PRs affected by the github squash commit bug. We take every contribution serious in the TVM community. The community has decided to use revert/redo approach to amend the contributions as per #5015

@ANSHUMAN87 Please let us know if you would like us to revert the PR and resend the contribution. Thank you

@tqchen : Thanks a lot! Please revert the merged one. I will raise again.

@masahi
Copy link
Member

masahi commented Mar 10, 2020

ping @tqchen

@tqchen
Copy link
Member

tqchen commented Mar 10, 2020

#5032

tqchen added a commit that referenced this pull request Mar 11, 2020
@tqchen
Copy link
Member

tqchen commented Mar 11, 2020

@ANSHUMAN87 the revert PR has been merged, please send another PR to add the patch back :)

@ANSHUMAN87
Copy link
Contributor Author

@ANSHUMAN87 the revert PR has been merged, please send another PR to add the patch back :)

@tqchen: Thanks a lot! I have raised new PR now(#5043). Please check and approve. Thanks!

trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Apr 16, 2020
* Conditions updated to cover better user scenarios

* [1] New test case added

* [2] New test case added

* [3] Proper variable name used

* [4] Review Comments handled

* [5] Review comments handled

* [6] Review comments handled
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Apr 16, 2020
zhiics pushed a commit to neo-ai/tvm that referenced this pull request Apr 17, 2020
* Conditions updated to cover better user scenarios

* [1] New test case added

* [2] New test case added

* [3] Proper variable name used

* [4] Review Comments handled

* [5] Review comments handled

* [6] Review comments handled
zhiics pushed a commit to neo-ai/tvm that referenced this pull request Apr 17, 2020
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.

5 participants