From a6eb90472cccef82d71003dc320ae1160fd0dcc4 Mon Sep 17 00:00:00 2001 From: suffian khan Date: Mon, 21 Sep 2020 15:35:30 +0000 Subject: [PATCH] try fix error on code coverage ci build --- onnxruntime/test/contrib_ops/bias_softmax_op_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/onnxruntime/test/contrib_ops/bias_softmax_op_test.cc b/onnxruntime/test/contrib_ops/bias_softmax_op_test.cc index 78a86c6700..10de6930d5 100644 --- a/onnxruntime/test/contrib_ops/bias_softmax_op_test.cc +++ b/onnxruntime/test/contrib_ops/bias_softmax_op_test.cc @@ -85,13 +85,13 @@ class BiasSoftmaxTester { in_data_.resize(len); for (int64_t b = 0; b < nbatches_; b++) for (int64_t i = 0; i < nelements_; i++) - in_data_[i] = allow_fill(i) ? -5.0f + 10.0f * ((float)rand() / (RAND_MAX)) : -10000.0f; + in_data_[i] = allow_fill(i) ? -5.0f + 10.0f * ((float)rand() / float(RAND_MAX)) : -10000.0f; len = nelements_ * nbatches_ / broadcast_size_; bias_data_.resize(len); for (int64_t b = 0; b < nbatches_ / broadcast_size_; b++) for (int64_t i = 0; i < nelements_; i++) - bias_data_[i] = allow_fill(i) ? -5.0f + 10.0f * ((float)rand() / (RAND_MAX)) : 0.0f; + bias_data_[i] = allow_fill(i) ? -5.0f + 10.0f * ((float)rand() / float(RAND_MAX)) : 0.0f; } void ComputeInternal() {