C10_UNUSED to [[maybe_unused]] (#6357) (#138364)

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:
Richard Barnes
2024-10-19 13:17:43 +00:00
committed by PyTorch MergeBot
parent 2f6a70bfea
commit fddabc6e0b
139 changed files with 834 additions and 690 deletions

View File

@ -157,7 +157,7 @@ void check_exact_values(
TEST(OptimTest, OptimizerAccessors) {
auto options = AdagradOptions(1.0);
std::vector<torch::Tensor> params;
for (C10_UNUSED const auto i : c10::irange(3)) {
for ([[maybe_unused]] const auto i : c10::irange(3)) {
params.push_back(torch::randn(10));
}
auto optimizer = Adagrad(params, options);