From 9ad6ab89d350593528380973ddb826602b74f56e Mon Sep 17 00:00:00 2001 From: Justin Lebar Date: Thu, 2 Nov 2023 19:49:17 -0700 Subject: [PATCH] Add a blank line to code_generator.py. Without this, the line-info test fails. python -m pytest python/triton/compiler/code_generator.py Fails 10/10 times without this blank line, passes 10/10 times with the blank line. The failure is in call_noinline and multi_files, both of which generate incorrect line numbers. I have absolutely no idea what is going on. --- python/triton/compiler/code_generator.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/triton/compiler/code_generator.py b/python/triton/compiler/code_generator.py index 03982a47de09..54c496cc4c04 100644 --- a/python/triton/compiler/code_generator.py +++ b/python/triton/compiler/code_generator.py @@ -683,6 +683,7 @@ def visit_IfExp(self, node): return language.core.tensor(if_op.get_result(0), ret_type) if ret_type_ir else None else: cond = _unwrap_if_constexpr(cond) + # not isinstance - we insist the real thing, no subclasses and no ducks if type(cond) not in _condition_types: raise UnsupportedLanguageConstruct(