File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
kernels/portable/cpu/util Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -319,12 +319,13 @@ inline void apply_elementwise_fn(
319
319
}
320
320
321
321
constexpr auto compute_type = CppTypeToScalarType<CTYPE_COMPUTE>::value;
322
- if constexpr (should_include_kernel_dtype (op_name, compute_type)) {
322
+ constexpr ScalarType out_specialized_scalar_type =
323
+ specialized_output_scalar_type<CTYPE_COMPUTE>(out_dtypes);
324
+ if constexpr (should_include_kernel_dtype (
325
+ op_name, out_specialized_scalar_type)) {
323
326
const bool all_inputs_compute_dtype =
324
327
((inputs.first ->scalar_type () == compute_type) && ...);
325
328
326
- constexpr ScalarType out_specialized_scalar_type =
327
- specialized_output_scalar_type<CTYPE_COMPUTE>(out_dtypes);
328
329
if (all_inputs_compute_dtype &&
329
330
out.scalar_type () == out_specialized_scalar_type) {
330
331
using CTYPE_OUT =
You can’t perform that action at this time.
0 commit comments