@Namespace(value="nvinfer1") @NoOffset @Properties(inherit=nvinfer.class) public class IBuilder extends INoCopy
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
IBuilder()
Default native constructor.
|
IBuilder(long size)
Native array allocator.
|
IBuilder(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
ICudaEngine |
buildEngineWithConfig(INetworkDefinition network,
IBuilderConfig config)
\brief Builds a network for the given INetworkDefinition and IBuilderConfig.
|
IHostMemory |
buildSerializedNetwork(INetworkDefinition network,
IBuilderConfig config)
\brief Builds and serializes a network for the given INetworkDefinition and IBuilderConfig.
|
IBuilderConfig |
createBuilderConfig()
\brief Create a builder configuration object.
|
INetworkDefinition |
createNetworkV2(int flags)
\brief Create a network definition object
Creates a network definition object with immutable properties specified using the flags parameter.
|
IOptimizationProfile |
createOptimizationProfile()
\brief Create a new optimization profile.
|
IErrorRecorder |
getErrorRecorder()
\brief get the ErrorRecorder assigned to this interface.
|
ILogger |
getLogger()
\brief get the logger with which the builder was created
|
int |
getMaxDLABatchSize()
\brief Get the maximum batch size DLA can support.
|
int |
getMaxThreads()
\brief get the maximum number of threads that can be used by the builder.
|
int |
getNbDLACores()
\brief Return the number of DLA engines available to this builder.
|
IPluginRegistry |
getPluginRegistry()
\brief get the local plugin registry that can be used by the builder.
|
IBuilder |
getPointer(long i) |
boolean |
isNetworkSupported(INetworkDefinition network,
IBuilderConfig config)
\brief Checks that a network is within the scope of the IBuilderConfig settings.
|
boolean |
platformHasFastFp16()
Deprecated.
Deprecated in TensorRT 10.5. Please query data type support from CUDA directly.
|
boolean |
platformHasFastInt8()
Deprecated.
Deprecated in TensorRT 10.5. Please query data type support from CUDA directly.
|
boolean |
platformHasTf32()
Deprecated.
Deprecated in TensorRT 10.5. Please query data type support from CUDA directly.
|
IBuilder |
position(long position) |
void |
reset()
\brief Resets the builder state to default values.
|
void |
setErrorRecorder(IErrorRecorder recorder)
\brief Set the ErrorRecorder for this interface
Assigns the ErrorRecorder to this interface.
|
void |
setGpuAllocator(IGpuAllocator allocator)
\brief Set the GPU allocator.
|
boolean |
setMaxThreads(int maxThreads)
\brief Set the maximum number of threads.
|
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, zero
public IBuilder()
public IBuilder(long size)
Pointer.position(long)
.public IBuilder(Pointer p)
Pointer(Pointer)
.public IBuilder getPointer(long i)
getPointer
in class Pointer
@Cast(value="bool") @Deprecated @NoException(value=true) public boolean platformHasFastFp16()
@Cast(value="bool") @Deprecated @NoException(value=true) public boolean platformHasFastInt8()
@NoException(value=true) public int getMaxDLABatchSize()
@NoException(value=true) public int getNbDLACores()
@NoException(value=true) public void setGpuAllocator(IGpuAllocator allocator)
allocator
- Set the GPU allocator to be used by the builder. All GPU memory acquired will use this
allocator. If NULL is passed, the default allocator will be used.
Default: uses cudaMalloc/cudaFree.
\note This allocator will be passed to any engines created via the builder; thus the lifetime of the allocator
must span the lifetime of those engines as
well as that of the builder. If nullptr is passed, the default allocator will be used.@NoException(value=true) public IBuilderConfig createBuilderConfig()
IBuilderConfig
@NoException(value=true) public INetworkDefinition createNetworkV2(@Cast(value="nvinfer1::NetworkDefinitionCreationFlags") int flags)
flags
- Bitset of NetworkDefinitionCreationFlags specifying network properties combined with bitwise OR.
e.g., 1U << NetworkDefinitionCreationFlag::kSTRONGLY_TYPEDINetworkDefinition, NetworkDefinitionCreationFlags
@NoException(value=true) public IOptimizationProfile createOptimizationProfile()
IOptimizationProfile
@NoException(value=true) public void setErrorRecorder(IErrorRecorder recorder)
recorder
- The error recorder to register with this interface.getErrorRecorder()
@NoException(value=true) public IErrorRecorder getErrorRecorder()
setErrorRecorder()
@NoException(value=true) public void reset()
@Cast(value="bool") @Deprecated @NoException(value=true) public boolean platformHasTf32()
@NoException(value=true) public IHostMemory buildSerializedNetwork(@ByRef INetworkDefinition network, @ByRef IBuilderConfig config)
network
- Network definition.config
- Builder configuration.INetworkDefinition, IBuilderConfig, IHostMemory
@NoException(value=true) public ICudaEngine buildEngineWithConfig(@ByRef INetworkDefinition network, @ByRef IBuilderConfig config)
network
- Network definition.config
- Builder configuration.INetworkDefinition, IBuilderConfig, ICudaEngine
@Cast(value="bool") @NoException(value=true) public boolean isNetworkSupported(@Const @ByRef INetworkDefinition network, @Const @ByRef IBuilderConfig config)
network
- The network definition to check for configuration compliance.config
- The configuration of the builder to use when checking \p network.
Given an INetworkDefinition, \p network, and an IBuilderConfig, \p config, check if
the network falls within the constraints of the builder configuration based on the
EngineCapability, BuilderFlag, and DeviceType. If the network is within the constraints,
then the function returns true, and false if a violation occurs. This function reports
the conditions that are violated to the registered ErrorRecorder.@NoException(value=true) public ILogger getLogger()
@Cast(value="bool") @NoException(value=true) public boolean setMaxThreads(int maxThreads)
maxThreads
- The maximum number of threads that can be used by the builder.@NoException(value=true) public int getMaxThreads()
setMaxThreads()
@ByRef @NoException(value=true) public IPluginRegistry getPluginRegistry()
Copyright © 2024. All rights reserved.