Error using gpuArray : when running three times , GPUs not working again !

2 ビュー (過去 30 日間)
Furat Alobaidy
Furat Alobaidy 2020 年 12 月 15 日
コメント済み: Furat Alobaidy 2020 年 12 月 17 日
clear all;
gpu = gpuDevice();
fprintf('Using a %s GPU.\n', gpu.Name)
sizeOfDouble = 8; % Each double-precision number needs 8 bytes of storage
sizes = power(2, 14:28);
sendTimes = inf(size(sizes));
gatherTimes = inf(size(sizes));
for ii=1:numel(sizes)
numElements = sizes(ii)/sizeOfDouble;
hostData = randi([0 9], numElements, 1);
gpuData = randi([0 9], numElements, 1, 'gpuArray');
% Time sending to GPU
sendFcn = @() gpuArray(hostData);
sendTimes(ii) = gputimeit(sendFcn);
% Time gathering back from GPU
gatherFcn = @() gather(gpuData);
gatherTimes(ii) = gputimeit(gatherFcn);
end
sendBandwidth = (sizes./sendTimes)/1e9;
[maxSendBandwidth,maxSendIdx] = max(sendBandwidth);
fprintf('Achieved peak send speed of %g GB/s\n',maxSendBandwidth)
gatherBandwidth = (sizes./gatherTimes)/1e9;
[maxGatherBandwidth,maxGatherIdx] = max(gatherBandwidth);
fprintf('Achieved peak gather speed of %g GB/s\n',max(gatherBandwidth))
hold off
semilogx(sizes, sendBandwidth, 'b.-', sizes, gatherBandwidth, 'r.-')
hold on
semilogx(sizes(maxSendIdx), maxSendBandwidth, 'bo-', 'MarkerSize', 10);
semilogx(sizes(maxGatherIdx), maxGatherBandwidth, 'ro-', 'MarkerSize', 10);
grid on
title('Data Transfer Bandwidth')
xlabel('Array size (bytes)')
ylabel('Transfer speed (GB/s)')
legend('Send to GPU', 'Gather from GPU', 'Location', 'NorthWest')
Hi when i need ruuning this program mutli time for testing GPus performance ,
after thrr time gave me error and its not work until restest my PC , then after three time agin gave me the same error ?
i tired follows this soulation ( by change Nsight Monitor ) at this web site : https://www.mathworks.com/matlabcentral/answers/34052-cuda_error_launch_failed-problem
, but the same problem!
Error using gpuArray
An unexpected error occurred during CUDA execution. The CUDA error was:
CUDA_ERROR_LAUNCH_FAILED
  2 件のコメント
Andrea Picciau
Andrea Picciau 2020 年 12 月 17 日
Hi Furat,
It would help to know you setup: MATLAB version, GPU model and driver.
Furat Alobaidy
Furat Alobaidy 2020 年 12 月 17 日
thanks Andera ,
MATLAB2019b,
GPU model:NVIDA GeForce GT730
Driver: Intel UHD graphics 630

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeGPU Computing についてさらに検索

タグ

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by