[jit kernel] support dtype as a cpp template parameter (#16452)
This commit is contained in:
@@ -445,7 +445,7 @@ def apply_qk_norm(
|
||||
q.is_cuda
|
||||
and allow_inplace
|
||||
and (q_eps == k_eps)
|
||||
and can_use_fused_inplace_qknorm(head_dim)
|
||||
and can_use_fused_inplace_qknorm(head_dim, q.dtype)
|
||||
):
|
||||
fused_inplace_qknorm(
|
||||
q=q.view(batch_size, -1, head_dim),
|
||||
|
||||
@@ -159,7 +159,7 @@ class ZImageAttention(nn.Module):
|
||||
if (
|
||||
q.is_cuda
|
||||
and (self.norm_q.variance_epsilon == self.norm_k.variance_epsilon)
|
||||
and can_use_fused_inplace_qknorm(self.head_dim)
|
||||
and can_use_fused_inplace_qknorm(self.head_dim, q.dtype)
|
||||
):
|
||||
q, k = apply_qk_norm(
|
||||
q=q,
|
||||
|
||||
Reference in New Issue
Block a user