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.cfgmust be ancoder.gpuEnvConfigobject. 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 that performs the same checks. To open this application, use the MATLAB®command,coder.checkGpuInstallApp.

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.gpuEnvConfigobject contains the configuration parameters thatcoder.checkGpuInstalluses to verify the GPU code generation environment.

Output Arguments

collapse all

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

Version History

Introduced in R2017b