MATLAB automatically runs calculations on the GPU. For more information, see Run MATLAB Functions on a GPU.