Matlab GPU计算解决方案

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

M = ceil((numel(x)-W)/stride);%iterations needed o = cell(M, 1); % preallocate output for i = 1:M % What are the start points thisSP = (i-1)*stride:step: … (min(numel(x)-W, i*stride)-1); % Move the data efficiently into a matrix X = copyAndWindowInput(x, window, thisSP); % Take lots of fft's down the colmuns
+
谢谢!
+
Matlab 集群推荐配置
集群 AMAX Xn-1113G, Xn-4002G Tesla卡 • Tesla C2070 (6 GB) • Tesla C2075 (6GB) 新系统: • CPU: 2 x 4core Xeon E5645 • Memory: 48GB • Disk: 500 GB • GPU: 1~2 Tesla C2070/C2075 • 40Gb Infiniband
z = gather(x); % Bring back into MATLAB
+100 Functions support GPU Arrays
fft, fft2, ifft, ifft2
Matrix multiplication (A*B) Matrix left division (A\b)
LU factorization ‘ .’ abs, acos, …, minus, …, plus, …, sin, …
+
NVIDIA Confidential
Matlab + Jacket 超级计算工作站
工作站 AMAX PSC-2N, PSC-5N Tesla卡 • Tesla C2070 (6 GB) • Tesla C2075 (6GB) 新系统: • CPU: 2 x 4core Xeon E5645 • Memory: 48GB • Disk: 500 GB • GPU: 1~4 Tesla C2070/C2075
GPU Array 测试
Example:
CPU Only
Spectrogram on the desktop
D = data; iterations = 2000; % # of parallel iterations stride = iterations*step
%stride of outer loop
X = abs(fft(X));
% Return only the first part to MATLAB o{i} = X(1:E, 1:ratio:end); end
ExaБайду номын сангаасple:
CPU Only GPU
Spectrogram on the desktop
D = data; iterations = 2000 stride = iterations*step % # of parallel iterations %stride of outer loop D = gpuArray(data); iterations = 2000; % # of parallel iterations stride = iterations*step; %stride of outer loop M = ceil((numel(x)-W)/stride %iterations needed o = cell(M, 1); % preallocate output for i = 1:M % What are the start points thisSP = (i-1)*stride:step ... (min(numel(D)-W, i*stride)-1); % Move the data efficiently into a matrix X = copyAndWindowInput(D, window, thisSP); % Take lots of fft's down the colmuns gather( X= abs(fft(X)));
Matlab GPU计算解决方案
Author: Mike Huang Product Director
什么是Matlab?
工作标准的高级编程语言
用于算法开发
数值计算
数据分析和可视化 集成了信号处理、图像处理、 统计、优化、符号数学等工 具箱
MATLAB 并行计算工具箱
工业标准的算法开发和数据分析的高级语言
o{i} = X(1:E, 1:ratio:end); end
Matlab 超级计算工作站
工作站 AMAX PSC-2N, PSC-5N Tesla卡 • Tesla C2070 (6 GB) • Tesla C2075 (6GB) 新系统: • CPU: 2 x 4core Xeon E5645 • Memory: 48GB • Disk: 500 GB • GPU: Quadro 600 + Tesla C2070/C2075
3x speedup in estimating 7.6 million contract prices using Black- Scholes model
17x speedup in simulating the movement of 3072 celestial objects
4x speedup in adaptive filtering routine (part of acoustic tracking algorithm)
工作标准的高级编程语言用于算法开发数值计算数据分析和可视化集成了信号处理图像处理统计优化符号数学等工工业标准的算法开发和数据分析的高级语言gpu价值gpu可以加速现有的matlab的代码对大数据集可以提高1040x的性能datasets对许多工作流有显著的加速包括频谱分析线性代数随机模拟等等亮点gpu加速纯matlab操作支持用户的cudakernel集成进matlab支持matlab编译器gpu速不需要matlab可以从gpu工作站parallelcomputingtoolbox扩展到gpu集群matlabdistributedcomputingservermatlab并行计算工具箱工具和术语matlab并行计算10xspeedupdataclusteringviameansclusteringalgorithm17xspeedup3072celestialobjects14xspeeduptemplatematchingroutinepartcancercellimageanalysis4xspeedupadaptivefilteringroutinepartacoustictrackingalgorithm3xspeedupestimating76millioncontractpricesusingblackscholesmodel4xspeedupwaveequationsolvingpartseismicdataprocessingalgorithmmatlabgpu计算实例在一台机器或集群的每一台机器上增加一块或多块gpu实现加速
% Take lots of fft's down the colmuns
X = abs(fft(X)); % Return only the first part to MATLAB o{i} = X(1:E, 1:ratio:end); end
% Return only the first part to MATLAB
M = ceil((numel(x)-W)/stride %iterations needed o = cell(M, 1); % preallocate output for i = 1:M % What are the start points thisSP = (i-1)*stride:step: … (min(numel(x)-W, i*stride)-1); % Move the data efficiently into a matrix X = copyAndWindowInput(x, window, thisSP);
MATLAB并行计算
工具和术语
MATLAB GPU 计算实例
10x speedup in data clustering via Kmeans clustering algorithm
14x speedup in template matching routine (part of cancer cell image analysis)
4x speedup in wave equation solving (part of seismic data processing algorithm)
MATLABGPU加速的方式
在一台机器或集群的每一台机器上增加一块或多 块GPU实现加速:
1) 使用 MATLAB 内置的 GPU array 接口函数 Greater Control
+
Matlab 集群推荐配置
集群 AMAX Xn-1113G, Xn-4101G Tesla卡 • Tesla C2070 (6 GB) • Tesla C2075 (6GB) 新系统: • CPU: 2 x 4core Xeon E5645 • Memory: 48GB • Disk: 500 GB • GPU: 1~7 Tesla C2070/C2075 • 40Gb Infiniband
Ease of Use
2) 在GPU array 中的元素执行客户函数
3) 利用现有的CUDA代码和PTX文件创建 kernel
Example:
GPU Arrays
>> >> … >> >> … >> A = someArray(1000, 1000); G = gpuArray(A); % Push to GPU memory F = fft(G); x = G\b;
GPU 价值
GPU可以加速现有的MATLAB的代码 对大数据集可以提高 10-40x 的性能 datasets 对许多工作流有显著的加速,包括频谱分析,线性代数,随机模拟,
等等
亮点
GPU 加速纯 MATLAB 操作
支持用户的 CUDA kernel 集成进MATLAB 支持MATLAB 编译器 (GPU 加 速不需要 MATLAB) 可以从GPU工作站(Parallel Computing Toolbox) 扩展到GPU集群 (MATLAB Distributed Computing Server)
相关文档
最新文档