@Namespace(value="nvinfer1") @Properties(inherit=nvinfer.class) public class IPluginV2 extends Pointer
IPluginCreator
,
IPluginRegistry
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
IPluginV2(Pointer p)
Deprecated.
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
IPluginV2 |
clone()
Deprecated.
\brief Clone the plugin object.
|
void |
configureWithFormat(Dims64 inputDims,
int nbInputs,
Dims64 outputDims,
int nbOutputs,
int type,
int format,
int maxBatchSize)
Deprecated.
|
void |
configureWithFormat(Dims64 inputDims,
int nbInputs,
Dims64 outputDims,
int nbOutputs,
nvinfer.DataType type,
nvinfer.TensorFormat format,
int maxBatchSize)
Deprecated.
\brief Configure the layer.
|
void |
destroy()
Deprecated.
\brief Destroy the plugin object.
|
int |
enqueue(int batchSize,
Pointer inputs,
Pointer outputs,
Pointer workspace,
org.bytedeco.cuda.cudart.CUstream_st stream)
Deprecated.
|
int |
enqueue(int batchSize,
PointerPointer inputs,
PointerPointer outputs,
Pointer workspace,
org.bytedeco.cuda.cudart.CUstream_st stream)
Deprecated.
\brief Execute the layer.
|
int |
getNbOutputs()
Deprecated.
\brief Get the number of outputs from the layer.
|
Dims64 |
getOutputDimensions(int index,
Dims64 inputs,
int nbInputDims)
Deprecated.
\brief Get the dimension of an output tensor.
|
String |
getPluginNamespace()
Deprecated.
\brief Return the namespace of the plugin object.
|
String |
getPluginType()
Deprecated.
\brief Return the plugin type.
|
String |
getPluginVersion()
Deprecated.
\brief Return the plugin version.
|
long |
getSerializationSize()
Deprecated.
\brief Find the size of the serialization buffer required to store the plugin configuration in a binary file.
|
int |
getTensorRTVersion()
Deprecated.
\brief Return the API version with which this plugin was built.
|
long |
getWorkspaceSize(int maxBatchSize)
Deprecated.
\brief Find the workspace size required by the layer.
|
int |
initialize()
Deprecated.
\brief Initialize the layer for execution.
|
void |
serialize(Pointer buffer)
Deprecated.
\brief Serialize the layer.
|
void |
setPluginNamespace(BytePointer pluginNamespace)
Deprecated.
|
void |
setPluginNamespace(String pluginNamespace)
Deprecated.
\brief Set the namespace that this plugin object belongs to.
|
boolean |
supportsFormat(int type,
int format)
Deprecated.
|
boolean |
supportsFormat(nvinfer.DataType type,
nvinfer.TensorFormat format)
Deprecated.
\brief Check format support.
|
void |
terminate()
Deprecated.
\brief Release resources acquired during plugin layer initialization.
|
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 IPluginV2(Pointer p)
Pointer(Pointer)
.@NoException(value=true) public int getTensorRTVersion()
@NoException(value=true) public String getPluginType()
\warning The string returned must be NULL-terminated and have a length of 1024 bytes or less including the
NULL terminator.
\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 String getPluginVersion()
\warning The string returned must be NULL-terminated and have a length of 1024 bytes or less including the
NULL terminator.
\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 int getNbOutputs()
@ByVal @Cast(value="nvinfer1::Dims*") @NoException(value=true) public Dims64 getOutputDimensions(int index, @Cast(value="const nvinfer1::Dims*") Dims64 inputs, int nbInputDims)
index
- The index of the output tensor. Will lie in the valid range (between 0 and getNbOutputs()-1
inclusive).inputs
- The input tensor dimensions. Will be the start address of a Dims array of length nbInputDims.nbInputDims
- The number of input tensors. Will be a non-negative integer.@Cast(value="bool") @NoException(value=true) public boolean supportsFormat(nvinfer.DataType type, @Cast(value="nvinfer1::PluginFormat") nvinfer.TensorFormat format)
type
- DataType requested.format
- PluginFormat requested.@Cast(value="bool") @NoException(value=true) public boolean supportsFormat(@Cast(value="nvinfer1::DataType") int type, @Cast(value="nvinfer1::PluginFormat") int format)
@NoException(value=true) public void configureWithFormat(@Cast(value="const nvinfer1::Dims*") Dims64 inputDims, int nbInputs, @Cast(value="const nvinfer1::Dims*") Dims64 outputDims, int nbOutputs, nvinfer.DataType type, @Cast(value="nvinfer1::PluginFormat") nvinfer.TensorFormat format, int maxBatchSize)
inputDims
- The input tensor dimensions. Will be the start address of a Dims array of length nbInputs.nbInputs
- The number of inputs. Will be a non-negative integer.outputDims
- The output tensor dimensions. Will be the start address of a Dims array of length nbOutputs.nbOutputs
- The number of outputs. Will be a positive integer identical to the return value of
getNbOutputs().type
- The data type selected for the engine.format
- The format selected for the engine.maxBatchSize
- The maximum batch size. Will be a positive integer.
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).
\warning for the format 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.
\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. However, TensorRT
will not call this method from two threads simultaneously on a given clone of a plugin.
@NoException(value=true) public void configureWithFormat(@Cast(value="const nvinfer1::Dims*") Dims64 inputDims, int nbInputs, @Cast(value="const nvinfer1::Dims*") Dims64 outputDims, int nbOutputs, @Cast(value="nvinfer1::DataType") int type, @Cast(value="nvinfer1::PluginFormat") int format, int maxBatchSize)
@NoException(value=true) public int initialize()
@NoException(value=true) public void terminate()
@Cast(value="size_t") @NoException(value=true) public long getWorkspaceSize(int maxBatchSize)
maxBatchSize
- The maximum batch size, which will be a positive integer.@NoException(value=true) public int enqueue(int batchSize, @Cast(value="const void*const*") PointerPointer inputs, @Cast(value="void*const*") PointerPointer outputs, Pointer workspace, org.bytedeco.cuda.cudart.CUstream_st stream)
batchSize
- The number of inputs in the batch.inputs
- The memory for the input tensors. Will be an array of device addresses corresponding to input
tensors of length nbInputs, where nbInputs is the second parameter passed to configureWithFormat().
The i-th input tensor will have the dimensions inputDims[i], where inputDims is the first parameter
that was passed to configureWithFormat().outputs
- The memory for the output tensors. Will be an array of device addresses corresponding to output
tensors of length getNbOutputs().workspace
- Workspace for execution. Will be the start address of a device buffer whose length will be at
least getWorkspaceSize(batchSize).stream
- The stream in which to execute the kernels. This will be a valid CUDA stream.@NoException(value=true) public int enqueue(int batchSize, @Cast(value="const void*const*") @ByPtrPtr Pointer inputs, @Cast(value="void*const*") @ByPtrPtr Pointer outputs, Pointer workspace, org.bytedeco.cuda.cudart.CUstream_st stream)
@Cast(value="size_t") @NoException(value=true) public long getSerializationSize()
@NoException(value=true) public void serialize(Pointer buffer)
buffer
- A pointer to a host buffer to serialize data. Size of buffer will be at least as large as the
value returned by getSerializationSize.\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 destroy()
@NoException(value=true) public IPluginV2 clone()
clone
in class Object
@NoException(value=true) public void setPluginNamespace(String pluginNamespace)
pluginNamespace
- The namespace for the plugin object.
\warning The string pluginNamespace will be NULL-terminated and have a length of 1024 bytes or less including the
NULL terminator.
\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 setPluginNamespace(@Cast(value="const char*") BytePointer pluginNamespace)
@NoException(value=true) public String getPluginNamespace()
Copyright © 2024. All rights reserved.