[codemod] Remove unused variables in caffe2/caffe2/operators/softmax_op_cudnn.cc (#121995)

Summary:
LLVM-15 has a warning `-Wunused-but-set-variable` which we treat as an error because it's so often diagnostic of a code issue. Unused variables can compromise readability or, worse, performance.

This diff either (a) removes an unused variable and, possibly, it's associated code, or (b) qualifies the variable with `[[maybe_unused]]`, mostly in cases where the variable _is_ used, but, eg, in an `assert` statement that isn't present in production code.

 - If you approve of this diff, please use the "Accept & Ship" button :-)

Test Plan: Sandcastle

Reviewed By: palmje

Differential Revision: D54931224

Pull Request resolved: https://github.com/pytorch/pytorch/pull/121995
Approved by: https://github.com/Skylion007
This commit is contained in:
Richard Barnes
2024-03-19 22:35:58 +00:00
committed by PyTorch MergeBot
parent a6aa3afa77
commit 94eb940a02
2 changed files with 0 additions and 9 deletions

View File

@ -5,14 +5,6 @@
namespace caffe2 {
namespace {
constexpr int NUM_DESCRIPTORS = 2;
constexpr int GRADIENT_NUM_DESCRIPTORS = 3;
constexpr int BOTTOM_DESC_ID = 0;
constexpr int TOP_DESC_ID = 1;
constexpr int TOP_GRADIENT_DESC_ID = 2;
} // namespace
class CuDNNSoftmaxOp final : public Operator<CUDAContext> {
public:
template <class... Args>

View File

@ -12,7 +12,6 @@
namespace c10d {
namespace {
constexpr int64_t kBusyWaitMillis = 10;
const std::map<c10::DeviceType, ucc_memory_type_t> ucc_mtype_map = {
{c10::kCPU, UCC_MEMORY_TYPE_HOST},