Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Fixed issue of loading woq model for intel GPU #1614

Merged
merged 2 commits into from
Jun 21, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def build_woq_model(model, quantization_config):

def convert_model_to_public(model):
# reorder weight and scales if they have been transposed
if model.device == "xpu":
if model.device == "xpu" or (isinstance(model.device, torch.device) and model.device.type == "xpu"):
for name, module in model.named_modules():
if isinstance(module, WeightOnlyQuantizedLinear):
if module.weight_transposed:
Expand Down
Loading