Skip to content

Commit

Permalink
small fix and add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
MeouSker77 committed Jan 8, 2025
1 parent ccf618f commit 15e3086
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/llm/src/ipex_llm/transformers/low_bit_linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def use_batch_forward(x: torch.Tensor, qtype: int, output_len: int):
or (
qtype in [SYM_INT8, FP4, FP6, Q4_K, Q6_K]
and batch_size <= 48
and device_name in ["arc", "pvc", "mtl", "lnl", "arl"]
and device_name in ["arc", "pvc", "mtl", "arl"]
and x.shape[1] % 256 == 0
and output_len % 32 == 0
)
Expand Down
2 changes: 2 additions & 0 deletions python/llm/src/ipex_llm/transformers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ def get_xpu_device_name(device: torch.device):
if device.type != "xpu":
return device.type
else:
# possiable device name:
# ["arc", "pvc", "mtl", "lnl", "bmg", "arl", "legacy", "unknown"]
import xe_linear
return xe_linear.get_xpu_device_name(device)

Expand Down

0 comments on commit 15e3086

Please sign in to comment.