并行稀疏乘法算法 [英] parallel sparse multiplication algorithm

查看:89
本文介绍了并行稀疏乘法算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我有一个算法,我想知道它是如何工作的以及如何划分处理器
请帮助我,这对我来说非常重要
使用稀疏SUMMA的算法运算C←AB
输入:A∈Sm×k,B∈Sk×n:稀疏矩阵分布在pr×pc处理器网格上
输出:C∈Sm×n:乘积AB,分布相似.
1:过程SparseSUMMA(A,B,C)
2:对于所有并行执行的处理器P(i,j)
3:Bij←(Bij)T
4:对于q = 1到k/b呢?阻塞参数b均分k/pr和k/pc
5:c =(q·b)/pc? c是广播处理器列
6:r =(q·b)/pr? r是广播处理器行
7:lcols =(q·b)mod pc:((q + 1)·b)mod pc?本地列范围
8:借款人=(q·b)mod pr:((q + 1)·b)mod pr吗?本地行范围
9:战神←广播(Aic(:, lcols),P(i,:))
10:Brem←广播(Brj(:, lrows),P(:, j))
11:Cij←Cij + HyperSparseGEMM(Arem,Brem)
12:比吉←(Bij)T
?恢复原始的B

hello i have an algorithm and i want to know how it works and how it divides processors
please help me its very important for me
Algorithm Operation C ← AB using Sparse SUMMA
Input: A ∈ Sm×k,B ∈ Sk×n: sparse matrices distributed on a pr ×pc processor grid
Output: C ∈ Sm×n: the product AB, similarly distributed.
1: procedure SparseSUMMA(A,B,C)
2: for all processors P(i, j) in parallel do
3: Bij ← (Bij )T
4: for q = 1 to k/b do  blocking parameter b evenly divides k/pr and k/pc
5: c = (q · b)/pc  c is the broadcasting processor column
6: r = (q · b)/pr  r is the broadcasting processor row
7: lcols = (q · b) mod pc : ((q + 1) · b) mod pc  local column range
8: lrows = (q · b) mod pr : ((q + 1) · b) mod pr  local row range
9: Arem ← Broadcast(Aic(:, lcols), P(i, :))
10: Brem ← Broadcast(Brj(:, lrows), P(:, j))
11: Cij ← Cij + HyperSparseGEMM(Arem,Brem)
12: Bij ← (Bij )T
 Restore the original B

推荐答案

在这里不起作用.

这是询问者的期望:
1. 先尝试您要做什么!您可能会发现它并不难.
2.制定看起来像问题/无法解决的问题.

试试看,告诉他们是否遇到问题.
成员将很乐意为您提供帮助.


去吧,跟你的老师谈谈.然后学习如何读取算法-使用的符号.尝试阅读.
It does not work like this here.

Here is what is expected of enquirers:
1. TRY first what you want to do! You may find that it''s not that hard.
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.
Members will be more than happy to help like this.


Go, talk to your teacher. Then learn how to read algorithms - symbols used. Try to read it.


这篇关于并行稀疏乘法算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆