We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4751164 commit 0edb5c4Copy full SHA for 0edb5c4
optimum/intel/ipex/modeling_base.py
@@ -67,7 +67,7 @@ def __init__(
67
OptimizedModel.__init__(self, model=model, config=config)
68
# To do: add XPU support
69
self._device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
70
- self._dtype = self.config.torch_dtype
+ self._dtype = self.config.torch_dtype if self.config.torch_dtype is not None else torch.float32
71
self.model.to(self._device)
72
self.model_save_dir = model_save_dir
73
0 commit comments