概述
gpuDevice
ans =
CUDADevice (具有属性):
Name: 'GeForce RTX 2060 SUPER'
Index: 1
ComputeCapability: '7.5'
SupportsDouble: 1
DriverVersion: 10.2000
ToolkitVersion: 7.5000
MaxThreadsPerBlock: 1024
MaxShmemPerBlock: 49152
MaxThreadBlockSize: [1024 1024 64]
MaxGridSize: [2.1475e+09 65535 65535]
SIMDWidth: 32
TotalMemory: 8.5899e+09
AvailableMemory: 6.9322e+09
MultiprocessorCount: 34
ClockRateKHz: 1650000
ComputeMode: 'Default'
GPUOverlapsTransfers: 1
KernelExecutionTimeout: 1
CanMapHostMemory: 1
DeviceSupported: 1
DeviceSelected: 1
>> gpuDeviceCount
ans =
1
从 gpuArray 转换为 double 时出现以下错误:
无法从 gpuArray 转换为 double。
出错 FD (line 7)
set(:,m,:) = downsample(signal(:,m:end)',dura_k)';
测试:
t = tic;
gridSize = 200;
maxIterations = 10000;
x = linspace(1, 100, gridSize);
y = linspace(1, 100, gridSize);
[xGrid, yGrid] = meshgrid(x, y);
z0 = xGrid + 1i*yGrid;
count = ones(size(z0), 'gpuArray');
z = z0;
for n = 0:maxIterations
z = z.*z + z0;
inside = abs(z)<=2;
inside = count + inside;
end
count = log(count);
gpuTime = toc(t)
>> testgpu
gpuTime =
164.4075
>> testgpu
cpuTime =
2.4311
最后
以上就是结实鲜花为你收集整理的matlab gpu加速的全部内容,希望文章能够帮你解决matlab gpu加速所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复