coder.checkGpuInstall - Verify GPU code generation environment - MATLAB (original) (raw)
Main Content
Verify GPU code generation environment
Syntax
Description
[results](#d126e3432) = coder.checkGpuInstall([cfg](#d126e3405))
performs checks to verify if your environment has all the 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
Check GPU Code Generation Environment
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 Host Compiler : PASSED Basic Code Generation : PASSED Basic Code Execution : PASSED
results =
struct with fields:
gpu: 1
cuda: 1
cudnn: 0
tensorrt: 0
hostcompiler: 1
basiccodegen: 1
basiccodeexec: 1
deepcodegen: 0
tensorrtdatatype: 0
deepcodeexec: 0
Input Arguments
cfg
— GPU code generation environment configuration
coder.gpuEnvConfig
object
GPU code generation environment configuration, specified as a coder.gpuEnvConfig object.
Output Arguments
results
— GPU environment checking results
structure array
GPU environment checking results, returned as a1
-by-1
structure of Boolean values that indicate the output of each check. This table shows what each field of the results
structure represents.
Field | Description |
---|---|
gpu | There is a supported GPU connected to MATLAB. |
cuda | There is a supported CUDA® Toolkit installation on the development host and, if you specified a hardware object, on the hardware. |
cudnn | There is a supported cuDNN installation on the development host and, if you specified a hardware object, on the hardware. |
tensorrt | There is a supported TensorRT™ installation on the development host and, if you specified a hardware object, on the hardware. |
hostcompiler | There is a supported compiler installed on the development host. |
basiccodegen | The selected hardware passed the check to generate CUDA code. |
basiccodeexec | The selected hardware passed the check to generate and execute CUDA code. |
deepcodegen | The selected hardware passed the check to generate CUDA code for deep learning. |
tensorrtdatatype | The selected hardware has at least the minimum compute capability for the selected TensorRT data type. |
deepcodeexec | The selected hardware passed the check to generate and execute CUDA code for deep learning. |
Version History
Introduced in R2017b
See Also
Apps
Functions
Objects
- coder.gpuEnvConfig | coder.gpuConfig | coder.CodeConfig | coder.MexCodeConfig | coder.EmbeddedCodeConfig
Topics
- GPU Programming Paradigm
- Installing Prerequisite Products
- Setting Up the Prerequisite Products
- The GPU Environment Check and Setup App
- Verify Setup
- Generate Code by Using the GPU Coder App
- Generate Code Using the Command Line Interface
- Code Generation for Deep Learning Networks by Using cuDNN
- Code Generation for Deep Learning Networks by Using TensorRT