mmq.cu: move amd wmma mmq/wmma switching behind IS_RDNA3
This commit is contained in:
parent
a435c7725b
commit
3326fa2387
|
|
@ -333,23 +333,29 @@ bool ggml_cuda_should_use_mmq(enum ggml_type type, int cc, int64_t ne11, int64_t
|
||||||
}
|
}
|
||||||
|
|
||||||
if (amd_wmma_available(cc)) {
|
if (amd_wmma_available(cc)) {
|
||||||
// High expert counts almost always better on MMQ
|
// RDNA 4 is consistently worse on rocblas
|
||||||
// due to a large amount of graph splits
|
// https://github.com/ggml-org/llama.cpp/pull/18537#issuecomment-3706422301
|
||||||
// https://github.com/ggml-org/llama.cpp/pull/18202
|
if (GGML_CUDA_CC_IS_RDNA3(cc)) {
|
||||||
if (n_experts >= 64) {
|
// High expert counts almost always better on MMQ
|
||||||
return true;
|
// due to a large amount of graph splits
|
||||||
}
|
// https://github.com/ggml-org/llama.cpp/pull/18202
|
||||||
|
if (n_experts >= 64) {
|
||||||
switch (type) {
|
|
||||||
// These quants are really bad on MMQ
|
|
||||||
case GGML_TYPE_Q2_K:
|
|
||||||
case GGML_TYPE_Q6_K:
|
|
||||||
// These quants are usually worse but not always
|
|
||||||
case GGML_TYPE_IQ2_XS:
|
|
||||||
case GGML_TYPE_IQ2_S:
|
|
||||||
return ne11 <= 128;
|
|
||||||
default:
|
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (type) {
|
||||||
|
// These quants are really bad on MMQ
|
||||||
|
case GGML_TYPE_Q2_K:
|
||||||
|
case GGML_TYPE_Q6_K:
|
||||||
|
// These quants are usually worse but not always
|
||||||
|
case GGML_TYPE_IQ2_XS:
|
||||||
|
case GGML_TYPE_IQ2_S:
|
||||||
|
return ne11 <= 128;
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue