Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/marian.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@gmail.com>2018-01-19 20:08:49 +0300
committerHieu Hoang <hieuhoang@gmail.com>2018-01-19 20:08:49 +0300
commitf1033ac281878ce049aa9afccf530264e73c2b36 (patch)
treef906e8c8ac04850548ce4f8cfd584085e3586cce
parent79de7a566eff6b8d374fb62d764892a1854dc444 (diff)
topup whenn half empty
-rw-r--r--src/amun/gpu/decoder/encoder_decoder.cu5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/amun/gpu/decoder/encoder_decoder.cu b/src/amun/gpu/decoder/encoder_decoder.cu
index 444fb701..6bf85ffc 100644
--- a/src/amun/gpu/decoder/encoder_decoder.cu
+++ b/src/amun/gpu/decoder/encoder_decoder.cu
@@ -426,9 +426,8 @@ void EncoderDecoder::AssembleBeamStateTopup(const Histories& histories,
unsigned EncoderDecoder::SentencesToGet(const Histories& histories)
{
///*
- if (histories.NumActive() < 256) {
- unsigned ret1 = histories.NumInactive();
- return ret1;
+ if (histories.size() < 8 || histories.NumActive() < histories.size() / 2) {
+ return histories.NumInactive();
}
else {
return 0;