GPU Computing in MATLAB
Functions
Key Functions
gpuArray |
Create array on GPU |
gather |
Transfer distributed array or gpuArray to local workspace |
existsOnGPU |
Determine if gpuArray or CUDAKernel is available on GPU |
gpuDevice |
查询或选择GPU设备 |
gpuDeviceCount |
Number of GPU devices present |
gputimeit |
Time required to run function on GPU |
reset |
Reset GPU device and clear its memory |
wait (GPUDevice) |
Wait for GPU calculation to complete |
arrayfun |
Apply function to each element of array on GPU |
bsxfun |
Binary singleton expansion function for gpuArray |
pagefun |
Apply function to each page of array on GPU |
Classes
Key Classes
gpuArray |
Array stored on GPU |
GPUDevice |
图ics processing unit (GPU) |
GPUDeviceManager |
Manager for GPU Devices |
Topics
Identify and Select a GPU Device
UsegpuDevice
to identify and select which device you want to use.
AgpuArray
in MATLAB®represents an array that is stored on the GPU.
Run Built-In Functions on a GPU
Many MATLAB built-in functions supportgpuArray
input arguments.
Run Element-wise MATLAB Code on GPU
Use examples to learn about running MATLAB code on a GPU
Improve Performance of Small Matrix Problems on the GPU using PAGEFUN
This example shows how to usepagefun
to improve the performance of applying a large number of independent rotations and translations to objects in a 3-D environment.
Measure and Improve GPU Performance
The purpose of GPU computing in MATLAB is to speed up your applications.
By default, each worker in a cluster working on the same job has a unique random number stream.