Skip to content

Commit

Permalink
Add a blank line to code_generator.py.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jlebar committed Nov 3, 2023
1 parent 63562f1 commit 9ad6ab8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/triton/compiler/code_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 9ad6ab8

Please sign in to comment.