🐛 Describe the bug
#61643 broke the originally working case non_fp_tensor.mean(dtype=fp_dtype).
Original code checks
ScalarType scalarType = opt_dtype.has_value() ? opt_dtype.value() : self.scalar_type();
but the new code doesn't consider opt_dtype in checking:
at::isFloatingType(self_dtype) || at::isComplexType(self_dtype),
CC @ysiraichi who authored the PR, and @ezyang who merged it.
Versions
1.10+
🐛 Describe the bug
#61643 broke the originally working case
non_fp_tensor.mean(dtype=fp_dtype).Original code checks
but the new code doesn't consider
opt_dtypein checking:CC @ysiraichi who authored the PR, and @ezyang who merged it.
Versions
1.10+