diff --git a/paddle/fluid/operators/jit/benchmark.cc b/paddle/fluid/operators/jit/benchmark.cc index e7041b1228829ddb1381a78b9f3e955f5c2f4402..74d6a87247821eb1d17cc97b8d8b4bcf1c832f79 100644 --- a/paddle/fluid/operators/jit/benchmark.cc +++ b/paddle/fluid/operators/jit/benchmark.cc @@ -22,6 +22,7 @@ #include "paddle/fluid/platform/device_tracer.h" #include "paddle/fluid/platform/place.h" #include "paddle/fluid/platform/port.h" +#include "paddle/fluid/platform/variant.h" // for UNUSED DEFINE_int32(burning, 10, "Burning times."); DEFINE_int32(repeat, 3000, "Repeat times."); @@ -53,7 +54,7 @@ BenchJITKernel* InsertBenchmark(BenchJITKernel* b) { const char* Place() override { return #place; } \ void Run() override; \ }; \ - static auto inserted_##name##_##dtype##_##place##_ = \ + static auto inserted_##name##_##dtype##_##place##_ UNUSED = \ InsertBenchmark(new BenchJITKernel_##name##_##dtype##_##place##_()); \ void BenchJITKernel_##name##_##dtype##_##place##_::Run()