This commit is contained in:
Hieu Hoang 2018-01-11 22:23:51 +00:00
parent 524d9ba968
commit 772df1fb0e
2 changed files with 4 additions and 2 deletions

View File

@ -186,9 +186,9 @@ void BestHyps::CalcBeam(
std::cerr << "maxBeamSize_=" << maxBeamSize_ << std::endl;
std::cerr << "numHypos=" << numHypos << std::endl;
*/
BEGIN_TIMER("GetProbs.LogSoftmaxAndNBest");
BEGIN_TIMER("LogSoftmaxAndNBest.outer");
mblas::LogSoftmaxAndNBest(nBest, Probs, b4, costs_, histories, forbidUNK_, maxBeamSize_);
PAUSE_TIMER("GetProbs.LogSoftmaxAndNBest");
PAUSE_TIMER("LogSoftmaxAndNBest.outer");
//cerr << "nBest=" << nBest.Debug(2) << endl;
FindBests(histories, Probs, nBest, bestCosts, bestKeys);

View File

@ -1376,6 +1376,7 @@ void LogSoftmaxAndNBest(mblas::Vector<NthOutBatch> &nBest,
bool forbidUNK,
unsigned maxBeamSize)
{
BEGIN_TIMER("LogSoftmax");
//BEGIN_TIMER("LogSoftmax excl kernels");
std::vector<char> isFirsts = histories.IsFirsts();
@ -1445,6 +1446,7 @@ void LogSoftmaxAndNBest(mblas::Vector<NthOutBatch> &nBest,
hypo2Candidate,
hypo2NextHypo);
//PAUSE_TIMER("gNBestPerBatch");
PAUSE_TIMER("LogSoftmax");
}
__global__