| Contents | Index |
A GPUDevice object represents a graphic processing unit (GPU) in your computer. You can use the GPU to execute CUDA kernels or MATLAB code.
The following convenience functions let you identify and select a GPU device:
| gpuDevice | Query or select GPU device |
| gpuDeviceCount | Number of GPU devices present |
| reset | Reset GPU device and clear its memory |
Methods of the class include the following:
| Method Name | Description |
|---|---|
| parallel.gpu.GPUDevice.isAvailable(idx) | True if the GPU specified by index idx is supported and capable of being selected. idx can be an integer or a vector of integers; the default index is the current device. |
| parallel.gpu.GPUDevice.getDevice(idx) | Returns a GPUDevice object without selecting it. |
| wait(dev) | Blocks MATLAB until GPU calculations are complete on specified device. |
For the complete list, use the methods function on the GPUDevice class:
methods('parallel.gpu.GPUDevice')You can get help on any of the class methods with the command
help parallel.gpu.GPUDevice.methodname
where methodname is the name of the method. For example, to get help on isAvailable, type
help parallel.gpu.GPUDevice.isAvailable
A GPUDevice object has the following read-only properties:
| Property Name | Description | |||
|---|---|---|---|---|
| Name | Name of the CUDA device. | |||
| Index | Index by which you can select the device. | |||
| ComputeCapability | Computational capability of the CUDA device. Must meet required specification. | |||
| SupportsDouble | Indicates if this device can support double precision operations. | |||
| DriverVersion | The CUDA device driver version currently in use. Must meet required specification. | |||
| MaxThreadsPerBlock | Maximum supported number of threads per block during CUDAKernel execution. | |||
| MaxShmemPerBlock | Maximum supported amount of shared memory that can be used by a thread block during CUDAKernel execution. | |||
| MaxThreadBlockSize | Maximum size in each dimension for thread block. Each dimension of a thread block must not exceed these dimensions. Also, the product of the thread block size must not exceed MaxThreadsPerBlock. | |||
| MaxGridSize | Maximum size of grid of thread blocks. | |||
| SIMDWidth | Number of simultaneously executing threads. | |||
| TotalMemory | Total available memory (in bytes) on the device. | |||
| FreeMemory | Free memory (in bytes) on the device. This property is available only for the currently selected device, and has the value NaN for unselected devices. | |||
| MultiprocessorCount | The number of vector processors present on the device. The total core count of the device is 8 times this property. | |||
| ClockRateKHz | Peak clock rate of the GPU in kHz. | |||
| ComputeMode | The compute mode of the device, according to the following
values:
| |||
| GPUOverlapsTransfers | Indicates if the device supports overlapped transfers. | |||
| KernelExecutionTimeout | Indicates if the device can abort long-running kernels. If true, the operating system places an upper bound on the time allowed for the CUDA kernel to execute, after which the CUDA driver times out the kernel and returns an error. | |||
| CanMapHostMemory | Indicates if the device supports mapping host memory into the CUDA address space. | |||
| DeviceSupported | Indicates if toolbox can use this this device. Not all devices are supported; for example, if their ComputeCapability is insufficient, the toolbox cannot use them. | |||
| DeviceSelected | Indicates if this is the currently selected device. |

See how to solve large problems with minimal effort and reduce simulation time.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |