Repository navigation
Avoid creating duplicate VM contexts for TF Python tests - #2899
Merged
Merged
Conversation
For each test case, we are actually holding two contexts alive: one in cls._tar_modules (via setUpClass()) and one in self._tar_modules (via setUp()). The class one somehow is not properly released and that causes issues with Vulkan driver DSO deallocation. This commit changes to avoid using cls._tar_modules.
GMNGeoffrey
reviewed
Aug 15, 2020
GMNGeoffrey
left a comment
Member
There was a problem hiding this comment.
Wooo passing tests on real GPUs!
GMNGeoffrey
approved these changes
Aug 15, 2020
Merged
phoenix-meadowlark
added a commit
that referenced
this pull request
Aug 17, 2020
Follow-up to #2899. The global variables `_global_ref_module` and `_global_tar_modules` are used to store compiled IREE modules for the `TracedModuleTestCase`. Storing the variables on the `TracedModuleTestCase` `cls` causes the errors in #2900, and storing the variables on the `TracedModuleTestCase` instance (via `self`) doesn't work because `tf.test.TestCase` wipes these variables before each unittest.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For each TF python test case, we are actually holding two contexts alive:
one in cls._tar_modules (via setUpClass()) and one in self._tar_modules
(via setUp()). The class one somehow is not properly released and
that causes issues with Vulkan driver DSO deallocation.
This commit changes to avoid using cls._tar_modules.