TensorRT  7.2.1.6
NVIDIA TensorRT
Looking for a C++ dev who knows TensorRT?
I'm looking for work. Hire me!
nmtSample::BenchmarkWriter Class Reference

all it does is to measure the performance of sequence generation More...

Inheritance diagram for nmtSample::BenchmarkWriter:
Collaboration diagram for nmtSample::BenchmarkWriter:

Public Types

typedef std::shared_ptr< DataWriterptr
 

Public Member Functions

 BenchmarkWriter ()
 
void write (const int *hOutputData, int actualOutputSequenceLength, int actualInputSequenceLength) override
 write the generated sequence More...
 
void initialize () override
 it is called right before inference starts More...
 
void finalize () override
 it is called right after inference ends More...
 
std::string getInfo () override
 get the textual description of the component More...
 
 ~BenchmarkWriter () override=default
 

Static Protected Member Functions

static std::string generateText (int sequenceLength, const int *currentOutputData, Vocabulary::ptr vocabulary)
 

Private Attributes

int mSampleCount
 
int mInputTokenCount
 
int mOutputTokenCount
 
std::chrono::high_resolution_clock::time_point mStartTS
 

Detailed Description

all it does is to measure the performance of sequence generation

Member Typedef Documentation

◆ ptr

typedef std::shared_ptr<DataWriter> nmtSample::DataWriter::ptr
inherited

Constructor & Destructor Documentation

◆ BenchmarkWriter()

nmtSample::BenchmarkWriter::BenchmarkWriter ( )

◆ ~BenchmarkWriter()

nmtSample::BenchmarkWriter::~BenchmarkWriter ( )
overridedefault

Member Function Documentation

◆ write()

void nmtSample::BenchmarkWriter::write ( const int hOutputData,
int  actualOutputSequenceLength,
int  actualInputSequenceLength 
)
overridevirtual

write the generated sequence

Implements nmtSample::DataWriter.

◆ initialize()

void nmtSample::BenchmarkWriter::initialize ( )
overridevirtual

it is called right before inference starts

Implements nmtSample::DataWriter.

◆ finalize()

void nmtSample::BenchmarkWriter::finalize ( )
overridevirtual

it is called right after inference ends

Implements nmtSample::DataWriter.

◆ getInfo()

std::string nmtSample::BenchmarkWriter::getInfo ( )
overridevirtual

get the textual description of the component

Implements nmtSample::Component.

◆ generateText()

std::string nmtSample::DataWriter::generateText ( int  sequenceLength,
const int currentOutputData,
Vocabulary::ptr  vocabulary 
)
staticprotectedinherited
Here is the caller graph for this function:

Member Data Documentation

◆ mSampleCount

int nmtSample::BenchmarkWriter::mSampleCount
private

◆ mInputTokenCount

int nmtSample::BenchmarkWriter::mInputTokenCount
private

◆ mOutputTokenCount

int nmtSample::BenchmarkWriter::mOutputTokenCount
private

◆ mStartTS

std::chrono::high_resolution_clock::time_point nmtSample::BenchmarkWriter::mStartTS
private

The documentation for this class was generated from the following files: