For the specified tool, perform TensorRT optimization using the
specified GPU. Width and height set to zero means use training image
size.
Namespace: Cognex.VisionPro.DLRuntimeAssembly: 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 optimized.
- toolName
- Type: System String
The name of the ViDi tool to be optimized.
- gpuIndex
- Type: System Int32
The index of the GPU for which this tool will be optimized.
- mode
- Type: Cognex.VisionPro.DLRuntime CogDLRuntimeTensorRTModeConstants
The desired style of TensorRT optimization. May not be CogDLRuntimeTensorRTModeConstants.None.
- width (Optional)
- Type: System Int32
The image width, in pixels, for which this ViDi tool should be optimized. A value of zero means use the training image size.
- height (Optional)
- Type: System Int32
The image height, in pixels, for which this ViDi tool should be optimized. A value of zero means use the training image size.
- batch (Optional)
- Type: System Int32
The batch size for which this ViDi tool should be optimized. Default is a batch size of 1.
Events
| Event Type | Reason |
|---|---|
| ICogChangedEvent Changed |
Fires when a ViDi tool may have been optimized.
The following state flags may be affected:
|
Exceptions
| Exception | Condition |
|---|---|
| ArgumentException | If the specified tool cannot be accessed. |
| ArgumentException | If the specified tool does not support TensorRT optimization. |
| ArgumentOutOfRangeException | If the specified GPU index is not valid. |
| ArgumentException | If the specified mode is CogDLRuntimeTensorRTModeConstants.None. |
| CogInternalErrorException | If the underlying ViDi tool could not be optimized for any other reason. |
See Also