Skip to content

Commit

Permalink
Fix linter for pytorch#3266 (pytorch#3293)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#3293

X-link: facebookresearch/FBGEMM#392

pytorch#3266 has a lint issue so I'm fixing it in this PR

Reviewed By: yoyoyocmu, mxz297

Differential Revision: D65213615

fbshipit-source-id: 40ae35a912f7f6d7040d7b80578c78c2dbfe6b1f
  • Loading branch information
xw285cornell authored and facebook-github-bot committed Oct 30, 2024
1 parent 007ed39 commit d6b1697
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
8 changes: 1 addition & 7 deletions fbgemm_gpu/codegen/genscript/jinja_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,7 @@ def has_experimental_support(
Check if the given combination of configs has TBE v2 support
- TBE v2 does not support dense, nobag, vbe, is_index_select, is_rocm, and ssd
"""
return (
not dense
and not nobag
and not vbe
and not is_index_select
and not ssd
)
return not dense and not nobag and not vbe and not is_index_select and not ssd


def is_valid_gwd_config(
Expand Down
5 changes: 3 additions & 2 deletions fbgemm_gpu/include/fbgemm_gpu/utils/cuda_prelude.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ DEVICE_INLINE uint32_t ballot_sync(

/// Sums a register value across all warp threads
template <typename T, int ReduceWidth = kWarpSize>
DEVICE_INLINE T
warpReduceAllSum(T val, unsigned shfl_sync_mask = static_cast<unsigned>(kFullWarpMask)) {
DEVICE_INLINE T warpReduceAllSum(
T val,
unsigned shfl_sync_mask = static_cast<unsigned>(kFullWarpMask)) {
#pragma unroll
for (int mask = ReduceWidth / 2; mask > 0; mask >>= 1) {
val += shfl_xor(val, mask, ReduceWidth, shfl_sync_mask);
Expand Down

0 comments on commit d6b1697

Please sign in to comment.