diff --git a/src/tree/gpu_hist/histogram.cu b/src/tree/gpu_hist/histogram.cu index 2b52f03a1dbf..073faa6f5203 100644 --- a/src/tree/gpu_hist/histogram.cu +++ b/src/tree/gpu_hist/histogram.cu @@ -374,7 +374,7 @@ struct ReadMatrixFunction { auto row = global_idx / k_cols; auto col = global_idx % k_cols; auto value = matrix.GetBinIndex(row, col); - if (isnan(float(value))) { + if (isnan(static_cast(value))) { value = -1; } matrix_data_d[global_idx] = value;