Skip to content

Commit

Permalink
IPEX fix torch.load
Browse files Browse the repository at this point in the history
  • Loading branch information
Disty0 committed Dec 30, 2023
1 parent bc79cbc commit ab7b78c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/intel/ipex/hijacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def ipex_hijacks():
lambda orig_func, *args, device=None, **kwargs: check_device(device))
CondFunc('torch.load',
lambda orig_func, f, map_location=None, pickle_module=None, *, weights_only=False, mmap=None, **kwargs:
orig_func(orig_func, f, map_location=return_xpu(map_location), pickle_module=pickle_module, weights_only=weights_only, mmap=mmap, **kwargs),
orig_func(f, map_location=return_xpu(map_location), pickle_module=pickle_module, weights_only=weights_only, mmap=mmap, **kwargs),
lambda orig_func, f, map_location=None, pickle_module=None, *, weights_only=False, mmap=None, **kwargs: check_device(map_location))
if hasattr(torch.xpu, "Generator"):
CondFunc('torch.Generator',
Expand Down

0 comments on commit ab7b78c

Please sign in to comment.