Remove unused exception parameter from some files, to work with -Wunused-exception-parameter (#165770)

Summary: address compiler complains that were coming up to unblock the build

Test Plan:
before the change
```
aten/src/ATen/native/LinearAlgebra.cpp:3623:36: error: unused exception parameter 'e' [-Werror,-Wunused-exception-parameter]
 3623 |     } catch (const std::exception& e) {
      |
```

after: targets build with `-Wunused-exception-parameter`

Differential Revision: D84876246

Pull Request resolved: https://github.com/pytorch/pytorch/pull/165770
Approved by: https://github.com/Skylion007, https://github.com/cyyever

Co-authored-by: Tony Targonski <tony.targonski@meta.com>
This commit is contained in:
Tony Targonski 2025-10-21 18:30:29 +00:00 committed by PyTorch MergeBot
parent 292454942e
commit ff8be889ad

View File

@ -3620,7 +3620,7 @@ Tensor& _int_mm_out_cpu(const Tensor& self, const Tensor& mat2, Tensor& result)
try { try {
mkldnn_matmul_i8i8i32(self, mat2, result); mkldnn_matmul_i8i8i32(self, mat2, result);
dispatched = true; dispatched = true;
} catch (const std::exception& e) { } catch ([[maybe_unused]] const std::exception& e) {
TORCH_WARN(func_name, " failed, switching to BLAS gemm: ", e.what()); TORCH_WARN(func_name, " failed, switching to BLAS gemm: ", e.what());
} }
} }