We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 006420c commit d453160Copy full SHA for d453160
src/ops/random_sample/cuda/random_sample.cu
@@ -34,7 +34,7 @@ __global__ void softmax(
34
int topk,
35
float temperature, int voc) {
36
float sum_s = 0.0f;
37
- for (int i = threadIdx.x; i < topk; i += BLOCK_DIM) {
+ for (int i = threadIdx.x; i < voc; i += BLOCK_DIM) {
38
sum_s += __expf(static_cast<float>(val_out[i] - val_out[0]) / temperature);
39
}
40
__shared__ float sum_inverse_total;
0 commit comments