|
| virtual | ~IBuilder () noexcept=0 |
| |
| int32_t | getMaxDLABatchSize () const noexcept |
| | Get the maximum batch size DLA can support. For any tensor the total volume of index dimensions combined(dimensions other than CHW) with the requested batch size should not exceed the value returned by this function. More...
|
| |
| int32_t | getNbDLACores () const noexcept |
| | Return the number of DLA engines available to this builder. More...
|
| |
| void | setGpuAllocator (IGpuAllocator *allocator) noexcept |
| | Set the GPU allocator. More...
|
| |
| nvinfer1::IBuilderConfig * | createBuilderConfig () noexcept |
| | Create a builder configuration object. More...
|
| |
| nvinfer1::INetworkDefinition * | createNetworkV2 (NetworkDefinitionCreationFlags flags) noexcept |
| | Create a network definition object. More...
|
| |
| nvinfer1::IOptimizationProfile * | createOptimizationProfile () noexcept |
| | Create a new optimization profile. More...
|
| |
| void | setErrorRecorder (IErrorRecorder *recorder) noexcept |
| | Set the ErrorRecorder for this interface. More...
|
| |
| IErrorRecorder * | getErrorRecorder () const noexcept |
| | get the ErrorRecorder assigned to this interface. More...
|
| |
| void | reset () noexcept |
| | Resets the builder state to default values. More...
|
| |
| nvinfer1::IHostMemory * | buildSerializedNetwork (INetworkDefinition &network, IBuilderConfig &config) noexcept |
| | Builds and serializes a network for the given INetworkDefinition and IBuilderConfig. More...
|
| |
| bool | buildSerializedNetworkToStream (INetworkDefinition &network, IBuilderConfig &config, IStreamWriter &writer) noexcept |
| | Builds network using the config configuration, and serializes an engine into writer. More...
|
| |
| TRT_DEPRECATED nvinfer1::IHostMemory * | buildSerializedNetwork (INetworkDefinition &network, IBuilderConfig &config, IHostMemory *&kernelText) noexcept |
| | Extended form of buildSerializedNetwork that optionally permits getting the kernel text. More...
|
| |
| TRT_NODISCARD ISafeSerializedNetworkArtifacts * | buildSerializedSafeNetwork (INetworkDefinition &network, IBuilderConfig &config, bool emitCheckerBlob) noexcept |
| | Builds and serializes a safety network. More...
|
| |
| nvinfer1::ICudaEngine * | buildEngineWithConfig (INetworkDefinition &network, IBuilderConfig &config) noexcept |
| | Builds a network for the given INetworkDefinition and IBuilderConfig. More...
|
| |
| bool | isNetworkSupported (INetworkDefinition const &network, IBuilderConfig const &config) const noexcept |
| | Checks that a network is within the scope of the IBuilderConfig settings. More...
|
| |
| ILogger * | getLogger () const noexcept |
| | get the logger with which the builder was created More...
|
| |
| bool | setMaxThreads (int32_t maxThreads) noexcept |
| | Set the maximum number of threads. More...
|
| |
| int32_t | getMaxThreads () const noexcept |
| | get the maximum number of threads that can be used by the builder. More...
|
| |
| IPluginRegistry & | getPluginRegistry () noexcept |
| | get the local plugin registry that can be used by the builder. More...
|
| |
Builds an engine from a network definition.
- Warning
- Do not inherit from this class, as doing so will break forward-compatibility of the API and ABI.
Create a network definition object.
Creates a network definition object with immutable properties specified using the flags parameter.
createNetworkV2 supports creating network with properties from NetworkDefinitionCreationFlags.
CreateNetworkV2 supports dynamic shapes and explicit batch dimensions by default.
The network is always strongly typed: tensor data types are inferred from network input types and operator type specification. The kSTRONGLY_TYPED flag is deprecated and ignored.
The caller owns the new INetworkDefinition, which must be destroyed with operator delete before this IBuilder is destroyed. Destroying this IBuilder before destroying the INetworkDefinition causes undefined behavior.
- Parameters
-
- See also
- INetworkDefinition, NetworkDefinitionCreationFlags
Checks that a network is within the scope of the IBuilderConfig settings.
- Parameters
-
| network | The network definition to check for configuration compliance. |
| config | The configuration of the builder to use when checking network. |
Given an INetworkDefinition, network, and an IBuilderConfig, config, check if the network falls within the constraints of the builder configuration based on the EngineCapability, BuilderFlag, and DeviceType. If the network is within the constraints, then the function returns true, and false if a violation occurs. This function reports the conditions that are violated to the registered ErrorRecorder.
- Returns
- True if network is within the scope of the restrictions specified by the builder config, false otherwise.
- Note
- A
true return value does not guarantee that engine building will succeed, as backends may reject it for reasons not detectable with this fast validation. To definitively check whether a network can be built with a given config, use buildEngineWithConfig or buildSerializedNetwork (depending on the engine capability).
-
This function will synchronize the CUDA stream returned by
config.getProfileStream() before returning.
| void nvinfer1::IBuilder::setErrorRecorder |
( |
IErrorRecorder * |
recorder | ) |
|
|
inlinenoexcept |
Set the ErrorRecorder for this interface.
Assigns the ErrorRecorder to this interface. The ErrorRecorder will track all errors during execution. This function will call incRefCount of the registered ErrorRecorder at least once. Setting recorder to nullptr unregisters the recorder with the interface, resulting in a call to decRefCount if a recorder has been registered.
If an error recorder is not set, messages will be sent to the global log stream.
- Parameters
-
| recorder | The error recorder to register with this interface. |
- See also
- getErrorRecorder()