Skip to content

Avoid creating duplicate VM contexts for TF Python tests - #2899

Merged
antiagainst merged 1 commit into
iree-org:mainfrom
antiagainst:avoid-double-context
Aug 15, 2020
Merged

antiagainst merged 1 commit into
iree-org:mainfrom
antiagainst:avoid-double-context

Conversation

@antiagainst

@antiagainst antiagainst commented Aug 14, 2020 •

Copy link
Copy Markdown
Member

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.

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 GMNGeoffrey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wooo passing tests on real GPUs!

@antiagainst
antiagainst merged commit c82fb65 into iree-org:main Aug 15, 2020
@antiagainst
antiagainst deleted the avoid-double-context branch August 15, 2020 01:15
@ScottTodd ScottTodd mentioned this pull request Aug 17, 2020
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants