Skip to content

Commit

Permalink
fix device
Browse files Browse the repository at this point in the history
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
  • Loading branch information
jiqing-feng committed Nov 26, 2024
1 parent e7ec3d4 commit f0ba16a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions optimum/intel/ipex/modeling_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ def _init_warmup(self):
if not self._add_patch:
# use_cache = "past_key_values" in self.input_names
dummy_inputs = _prepare_inputs_for_ipex_model(self, self.export_feature, self.use_cache)
if self._device.type != "cpu":
dummy_inputs = recursive_to_device(value=dummy_inputs, device=self._device)
if self.device.type != "cpu":
dummy_inputs = recursive_to_device(value=dummy_inputs, device=self.device)
for _ in range(2):
self(**dummy_inputs)

Expand Down

0 comments on commit f0ba16a

Please sign in to comment.