diff --git a/mlx/backend/cpu/binary.h b/mlx/backend/cpu/binary.h index 5333aff9a1..fb7db76f93 100644 --- a/mlx/backend/cpu/binary.h +++ b/mlx/backend/cpu/binary.h @@ -16,7 +16,7 @@ namespace mlx::core { template struct VectorScalar { template - void operator()(const T* a, const T* b, U* dst, int size) { + void operator()(const T* a, const T* b, U* dst, size_t size) { T scalar = *b; constexpr int N = simd::max_size; while (size >= N) { @@ -36,7 +36,7 @@ struct VectorScalar { template struct ScalarVector { template - void operator()(const T* a, const T* b, U* dst, int size) { + void operator()(const T* a, const T* b, U* dst, size_t size) { T scalar = *a; constexpr int N = simd::max_size; while (size >= N) { @@ -56,7 +56,7 @@ struct ScalarVector { template struct VectorVector { template - void operator()(const T* a, const T* b, U* dst, int size) { + void operator()(const T* a, const T* b, U* dst, size_t size) { constexpr int N = simd::max_size; while (size >= N) { simd::store(dst, Op{}(simd::load(a), simd::load(b)));