# GPU Mode Command Line Initialization

There are several command line arguments that can be used with the VisionPro Deep Learning GUI on startup for library initialization.

The commands are issued using Windows Command Prompt, and navigating to this directory for Cognex Deep Learning Studio.exe (IDE application):

C:\Program Files\Cognex\VisionPro Deep Learning\4.2\Cognex Deep Learning Studio

Navigate to this directory for VisionPro Deep Learning Service.exe (if using the Deep Learning Client/Server Functionality):

C:\Program Files\Cognex\VisionPro Deep Learning\4.2\Service

You issue the commands by first specifying the name of the application followed by the command line arguments.

The following command line arguments can be used to control the GPU Mode, which GPU device to use and the allocation of GPU memory:

Command | Description
--- | ---
--gpu-mode=NoSupport or SingleDevicePerTool | Specifies the GPU mode to be used by the application.
SingleDevicePerTool | The application uses a single GPU for training Training is the process that your tool, which is a neural network, is learning about the features (pixels) based on the labels you made. For example, a tool will learn the defect/normal pixels in each image based on the defect/normal labels you drew. The goal of the tool Training is learning enough to give the correct inspection results of whether an unseen image is defective or not. The key to training is to ensure that you include all possible variations within your training set, and that your images are accurately labeled. Training times vary by the application, tool setup and the GPU in the PC being used to train the network. and processing an image.
NoSupport | The application does not use a GPU. Note: This option conflicts with --gpu-devices and/or --optimized-gpu-memory.
Note: See Configuring Multiple GPUs for more information about the GPU modes.
--gpu-devices=comma separated indexed list of GPUs | Specifies the GPUs that will be used on initialization, via an indexed list. For example: --gpu-devices=0,1
--optimized-gpu-memory=memory size, in MB | Specifies the size of the pre-allocated optimized memory buffer. This setting is activated by default, with the default size of 2GB. To deactivate the feature A feature is a visually distinguishable area in an image. Features typically represent something of interest for the application (a defect, an object, a particular component of an object)., first issue the --optimized-gpu-memory-override=1 command, and then --optimized-gpu-memory=0 command. To use a memory buffer size other than the default setting, first issue the --optimized-gpu-memory-override=1 command, and then the --optimized-gpu-memory=<memory size in MB> command. Note: The GPU Memory Optimization setting is enabled by default. For more information, see Optimized GPU Memory.
--optimized-gpu-memory-override=[0 or 1] | If using the --optimized-gpu-memory setting, set to 1. If set to 0, the default amount of memory will be allocated.