Commit d1c9d3fa authored by zhanghj2's avatar zhanghj2
Browse files

topk_length=0的时候,gMax_logits=-inf

parent dd5d4bb3
......@@ -464,7 +464,7 @@ __device__ void KernelTemplate<D_QK, HAVE_TOPK_LENGTH>::devfunc(const SparseAttn
}
}
gLSE[row] = lse(mi);
gMax_logits[row] = softmax.row_max(mi) * params.sm_scale;
gMax_logits[row] = topk_length == 0 ? -INFINITY : softmax.row_max(mi) * params.sm_scale;
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment