Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[INTERPRETER] Patch globals more carefully (#5485)
Fixes #5484. Since python objects can arbitrarily override `__contains__`, using `inspect.ismodule` seems to be the most general solution, beyond numpy arrays. Overriding a module's `__contains__` would be very strange. ```python >>> import triton.language as tl >>> import inspect >>> inspect.ismodule(tl) True >>> inspect.ismodule(tl.core) True ```
- Loading branch information