Main Content

coder.checkGpuInstall

Verify GPU code generation environment

Description

example

results = coder.checkGpuInstall(cfg) performs checks to verify if your environment has the all third-party tools and libraries required for GPU code generation. cfg must be an coder.gpuEnvConfig object. This function verifies the GPU code generation environment based on the properties specified in the given configuration object.

You can also use the equivalent GUI-based application, GPU Environment Check that performs the same checks. To open this application, use the MATLAB® command, gpucoderSetup.

Before using this function, install and set up the required prerequisite third-party compilers, libraries, and tools. For more information, see Installing Prerequisite Products and Setting Up the Prerequisite Products.

Examples

collapse all

Perform a complete check of all third-party tools required for GPU code generation. The output shown here is representative. Your results might differ.

gpuEnvObj = coder.gpuEnvConfig;
gpuEnvObj.GpuId = 1;
gpuEnvObj.BasicCodegen = 1;
gpuEnvObj.BasicCodeexec = 1;
results = coder.checkGpuInstall(gpuEnvObj)
Compatible GPU           : PASSED 
CUDA Environment         : PASSED 
	Runtime   : PASSED 
	cuFFT     : PASSED 
	cuSOLVER  : PASSED 
	cuBLAS    : PASSED 
Basic Code Generation    : PASSED 
Basic Code Execution     : PASSED 

results = 

  struct with fields:

                 gpu: 1
                cuda: 1
               cudnn: 0
            tensorrt: 0
        basiccodegen: 1
       basiccodeexec: 1
         deepcodegen: 0
        deepcodeexec: 0
    tensorrtdatatype: 0
           profiling: 0

Input Arguments

collapse all

coder.gpuEnvConfig object contains the configuration parameters that coder.checkGpuInstall uses to verify the GPU code generation environment.

Output Arguments

collapse all

Results of checking the GPU code generation environment, returned as a 1-by-1 structure.

Version History

Introduced in R2017b