mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Fixes #120903 Scale for fake quant is assumed FP32 but not checked. If scales of double dtype are passed in, an internal error is raised: `TORCH_INTERNAL_ASSERT(!needs_dynamic_casting<func_t>::check(iter));` in aten/src/ATen/native/cpu/Loops.h This PR adds a check of scale dtype. Pull Request resolved: https://github.com/pytorch/pytorch/pull/120987 Approved by: https://github.com/jgong5, https://github.com/jerryzh168