@Namespace(value="nvinfer1") @NoOffset @Properties(inherit=nvinfer.class) public class IPluginV2DynamicExt extends IPluginV2Ext
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Modifier and Type | Field and Description |
|---|---|
static int |
kFORMAT_COMBINATION_LIMIT |
| Constructor and Description |
|---|
IPluginV2DynamicExt(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
IPluginV2DynamicExt |
clone()
\brief Clone the plugin object.
|
void |
configurePlugin(DynamicPluginTensorDesc in,
int nbInputs,
DynamicPluginTensorDesc out,
int nbOutputs)
\brief Configure the plugin.
|
int |
enqueue(PluginTensorDesc inputDesc,
PluginTensorDesc outputDesc,
Pointer inputs,
Pointer outputs,
Pointer workspace,
org.bytedeco.cuda.cudart.CUstream_st stream) |
int |
enqueue(PluginTensorDesc inputDesc,
PluginTensorDesc outputDesc,
PointerPointer inputs,
PointerPointer outputs,
Pointer workspace,
org.bytedeco.cuda.cudart.CUstream_st stream)
\brief Execute the layer.
|
DimsExprs |
getOutputDimensions(int outputIndex,
DimsExprs inputs,
int nbInputs,
IExprBuilder exprBuilder)
\brief Get expressions for computing dimensions of an output tensor from dimensions of the input tensors.
|
long |
getWorkspaceSize(PluginTensorDesc inputs,
int nbInputs,
PluginTensorDesc outputs,
int nbOutputs)
\brief Find the workspace size required by the layer.
|
static int |
kFORMAT_COMBINATION_LIMIT()
Limit on number of format combinations accepted.
|
boolean |
supportsFormatCombination(int pos,
PluginTensorDesc inOut,
int nbInputs,
int nbOutputs)
\brief Return true if plugin supports the format and datatype for the input/output indexed by pos.
|
attachToContext, canBroadcastInputAcrossBatch, configurePlugin, configurePlugin, configurePlugin, configurePlugin, configurePlugin, configurePlugin, detachFromContext, getOutputDataType, getOutputDataType, getOutputDataType, isOutputBroadcastAcrossBatch, isOutputBroadcastAcrossBatchconfigureWithFormat, configureWithFormat, destroy, enqueue, enqueue, getNbOutputs, getOutputDimensions, getPluginNamespace, getPluginType, getPluginVersion, getSerializationSize, getTensorRTVersion, getWorkspaceSize, initialize, serialize, setPluginNamespace, setPluginNamespace, supportsFormat, supportsFormat, terminateaddress, 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, zeropublic IPluginV2DynamicExt(Pointer p)
Pointer(Pointer).@NoException(value=true) public IPluginV2DynamicExt clone()
IPluginV2Extclone in class IPluginV2Ext@ByVal @NoException(value=true) public DimsExprs getOutputDimensions(int outputIndex, @Const DimsExprs inputs, int nbInputs, @ByRef IExprBuilder exprBuilder)
outputIndex - The index of the output tensorinputs - Expressions for dimensions of the input tensorsnbInputs - The number of input tensorsexprBuilder - Object for generating new expressions
This function is called by the implementations of IBuilder during analysis of the network.
Example #1: A plugin has a single output that transposes the last two dimensions of the plugin's single input.
The body of the override of getOutputDimensions can be:
DimsExprs output(inputs[0]);
std::swap(output.d[output.nbDims-1], output.d[output.nbDims-2]);
return output;
Example #2: A plugin concatenates its two inputs along the first dimension.
The body of the override of getOutputDimensions can be:
DimsExprs output(inputs[0]);
output.d[0] = exprBuilder.operation(DimensionOperation::kSUM, *inputs[0].d[0], *inputs[1].d[0]);
return output;@MemberGetter public static int kFORMAT_COMBINATION_LIMIT()
@Cast(value="bool") @NoException(value=true) public boolean supportsFormatCombination(int pos, @Const PluginTensorDesc inOut, int nbInputs, int nbOutputs)
@NoException(value=true) public void configurePlugin(@Const DynamicPluginTensorDesc in, int nbInputs, @Const DynamicPluginTensorDesc out, int nbOutputs)
in - The input tensors attributes that are used for configuration.nbInputs - Number of input tensors.out - The output tensors attributes that are used for configuration.nbOutputs - Number of output tensors.@Cast(value="size_t") @NoException(value=true) public long getWorkspaceSize(@Const PluginTensorDesc inputs, int nbInputs, @Const PluginTensorDesc outputs, int nbOutputs)
@NoException(value=true) public int enqueue(@Const PluginTensorDesc inputDesc, @Const PluginTensorDesc outputDesc, @Cast(value="const void*const*") PointerPointer inputs, @Cast(value="void*const*") PointerPointer outputs, Pointer workspace, org.bytedeco.cuda.cudart.CUstream_st stream)
inputDesc - how to interpret the memory for the input tensors.outputDesc - how to interpret the memory for the output tensors.inputs - The memory for the input tensors.outputs - The memory for the output tensors.workspace - Workspace for execution.stream - The stream in which to execute the kernels.@NoException(value=true) public int enqueue(@Const PluginTensorDesc inputDesc, @Const PluginTensorDesc outputDesc, @Cast(value="const void*const*") @ByPtrPtr Pointer inputs, @Cast(value="void*const*") @ByPtrPtr Pointer outputs, Pointer workspace, org.bytedeco.cuda.cudart.CUstream_st stream)
Copyright © 2024. All rights reserved.