mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/6357 Pull Request resolved: https://github.com/pytorch/pytorch/pull/138364 Approved by: https://github.com/Skylion007, https://github.com/eqy
This commit is contained in:
committed by
PyTorch MergeBot
parent
2f6a70bfea
commit
fddabc6e0b
@ -1581,7 +1581,7 @@ float BlockRunner::benchmark_model(
|
||||
|
||||
const bool is_kwargs_empty = kwargs_list.empty();
|
||||
const KeywordArgs empty_kwargs;
|
||||
for (C10_UNUSED const auto _n_run : c10::irange(warmup_runs)) {
|
||||
for ([[maybe_unused]] const auto _n_run : c10::irange(warmup_runs)) {
|
||||
const auto num_args = static_cast<uint32_t>(args_list.size());
|
||||
for (const auto j : c10::irange(num_args)) {
|
||||
operator()(args_list[j], is_kwargs_empty ? empty_kwargs : kwargs_list[j]);
|
||||
@ -1591,7 +1591,7 @@ float BlockRunner::benchmark_model(
|
||||
}
|
||||
}
|
||||
caffe2::Timer timer;
|
||||
for (C10_UNUSED const auto _n_run : c10::irange(main_runs)) {
|
||||
for ([[maybe_unused]] const auto _n_run : c10::irange(main_runs)) {
|
||||
const auto num_args = static_cast<uint32_t>(args_list.size());
|
||||
for (const auto j : c10::irange(num_args)) {
|
||||
operator()(args_list[j], is_kwargs_empty ? empty_kwargs : kwargs_list[j]);
|
||||
@ -1743,7 +1743,7 @@ BlockRunner::IndividualMetrics BlockRunner::benchmark_individual_ops(
|
||||
results.first_iter_time = timer.MilliSeconds();
|
||||
|
||||
// warmup runs
|
||||
for (C10_UNUSED const auto _n_run : c10::irange(warmup_runs)) {
|
||||
for ([[maybe_unused]] const auto _n_run : c10::irange(warmup_runs)) {
|
||||
const auto num_args = static_cast<uint32_t>(args_list.size());
|
||||
for (const auto j : c10::irange(num_args)) {
|
||||
operator()(args_list[j], is_kwargs_empty ? empty_kwargs : kwargs_list[j]);
|
||||
@ -1754,7 +1754,7 @@ BlockRunner::IndividualMetrics BlockRunner::benchmark_individual_ops(
|
||||
}
|
||||
|
||||
// main runs
|
||||
for (C10_UNUSED const auto i : c10::irange(main_runs)) {
|
||||
for ([[maybe_unused]] const auto i : c10::irange(main_runs)) {
|
||||
const auto num_args = static_cast<uint32_t>(args_list.size());
|
||||
for (const auto j : c10::irange(num_args)) {
|
||||
set_inputs(args_list[j], is_kwargs_empty ? empty_kwargs : kwargs_list[j]);
|
||||
|
||||
Reference in New Issue
Block a user