-
Couldn't load subscription status.
- Fork 3.7k
[Relay][Frontend] Support TF Gather #2935
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
Conversation
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.
LGTM
|
|
||
| compare_tf_with_tvm([np_data, np_indices], ['in_data:0', 'indices:0'], 'Gather:0') | ||
|
|
||
| def test_forward_gather_v1(): |
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.
| def test_forward_gather_v1(): | |
| from nose.tools import nottest | |
| @nottest | |
| def test_forward_gather_v1(): |
This will skip the unit test. Integ test is failing because it's running your test.
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.
how about adding if condition for the test? if int(tf.__version__.split('.')[1]) <= 6:
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.
sounds good. Checkout out an example: https://github.com/dmlc/tvm/blob/5f37cc1290355c840e36ba3a4a7ff158a97896c5/tests/python/contrib/test_nnpack.py#L20-L21
| 'Taxis', '_class'])(new_input, attr) | ||
| return _impl | ||
|
|
||
| def _gather_v1(): |
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.
Both versions share almost same logic across.
Advice to differ on axis based on inputs count or an argument.
| ####################################################################### | ||
| # Gather | ||
| # Gather, GatherV2 | ||
| # ------ |
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.
Underline up to the text pls.
| test_forward_crop() | ||
| test_forward_pad() | ||
| test_forward_gather() | ||
| # Gather was used in tf 1.6 and before |
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.
This doesn't work with nose execution. Add this version check inside test_forward_gather_v1.
|
@srkreddy1238 fixed all comments, CI passed, pls take another look |
* [Relay][Frontend] Support TF Gather * fix comments
* [Relay][Frontend] Support TF Gather * fix comments
* [Relay][Frontend] Support TF Gather * fix comments
* [Relay][Frontend] Support TF Gather * fix comments
* [Relay][Frontend] Support TF Gather * fix comments
Add Gather support
Note: comment test case since Gather was used in tf.__version__ <= 1.6
I have to comment test case since the test env is using latest tf, Gather is not in graphdef, if the pr is not acceptable, i will close it soon
@srkreddy1238 @kazum @wweic @zhiics