Set the run time TensorRT Mode property for the specified tool. Some
general rules:
Namespace: Cognex.VisionPro.DLRuntime- 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.
Assembly: Cognex.VisionPro.DLRuntime (in Cognex.VisionPro.DLRuntime.dll) Version: 91.0.0.0 (91.0.0.0)
Syntax
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 Type | Reason |
|---|---|
| ICogChangedEvent Changed |
Fires when a ViDi tool's Mode property may have changed.
|
Exceptions
| Exception | Condition |
|---|---|
| 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