TensorRT 10.6.0
nvinfer1::v_1_0::IPluginV3OneRuntime Class Referenceabstract

#include <NvInferRuntime.h>

Inheritance diagram for nvinfer1::v_1_0::IPluginV3OneRuntime:
nvinfer1::v_1_0::IPluginCapability nvinfer1::IVersionedInterface

Public Member Functions

InterfaceInfo getInterfaceInfo () const noexcept override
 Return version information associated with this interface. Applications must not override this method. More...
 
virtual int32_t setTactic (int32_t tactic) noexcept
 Set the tactic to be used in the subsequent call to enqueue(). If no custom tactics were advertised, this will have a value of 0, which is designated as the default tactic. More...
 
virtual int32_t onShapeChange (PluginTensorDesc const *in, int32_t nbInputs, PluginTensorDesc const *out, int32_t nbOutputs) noexcept=0
 Called when a plugin is being prepared for execution for specific dimensions. This could happen multiple times in the execution phase, both during creation of an engine by IBuilder and execution of an engine by IExecutionContext. More...
 
virtual int32_t enqueue (PluginTensorDesc const *inputDesc, PluginTensorDesc const *outputDesc, void const *const *inputs, void *const *outputs, void *workspace, cudaStream_t stream) noexcept=0
 Execute the layer. More...
 
virtual IPluginV3attachToContext (IPluginResourceContext *context) noexcept=0
 Clone the plugin, attach the cloned plugin object to a execution context and grant the cloned plugin access to some context resources. More...
 
virtual PluginFieldCollection const * getFieldsToSerialize () noexcept=0
 Get the plugin fields which should be serialized. More...
 
- Public Member Functions inherited from nvinfer1::IVersionedInterface
virtual APILanguage getAPILanguage () const noexcept
 The language used to build the implementation of this Interface. More...
 
virtual ~IVersionedInterface () noexcept=default
 

Additional Inherited Members

- Protected Member Functions inherited from nvinfer1::IVersionedInterface
 IVersionedInterface ()=default
 
 IVersionedInterface (IVersionedInterface const &)=default
 
 IVersionedInterface (IVersionedInterface &&)=default
 
IVersionedInterfaceoperator= (IVersionedInterface const &) &=default
 
IVersionedInterfaceoperator= (IVersionedInterface &&) &=default
 

Member Function Documentation

◆ attachToContext()

virtual IPluginV3 * nvinfer1::v_1_0::IPluginV3OneRuntime::attachToContext ( IPluginResourceContext context)
pure virtualnoexcept

Clone the plugin, attach the cloned plugin object to a execution context and grant the cloned plugin access to some context resources.

This function is called automatically for each plugin when a new execution context is created. The plugin may use resources provided by the IPluginResourceContext until the plugin is deleted by TensorRT.

If the plugin needs per-context resources, it can be allocated here.

Parameters
contextA resource context that exposes methods to get access to execution context specific resources. A different resource context is guaranteed for each different execution context to which the plugin is attached.
See also
IPluginResourceContext
Note
This method should clone the entire IPluginV3 object, not just the runtime interface
Returns
A clone of the IPluginV3 object whose runtime interface on which this method is invoked, which has attached to the provided resource context.

◆ enqueue()

virtual int32_t nvinfer1::v_1_0::IPluginV3OneRuntime::enqueue ( PluginTensorDesc const *  inputDesc,
PluginTensorDesc const *  outputDesc,
void const *const *  inputs,
void *const *  outputs,
void *  workspace,
cudaStream_t  stream 
)
pure virtualnoexcept

Execute the layer.

Parameters
inputDeschow to interpret the memory for the input tensors.
outputDeschow to interpret the memory for the output tensors.
inputsThe memory for the input tensors.
outputsThe memory for the output tensors.
workspaceWorkspace for execution.
streamThe stream in which to execute the kernels.
Returns
0 for success, else non-zero (which will cause engine termination). The returned code will be reported through the error recorder.

◆ getFieldsToSerialize()

virtual PluginFieldCollection const * nvinfer1::v_1_0::IPluginV3OneRuntime::getFieldsToSerialize ( )
pure virtualnoexcept

Get the plugin fields which should be serialized.

Note
The set of plugin fields returned does not necessarily need to match that advertised through getFieldNames() of the corresponding plugin creator.
To serialize arbitrary plugin data, use a PluginField of PluginFieldType::kUNKNOWN, with the length of the PluginField set to the correct number of bytes.

◆ getInterfaceInfo()

InterfaceInfo nvinfer1::v_1_0::IPluginV3OneRuntime::getInterfaceInfo ( ) const
inlineoverridevirtualnoexcept

Return version information associated with this interface. Applications must not override this method.

Implements nvinfer1::IVersionedInterface.

◆ onShapeChange()

virtual int32_t nvinfer1::v_1_0::IPluginV3OneRuntime::onShapeChange ( PluginTensorDesc const *  in,
int32_t  nbInputs,
PluginTensorDesc const *  out,
int32_t  nbOutputs 
)
pure virtualnoexcept

Called when a plugin is being prepared for execution for specific dimensions. This could happen multiple times in the execution phase, both during creation of an engine by IBuilder and execution of an engine by IExecutionContext.

  • IBuilder will call this function once per profile, with in resolved to the values specified by the kOPT field of the current profile.
  • IExecutionContext will call this during the next subsequent instance of enqueueV3() or executeV2() if:
    • The optimization profile is changed via setOptimizationProfile() or setOptimizationProfileAsync().
    • An input binding is changed via setInputTensorAddress() or setTensorAddress() or setInputShape().
      Warning
      The execution phase is timing critical during IExecutionContext but is not part of the timing loop when called from IBuilder. Performance bottlenecks of onShapeChange() will not show up during engine building but will be visible during execution if any triggering functions are called.
      Parameters
      inThe input tensors attributes that are used for configuration.
      nbInputsNumber of input tensors.
      outThe output tensors attributes that are used for configuration.
      nbOutputsNumber of output tensors.

◆ setTactic()

virtual int32_t nvinfer1::v_1_0::IPluginV3OneRuntime::setTactic ( int32_t  tactic)
inlinevirtualnoexcept

Set the tactic to be used in the subsequent call to enqueue(). If no custom tactics were advertised, this will have a value of 0, which is designated as the default tactic.

Returns
0 for success, else non-zero (which will cause engine termination). The returned code will be reported through the error recorder.

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

  Copyright © 2024 NVIDIA Corporation
  Privacy Policy | Manage My Privacy | Do Not Sell or Share My Data | Terms of Service | Accessibility | Corporate Policies | Product Security | Contact