diff --git a/python/triton/runtime/interpreter.py b/python/triton/runtime/interpreter.py index e6942d470f8a..d4a09ffaf8ba 100644 --- a/python/triton/runtime/interpreter.py +++ b/python/triton/runtime/interpreter.py @@ -1001,7 +1001,7 @@ def _set_attr(input, values, name): def _patch_lang(fn): - langs = [value for _, value in fn.__globals__.items() if value in [tl, tl.core]] + langs = [value for _, value in fn.__globals__.items() if inspect.ismodule(value) and value in [tl, tl.core]] assert len(langs) >= 1, "triton.language must be visible from within jit'd function" for lang in langs: _patch_builtin(lang, interpreter_builder)