Select Specific GPU For Zivid Software

This article demonstrates how to specify a computational device for Zivid Software. You should consider this if you have multiple GPUs and want to use a specific one. This can be one integrated GPU and one or more dedicated GPUs.

Note

Make sure that the GPU Requirements for Zivid are met.

  1. Download the Config.yml file.

    The config file contains the following information:

    __version__: 4
    Configuration:
        ComputeDevice:
            SelectionFilter: ""
            Type: GPU
            Vendor: Nvidia
        DriverConfig:
            ToshibaTeli:
                VersionCheck: yes
        Logging:
            Asynchronous: yes
            CrashHandler: no
            Directory: ""
            Enabled: yes
            FlushOnExit: yes
            HistorySize: 7
            MaxFileSizeMB: 10
            MaxTotalSizeMB: 100
            RotationCount: 0
            WriteInterval: 200
    
  2. Place the config file in the following directory:

    mkdir %LOCALAPPDATA%\Zivid\API
    move %HOMEPATH%\Downloads\Config.yml %LOCALAPPDATA%\Zivid\API\
    
  3. The desired GPU (if it is known) is assigned by changing the config file ComputeDevice parameters:

  4. If you have a single GPU per vendor (e.g. an integrated Intel GPU and a dedicated NVIDIA GPU), change Type to GPU and Vendor to NVIDIA, Intel or AMD, e.g.

    ComputeDevice:
        SelectionFilter: ""
        Type: GPU
        Vendor: NVIDIA
    
  5. If you have multiple GPUs of the same vendor (e.g. two AMD GPUs), write something in the selection filter, e.g. “something” and leave Type and Vendor as Any, e.g.

    ComputeDevice:
        SelectionFilter: "something"
        Type: Any
        Vendor: Any
    

    Start Zivid Studio. An error message like this should appear:

    ../../../_images/studio-error-wrong-gpu-selected.png

    Change the SelectionFilter to any unique part of the string that describes the desired available devices, e.g.

    ComputeDevice:
        SelectionFilter: "620"
        Type: Any
        Vendor: Any
    
  6. To verify the changes, re-launch Zivid Studio and go to HelpAbout Zivid StudioSystem InfoCompute Device Info. The selected device can be seen under Device info.

    ../../../_images/studio-system-info-device-info-highlighted.png

Run SDK on CPU only

Caution

While it is possible to run SDK on CPU only, this is not a supported feature.

It is possible to run the Zivid SDK on a Intel chip set using their OpenCL runtime and the following configuration:

__version__: 4
Configuration:
  ComputeDevice:
    Type: CPU

Warning

  • Capture time will be greatly increased when using CPU-only instead of GPU and is not a recommended mode for most applications.

  • This feature is not supported and not well tested. Please contact customersuccess@zivid.com if you have issues.