Skip to content

Commit

Permalink
Remove unused-but-set variables in deeplearning/fbgemm/fbgemm_gpu/cod…
Browse files Browse the repository at this point in the history
…egen/training/forward/embedding_forward_split_cpu.cpp +1 (#2562)

Summary:
Pull Request resolved: #2562

This diff removes a variable that was set, but which was not used.

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 but set variables often indicate a programming mistake, but can also just be unnecessary cruft that harms readability and performance.

Removing this variable will not change how your code works, but the unused variable may indicate your code isn't working the way you thought it was. I've gone through each of these by hand, but mistakes may have slipped through. If you feel the diff needs changes before landing, **please commandeer** and make appropriate changes: there are hundreds of these and responding to them individually is challenging.

For questions/comments, contact r-barnes.

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

Reviewed By: palmje, dmm-fb

Differential Revision: D56887160

fbshipit-source-id: 5542f4a5b2fc00345335b58db5916a8244ee6555
  • Loading branch information
r-barnes authored and facebook-github-bot committed May 4, 2024
1 parent 45fef71 commit a40afe5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ void csr2csc_template_(
fbgemm::fbgemmAlignedAlloc(64, nnz * sizeof(float)));
}

int column_ptr_curr = 0;
[[maybe_unused]] int column_ptr_curr = 0;
bool is_shared_table =
table_to_feature_offset[1] > table_to_feature_offset[0] + 1;
auto NS = csr_offsets[table_to_feature_offset[1] * B] -
Expand Down

0 comments on commit a40afe5

Please sign in to comment.