From d9e9dda389e3f70e6a69651974553b11bb0a6e31 Mon Sep 17 00:00:00 2001 From: Baiju Meswani Date: Wed, 24 Jan 2024 03:08:30 +0000 Subject: [PATCH] Fix windows pipeline error --- .../test/training_api/core/training_capi_tests.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/orttraining/orttraining/test/training_api/core/training_capi_tests.cc b/orttraining/orttraining/test/training_api/core/training_capi_tests.cc index b1ed7c5e14666..8f25e1e4c92b8 100644 --- a/orttraining/orttraining/test/training_api/core/training_capi_tests.cc +++ b/orttraining/orttraining/test/training_api/core/training_capi_tests.cc @@ -469,19 +469,19 @@ TEST(TrainingCApiTest, ModuleAndOptimizerWithNominalState) { ASSERT_EQ(complete_fetches.size(), nominal_fetches.size()); ASSERT_GT(complete_fetches.size(), 0U); - for (size_t i = 0; i < complete_fetches.size(); ++i) { - ASSERT_TRUE(complete_fetches[i].IsTensor()); - ASSERT_TRUE(nominal_fetches[i].IsTensor()); + for (size_t j = 0; j < complete_fetches.size(); ++j) { + ASSERT_TRUE(complete_fetches[j].IsTensor()); + ASSERT_TRUE(nominal_fetches[j].IsTensor()); - auto complete_tensor_info = complete_fetches[i].GetTensorTypeAndShapeInfo(); - auto nominal_tensor_info = nominal_fetches[i].GetTensorTypeAndShapeInfo(); + auto complete_tensor_info = complete_fetches[j].GetTensorTypeAndShapeInfo(); + auto nominal_tensor_info = nominal_fetches[j].GetTensorTypeAndShapeInfo(); ASSERT_EQ(complete_tensor_info.GetShape(), nominal_tensor_info.GetShape()); ASSERT_EQ(complete_tensor_info.GetElementType(), nominal_tensor_info.GetElementType()); - gsl::span complete_data = gsl::span(complete_fetches[i].GetTensorMutableData(), + gsl::span complete_data = gsl::span(complete_fetches[j].GetTensorMutableData(), complete_tensor_info.GetElementCount()); - gsl::span nominal_data = gsl::span(nominal_fetches[i].GetTensorMutableData(), + gsl::span nominal_data = gsl::span(nominal_fetches[j].GetTensorMutableData(), nominal_tensor_info.GetElementCount()); ASSERT_EQ(complete_data, nominal_data);