CogDLRuntime SetTensorRTMode Method Cognex VisionPro 9.25 SR1
Set the run time TensorRT Mode property for the specified tool. Some general rules:
  • For a ViDi tool that has been optimized for TensorRT Mode Basic, you may set the run time TensorRTMode to either None or Basic.
  • For a ViDi tool that has been optimized for TensorRT Mode Int8, you may set the run time TensorRTMode to either None or Int8.
  • For a ViDi tool that has not yet been optimized for TensorRT, the run time TensorRTMode must remain None.
  • For a ViDi tool that does not support TensorRT optimization, you may not set TensorRTMode.

Namespace: Cognex.VisionPro.DLRuntime
Assembly: Cognex.VisionPro.DLRuntime (in Cognex.VisionPro.DLRuntime.dll) Version: 93.1.0.0 (93.1.0.0)
Syntax

public void SetTensorRTMode(
	string streamName,
	string toolName,
	CogDLRuntimeTensorRTModeConstants mode
)

Parameters

streamName
Type: System String
The name of the stream containing the ViDi tool to be configured.
toolName
Type: System String
The name of the ViDi tool to be configured.
mode
Type: Cognex.VisionPro.DLRuntime CogDLRuntimeTensorRTModeConstants
The desired style of TensorRT optimization.
Events

Event TypeReason
ICogChangedEvent Changed Fires when a ViDi tool's Mode property may have changed.
  • SfGetTensorRTInfo
Exceptions

ExceptionCondition
ArgumentException If the specified tool cannot be accessed.
ArgumentException If the specified tool does not support TensorRT optimization.
ArgumentException If you attempt to set an optimized tool to an inconsistent optimization mode.
ArgumentException If you attempt to set a non-optimized tool to an optimized mode.
ArgumentException If setting the TensorRT Mode fails for any other reason.
See Also