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(