From 5ae9901222d8314a47c77a2ee0bb2e98596797a6 Mon Sep 17 00:00:00 2001 From: ashjeong Date: Thu, 17 Oct 2024 10:14:10 +0900 Subject: [PATCH] chore(benchmark): fix lint errors --- benchmark/fft/fft_benchmark.cc | 3 +++ benchmark/fft/fft_benchmark_gpu.cc | 4 ++++ benchmark/fft_batch/fft_batch_benchmark.cc | 2 ++ benchmark/msm/msm_benchmark.cc | 2 ++ benchmark/msm/msm_benchmark_gpu.cc | 8 ++++++++ 5 files changed, 19 insertions(+) diff --git a/benchmark/fft/fft_benchmark.cc b/benchmark/fft/fft_benchmark.cc index 01eab98ed..bd23afa6c 100644 --- a/benchmark/fft/fft_benchmark.cc +++ b/benchmark/fft/fft_benchmark.cc @@ -2,6 +2,9 @@ #include #include +#include +#include + // clang-format off #include "benchmark/fft/fft_config.h" diff --git a/benchmark/fft/fft_benchmark_gpu.cc b/benchmark/fft/fft_benchmark_gpu.cc index 094bd8594..500ee5be7 100644 --- a/benchmark/fft/fft_benchmark_gpu.cc +++ b/benchmark/fft/fft_benchmark_gpu.cc @@ -1,5 +1,7 @@ #if TACHYON_CUDA #include +#include +#include // clang-format off #include "benchmark/fft/fft_config.h" @@ -42,12 +44,14 @@ void Run(const FFTConfig& config) { reporter.AddVendor(Vendor::TachyonCPU()); reporter.AddVendor(Vendor::TachyonGPU()); + // NOLINTNEXTLINE(build/include_what_you_use) std::vector degrees = config.GetDegrees(); FFTRunner runner(reporter); for (size_t degree : degrees) { PolyOrEvals input = PolyOrEvals::Random(degree); + // NOLINTNEXTLINE(build/include_what_you_use) std::unique_ptr domain = Domain::Create(degree + 1); bool kShouldRecord = true; diff --git a/benchmark/fft_batch/fft_batch_benchmark.cc b/benchmark/fft_batch/fft_batch_benchmark.cc index 73606f9d7..b76375861 100644 --- a/benchmark/fft_batch/fft_batch_benchmark.cc +++ b/benchmark/fft_batch/fft_batch_benchmark.cc @@ -1,4 +1,6 @@ #include +#include +#include #include "absl/strings/substitute.h" diff --git a/benchmark/msm/msm_benchmark.cc b/benchmark/msm/msm_benchmark.cc index b64855336..62c4e0f40 100644 --- a/benchmark/msm/msm_benchmark.cc +++ b/benchmark/msm/msm_benchmark.cc @@ -1,4 +1,6 @@ #include +#include +#include // clang-format off #include "benchmark/msm/msm_config.h" diff --git a/benchmark/msm/msm_benchmark_gpu.cc b/benchmark/msm/msm_benchmark_gpu.cc index 71d87863f..e738b0926 100644 --- a/benchmark/msm/msm_benchmark_gpu.cc +++ b/benchmark/msm/msm_benchmark_gpu.cc @@ -1,5 +1,6 @@ #if TACHYON_CUDA #include +#include // clang-format off #include "benchmark/msm/msm_config.h" @@ -38,21 +39,26 @@ int RealMain(int argc, char** argv) { config.exponents(), [](uint32_t exponent) { return base::NumberToString(exponent); })); + // NOLINTNEXTLINE(build/include_what_you_use) std::vector point_nums = config.GetPointNums(); tachyon_bn254_g1_init(); tachyon_bn254_g1_msm_ptr msm = tachyon_bn254_g1_create_msm(config.exponents().back()); + // NOLINTNEXTLINE(build/include_what_you_use) std::cout << "Generating random points..." << std::endl; size_t max_point_num = point_nums.back(); VariableBaseMSMTestSet test_set; CHECK(config.GenerateTestSet(max_point_num, &test_set)); + + // NOLINTNEXTLINE(build/include_what_you_use) std::cout << "Generation completed" << std::endl; MSMRunner runner(reporter); runner.SetInputs(test_set.bases, test_set.scalars); + // NOLINTNEXTLINE(build/include_what_you_use) std::vector results_cpu; runner.Run(Vendor::TachyonCPU(), tachyon_bn254_g1_affine_msm, msm, point_nums, results_cpu); @@ -60,6 +66,8 @@ int RealMain(int argc, char** argv) { tachyon_bn254_g1_msm_gpu_ptr msm_gpu = tachyon_bn254_g1_create_msm_gpu(config.exponents().back()); + + // NOLINTNEXTLINE(build/include_what_you_use) std::vector results_gpu; runner.Run(Vendor::TachyonGPU(), tachyon_bn254_g1_affine_msm_gpu, msm_gpu, point_nums, results_gpu);