Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Revert "perf(ROCm): optimize chunked CE loss num_warps for RDNA GPUs (#4123)" (#4139)

金黄色葡萄球君君5e781900fb51
diff --git a/unsloth/kernels/cross_entropy_loss.py b/unsloth/kernels/cross_entropy_loss.py
index 1bb1691776d..d92229314fa 100644
--- a/unsloth/kernels/cross_entropy_loss.py
+++ b/unsloth/kernels/cross_entropy_loss.py
@@ -22,7 +22,6 @@ from .utils import (
triton_cast,
torch_gpu_device,
is_cdna,
- is_rdna,
)
from transformers.models.llama.modeling_llama import logger
from unsloth_zoo.utils import Version
@@ -365,7 +364,7 @@ class Fast_CrossEntropyLoss(torch.autograd.Function):
SOFTCAP = logit_softcapping,
DO_LOGIT_SCALING = DO_LOGIT_SCALING,
LOGIT_SCALE = logit_scaling,
- num_warps = 16 if is_cdna() or is_rdna() else 32,
+ num_warps = 32 if not is_cdna() else 16,
)
# logsumexp(chunked_logsumexp) - x
# Do the -x separately