CogDLRuntime GPUAffinity Property Cognex VisionPro 9.25 SR1
The desired GPU index for the current workspace. This zero-based device index may not be the same as the CUDA ID. The specified GPU will be used for every ViDi tool in every stream in the current workspace. Since the underlying VPDL library supports at most 4 GPUs, the maximum legal value for this parameter is 3. The special value -1 means let the VPDL library automatically choose the GPU.

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

public int GPUAffinity { get; set; }

Property Value

Type: Int32
Events

Event TypeReason
ICogChangedEvent Changed Fires when this value is changed. The following state flags may be affected:
  • SfGPUAffinity
  • SfGetTensorRTInfo
  • SfGetParams
  • SfState
Exceptions

ExceptionCondition
ArgumentOutOfRangeException If the input argument is less than -1 or greater than 3.
Remarks

Changing the value of this property while State is Open will cause State to become Closed.
See Also