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

Add group_size 7 and fix compat with Yi 1.5 34b #246

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions include/flashinfer/attention/prefill.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ __global__ void SinglePrefillWithKVCacheKernel(
constexpr uint32_t channel_size_128b_out = head_dim / num_elems_per_128b<DTypeOut>();

static_assert(num_frags_z * num_frags_y % num_warps == 0);
static_assert(group_size == 1 || group_size % 4 == 0 || group_size == 6);
static_assert(group_size == 1 || group_size % 4 == 0 || group_size == 6 || group_size == 7);

extern __shared__ uint8_t smem[];

Expand Down Expand Up @@ -1135,7 +1135,7 @@ __global__ void BatchPrefillWithRaggedKVCacheKernel(
constexpr uint32_t channel_size_128b_out = head_dim / num_elems_per_128b<DTypeOut>();

static_assert(num_frags_z * num_frags_y % num_warps == 0);
static_assert(group_size == 1 || group_size % 4 == 0 || group_size == 6);
static_assert(group_size == 1 || group_size % 4 == 0 || group_size == 6 || group_size == 7);

extern __shared__ uint8_t smem[];

Expand Down Expand Up @@ -1341,7 +1341,7 @@ __global__ void BatchPrefillWithPagedKVCacheKernel(
constexpr uint32_t channel_size_128b_out = head_dim / num_elems_per_128b<DTypeOut>();

static_assert(num_frags_z * num_frags_y % num_warps == 0);
static_assert(group_size == 1 || group_size % 4 == 0 || group_size == 6);
static_assert(group_size == 1 || group_size % 4 == 0 || group_size == 6 || group_size == 7);

extern __shared__ uint8_t smem[];

Expand Down
3 changes: 3 additions & 0 deletions include/flashinfer/utils.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@
} else if (group_size == 6) { \
constexpr size_t GROUP_SIZE = 6; \
__VA_ARGS__ \
} else if (group_size == 7) { \
constexpr size_t GROUP_SIZE = 7; \
__VA_ARGS__ \
} else if (group_size == 8) { \
constexpr size_t GROUP_SIZE = 8; \
__VA_ARGS__ \
Expand Down