diff --git a/mlx/backend/cuda/conv.cpp b/mlx/backend/cuda/conv.cpp index d49124c8f..53ef6d06c 100644 --- a/mlx/backend/cuda/conv.cpp +++ b/mlx/backend/cuda/conv.cpp @@ -58,7 +58,7 @@ inline std::array fixed_vector(const std::vector& vec) { throw std::runtime_error( fmt::format("ndim can not be larger than {}.", MAX_NDIM)); } - std::array result; + std::array result = {}; std::copy_n(vec.begin(), vec.size(), result.begin()); return result; }