Skip to content

Commit

Permalink
hotfix: fix the bug in #386 (#387)
Browse files Browse the repository at this point in the history
Hotfix to #386, the input and output argument order in `SubtractLeft`
and `FlagHeads` is different.
  • Loading branch information
yzh119 authored Jul 21, 2024
1 parent 0cd4994 commit dc3f184
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/flashinfer/sampling.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ __device__ __forceinline__ void DeviceSamplingFromProb(
bool greater_than_u_diff[VEC_SIZE];
#ifdef FLASHINFER_CUB_SUBTRACTLEFT_DEFINED
BlockAdjacentDifference<bool, BLOCK_THREADS>(temp_storage->block_prim.adj_diff)
.SubtractLeft<VEC_SIZE>(greater_than_u_diff, greater_than_u, BoolDiffOp());
.SubtractLeft<VEC_SIZE>(greater_than_u, greater_than_u_diff, BoolDiffOp());
#else
BlockAdjacentDifference<bool, BLOCK_THREADS>(temp_storage->block_prim.adj_diff)
.FlagHeads<VEC_SIZE>(greater_than_u_diff, greater_than_u, BoolDiffOp());
Expand Down

0 comments on commit dc3f184

Please # to comment.