@Namespace(value="nvinfer1") @NoOffset @Properties(inherit=nvinfer.class) public class ICudaEngine extends INoCopy
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
ICudaEngine()
Default native constructor.
|
ICudaEngine(long size)
Native array allocator.
|
ICudaEngine(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
bindingIsInput(int bindingIndex)
\brief Determine whether a binding is an input binding.
|
IEngineInspector |
createEngineInspector()
\brief Create a new engine inspector which prints the layer information in an engine or an execution context.
|
IExecutionContext |
createExecutionContext()
\brief Create an execution context.
|
IExecutionContext |
createExecutionContextWithoutDeviceMemory()
\brief create an execution context without any device memory allocated
The memory for execution of this device context must be supplied by the application.
|
void |
destroy()
Deprecated.
Use
delete instead. Deprecated in TRT 8.0.
\warning Calling destroy on a managed pointer will result in a double-free error. |
int |
getBindingBytesPerComponent(int bindingIndex)
\brief Return the number of bytes per component of an element.
|
int |
getBindingComponentsPerElement(int bindingIndex)
\brief Return the number of components included in one element.
|
nvinfer.DataType |
getBindingDataType(int bindingIndex)
\brief Determine the required data type for a buffer from its binding index.
|
Dims32 |
getBindingDimensions(int bindingIndex)
\brief Get the dimensions of a binding.
|
nvinfer.TensorFormat |
getBindingFormat(int bindingIndex)
\brief Return the binding format.
|
String |
getBindingFormatDesc(int bindingIndex)
\brief Return the human readable description of the tensor format.
|
int |
getBindingIndex(BytePointer name) |
int |
getBindingIndex(String name)
\brief Retrieve the binding index for a named tensor.
|
String |
getBindingName(int bindingIndex)
\brief Retrieve the name corresponding to a binding index.
|
int |
getBindingVectorizedDim(int bindingIndex)
\brief Return the dimension index that the buffer is vectorized.
|
long |
getDeviceMemorySize()
\brief Return the amount of device memory required by an execution context.
|
nvinfer.EngineCapability |
getEngineCapability()
\brief Determine what execution capability this engine has.
|
IErrorRecorder |
getErrorRecorder()
\brief Get the ErrorRecorder assigned to this interface.
|
nvinfer.TensorLocation |
getLocation(int bindingIndex)
\brief Get location of binding
This lets you know whether the binding should be a pointer to device or host memory.
|
int |
getMaxBatchSize()
Deprecated.
Deprecated in TensorRT 8.4.
|
String |
getName()
\brief Returns the name of the network associated with the engine.
|
int |
getNbBindings()
\brief Get the number of binding indices.
|
int |
getNbLayers()
\brief Get the number of layers in the network.
|
int |
getNbOptimizationProfiles()
\brief Get the number of optimization profiles defined for this engine.
|
ICudaEngine |
getPointer(long i) |
Dims32 |
getProfileDimensions(int bindingIndex,
int profileIndex,
int select) |
Dims32 |
getProfileDimensions(int bindingIndex,
int profileIndex,
nvinfer.OptProfileSelector select)
\brief Get the minimum / optimum / maximum dimensions for a particular binding under an optimization profile.
|
IntBuffer |
getProfileShapeValues(int profileIndex,
int inputIndex,
int select) |
IntPointer |
getProfileShapeValues(int profileIndex,
int inputIndex,
nvinfer.OptProfileSelector select)
\brief Get minimum / optimum / maximum values for an input shape binding under an optimization profile.
|
nvinfer.ProfilingVerbosity |
getProfilingVerbosity()
\brief Return the \ref ProfilingVerbosity the builder config was set to when the engine was built.
|
int |
getTacticSources()
\brief return the tactic sources required by this engine.
|
boolean |
hasImplicitBatchDimension()
\brief Query whether the engine was built with an implicit batch dimension.
|
boolean |
isExecutionBinding(int bindingIndex)
\brief True if pointer to tensor data is required for execution phase, false if nullptr can be supplied.
|
boolean |
isRefittable()
\brief Return true if an engine can be refit.
|
boolean |
isShapeBinding(int bindingIndex)
\brief True if tensor is required as input for shape calculations or output from them.
|
ICudaEngine |
position(long position) |
IHostMemory |
serialize()
\brief Serialize the network to a stream.
|
void |
setErrorRecorder(IErrorRecorder recorder) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zeropublic ICudaEngine()
public ICudaEngine(long size)
Pointer.position(long).public ICudaEngine(Pointer p)
Pointer(Pointer).public ICudaEngine position(long position)
public ICudaEngine getPointer(long i)
getPointer in class Pointer@NoException(value=true) public int getNbBindings()
getBindingIndex();@NoException(value=true) public int getBindingIndex(String name)
name - The tensor name.getBindingName()@NoException(value=true) public int getBindingIndex(@Cast(value="const char*") BytePointer name)
@NoException(value=true) public String getBindingName(int bindingIndex)
bindingIndex - The binding index.getBindingIndex()@Cast(value="bool") @NoException(value=true) public boolean bindingIsInput(int bindingIndex)
bindingIndex - The binding index.getBindingIndex()@ByVal @Cast(value="nvinfer1::Dims*") @NoException(value=true) public Dims32 getBindingDimensions(int bindingIndex)
bindingIndex - The binding index.getBindingIndex()@NoException(value=true) public nvinfer.DataType getBindingDataType(int bindingIndex)
bindingIndex - The binding index.getBindingIndex()@Deprecated @NoException(value=true) public int getMaxBatchSize()
@NoException(value=true) public int getNbLayers()
@NoException(value=true) public IHostMemory serialize()
IRuntime::deserializeCudaEngine()@NoException(value=true) public IExecutionContext createExecutionContext()
IExecutionContext.,
IExecutionContext::setOptimizationProfile()@Deprecated @NoException(value=true) public void destroy()
delete instead. Deprecated in TRT 8.0.
\warning Calling destroy on a managed pointer will result in a double-free error.@NoException(value=true) public nvinfer.TensorLocation getLocation(int bindingIndex)
bindingIndex - The binding index.ITensor::getLocation()@NoException(value=true) public IExecutionContext createExecutionContextWithoutDeviceMemory()
@Cast(value="size_t") @NoException(value=true) public long getDeviceMemorySize()
IExecutionContext::setDeviceMemory()@Cast(value="bool") @NoException(value=true) public boolean isRefittable()
nvinfer1::createInferRefitter()@NoException(value=true) public int getBindingBytesPerComponent(int bindingIndex)
bindingIndex - The binding Index.ICudaEngine::getBindingVectorizedDim()@NoException(value=true) public int getBindingComponentsPerElement(int bindingIndex)
bindingIndex - The binding Index.ICudaEngine::getBindingVectorizedDim()@NoException(value=true) public nvinfer.TensorFormat getBindingFormat(int bindingIndex)
bindingIndex - The binding Index.@NoException(value=true) public String getBindingFormatDesc(int bindingIndex)
bindingIndex - The binding Index.@NoException(value=true) public int getBindingVectorizedDim(int bindingIndex)
bindingIndex - The binding Index.@NoException(value=true) public String getName()
INetworkDefinition::setName(), INetworkDefinition::getName()@NoException(value=true) public int getNbOptimizationProfiles()
IExecutionContext::setOptimizationProfile()@ByVal @Cast(value="nvinfer1::Dims*") @NoException(value=true) public Dims32 getProfileDimensions(int bindingIndex, int profileIndex, nvinfer.OptProfileSelector select)
bindingIndex - The binding index, which must belong to the given profile,
or be between 0 and bindingsPerProfile-1 as described below.profileIndex - The profile index, which must be between 0 and getNbOptimizationProfiles()-1.select - Whether to query the minimum, optimum, or maximum dimensions for this binding.@ByVal @Cast(value="nvinfer1::Dims*") @NoException(value=true) public Dims32 getProfileDimensions(int bindingIndex, int profileIndex, @Cast(value="nvinfer1::OptProfileSelector") int select)
@Const @NoException(value=true) public IntPointer getProfileShapeValues(int profileIndex, int inputIndex, nvinfer.OptProfileSelector select)
profileIndex - The profile index (must be between 0 and getNbOptimizationProfiles()-1)inputIndex - The input index (must be between 0 and getNbBindings() - 1)select - Whether to query the minimum, optimum, or maximum shape values for this binding.ICudaEngine::getProfileDimensions@Const @NoException(value=true) public IntBuffer getProfileShapeValues(int profileIndex, int inputIndex, @Cast(value="nvinfer1::OptProfileSelector") int select)
@Cast(value="bool") @NoException(value=true) public boolean isShapeBinding(int bindingIndex)
isExecutionBinding()@Cast(value="bool") @NoException(value=true) public boolean isExecutionBinding(int bindingIndex)
isShapeBinding()@NoException(value=true) public nvinfer.EngineCapability getEngineCapability()
@NoException(value=true) public void setErrorRecorder(IErrorRecorder recorder)
/**@NoException(value=true) public IErrorRecorder getErrorRecorder()
setErrorRecorder()@Cast(value="bool") @NoException(value=true) public boolean hasImplicitBatchDimension()
createNetworkV2@Cast(value="nvinfer1::TacticSources") @NoException(value=true) public int getTacticSources()
IBuilderConfig::setTacticSources()@NoException(value=true) public nvinfer.ProfilingVerbosity getProfilingVerbosity()
IBuilderConfig::setProfilingVerbosity()@NoException(value=true) public IEngineInspector createEngineInspector()
IEngineInspector.Copyright © 2022. All rights reserved.