Skip to content

Failed to properly clean up all refcounted objects in TF Python tests #2900

Closed as not planned

Description

@antiagainst

#2899 fixed an issue where we used to have two alive contexts for each test: one in cls._tar_modules (created via setUpClass()) and one in self._tar_modules (created via setUp()). It fixes by removing the cls._tar_mdoules. However, this disables module compilation sharing. But, simply switch to always use cls._tar_modules does not work as shown by #2897. This indicates deeper issues in Python layer regarding refcounted object clean up. It might due to Python garbage collection on Python classes (as shown by #2896), or there might be an issue in Python bindings not properly call C/C++ APIs to release objects.

Activity

  1. phoenix-meadowlark commented on Aug 17, 2020

    @phoenix-meadowlark
    Contributor

    Recompilation is fixed by (an updated) #2897.

  2. benvanik commented on Nov 22, 2020

    @benvanik
    Collaborator
  3. added
    integrations/tensorflow
    bug 🐞
    on Nov 22, 2020
  4. phoenix-meadowlark commented on Nov 22, 2020

    @phoenix-meadowlark
    Contributor

    Already fixed? @antiagainst @phoenix-meadowlark

    Not fixed so much as worked around. We store the pre-compiled modules in _global* variables instead of on the test case class.

  5. benvanik commented on Jul 1, 2022

    @benvanik
    Collaborator

    Closing as obsolete.

  6. moved this to Done in IREEon Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug 🐞integrations/tensorflow

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions