Skip to content
Merged
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
14 changes: 13 additions & 1 deletion server/deps/llama.cpp/ggml/src/ggml-cuda/ggml-cuda.cu
Original file line number Diff line number Diff line change
Expand Up @@ -2816,7 +2816,19 @@ static bool ggml_cuda_try_fuse_mul_mat_glu(
}

const int64_t ncols = ids ? src1->ne[2] : src1->ne[1];
if (ggml_cuda_should_use_mmq(
#ifdef GGML_CUDA_FORCE_CUBLAS
// The global force-cuBLAS policy is authoritative over this RDNA 3.5 default.
constexpr bool default_ds4_mix_gate_up_mmq = false;
#else
const char * mix_mmq = std::getenv("DFLASH_DS4_MIX_MMQ_PREFILL");
const bool default_ds4_mix_gate_up_mmq =
src0->type == GGML_TYPE_Q2_1_ROCMFP2_MIX &&
ids != nullptr &&
GGML_CUDA_CC_IS_RDNA3_5(cc) &&
(!mix_mmq || !(mix_mmq[0] == '0' && mix_mmq[1] == '\0'));
#endif
if (default_ds4_mix_gate_up_mmq ||
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
ggml_cuda_should_use_mmq(
src0->type, cc, ncols,
ids ? src0->ne[2] : /*n_experts=*/0)) {
ggml_cuda_mul_mat_q_pair(
Expand Down
Loading