Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable generic functions for 64-bit shuffles #171

Merged
merged 4 commits into from
Jan 9, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions include/cutlass/gpu_generics.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,11 @@ unsigned int byte_perm(unsigned int x, unsigned int y, unsigned int s) {

// shfl

template<typename T>
joeatodd marked this conversation as resolved.
Show resolved Hide resolved
CUTLASS_DEVICE
unsigned int shfl_up_sync(
t4c1 marked this conversation as resolved.
Show resolved Hide resolved
unsigned int const mask,
unsigned int const var,
T const var,
int const delta,
int const width = NumThreadsPerWarp) {
#if defined(__CUDA_ARCH__)
Expand All @@ -263,10 +264,11 @@ unsigned int shfl_up_sync(
#endif
}

template<typename T>
CUTLASS_DEVICE
unsigned int shfl_down_sync(
T shfl_down_sync(
unsigned int const mask,
unsigned int const var,
T const var,
int const delta,
int const width = NumThreadsPerWarp) {
#if defined(__CUDA_ARCH__)
Expand All @@ -278,10 +280,11 @@ unsigned int shfl_down_sync(
#endif
}

template<typename T>
CUTLASS_DEVICE
unsigned int shfl_sync(
T shfl_sync(
unsigned int const mask,
unsigned int const var,
T const var,
int const delta,
int const width = NumThreadsPerWarp) {
#if defined(__CUDA_ARCH__)
Expand All @@ -295,10 +298,11 @@ unsigned int shfl_sync(
#endif
}

template<typename T>
CUTLASS_DEVICE
unsigned int shfl_xor_sync(
T shfl_xor_sync(
unsigned int const mask,
unsigned int const var,
T const var,
int const laneMask,
int const width = NumThreadsPerWarp) {
#if defined(__CUDA_ARCH__)
Expand Down
Loading