Skip to content

Commit dd5c8d0

Browse files
committed
fix: fix a potential synchronize bug when update state
1 parent adb0148 commit dd5c8d0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/turbomind/layers/sampling_layers/GuidedDecodeUpdateLayer.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
#include "src/turbomind/layers/sampling_layers/GuidedDecodeUpdateLayer.h"
18+
#include "src/turbomind/core/context.h"
1819

1920
namespace turbomind {
2021

@@ -45,6 +46,7 @@ void GuidedDecodeUpdateLayer<T>::Forward(TensorMap& args)
4546

4647
FT_CHECK(bsz == matchers_.size());
4748
Copy(output_ids.slice(step * bsz, bsz), output_ids_buf);
49+
core::Context::stream().Sync();
4850

4951
for (size_t i = 0; i < bsz; ++i) {
5052
const auto& matcher = matchers_[i];

0 commit comments

Comments
 (0)