@Namespace(value="nvinfer1") @NoOffset @Properties(inherit=nvinfer.class) public class IBuilderConfig extends INoCopy
BuilderFlagsPointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
IBuilderConfig()
Default native constructor.
|
IBuilderConfig(long size)
Native array allocator.
|
IBuilderConfig(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
addOptimizationProfile(IOptimizationProfile profile)
\brief Add an optimization profile.
|
boolean |
canRunOnDLA(ILayer layer)
\brief Checks if a layer can run on DLA.
|
void |
clearFlag(int builderFlag) |
void |
clearFlag(nvinfer.BuilderFlag builderFlag)
\brief clear a single build mode flag.
|
void |
clearQuantizationFlag(int flag)
Deprecated.
|
void |
clearQuantizationFlag(nvinfer.QuantizationFlag flag)
Deprecated.
Deprecated in TensorRT 10.10. Superseded by explicit quantization.
|
ITimingCache |
createTimingCache(Pointer blob,
long size)
\brief Create timing cache
Create ITimingCache instance from serialized raw data.
|
IAlgorithmSelector |
getAlgorithmSelector()
Deprecated.
Deprecated in TensorRT 10.8. Please use editable mode in ITimingCache instead.
|
int |
getAvgTimingIterations()
\brief Query the number of averaging iterations.
|
int |
getBuilderOptimizationLevel()
\brief Get builder optimization level
|
IOptimizationProfile |
getCalibrationProfile()
Deprecated.
Deprecated in TensorRT 10.1. Superseded by explicit quantization.
|
nvinfer.DeviceType |
getDefaultDeviceType()
\brief Get the default DeviceType which was set by setDefaultDeviceType.
|
nvinfer.DeviceType |
getDeviceType(ILayer layer)
\brief Get the device that this layer executes on.
|
int |
getDLACore()
\brief Get the DLA core that the engine executes on.
|
nvinfer.EngineCapability |
getEngineCapability()
\brief Query EngineCapability flow configured for the builder.
|
boolean |
getFlag(int builderFlag) |
boolean |
getFlag(nvinfer.BuilderFlag builderFlag)
\brief Returns true if the build mode flag is set
|
int |
getFlags()
\brief Get the build mode flags for this builder config.
|
nvinfer.HardwareCompatibilityLevel |
getHardwareCompatibilityLevel()
\brief Get the hardware compatibility level.
|
IInt8Calibrator |
getInt8Calibrator()
Deprecated.
Deprecated in TensorRT 10.1. Superseded by explicit quantization.
|
long |
getL2LimitForTiling()
\brief Get the L2 cache usage limit for tiling optimization.
|
int |
getMaxAuxStreams()
\brief Get the maximum number of auxiliary streams that TRT is allowed to use.
|
int |
getMaxNbTactics()
\brief Query the maximum number of tactics timed when there is a choice.
|
long |
getMemoryPoolLimit(int pool) |
long |
getMemoryPoolLimit(nvinfer.MemoryPoolType pool)
\brief Get the memory size limit of the memory pool.
|
int |
getNbOptimizationProfiles()
\brief Get number of optimization profiles.
|
int |
getNbPluginsToSerialize()
\brief Get the number of plugin library paths to be serialized with version-compatible engines.
|
String |
getPluginToSerialize(int index)
\brief Get the plugin library path to be serialized with version-compatible engines.
|
IBuilderConfig |
getPointer(long i) |
boolean |
getPreviewFeature(int feature) |
boolean |
getPreviewFeature(nvinfer.PreviewFeature feature)
\brief Get status of preview feature
|
org.bytedeco.cuda.cudart.CUstream_st |
getProfileStream()
\brief Get the CUDA stream that is used to profile this network.
|
nvinfer.ProfilingVerbosity |
getProfilingVerbosity()
\brief Get verbosity level of layer information exposed in NVTX annotations and IEngineInspector.
|
IProgressMonitor |
getProgressMonitor() |
boolean |
getQuantizationFlag(int flag)
Deprecated.
|
boolean |
getQuantizationFlag(nvinfer.QuantizationFlag flag)
Deprecated.
Deprecated in TensorRT 10.10. Superseded by explicit quantization.
|
int |
getQuantizationFlags()
Deprecated.
Deprecated in TensorRT 10.10. Superseded by explicit quantization.
|
String |
getRemoteAutoTuningConfig()
\brief Get a config string for remote auto tuning.
|
nvinfer.RuntimePlatform |
getRuntimePlatform()
\brief Get the target platform for runtime execution.
|
int |
getTacticSources()
\brief Get tactic sources.
|
nvinfer.TilingOptimizationLevel |
getTilingOptimizationLevel()
\brief Get the Tiling optimization level.
|
ITimingCache |
getTimingCache()
\brief Get the pointer to the timing cache from current IBuilderConfig
|
boolean |
isDeviceTypeSet(ILayer layer)
\brief whether the DeviceType has been explicitly set for this layer
|
IBuilderConfig |
position(long position) |
void |
reset()
\brief Resets the builder configuration to defaults.
|
void |
resetDeviceType(ILayer layer)
\brief reset the DeviceType for this layer
|
void |
setAlgorithmSelector(IAlgorithmSelector selector)
Deprecated.
Deprecated in TensorRT 10.8. Please use editable mode in ITimingCache instead.
|
void |
setAvgTimingIterations(int avgTiming)
\brief Set the number of averaging iterations used when timing layers.
|
void |
setBuilderOptimizationLevel(int level)
\brief Set builder optimization level
Set the builder optimization level.
|
boolean |
setCalibrationProfile(IOptimizationProfile profile)
Deprecated.
Deprecated in TensorRT 10.1. Superseded by explicit quantization.
|
void |
setDefaultDeviceType(int deviceType) |
void |
setDefaultDeviceType(nvinfer.DeviceType deviceType)
\brief Sets the default DeviceType to be used by the builder.
|
void |
setDeviceType(ILayer layer,
int deviceType) |
void |
setDeviceType(ILayer layer,
nvinfer.DeviceType deviceType)
\brief Set the device that this layer must execute on.
|
void |
setDLACore(int dlaCore)
\brief Sets the DLA core used by the network.
|
void |
setEngineCapability(int capability) |
void |
setEngineCapability(nvinfer.EngineCapability capability)
\brief Configure the builder to target specified EngineCapability flow.
|
void |
setFlag(int builderFlag) |
void |
setFlag(nvinfer.BuilderFlag builderFlag)
\brief Set a single build mode flag.
|
void |
setFlags(int builderFlags)
\brief Set the build mode flags to turn on builder options for this network.
|
void |
setHardwareCompatibilityLevel(int hardwareCompatibilityLevel) |
void |
setHardwareCompatibilityLevel(nvinfer.HardwareCompatibilityLevel hardwareCompatibilityLevel)
\brief Set the hardware compatibility level.
|
void |
setInt8Calibrator(IInt8Calibrator calibrator)
Deprecated.
Deprecated in TensorRT 10.1. Superseded by explicit quantization.
|
boolean |
setL2LimitForTiling(long size)
\brief Set the L2 cache usage limit for Tiling optimization.
|
void |
setMaxAuxStreams(int nbStreams)
\brief Set the maximum number of auxiliary streams that TRT is allowed to use.
|
void |
setMaxNbTactics(int maxNbTactics)
\brief Set the maximum number of tactics to time when there is a choice of tactics.
|
void |
setMemoryPoolLimit(int pool,
long poolSize) |
void |
setMemoryPoolLimit(nvinfer.MemoryPoolType pool,
long poolSize)
\brief Set the memory size for the memory pool.
|
void |
setPluginsToSerialize(byte[] paths,
int nbPaths) |
void |
setPluginsToSerialize(ByteBuffer paths,
int nbPaths) |
void |
setPluginsToSerialize(BytePointer paths,
int nbPaths) |
void |
setPluginsToSerialize(PointerPointer paths,
int nbPaths)
\brief Set the plugin libraries to be serialized with version-compatible engines.
|
void |
setPreviewFeature(int feature,
boolean enable) |
void |
setPreviewFeature(nvinfer.PreviewFeature feature,
boolean enable)
\brief Enable or disable a specific preview feature
Allows enabling or disabling experimental features, which are not enabled by default in the
current release.
|
void |
setProfileStream(org.bytedeco.cuda.cudart.CUstream_st stream)
\brief Set the CUDA stream that is used to profile this network.
|
void |
setProfilingVerbosity(int verbosity) |
void |
setProfilingVerbosity(nvinfer.ProfilingVerbosity verbosity)
\brief Set verbosity level of layer information exposed in NVTX annotations and IEngineInspector.
|
void |
setProgressMonitor(IProgressMonitor monitor)
\brief Sets the progress monitor for building a network.
|
void |
setQuantizationFlag(int flag)
Deprecated.
|
void |
setQuantizationFlag(nvinfer.QuantizationFlag flag)
Deprecated.
Deprecated in TensorRT 10.10. Superseded by explicit quantization.
|
void |
setQuantizationFlags(int flags)
Deprecated.
Deprecated in TensorRT 10.10. Superseded by explicit quantization.
|
boolean |
setRemoteAutoTuningConfig(BytePointer config) |
boolean |
setRemoteAutoTuningConfig(String config)
\brief Set a config string for remote auto tuning.
|
void |
setRuntimePlatform(int runtimePlatform) |
void |
setRuntimePlatform(nvinfer.RuntimePlatform runtimePlatform)
\brief Set the target platform for runtime execution.
|
boolean |
setTacticSources(int tacticSources)
\brief Set tactic sources.
|
boolean |
setTilingOptimizationLevel(int level) |
boolean |
setTilingOptimizationLevel(nvinfer.TilingOptimizationLevel level)
\brief Set the Tiling optimization level.
|
boolean |
setTimingCache(ITimingCache cache,
boolean ignoreMismatch)
\brief Attach a timing cache to IBuilderConfig
The timing cache has verification header to make sure the provided cache can be used in current environment.
|
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, trimMemory, withDeallocator, zeropublic IBuilderConfig()
public IBuilderConfig(long size)
Pointer.position(long).public IBuilderConfig(Pointer p)
Pointer(Pointer).public IBuilderConfig position(long position)
public IBuilderConfig getPointer(long i)
getPointer in class Pointer@NoException(value=true) public void setAvgTimingIterations(int avgTiming)
getAvgTimingIterations()@NoException(value=true) public int getAvgTimingIterations()
setAvgTimingIterations()@NoException(value=true) public void setEngineCapability(nvinfer.EngineCapability capability)
@NoException(value=true) public void setEngineCapability(@Cast(value="nvinfer1::EngineCapability") int capability)
@NoException(value=true) public nvinfer.EngineCapability getEngineCapability()
setEngineCapability()@Deprecated @NoException(value=true) public void setInt8Calibrator(IInt8Calibrator calibrator)
@Deprecated @NoException(value=true) public IInt8Calibrator getInt8Calibrator()
@NoException(value=true) public void setFlags(@Cast(value="nvinfer1::BuilderFlags") int builderFlags)
builderFlags - The build option for an engine.
\note This function will override the previous set flags, rather than bitwise ORing the new flag.getFlags()@Cast(value="nvinfer1::BuilderFlags") @NoException(value=true) public int getFlags()
setFlags()@NoException(value=true) public void clearFlag(nvinfer.BuilderFlag builderFlag)
setFlags()@NoException(value=true) public void clearFlag(@Cast(value="nvinfer1::BuilderFlag") int builderFlag)
@NoException(value=true) public void setFlag(nvinfer.BuilderFlag builderFlag)
setFlags()@NoException(value=true) public void setFlag(@Cast(value="nvinfer1::BuilderFlag") int builderFlag)
@Cast(value="bool") @NoException(value=true) public boolean getFlag(nvinfer.BuilderFlag builderFlag)
getFlags()@Cast(value="bool") @NoException(value=true) public boolean getFlag(@Cast(value="nvinfer1::BuilderFlag") int builderFlag)
@NoException(value=true) public void setDeviceType(@Const ILayer layer, nvinfer.DeviceType deviceType)
layer - which layer to execute.deviceType - that this layer must execute on.
If DeviceType is not set or is reset, TensorRT will use the default DeviceType set in the builder.
\note The device type for a layer must be compatible with the safety flow (if specified).
For example a layer cannot be marked for DLA execution while the builder is configured for kSAFETY.getDeviceType()@NoException(value=true) public void setDeviceType(@Const ILayer layer, @Cast(value="nvinfer1::DeviceType") int deviceType)
@NoException(value=true) public nvinfer.DeviceType getDeviceType(@Const ILayer layer)
@Cast(value="bool") @NoException(value=true) public boolean isDeviceTypeSet(@Const ILayer layer)
getDeviceType() resetDeviceType()@NoException(value=true) public void resetDeviceType(@Const ILayer layer)
getDeviceType() isDeviceTypeSet()@Cast(value="bool") @NoException(value=true) public boolean canRunOnDLA(@Const ILayer layer)
@NoException(value=true) public void setDLACore(int dlaCore)
dlaCore - The DLA core to execute the engine on, in the range [0,getNbDlaCores()).
This function is used to specify which DLA core to use via indexing, if multiple DLA cores are available.
\warning if getNbDLACores() returns 0, then this function does nothing.getDLACore()@NoException(value=true) public int getDLACore()
@NoException(value=true) public void setDefaultDeviceType(nvinfer.DeviceType deviceType)
getDefaultDeviceType()@NoException(value=true) public void setDefaultDeviceType(@Cast(value="nvinfer1::DeviceType") int deviceType)
@NoException(value=true) public nvinfer.DeviceType getDefaultDeviceType()
@NoException(value=true) public void reset()
@NoException(value=true) public void setProfileStream(org.bytedeco.cuda.cudart.CUstream_st stream)
stream - The CUDA stream used for profiling by the builder.getProfileStream()@NoException(value=true) public org.bytedeco.cuda.cudart.CUstream_st getProfileStream()
setProfileStream()@NoException(value=true) public int addOptimizationProfile(@Const IOptimizationProfile profile)
profile - The new optimization profile, which must satisfy profile->isValid() == true@NoException(value=true) public int getNbOptimizationProfiles()
@NoException(value=true) public void setProfilingVerbosity(nvinfer.ProfilingVerbosity verbosity)
ProfilingVerbosity, getProfilingVerbosity(), IEngineInspector@NoException(value=true) public void setProfilingVerbosity(@Cast(value="nvinfer1::ProfilingVerbosity") int verbosity)
@NoException(value=true) public nvinfer.ProfilingVerbosity getProfilingVerbosity()
ProfilingVerbosity, setProfilingVerbosity(), IEngineInspector@Deprecated @NoException(value=true) public void setAlgorithmSelector(IAlgorithmSelector selector)
selector - The algorithm selector to be set in the build config.@Deprecated @NoException(value=true) public IAlgorithmSelector getAlgorithmSelector()
@Cast(value="bool") @Deprecated @NoException(value=true) public boolean setCalibrationProfile(@Const IOptimizationProfile profile)
profile - The new calibration profile, which must satisfy profile->isValid() == true or be nullptr.
MIN and MAX values will be overwritten by kOPT.@Const @Deprecated @NoException(value=true) public IOptimizationProfile getCalibrationProfile()
@Deprecated @NoException(value=true) public void setQuantizationFlags(@Cast(value="nvinfer1::QuantizationFlags") int flags)
flags - The quantization flags.
\note This function will override the previous set flags, rather than bitwise ORing the new flag.getQuantizationFlags()@Cast(value="nvinfer1::QuantizationFlags") @Deprecated @NoException(value=true) public int getQuantizationFlags()
setQuantizationFlag()@Deprecated @NoException(value=true) public void clearQuantizationFlag(nvinfer.QuantizationFlag flag)
setQuantizationFlags()@Deprecated @NoException(value=true) public void clearQuantizationFlag(@Cast(value="nvinfer1::QuantizationFlag") int flag)
@Deprecated @NoException(value=true) public void setQuantizationFlag(nvinfer.QuantizationFlag flag)
setQuantizationFlags()@Deprecated @NoException(value=true) public void setQuantizationFlag(@Cast(value="nvinfer1::QuantizationFlag") int flag)
@Cast(value="bool") @Deprecated @NoException(value=true) public boolean getQuantizationFlag(nvinfer.QuantizationFlag flag)
getQuantizationFlags()@Cast(value="bool") @Deprecated @NoException(value=true) public boolean getQuantizationFlag(@Cast(value="nvinfer1::QuantizationFlag") int flag)
@Cast(value="bool") @NoException(value=true) public boolean setTacticSources(@Cast(value="nvinfer1::TacticSources") int tacticSources)
getTacticSources@Cast(value="nvinfer1::TacticSources") @NoException(value=true) public int getTacticSources()
setTacticSources()@NoException(value=true) public ITimingCache createTimingCache(@Const Pointer blob, @Cast(value="std::size_t") long size)
blob - A pointer to the raw data that contains serialized timing cachesize - The size in bytes of the serialized timing cache. Size 0 means create a new cache from scratchsetTimingCache@Cast(value="bool") @NoException(value=true) public boolean setTimingCache(@Const @ByRef ITimingCache cache, @Cast(value="bool") boolean ignoreMismatch)
cache - the timing cache to be usedignoreMismatch - whether or not allow using a cache that contains different CUDA device property@Const @NoException(value=true) public ITimingCache getTimingCache()
@NoException(value=true) public void setMemoryPoolLimit(nvinfer.MemoryPoolType pool, @Cast(value="std::size_t") long poolSize)
pool - The memory pool to limit the available memory for.poolSize - The size of the pool in bytes.getMemoryPoolLimit, MemoryPoolType@NoException(value=true) public void setMemoryPoolLimit(@Cast(value="nvinfer1::MemoryPoolType") int pool, @Cast(value="std::size_t") long poolSize)
@Cast(value="std::size_t") @NoException(value=true) public long getMemoryPoolLimit(nvinfer.MemoryPoolType pool)
pool - The memory pool to get the limit for.setMemoryPoolLimit@Cast(value="std::size_t") @NoException(value=true) public long getMemoryPoolLimit(@Cast(value="nvinfer1::MemoryPoolType") int pool)
@NoException(value=true) public void setPreviewFeature(nvinfer.PreviewFeature feature, @Cast(value="bool") boolean enable)
feature - the feature to enable / disableenable - true for enable, false for disablePreviewFeature, getPreviewFeature@NoException(value=true) public void setPreviewFeature(@Cast(value="nvinfer1::PreviewFeature") int feature, @Cast(value="bool") boolean enable)
@Cast(value="bool") @NoException(value=true) public boolean getPreviewFeature(nvinfer.PreviewFeature feature)
feature - the feature to queryPreviewFeature, setPreviewFeature@Cast(value="bool") @NoException(value=true) public boolean getPreviewFeature(@Cast(value="nvinfer1::PreviewFeature") int feature)
@NoException(value=true) public void setBuilderOptimizationLevel(int level)
level - The optimization level to set to. Must be non-negative.getBuilderOptimizationLevel@NoException(value=true) public int getBuilderOptimizationLevel()
setBuilderOptimizationLevel@NoException(value=true) public void setHardwareCompatibilityLevel(nvinfer.HardwareCompatibilityLevel hardwareCompatibilityLevel)
hardwareCompatibilityLevel - The level of hardware
compatibility.@NoException(value=true) public void setHardwareCompatibilityLevel(@Cast(value="nvinfer1::HardwareCompatibilityLevel") int hardwareCompatibilityLevel)
@NoException(value=true) public nvinfer.HardwareCompatibilityLevel getHardwareCompatibilityLevel()
setHardwareCompatibilityLevel()@NoException(value=true) public void setPluginsToSerialize(@Cast(value="const char*const*") PointerPointer paths, int nbPaths)
paths - The paths of plugin libraries.nbPaths - The number of paths.@NoException(value=true) public void setPluginsToSerialize(@Cast(value="const char*const*") @ByPtrPtr BytePointer paths, int nbPaths)
@NoException(value=true) public void setPluginsToSerialize(@Cast(value="const char*const*") @ByPtrPtr ByteBuffer paths, int nbPaths)
@NoException(value=true) public void setPluginsToSerialize(@Cast(value="const char*const*") @ByPtrPtr byte[] paths, int nbPaths)
@NoException(value=true) public String getPluginToSerialize(int index)
index - Index of the plugin library path in the list. Should be in the range [0,
getNbPluginsToSerialize()).@NoException(value=true) public int getNbPluginsToSerialize()
@NoException(value=true) public void setMaxAuxStreams(int nbStreams)
nbStreams - The maximum number of auxiliary streams that TRT is allowed to use.getMaxAuxStreams(), ICudaEngine::getNbAuxStreams(), IExecutionContext::setAuxStreams()@NoException(value=true) public int getMaxAuxStreams()
setMaxAuxStreams()@NoException(value=true) public void setProgressMonitor(IProgressMonitor monitor)
monitor - The progress monitor to assign to the IBuilderConfig.
The progress monitor signals to the application when different phases of
the compiler are being executed. Setting to nullptr unsets the monitor so
that the application is not signaled.IBuilderConfig::getProgressMonitor@NoException(value=true) public IProgressMonitor getProgressMonitor()
IBuilderConfig::setProgressMonitor@NoException(value=true) public void setRuntimePlatform(nvinfer.RuntimePlatform runtimePlatform)
runtimePlatform - The target platform for runtime execution.IBuilderConfig::getRuntimePlatform()@NoException(value=true) public void setRuntimePlatform(@Cast(value="nvinfer1::RuntimePlatform") int runtimePlatform)
@NoException(value=true) public nvinfer.RuntimePlatform getRuntimePlatform()
IBuilderConfig::setRuntimePlatform()@NoException(value=true) public void setMaxNbTactics(int maxNbTactics)
getMaxNbTactics()@NoException(value=true) public int getMaxNbTactics()
setMaxNbTactics()@Cast(value="bool") @NoException(value=true) public boolean setTilingOptimizationLevel(nvinfer.TilingOptimizationLevel level)
level - The level of Tiling optimization.@Cast(value="bool") @NoException(value=true) public boolean setTilingOptimizationLevel(@Cast(value="nvinfer1::TilingOptimizationLevel") int level)
@NoException(value=true) public nvinfer.TilingOptimizationLevel getTilingOptimizationLevel()
setTilingOptimizationLevel()@Cast(value="bool") @NoException(value=true) public boolean setL2LimitForTiling(@Cast(value="int64_t") long size)
size - The size of the L2 cache usage limit for Tiling optimization.@Cast(value="int64_t") @NoException(value=true) public long getL2LimitForTiling()
setL2LimitForTiling()@Cast(value="bool") @NoException(value=true) public boolean setRemoteAutoTuningConfig(String config)
config - The config string to be used during remote auto tuning.@Cast(value="bool") @NoException(value=true) public boolean setRemoteAutoTuningConfig(@Cast(value="const char*") BytePointer config)
@NoException(value=true) public String getRemoteAutoTuningConfig()
Copyright © 2026. All rights reserved.