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(
319319 }
320320
321321 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)) {
323326 const bool all_inputs_compute_dtype =
324327 ((inputs.first ->scalar_type () == compute_type) && ...);
325328
326- constexpr ScalarType out_specialized_scalar_type =
327- specialized_output_scalar_type<CTYPE_COMPUTE>(out_dtypes);
328329 if (all_inputs_compute_dtype &&
329330 out.scalar_type () == out_specialized_scalar_type) {
330331 using CTYPE_OUT =
You can’t perform that action at this time.
0 commit comments