diff --git a/cpp/include/raft/cluster/detail/kmeans.cuh b/cpp/include/raft/cluster/detail/kmeans.cuh index 9632fedb9d..40e6728dbe 100644 --- a/cpp/include/raft/cluster/detail/kmeans.cuh +++ b/cpp/include/raft/cluster/detail/kmeans.cuh @@ -1209,7 +1209,7 @@ void kmeans_transform(raft::device_resources const& handle, // n_clusters] for (IndexT dIdx = 0; dIdx < (IndexT)n_samples; dIdx += dataBatchSize) { // # of samples for the current batch - auto ns = std::min(dataBatchSize, n_samples - dIdx); + auto ns = std::min(static_cast(dataBatchSize), static_cast(n_samples - dIdx)); // datasetView [ns x n_features] - view representing the current batch of // input dataset diff --git a/cpp/include/raft/random/detail/make_blobs.cuh b/cpp/include/raft/random/detail/make_blobs.cuh index b37dabb366..4e3da63ef6 100644 --- a/cpp/include/raft/random/detail/make_blobs.cuh +++ b/cpp/include/raft/random/detail/make_blobs.cuh @@ -158,9 +158,9 @@ void generate_data(DataT* out, raft::random::RngState& rng_state) { constexpr IdxT block_size = 128; - IdxT items = n_rows * n_cols; + int64_t items = static_cast(n_rows) * n_cols; // Choose a grid size so that each thread can write two output values. - IdxT nBlocks = ceildiv(items, 2 * block_size); + int64_t nBlocks = ceildiv(items, 2 * block_size); // parentheses needed here for kernel, otherwise macro interprets the arguments // of triple chevron notation as macro arguments RAFT_CALL_RNG_FUNC(rng_state,