在 Matlab 中通过多个 GPU 处理大型密集矩阵
只是矩阵 A 乘以矩阵 B(以及其他简单的运算),但每个矩阵(A 或 B)对于单个 GPU 来说都很大,无法存储。
A = rand(10000,10000)
A = distributed(A)
spmd
% gpuDevice
A = gpuArray(A)
end
我的解决方案失败了,因为“GPU 阵列仅支持基本的数字或逻辑数据类型”。
如果我手动将矩阵的一部分分配给每个GPU,我必须自己处理GPU(矩阵的每个部分)之间的通信时间,而且,我不能直接使用很多函数,例如eig或max。
我不知道matlab是否已经有一些解决方案(就像使用分布式数组来处理每个工作之间的通信时间一样)来处理这个问题。
Just matrix A times matrix B(and other simple operations), but each matrix (A or B) is so large for a single GPU to store.
A = rand(10000,10000)
A = distributed(A)
spmd
% gpuDevice
A = gpuArray(A)
end
My solution is failed, due to "GPU arrays support only fundamental numeric or logical data types."
If I manually distribute parts of the matrix to the each GPU,I have to deal with communication time between GPUs (each parts of my matrix) by myself, furthermore, I can't use lots of funtions such as eig or max directly.
I have no idea whether matlab already have some solution (just like using distributed array to deal with communication time between each works) to handle this problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论