Skip to content
Draft
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
11 changes: 11 additions & 0 deletions ggml/src/ggml-cuda/mmvq.cu
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,17 @@ static void mul_mat_vec_q_switch_ncols_dst(
stream);
};

// Fast-path for RDNA3 single-token vector multiplication
if (table_id == MMVQ_PARAMETERS_RDNA3_0 && !has_ids && nchannels_dst == 1) {
const std::pair<dim3, dim3> dims = calc_launch_params<type>(1, nrows_x, 1, 1, warp_size, table_id, false, false);
mul_mat_vec_q_switch_fusion<type, 1, false, false>(
vx, vy, ids, fusion, dst, ncols_x, nchannels_y_fd, stride_row_x, stride_col_y, stride_col_dst,
channel_ratio_fd, stride_channel_x, stride_channel_y, stride_channel_dst, sample_ratio_fd,
stride_sample_x, stride_sample_y, stride_sample_dst, dims.first, dims.second, 0, ids_stride,
stream);
break;
}

if (should_use_small_k(c_ncols_dst)) {
launch(std::true_type{}, std::false_type{});
} else if (should_halve_iters()) {
Expand Down