Skip to content

Commit

Permalink
fix test for FMA implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
binarman committed Jul 14, 2023
1 parent e289c81 commit bc9a730
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/triton/language/semantic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,10 @@ def dot(lhs: tl.tensor,
ret_cast_scalar_ty = tl.float32 if lhs.type.scalar.is_int() else ret_scalar_ty
lhs = cast(lhs, ret_cast_scalar_ty, builder)
rhs = cast(rhs, ret_cast_scalar_ty, builder)
_0 = builder.create_splat(builder.get_fp32(0), [M, N])
if ret_cast_scalar_ty == tl.float16:
_0 = builder.create_splat(builder.get_fp16(0), [M, N])
else:
_0 = builder.create_splat(builder.get_fp32(0), [M, N])
ret_ty = tl.block_type(ret_cast_scalar_ty, [M, N])
ret = tl.tensor(builder.create_dot(lhs.handle, rhs.handle, _0, allow_tf32),
ret_ty)
Expand Down

0 comments on commit bc9a730

Please sign in to comment.