@@ -121,14 +121,14 @@ struct Benchmark : public ::testing::Test {
121121 auto handle = atCompl.compile (name, inputs, mappingOptions);
122122 atCompl.run (name, inputs, outputs, handle);
123123 EXPECT_TRUE (checkFun (inputs, outputs));
124- for (int i = 1 ; i < tc::FLAGS_benchmark_warmup; ++i) {
124+ for (size_t i = 1 ; i < tc::FLAGS_benchmark_warmup; ++i) {
125125 atCompl.run (name, inputs, outputs, handle);
126126 }
127127 std::vector<tc::Duration> kernelTimes;
128128 kernelTimes.reserve (tc::FLAGS_benchmark_iterations);
129129 std::vector<tc::Duration> totalTimes;
130130 totalTimes.reserve (tc::FLAGS_benchmark_iterations);
131- for (int i = 0 ; i < tc::FLAGS_benchmark_iterations; ++i) {
131+ for (size_t i = 0 ; i < tc::FLAGS_benchmark_iterations; ++i) {
132132 kernelTimes.push_back (atCompl.run (name, inputs, outputs, handle, true ));
133133 TC_CUDA_RUNTIMEAPI_ENFORCE (cudaDeviceSynchronize ());
134134 auto time (std::chrono::system_clock::now ());
@@ -201,12 +201,12 @@ struct Benchmark : public ::testing::Test {
201201 template <typename InitFunction, typename InplaceFunction>
202202 void Reference (InitFunction init, InplaceFunction compute) {
203203 auto res = init ();
204- for (int i = 1 ; i < tc::FLAGS_benchmark_warmup; ++i) {
204+ for (size_t i = 1 ; i < tc::FLAGS_benchmark_warmup; ++i) {
205205 compute (res);
206206 }
207207 std::vector<tc::Duration> times;
208208 times.reserve (tc::FLAGS_benchmark_iterations);
209- for (int i = 0 ; i < tc::FLAGS_benchmark_iterations; ++i) {
209+ for (size_t i = 0 ; i < tc::FLAGS_benchmark_iterations; ++i) {
210210 auto time (std::chrono::system_clock::now ());
211211 compute (res);
212212 TC_CUDA_RUNTIMEAPI_ENFORCE (cudaDeviceSynchronize ());
@@ -278,14 +278,14 @@ struct Benchmark : public ::testing::Test {
278278 std::vector<at::Tensor> outputs;
279279 atCompl.run (name, inputs, outputs, handle);
280280 EXPECT_TRUE (checkFun (inputs, outputs));
281- for (int i = 1 ; i < tc::FLAGS_benchmark_warmup; ++i) {
281+ for (size_t i = 1 ; i < tc::FLAGS_benchmark_warmup; ++i) {
282282 atCompl.run (name, inputs, outputs, handle);
283283 }
284284 std::vector<tc::Duration> kernelTimes;
285285 kernelTimes.reserve (tc::FLAGS_benchmark_iterations);
286286 std::vector<tc::Duration> totalTimes;
287287 totalTimes.reserve (tc::FLAGS_benchmark_iterations);
288- for (int i = 0 ; i < tc::FLAGS_benchmark_iterations; ++i) {
288+ for (size_t i = 0 ; i < tc::FLAGS_benchmark_iterations; ++i) {
289289 kernelTimes.push_back (atCompl.run (name, inputs, outputs, handle, true ));
290290 TC_CUDA_RUNTIMEAPI_ENFORCE (cudaDeviceSynchronize ());
291291 auto time (std::chrono::system_clock::now ());
@@ -389,14 +389,14 @@ struct Benchmark : public ::testing::Test {
389389 std::vector<at::Tensor> outputs;
390390 atCompl.run (kernelName, inputs, outputs, handle);
391391 EXPECT_TRUE (checkFun (inputs, outputs));
392- for (int i = 1 ; i < tc::FLAGS_benchmark_warmup; ++i) {
392+ for (size_t i = 1 ; i < tc::FLAGS_benchmark_warmup; ++i) {
393393 atCompl.run (kernelName, inputs, outputs, handle);
394394 }
395395 std::vector<tc::Duration> kernelTimes;
396396 kernelTimes.reserve (tc::FLAGS_benchmark_iterations);
397397 std::vector<tc::Duration> totalTimes;
398398 totalTimes.reserve (tc::FLAGS_benchmark_iterations);
399- for (int i = 0 ; i < tc::FLAGS_benchmark_iterations; ++i) {
399+ for (size_t i = 0 ; i < tc::FLAGS_benchmark_iterations; ++i) {
400400 kernelTimes.push_back (
401401 atCompl.run (kernelName, inputs, outputs, handle, true ));
402402 TC_CUDA_RUNTIMEAPI_ENFORCE (cudaDeviceSynchronize ());
0 commit comments