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

Remove use-grappler-optimizer compile option #799

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

adk9
Copy link
Contributor

@adk9 adk9 commented Feb 1, 2021

  • Unconditionally enable "ngraph-optimizer" grappler pass
  • Remove is_grappler_enabled() API call
  • Run tests using the grappler pass

Abhishek Kulkarni added 5 commits February 1, 2021 12:35
* Unconditionally enable grappler path
* Remove is_grappler_enabled() API call
* Run tests using the grappler pass
The grappler optimizer, now used by default for tests, does not fail on
optimizer error unless explicitly specified in the rewriter config.
Invert the logic in test_disable_op_2 to not expect a session failure
when trying to disable invalid ops.
@adk9 adk9 marked this pull request as ready for review February 2, 2021 17:44
@@ -41,6 +41,7 @@ namespace testing {
// etc.,etc.

TEST(GrapplerConfig, RConfig1) {
ActivateNGraph();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is the explicit enabling/disabling of nGraph required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's to disable de-assigning of clusters.

Copy link
Contributor

Choose a reason for hiding this comment

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

You can use NGRAPH_TF_DISABLE_DEASSIGN_CLUSTERS ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Where? To run the entire unit test suite? I'm not sure why this isn't being done already.

test/python/common.py Show resolved Hide resolved
test/test_utilities.cpp Show resolved Hide resolved
patch_file_name = "test/python/tensorflow/tf_unittest_ngraph" + (
"_with_grappler"
if ngraph_bridge.is_grappler_enabled() else "") + ".patch"
patch_file_name = "test/python/tensorflow/tf_unittest_ngraph.patch"
Copy link
Contributor

Choose a reason for hiding this comment

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

The TF py tests will also run only with the graph pass?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, bridge C++ unit tests run with the optimizer, bridge Python and TF Python unit tests run without the optimizer. It seems a little excessive to test all the combinations here since the optimizer and non-optimizer paths are shared. Which configurations would we prefer testing?

Copy link
Contributor

Choose a reason for hiding this comment

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

Which one is going to be the default/promoted more than the other, we should make sure all tests pass with that. If there isn't any then probably the above configuration is fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The current default is non-optimizer. We could use this for all three but that'd leave the optimizer path untested.

@adk9 adk9 self-assigned this Feb 9, 2021
@adk9 adk9 added the comp:core Bridge core label Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:core Bridge core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants