Can remap_reduce_types
be removed
#1877
-
The reduce kernels use mlx/mlx/backend/metal/reduce.cpp Lines 309 to 310 in 4c1dfa5 Which I think is redundant considering the op has already set dtype for them: Lines 1855 to 1869 in 4c1dfa5 Why use |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Oh that's an interesting one. I wouldn't say it is a hack per-se but we reduce the number of kernels (which reduces the binary size) by reusing the reduction kernels based on the size of the dtype. Basically that means that we use the |
Beta Was this translation helpful? Give feedback.
Oh that's an interesting one. I wouldn't say it is a hack per-se but we reduce the number of kernels (which reduces the binary size) by reusing the reduction kernels based on the size of the dtype. Basically that means that we use the
int8
type for bothuint8
andint8
and so on and so forth.