diff --git a/mlx/backend/cuda/binary_two.cu b/mlx/backend/cuda/binary_two.cu index 3cdf2a89f..0a68e5f1d 100644 --- a/mlx/backend/cuda/binary_two.cu +++ b/mlx/backend/cuda/binary_two.cu @@ -153,7 +153,10 @@ void binary_op_gpu_inplace( out_a.data_size() > INT32_MAX, [&](auto large) { using IdxT = std::conditional_t; - auto [shape, strides] = collapse_contiguous_dims(a, b, out_a); + Shape shape; + std::vector strides; + std::tie(shape, strides) = + collapse_contiguous_dims(a, b, out_a); auto& a_strides = strides[0]; auto& b_strides = strides[1]; int ndim = shape.size(); diff --git a/mlx/backend/cuda/ternary.cu b/mlx/backend/cuda/ternary.cu index 06c063192..1d6535100 100644 --- a/mlx/backend/cuda/ternary.cu +++ b/mlx/backend/cuda/ternary.cu @@ -102,7 +102,9 @@ void ternary_op_gpu_inplace( c.data_size() > INT32_MAX || out.data_size() > INT32_MAX, [&](auto large) { using IdxT = std::conditional_t; - auto [shape, strides] = collapse_contiguous_dims(a, b, c, out); + Shape shape; + std::vector strides; + std::tie(shape, strides) = collapse_contiguous_dims(a, b, c, out); auto& a_strides = strides[0]; auto& b_strides = strides[1]; auto& c_strides = strides[2];