Skip to content

Commit

Permalink
Remove unused-variable in deeplearning/fbgemm/fbgemm_gpu/fb/test/prep…
Browse files Browse the repository at this point in the history
…roc_test_reference.hpp +3 (pytorch#3412)

Summary:
Pull Request resolved: pytorch#3412

X-link: facebookresearch/FBGEMM#500

LLVM-15 has a warning `-Wunused-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]]`.

#buildsonlynotests - Builds are sufficient

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

Differential Revision: D66330353

fbshipit-source-id: a97406b3116d6a6b860a53db9f371247db04c1b2
  • Loading branch information
r-barnes authored and facebook-github-bot committed Nov 24, 2024
1 parent ed15cca commit efdb2d0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void test_embedding_inplace_update() {
}
int n = folly::Random::rand32() % 10 + 5;
std::set<int32_t> rows;
for (const auto j : c10::irange(n)) {
for ([[maybe_unused]] const auto j : c10::irange(n)) {
rows.insert(folly::Random::rand32() % total_rows);
}
std::string update_row_idx_str = "";
Expand Down

0 comments on commit efdb2d0

Please sign in to comment.