-
Notifications
You must be signed in to change notification settings - Fork 74k
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
[INTEL MKL] Fixes for regressions in unit tests. #31955
[INTEL MKL] Fixes for regressions in unit tests. #31955
Conversation
from tensorflow.python import pywrap_tensorflow | ||
from tensorflow.python import _pywrap_utils |
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.
The linter will likely complain here; disable it
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.
@alextp Thanks for approving the PR. Pylint did not report any warnings in our internal testing for this line and it also passed in the Ubuntu sanity tests. Let me know if I need to update this PR.
from tensorflow.python import pywrap_tensorflow | ||
from tensorflow.python import _pywrap_utils |
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.
same here
Hi @gbaned, it looks like the PR is stuck at importing. Can you check the status? |
PiperOrigin-RevId: 265920757
… swig. This is part of a larger effort to deprecate swig and eventually with modularization break pywrap_tensorflow into smaller components. It will also make exporting C++ ops to Python significantly easier. XLA is using the pybind11 macros already. Please refer to https://github.com/tensorflow/community/blob/master/rfcs/20190208-pybind11.md for more information. We are adding `toco::` to the exported namespaces for pywrap_tensorflow's shared object. A few downstream modules also require a previous import of pywrap tensorflow, because the wrapper depends on the shared library. See #31955 for additional information. PiperOrigin-RevId: 276096778 Change-Id: I042f488c36b00818b2344fb39c36cad97cee6eb8
This PR fixes a number of regressions caused by this commit da3f7b1 when MKL DNN is enabled.
pywrap_tensorflow depends on a number of prebuilt shared libraries when MKL DNN is enabled, so importing of _pywrap_utils fails if pywrap_tensorflow has not already been imported. Fixed this by switching the order of imports or adding imports of pywrap_tensorflow when needed.