how to rum m file with GPU

조회 수: 6 (최근 30일)
Shehab Tarek
Shehab Tarek 2020년 7월 22일
댓글: Walter Roberson 2020년 7월 22일
hello guys i am asking for how to active the GPU to run the m file faster
what the i can do

채택된 답변

Walter Roberson
Walter Roberson 2020년 7월 22일
You cannot do that. When MATLAB talks to the GPU, it mostly does so in terms of a bunch a specialized pre-compiled code kernels (that are in the binary programming language of the GPUs.) The GPU does not run MATLAB code, only the pre-compiled snippets.
You can do some processing on GPU by using GPU Coder product; https://www.mathworks.com/products/gpu-coder.html but do not expect it to handle MATLAB code in general.
  댓글 수: 5
Edric Ellis
Edric Ellis 2020년 7월 22일
I wouldn't say that "the GPU does not run MATLAB code". Of course, MATLAB code doesn't run directly on the GPU - but if you use the GPU version of arrayfun, then the function you're running is converted into an optimised kernel and runs directly on the GPU. (That's why the GPU version of arrayfun can be blazingly fast).
Walter Roberson
Walter Roberson 2020년 7월 22일
I wouldn't say that "the GPU does not run MATLAB code".
I would say it without hesitation, just as I would say that Intel x64 architecture chips do no run C code. The code has to be compiled to run on the target, with the instructions generally not even in the same order as implied by the original code.
gpuArray support is only available for the operations Mathworks has already pre-built GPU support for. Anything beyond that requires GPU Coder product.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by