TensorRT
|
Builds an engine from a network definition. More...
#include <NvInfer.h>
Public Member Functions | |
virtual nvinfer1::INetworkDefinition * | createNetwork ()=0 |
Create a network definition object. More... | |
virtual void | setMaxBatchSize (int batchSize)=0 |
Set the maximum batch size. More... | |
virtual int | getMaxBatchSize () const =0 |
Get the maximum batch size. More... | |
virtual void | setMaxWorkspaceSize (std::size_t workspaceSize)=0 |
Set the maximum workspace size. More... | |
virtual std::size_t | getMaxWorkspaceSize () const =0 |
Get the maximum workspace size. More... | |
virtual void | setHalf2Mode (bool mode)=0 |
Set whether half2 mode is used. More... | |
virtual bool | getHalf2Mode () const =0 |
Query whether half2 mode is used. More... | |
virtual void | setDebugSync (bool sync)=0 |
Set whether the builder should use debug synchronization. More... | |
virtual bool | getDebugSync () const =0 |
Query whether the builder will use debug synchronization. More... | |
virtual void | setMinFindIterations (int minFind)=0 |
Set the number of minimization iterations used when timing layers. More... | |
virtual int | getMinFindIterations () const =0 |
Query the number of minimzation iterations. More... | |
virtual void | setAverageFindIterations (int avgFind)=0 |
Set the number of minimization iterations used when timing layers. More... | |
virtual int | getAverageFindIterations () const =0 |
Query the number of averaging iterations. More... | |
virtual nvinfer1::ICudaEngine * | buildCudaEngine (nvinfer1::INetworkDefinition &network)=0 |
Build a CUDA engine from a network definition. More... | |
virtual bool | platformHasFastFp16 () const =0 |
Determine whether the platform has fast native fp16. | |
virtual bool | platformHasFastInt8 () const =0 |
Determine whether the platform has fast native int8. | |
virtual void | destroy ()=0 |
Destroy this object. | |
virtual void | setInt8Mode (bool mode)=0 |
Set the maximum value for a region. More... | |
virtual bool | getInt8Mode () const =0 |
Query whether Int8 mode is used. More... | |
virtual void | setInt8Calibrator (IInt8Calibrator *calibrator)=0 |
Set Int8 Calibration interface. | |
virtual void | setGpuAllocator (IGpuAllocator *allocator)=0 |
Set the GPU allocator. More... | |
virtual void | setFp16Mode (bool mode)=0 |
Set whether or not 16-bit kernels are permitted. More... | |
virtual bool | getFp16Mode () const =0 |
Query whether 16-bit kernels are permitted. More... | |
Builds an engine from a network definition.
|
pure virtual |
Build a CUDA engine from a network definition.
|
pure virtual |
Create a network definition object.
|
pure virtual |
Query the number of averaging iterations.
|
pure virtual |
Query whether the builder will use debug synchronization.
|
pure virtual |
Query whether 16-bit kernels are permitted.
|
pure virtual |
Query whether half2 mode is used.
|
pure virtual |
Query whether Int8 mode is used.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Query the number of minimzation iterations.
|
pure virtual |
Set the number of minimization iterations used when timing layers.
When timing layers, the builder minimizes over a set of average times for layer execution. This parameter controls the number of iterations used in averaging.
|
pure virtual |
Set whether the builder should use debug synchronization.
If this flag is true, the builder will synchronize after timing each layer, and report the layer name. It can be useful when diagnosing issues at build time.
|
pure virtual |
Set whether or not 16-bit kernels are permitted.
During engine build fp16 kernels will also be tried when this mode is enabled.
mode | Whether 16-bit kernels are permitted. |
|
pure virtual |
Set the GPU allocator.
allocator | Set the GPU allocator to be used by the builder. All GPU memory acquired will use this allocator. If NULL is passed, the default allocator will be used. |
Default: uses cudaMalloc/cudaFree.
|
pure virtual |
Set whether half2 mode is used.
half2 mode is a paired-image mode that is significantly faster for batch sizes greater than one on platforms with fp16 support.
mode | Whether half2 mode is used. |
|
pure virtual |
Set the maximum value for a region.
Used for INT8 mode compression.
|
pure virtual |
Set the maximum batch size.
batchSize | The maximum batch size which can be used at execution time, and also the batch size for which the engine will be optimized. |
|
pure virtual |
Set the maximum workspace size.
workspaceSize | The maximum GPU temporary memory which the engine can use at execution time. |
|
pure virtual |
Set the number of minimization iterations used when timing layers.
When timing layers, the builder minimizes over a set of average times for layer execution. This parameter controls the number of iterations used in minimzation.