Unverified Commit e85654f5 authored by jiqing-feng's avatar jiqing-feng Committed by GitHub
Browse files

rm input dtype change in CPU (#28631)

* rm input dtype change in CPU

* add warning when use CPU low-precision

* rm useless logging
parent 13b23704
......@@ -1019,8 +1019,6 @@ class Pipeline(_ScikitCompat):
elif isinstance(inputs, tuple):
return tuple([self._ensure_tensor_on_device(item, device) for item in inputs])
elif isinstance(inputs, torch.Tensor):
if device == torch.device("cpu") and inputs.dtype in {torch.float16, torch.bfloat16}:
inputs = inputs.float()
return inputs.to(device)
else:
return inputs
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment