This commit is contained in:
Awni Hannun
2025-07-29 17:17:47 -07:00
parent 5694f764fc
commit 968868fa26

View File

@@ -54,7 +54,8 @@ __global__ void logsumexp(const T* in, T* out, int axis_size) {
// https://github.com/NVIDIA/online-softmax
normalizer = normalizer * softmax_exp(prevmax - maxval);
for (int i = 0; i < N_READS; i++) {
normalizer = normalizer + softmax_exp(static_cast<AccT>(vals[i]) - maxval);
normalizer =
normalizer + softmax_exp(static_cast<AccT>(vals[i]) - maxval);
}
}