@Namespace(value="nvinfer1") @Properties(inherit=nvinfer.class) public class IPluginV2Ext extends IPluginV2
IPluginV2
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
IPluginV2Ext(Pointer p)
Deprecated.
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
attachToContext(cudnnContext arg0,
cublasContext arg1,
IGpuAllocator arg2)
Deprecated.
\brief Attach the plugin object to an execution context and grant the plugin the access to some context
resource.
|
boolean |
canBroadcastInputAcrossBatch(int inputIndex)
Deprecated.
\brief Return true if plugin can use input that is broadcast across batch without replication.
|
IPluginV2Ext |
clone()
Deprecated.
\brief Clone the plugin object.
|
void |
configurePlugin(Dims32 inputDims,
int nbInputs,
Dims32 outputDims,
int nbOutputs,
int[] inputTypes,
int[] outputTypes,
boolean[] inputIsBroadcast,
boolean[] outputIsBroadcast,
int floatFormat,
int maxBatchSize)
Deprecated.
|
void |
configurePlugin(Dims32 inputDims,
int nbInputs,
Dims32 outputDims,
int nbOutputs,
int[] inputTypes,
int[] outputTypes,
BoolPointer inputIsBroadcast,
BoolPointer outputIsBroadcast,
nvinfer.TensorFormat floatFormat,
int maxBatchSize)
Deprecated.
|
void |
configurePlugin(Dims32 inputDims,
int nbInputs,
Dims32 outputDims,
int nbOutputs,
IntBuffer inputTypes,
IntBuffer outputTypes,
boolean[] inputIsBroadcast,
boolean[] outputIsBroadcast,
int floatFormat,
int maxBatchSize)
Deprecated.
|
void |
configurePlugin(Dims32 inputDims,
int nbInputs,
Dims32 outputDims,
int nbOutputs,
IntBuffer inputTypes,
IntBuffer outputTypes,
BoolPointer inputIsBroadcast,
BoolPointer outputIsBroadcast,
nvinfer.TensorFormat floatFormat,
int maxBatchSize)
Deprecated.
|
void |
configurePlugin(Dims32 inputDims,
int nbInputs,
Dims32 outputDims,
int nbOutputs,
IntPointer inputTypes,
IntPointer outputTypes,
boolean[] inputIsBroadcast,
boolean[] outputIsBroadcast,
int floatFormat,
int maxBatchSize)
Deprecated.
|
void |
configurePlugin(Dims32 inputDims,
int nbInputs,
Dims32 outputDims,
int nbOutputs,
IntPointer inputTypes,
IntPointer outputTypes,
BoolPointer inputIsBroadcast,
BoolPointer outputIsBroadcast,
nvinfer.TensorFormat floatFormat,
int maxBatchSize)
Deprecated.
\brief Configure the layer with input and output data types.
|
void |
detachFromContext()
Deprecated.
\brief Detach the plugin object from its execution context.
|
nvinfer.DataType |
getOutputDataType(int index,
int[] inputTypes,
int nbInputs)
Deprecated.
|
int |
getOutputDataType(int index,
IntBuffer inputTypes,
int nbInputs)
Deprecated.
|
nvinfer.DataType |
getOutputDataType(int index,
IntPointer inputTypes,
int nbInputs)
Deprecated.
\brief Return the DataType of the plugin output at the requested index.
|
boolean |
isOutputBroadcastAcrossBatch(int outputIndex,
boolean[] inputIsBroadcasted,
int nbInputs)
Deprecated.
|
boolean |
isOutputBroadcastAcrossBatch(int outputIndex,
BoolPointer inputIsBroadcasted,
int nbInputs)
Deprecated.
\brief Return true if output tensor is broadcast across a batch.
|
configureWithFormat, configureWithFormat, destroy, enqueue, enqueue, getNbOutputs, getOutputDimensions, getPluginNamespace, getPluginType, getPluginVersion, getSerializationSize, getTensorRTVersion, getWorkspaceSize, initialize, serialize, setPluginNamespace, setPluginNamespace, supportsFormat, supportsFormat, terminate
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public IPluginV2Ext(Pointer p)
Pointer(Pointer)
.@NoException(value=true) public nvinfer.DataType getOutputDataType(int index, @Cast(value="nvinfer1::DataType*") IntPointer inputTypes, int nbInputs)
\warning DataType:kBOOL and DataType::kUINT8 are not supported.
\usage
- Allowed context for the API call
- Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
when building networks on multiple devices sharing the same plugin.
@NoException(value=true) @Cast(value="nvinfer1::DataType") public int getOutputDataType(int index, @Cast(value="nvinfer1::DataType*") IntBuffer inputTypes, int nbInputs)
@NoException(value=true) public nvinfer.DataType getOutputDataType(int index, @Cast(value="nvinfer1::DataType*") int[] inputTypes, int nbInputs)
@Cast(value="bool") @NoException(value=true) public boolean isOutputBroadcastAcrossBatch(int outputIndex, @Cast(value="const bool*") BoolPointer inputIsBroadcasted, int nbInputs)
outputIndex
- The index of the outputinputIsBroadcasted
- The ith element is true if the tensor for the ith input is broadcast across a batch.nbInputs
- The number of inputs
The values in inputIsBroadcasted refer to broadcasting at the semantic level,
i.e. are unaffected by whether method canBroadcastInputAcrossBatch requests
physical replication of the values.
\usage
- Allowed context for the API call
- Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
when building networks on multiple devices sharing the same plugin.@Cast(value="bool") @NoException(value=true) public boolean isOutputBroadcastAcrossBatch(int outputIndex, @Cast(value="const bool*") boolean[] inputIsBroadcasted, int nbInputs)
@Cast(value="bool") @NoException(value=true) public boolean canBroadcastInputAcrossBatch(int inputIndex)
inputIndex
- Index of input that could be broadcast.
For each input whose tensor is semantically broadcast across a batch,
TensorRT calls this method before calling configurePlugin.
If canBroadcastInputAcrossBatch returns true, TensorRT will not replicate the input tensor;
i.e., there will be a single copy that the plugin should share across the batch.
If it returns false, TensorRT will replicate the input tensor
so that it appears like a non-broadcasted tensor.
This method is called only for inputs that can be broadcast.
\usage
- Allowed context for the API call
- Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
when building networks on multiple devices sharing the same plugin.@NoException(value=true) public void configurePlugin(@Cast(value="const nvinfer1::Dims*") Dims32 inputDims, int nbInputs, @Cast(value="const nvinfer1::Dims*") Dims32 outputDims, int nbOutputs, @Cast(value="nvinfer1::DataType*") IntPointer inputTypes, @Cast(value="nvinfer1::DataType*") IntPointer outputTypes, @Cast(value="const bool*") BoolPointer inputIsBroadcast, @Cast(value="const bool*") BoolPointer outputIsBroadcast, @Cast(value="nvinfer1::PluginFormat") nvinfer.TensorFormat floatFormat, int maxBatchSize)
inputDims
- The input tensor dimensions.nbInputs
- The number of inputs.outputDims
- The output tensor dimensions.nbOutputs
- The number of outputs.inputTypes
- The data types selected for the plugin inputs.outputTypes
- The data types selected for the plugin outputs.inputIsBroadcast
- True for each input that the plugin must broadcast across the batch.outputIsBroadcast
- True for each output that TensorRT will broadcast across the batch.floatFormat
- The format selected for the engine for the floating point inputs/outputs.maxBatchSize
- The maximum batch size.
The dimensions passed here do not include the outermost batch size (i.e. for 2-D image networks, they will be
3-dimensional CHW dimensions). When inputIsBroadcast or outputIsBroadcast is true, the outermost batch size for
that input or output should be treated as if it is one.
Index 'i' of inputIsBroadcast is true only if the input is semantically broadcast across the batch and
calling canBroadcastInputAcrossBatch with argument 'i' returns true.
Index 'i' of outputIsBroadcast is true only if calling isOutputBroadcastAcrossBatch with argument 'i'
returns true.
\warning for the floatFormat field, the values PluginFormat::kCHW4, PluginFormat::kCHW16, and
PluginFormat::kCHW32 will not be passed in, this is to keep backward compatibility with TensorRT 5.x series. Use
PluginV2IOExt or PluginV2DynamicExt for other PluginFormats.
\usage
- Allowed context for the API call
- Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
when building networks on multiple devices sharing the same plugin. However, TensorRT
will not call this method from two threads simultaneously on a given clone of a plugin.@NoException(value=true) public void configurePlugin(@Cast(value="const nvinfer1::Dims*") Dims32 inputDims, int nbInputs, @Cast(value="const nvinfer1::Dims*") Dims32 outputDims, int nbOutputs, @Cast(value="nvinfer1::DataType*") IntBuffer inputTypes, @Cast(value="nvinfer1::DataType*") IntBuffer outputTypes, @Cast(value="const bool*") boolean[] inputIsBroadcast, @Cast(value="const bool*") boolean[] outputIsBroadcast, @Cast(value="nvinfer1::PluginFormat") int floatFormat, int maxBatchSize)
@NoException(value=true) public void configurePlugin(@Cast(value="const nvinfer1::Dims*") Dims32 inputDims, int nbInputs, @Cast(value="const nvinfer1::Dims*") Dims32 outputDims, int nbOutputs, @Cast(value="nvinfer1::DataType*") int[] inputTypes, @Cast(value="nvinfer1::DataType*") int[] outputTypes, @Cast(value="const bool*") BoolPointer inputIsBroadcast, @Cast(value="const bool*") BoolPointer outputIsBroadcast, @Cast(value="nvinfer1::PluginFormat") nvinfer.TensorFormat floatFormat, int maxBatchSize)
@NoException(value=true) public void configurePlugin(@Cast(value="const nvinfer1::Dims*") Dims32 inputDims, int nbInputs, @Cast(value="const nvinfer1::Dims*") Dims32 outputDims, int nbOutputs, @Cast(value="nvinfer1::DataType*") IntPointer inputTypes, @Cast(value="nvinfer1::DataType*") IntPointer outputTypes, @Cast(value="const bool*") boolean[] inputIsBroadcast, @Cast(value="const bool*") boolean[] outputIsBroadcast, @Cast(value="nvinfer1::PluginFormat") int floatFormat, int maxBatchSize)
@NoException(value=true) public void configurePlugin(@Cast(value="const nvinfer1::Dims*") Dims32 inputDims, int nbInputs, @Cast(value="const nvinfer1::Dims*") Dims32 outputDims, int nbOutputs, @Cast(value="nvinfer1::DataType*") IntBuffer inputTypes, @Cast(value="nvinfer1::DataType*") IntBuffer outputTypes, @Cast(value="const bool*") BoolPointer inputIsBroadcast, @Cast(value="const bool*") BoolPointer outputIsBroadcast, @Cast(value="nvinfer1::PluginFormat") nvinfer.TensorFormat floatFormat, int maxBatchSize)
@NoException(value=true) public void configurePlugin(@Cast(value="const nvinfer1::Dims*") Dims32 inputDims, int nbInputs, @Cast(value="const nvinfer1::Dims*") Dims32 outputDims, int nbOutputs, @Cast(value="nvinfer1::DataType*") int[] inputTypes, @Cast(value="nvinfer1::DataType*") int[] outputTypes, @Cast(value="const bool*") boolean[] inputIsBroadcast, @Cast(value="const bool*") boolean[] outputIsBroadcast, @Cast(value="nvinfer1::PluginFormat") int floatFormat, int maxBatchSize)
@NoException(value=true) public void attachToContext(cudnnContext arg0, cublasContext arg1, IGpuAllocator arg2)
cudnn
- The CUDNN context handle of the execution contextcublas
- The cublas context handle of the execution contextallocator
- The allocator used by the execution context
This function is called automatically for each plugin when a new execution context is created. If the context
was created without resources, this method is not called until the resources are assigned. It is also called if
new resources are assigned to the context.
If the plugin needs per-context resource, it can be allocated here.
The plugin can also get context-owned CUDNN and CUBLAS context here.
\note In the automotive safety context, the CUDNN and CUBLAS parameters will be nullptr because CUDNN and CUBLAS
is not used by the safe runtime.
\usage
- Allowed context for the API call
- Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
when building networks on multiple devices sharing the same plugin.@NoException(value=true) public void detachFromContext()
@NoException(value=true) public IPluginV2Ext clone()
Copyright © 2024. All rights reserved.