Examples of GPU do not work
1 回表示 (過去 30 日間)
古いコメントを表示
I have the Parallel Processing toolbox.
tic;
A5 = parallel.gpu.GPUArray.rand(3000,3000);
B5 = fft(A5);
B5 = gather(B5);
time5 = toc;
>> A5 = parallel.gpu.GPUArray.rand(3000,3000);
Unable to resolve the name 'parallel.gpu.GPUArray.rand'.
One other demo used eigs, but I see now it is eig that works with the GPUArray object.
Any clues why this MathWorks Demo does not work?
In addition when I try to list MATLAB funtions that support GPU computations Google chrome crashes?
Thanks in advance,
Pete
0 件のコメント
回答 (2 件)
Joss Knight
2023 年 4 月 22 日
This isn't a demo it's a blog from 11 years ago, and unfortunately it's using syntax that was removed from MATLAB 9 years ago. It was substituted for the simpler gpuArray.rand and then superseded by rand(..., 'gpuArray').
0 件のコメント
Walter Roberson
2023 年 4 月 22 日
See https://www.mathworks.com/help/parallel-computing/parallel.gpu.randstream.parallel.gpu.randstream.create.html and https://www.mathworks.com/help/parallel-computing/generating-random-numbers-on-a-gpu.html
You would use the first of those if you specifically wanted to use random number streams; most of the time invoking rand() with "gpuArray" option is good-enough for most people.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で GPU Computing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!