Skip to content

Commit 9c22937

Browse files
authored
[Bug fix] tl.dot(a, b, None) (#7130)
If user passes None explicitly to `acc` in tl.dot, it will fail when accessing acc.handle from a constexpr[None]. ``` if acc is None: acc_handle = builder.create_splat(ret_ty.to_ir(builder), _0) else: > acc_handle = acc.handle E AttributeError: 'constexpr' object has no attribute 'handle' ``` Test plan: 1. randomly pick a unit test `pytest python/test/unit/language/test_core.py::test_dot[1-32-32-32-4-False-False-add-cols-ieee-float16-float16-1-None]` 2. add None to tl.dot
1 parent 13bae05 commit 9c22937

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

python/triton/language/core.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,6 +2034,7 @@ def dot(input, other, acc=None, input_precision=None, allow_tf32=None, max_num_i
20342034
input_precision = _unwrap_if_constexpr(input_precision)
20352035
out_dtype = _unwrap_if_constexpr(out_dtype)
20362036
max_num_imprecise_acc = _unwrap_if_constexpr(max_num_imprecise_acc)
2037+
acc = _unwrap_if_constexpr(acc)
20372038
return _semantic.dot(input, other, acc, input_precision, max_num_imprecise_acc, out_dtype)
20382039

20392040

0 commit comments

Comments
 (0)