matlab parallel computing/GPU error msg

조회 수: 6(최근 30일)
Nick Tsui
Nick Tsui 2012년 3월 9일
my code:
kp = parallel.gpu.CUDAKernel('derivative.ptx','','derivative');
my error message:
"??? Undefined variable "parallel" or class "parallel.gpu.CUDAKernel"."
I know that my code is not completely right, but I expect it gets something else, at least not this error message, which I do not know how to interpret. Does that mean I do not have a nVidia GPU card on my computer? Or does that mean my Matlab is too old (R2009) to support parallel computing? Surprisingly, when I googled this error message, not many results showed up.
I ran the same line on another machine, the error message was:
"Error using handleKernelArgs (line 48) The first input to parallel.gpu.CUDAKernel must be a file that contains PTX code or a string that is PTX code."
So can I still use parallel computing on my computer? If so, what should I do?
Any suggestion is appreciated. Thanks a lot.

채택된 답변

Jason Ross
Jason Ross 2012년 3월 9일
  댓글 수: 1
Jill Reese
Jill Reese 2012년 3월 9일
Jason is correct. You are using a MATLAB version that doesn't support GPU computing. You'll need to upgrade to at least R2010b, but you should use the most recent release you have available. R2010b was the first to enable GPU computing, but each subsequent release added many new features and performance improvements.

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

추가 답변(2개)

Malcolm Lidierth
Malcolm Lidierth 2012년 3월 9일
I think it means you do not have the Parallel Computing Toolbox. Try
at the command line.

Walter Roberson
Walter Roberson 2012년 3월 9일
Right: PCT not installed or not licensed.
PCT is an optional extra-cost toolbox.
Further note: GPU use requires an NVidia card with CUDA 1.3 or later. There are a lot of NVidia cards that support only CUDA 1.2, so before spending money on the PCT, check the CUDA version supported by your card
  댓글 수: 1
Jason Ross
Jason Ross 2012년 3월 9일
To be very pedantic and boring, Walter is referring to the "Compute Capability" of a given GPU, which needs to be 1.3 or higher. The linked page displays this very nicely.
The CUDA Version is something that's determined by the CUDA driver installed on the machine, and it's independent of the hardware. Generally speaking, it's a good idea to have the most recent CUDA driver installed, which you get from nVidia's driver download section:

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

Community Treasure Hunt

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

Start Hunting!

Translated by