Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions python/llm/src/ipex_llm/transformers/models/sd15.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ def __call__(
# the output of sdp = (batch, num_heads, seq_len, head_dim)
# IPEX-LLM changes start
if head_dim in [40, 80]:
import xe_test
hidden_states = xe_test.sdp_non_causal(query, key.contiguous(),
value.contiguous(), attention_mask)
import xe_addons
hidden_states = xe_addons.sdp_non_causal(query, key.contiguous(),
value.contiguous(), attention_mask)
else:
scale = 1 / math.sqrt(head_dim)
attn_weights = torch.matmul(query * scale, key.transpose(-1, -2))
Expand Down
Loading