Skip to content

Commit 1d60923

Browse files
add assert
1 parent a2f702a commit 1d60923

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ggml/src/ggml-cuda/mmq.cu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ static void launch_mmq_ids_helper(
132132
const dim3 num_blocks(n_experts, 1, 1);
133133
const dim3 block_size(warp_size, 1, 1);
134134
const size_t nbytes_shared = n_tokens*sizeof(mmq_ids_helper_store);
135+
GGML_ASSERT(nbytes_shared <= smpbo);
135136
mmq_ids_helper<n_expert_used_template><<<num_blocks, block_size, nbytes_shared, stream>>>
136137
(ids, ids_src1, ids_dst, expert_bounds, n_tokens, n_expert_used_var, nchannels_y, si1, sis1);
137138
}

0 commit comments

Comments
 (0)