diff --git a/onnxruntime/core/providers/cuda/test/greedy_search_top_one.cc b/onnxruntime/core/providers/cuda/test/greedy_search_top_one.cc index 13c468116f..96282c89ad 100644 --- a/onnxruntime/core/providers/cuda/test/greedy_search_top_one.cc +++ b/onnxruntime/core/providers/cuda/test/greedy_search_top_one.cc @@ -18,7 +18,7 @@ void FillAndShuffle(std::vector& values, int32_t batch_size, int32_t voca std::mt19937 generator(rd()); for (int32_t batch = 0; batch < batch_size; batch++) { for (int32_t vocab = 0; vocab < vocab_size; vocab++) { - values[batch * vocab_size + vocab] = vocab; + values[batch * vocab_size + vocab] = static_cast(vocab); } std::shuffle(values.begin() + batch * vocab_size, values.begin() + batch * vocab_size + vocab_size,