@Namespace(value="nvinfer1") @NoOffset @Properties(inherit=nvinfer.class) public class IOptimizationProfile extends INoCopy
IBuilderConfig::addOptimizationProfile()
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
IOptimizationProfile(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
Dims32 |
getDimensions(BytePointer inputName,
int select) |
Dims32 |
getDimensions(String inputName,
nvinfer.OptProfileSelector select)
\brief Get the minimum / optimum / maximum dimensions for a dynamic input tensor.
|
float |
getExtraMemoryTarget()
\brief Get the extra memory target that has been defined for this profile.
|
int |
getNbShapeValues(BytePointer inputName) |
int |
getNbShapeValues(String inputName)
\brief Get the number of values for an input shape tensor.
|
IntBuffer |
getShapeValues(BytePointer inputName,
int select) |
IntPointer |
getShapeValues(String inputName,
nvinfer.OptProfileSelector select)
\brief Get the minimum / optimum / maximum values for an input shape tensor.
|
boolean |
isValid()
\brief Check whether the optimization profile can be passed to an IBuilderConfig object.
|
boolean |
setDimensions(BytePointer inputName,
int select,
Dims32 dims) |
boolean |
setDimensions(String inputName,
nvinfer.OptProfileSelector select,
Dims32 dims)
\brief Set the minimum / optimum / maximum dimensions for a dynamic input tensor.
|
boolean |
setExtraMemoryTarget(float target)
\brief Set a target for extra GPU memory that may be used by this profile.
|
boolean |
setShapeValues(BytePointer inputName,
int select,
int[] values,
int nbValues) |
boolean |
setShapeValues(BytePointer inputName,
int select,
IntBuffer values,
int nbValues) |
boolean |
setShapeValues(BytePointer inputName,
int select,
IntPointer values,
int nbValues) |
boolean |
setShapeValues(String inputName,
nvinfer.OptProfileSelector select,
int[] values,
int nbValues) |
boolean |
setShapeValues(String inputName,
nvinfer.OptProfileSelector select,
IntBuffer values,
int nbValues) |
boolean |
setShapeValues(String inputName,
nvinfer.OptProfileSelector select,
IntPointer values,
int nbValues)
\brief Set the minimum / optimum / maximum values for an input shape tensor.
|
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 IOptimizationProfile(Pointer p)
Pointer(Pointer)
.@Cast(value="bool") @NoException(value=true) public boolean setDimensions(String inputName, nvinfer.OptProfileSelector select, @ByVal @Cast(value="nvinfer1::Dims*") Dims32 dims)
inputName
- The input tensor nameselect
- Whether to set the minimum, optimum, or maximum dimensionsdims
- The minimum, optimum, or maximum dimensions for this input tensor@Cast(value="bool") @NoException(value=true) public boolean setDimensions(@Cast(value="const char*") BytePointer inputName, @Cast(value="nvinfer1::OptProfileSelector") int select, @ByVal @Cast(value="nvinfer1::Dims*") Dims32 dims)
@ByVal @Cast(value="nvinfer1::Dims*") @NoException(value=true) public Dims32 getDimensions(String inputName, nvinfer.OptProfileSelector select)
@ByVal @Cast(value="nvinfer1::Dims*") @NoException(value=true) public Dims32 getDimensions(@Cast(value="const char*") BytePointer inputName, @Cast(value="nvinfer1::OptProfileSelector") int select)
@Cast(value="bool") @NoException(value=true) public boolean setShapeValues(String inputName, nvinfer.OptProfileSelector select, @Const IntPointer values, int nbValues)
inputName
- The input tensor nameselect
- Whether to set the minimum, optimum, or maximum input values.values
- An array of length nbValues containing the minimum, optimum, or maximum shape tensor elements.nbValues
- The length of the value array, which must equal the number of shape tensor elements (>= 1)@Cast(value="bool") @NoException(value=true) public boolean setShapeValues(@Cast(value="const char*") BytePointer inputName, @Cast(value="nvinfer1::OptProfileSelector") int select, @Const IntBuffer values, int nbValues)
@Cast(value="bool") @NoException(value=true) public boolean setShapeValues(String inputName, nvinfer.OptProfileSelector select, @Const int[] values, int nbValues)
@Cast(value="bool") @NoException(value=true) public boolean setShapeValues(@Cast(value="const char*") BytePointer inputName, @Cast(value="nvinfer1::OptProfileSelector") int select, @Const IntPointer values, int nbValues)
@Cast(value="bool") @NoException(value=true) public boolean setShapeValues(String inputName, nvinfer.OptProfileSelector select, @Const IntBuffer values, int nbValues)
@Cast(value="bool") @NoException(value=true) public boolean setShapeValues(@Cast(value="const char*") BytePointer inputName, @Cast(value="nvinfer1::OptProfileSelector") int select, @Const int[] values, int nbValues)
@NoException(value=true) public int getNbShapeValues(String inputName)
@NoException(value=true) public int getNbShapeValues(@Cast(value="const char*") BytePointer inputName)
@Const @NoException(value=true) public IntPointer getShapeValues(String inputName, nvinfer.OptProfileSelector select)
@Const @NoException(value=true) public IntBuffer getShapeValues(@Cast(value="const char*") BytePointer inputName, @Cast(value="nvinfer1::OptProfileSelector") int select)
@Cast(value="bool") @NoException(value=true) public boolean setExtraMemoryTarget(float target)
target
- Additional memory that the builder should aim to maximally allocate for this profile, as a
fraction of the memory it would use if the user did not impose any constraints on memory. This
unconstrained case is the default; it corresponds to target == 1.0. If target == 0.0, the builder
aims to create the new optimization profile without allocating any additional weight memory.
Valid inputs lie between 0.0 and 1.0. This parameter is only a hint, and TensorRT does not guarantee
that the target will be reached. This parameter is ignored for the first (default) optimization profile
that is defined.@NoException(value=true) public float getExtraMemoryTarget()
@Cast(value="bool") @NoException(value=true) public boolean isValid()
Copyright © 2024. All rights reserved.