Skip to content

Commit 74057f4

Browse files
committed
lint
1 parent 7d20cd4 commit 74057f4

2 files changed

Lines changed: 13 additions & 6 deletions

File tree

include/mscclpp/gpu_data_types.hpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,22 @@ union alignas(sizeof(T) * N) VectorTypeImpl {
129129
// Helper template to get the appropriate vector type for a given element type and count
130130
template <typename T, int N>
131131
struct VectorTypeHelper {
132-
using type = VectorTypeImpl<T, N, typename std::conditional_t<N * sizeof(T) == 4, uint32_t,
133-
typename std::conditional_t<N * sizeof(T) == 8, uint2, uint4>>>;
132+
using type =
133+
VectorTypeImpl<T, N,
134+
typename std::conditional_t<N * sizeof(T) == 4, uint32_t,
135+
typename std::conditional_t<N * sizeof(T) == 8, uint2, uint4>>>;
134136
};
135137

136138
/// Vector type - clean user interface (automatically selects appropriate storage type)
137139
template <typename T, int N>
138140
using VectorType = typename VectorTypeHelper<T, N>::type;
139141

140142
// Macro to define specialization AND alias in one go
141-
#define DEFINE_VEC(Alias, T, N, Storage) \
142-
template <> struct VectorTypeHelper<T, N> { using type = VectorTypeImpl<T, N, Storage>; }; \
143+
#define DEFINE_VEC(Alias, T, N, Storage) \
144+
template <> \
145+
struct VectorTypeHelper<T, N> { \
146+
using type = VectorTypeImpl<T, N, Storage>; \
147+
}; \
143148
using Alias = VectorType<T, N>
144149

145150
DEFINE_VEC(i32x1, int32_t, 1, int32_t);

src/ext/collectives/include/allreduce/common.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ MSCCLPP_DEVICE_INLINE void handleMultiLoadReduceStore(T* src, T* dst, size_t src
4343
MSCCLPP_ASSERT_DEVICE(size % 4 == 0, "size must be 4 bytes aligned");
4444
constexpr size_t nElem = calcVectorSize<T>();
4545
// For integer types, use 1-element vectors since multimem doesn't support vectorized integer operations
46-
constexpr size_t vecSize = (std::is_same_v<T, int> || std::is_same_v<T, int32_t> ||
47-
std::is_same_v<T, unsigned int> || std::is_same_v<T, uint32_t>) ? 1 : nElem;
46+
constexpr size_t vecSize = (std::is_same_v<T, int> || std::is_same_v<T, int32_t> || std::is_same_v<T, unsigned int> ||
47+
std::is_same_v<T, uint32_t>)
48+
? 1
49+
: nElem;
4850
using vectorType = mscclpp::VectorType<T, vecSize>;
4951
const size_t nVec = size / sizeof(vectorType);
5052
const size_t srcOffset4 = srcOffset / sizeof(vectorType);

0 commit comments

Comments
 (0)