Skip to content

Commit 676c5ca

Browse files
committed
Update README.md file
1 parent cc4a405 commit 676c5ca

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Parallel-Matrix-Multiplication-FOX-Algorithm
2-
:coffee:Implement of Parallel Matrix Multiplication Methods Using FOX Algorithm on Peking University's High-performance Computing System
1+
# **Parallel-Matrix-Multiplication-FOX-Algorithm**
2+
:coffee:Implement of Parallel Matrix Multiplication Methods Using FOX Algorithm on *<span style="color: red">Peking University's High-performance Computing System</span>*
33

4-
## Brief Introduction to Parallel Matrix Multiplication FOX Algorithm
4+
## **Brief Introduction to Parallel Matrix Multiplication FOX Algorithm**
55

6-
### Basic Concepts
6+
### **Basic Concepts**
77

88
* 规约计算 (Reduction)
99
* 拥有者计算原则 (Owner Computing Rule)
@@ -12,7 +12,7 @@
1212
* 数据并行 (Data Parallelism):
1313
* 在每个进程上同时计算局部的矩阵乘积 (Local Matrix Multiplications are computing on every processess at the same Computing Step)
1414

15-
### Serial Matrix Multiplication:
15+
### **Serial Matrix Multiplication**
1616

1717
* Mathematical Modeling of Matrix Multiplication
1818
* <img src="https://tex.s2cms.ru/svg/C_%7Bij%7D%3D%5Csum_%7Bk%3D0%7D%5E%7BK-1%7D%20A_%7Bik%7DB_%7Bkj%7D%3B%20%5Cquad%20(i%3D0%2CN-1)%2C%20%5Cquad%20(j%3D0%2CM-1)" alt="C_{ij}=\sum_{k=0}^{K-1} A_{ik}B_{kj}; \quad (i=0,N-1), \quad (j=0,M-1)" />
@@ -32,17 +32,17 @@ for (i = 0; i < n; i++)
3232
C(i,j) = C(i,j) + A(i,k)*B(k,j);
3333
```
3434
35-
### Parallel Computing Modeling Design
35+
### **Parallel Computing Modeling Design**
3636
37-
1. Basic Flow
37+
1. **Basic Flow**
3838
* Matrix <img src="https://tex.s2cms.ru/svg/%5Cmathbf%7BA%7D" alt="\mathbf{A}">'s Dimension is <img src="https://tex.s2cms.ru/svg/M%20%5Ctimes%20K" alt="M \times K">, and Matirx <img src="https://tex.s2cms.ru/svg/%5Cmathbf%7BB%7D" alt="\mathbf{B}">'s Dimension is a <img src="https://tex.s2cms.ru/svg/K%20%5Ctimes%20N" alt="K \times N">.
3939
* Compute Matrix <img src="https://tex.s2cms.ru/svg/%5Cmathbf%7BC%7D%20%3D%20%5Cmathbf%7BA%7D%5Cmathbf%7BB%7D" alt="\mathbf{C} = \mathbf{A}\mathbf{B}"> in parallel.
4040
* Let <img src="https://tex.s2cms.ru/svg/p%3Dnum(processors)" alt="p=num(processors)"> is the number of processors, and <img src="https://tex.s2cms.ru/svg/q%3D%5Csqrt%7Bp%7D" alt="q=\sqrt{p}"> be an integer such that it devides <img src="https://tex.s2cms.ru/svg/M" alt="M"> and <img src="https://tex.s2cms.ru/svg/N" alt="N">.
4141
* Create a Cartesian topology with process mesh <img src="https://tex.s2cms.ru/svg/P_%7Bij%7D" alt="P_{ij}">, and <img src="https://tex.s2cms.ru/svg/i%3D0..q-1" alt="i=0..q-1">, <img src="https://tex.s2cms.ru/svg/j%3D0..q-1" alt="j=0..q-1">.
4242
* Denote <img src="https://tex.s2cms.ru/svg/%5Chat%7BM%7D%20%3D%20%5Cfrac%7BM%7D%7Bq%7D" alt="\hat{M} = \frac{M}{q}">, <img src="https://tex.s2cms.ru/svg/%5Chat%7BK%7D%3D%5Cfrac%7BK%7D%7Bq%7D" alt="\hat{K}=\frac{K}{q}">, <img src="https://tex.s2cms.ru/svg/%5Chat%7BN%7D%3D%5Cfrac%7BN%7D%7Bq%7D" alt="\hat{N}=\frac{N}{q}">.
4343
* Distribute <img src="https://tex.s2cms.ru/svg/%5Cmathbf%7BA%7D" alt="\mathbf{A}"> and <img src="https://tex.s2cms.ru/svg/%5Cmathbf%7BB%7D" alt="\mathbf{B}"> by blocks on p processess such that <img src="https://tex.s2cms.ru/svg/A_%7Bij%7D" alt="A_{ij}"> is <img src="https://tex.s2cms.ru/svg/%5Chat%7BM%7D%20%5Ctimes%20%5Chat%7BK%7D" alt="\hat{M} \times \hat{K}"> block and <img src="https://tex.s2cms.ru/svg/B_%7Bij%7D" alt="B_{ij}"> is <img src="https://tex.s2cms.ru/svg/%5Chat%7BK%7D%20%5Ctimes%20%5Chat%7BN%7D" alt="\hat{K} \times \hat{N}"> block, stored on process <img src="https://tex.s2cms.ru/svg/P_%7Bij%7D" alt="P_{ij}">.
4444
45-
1. Details
45+
2. **Details**
4646
4747
* Partitions of Matrices A, B and C. (Index syntax in Mathematical form: start from 1)
4848
* Matrix A
@@ -55,3 +55,9 @@ for (i = 0; i < n; i++)
5555
* <img src="https://tex.s2cms.ru/svg/C%20%3D%20%5Cleft%20(%0A%5Cbegin%7Bmatrix%7D%20%5Cleft(%0A%20%0A%20%20%5Cbegin%7Bmatrix%7D%20%0A%20%20%20%20c_%7B11%7D%20%26%20c_%7B12%7D%20%26%20%5Ccdot%20%26%20c_%7B1%2C%5Cfrac%7BN%7D%7Bq%7D%7D%5C%5C%0A%20%20%20%20c_%7B21%7D%20%26%20c_%7B22%7D%20%26%20%5Ccdot%20%26%20%5Ccdot%20%5C%5C%0A%20%20%20%20%5Ccdot%20%26%20%5Ccdot%20%26%20%5Ccdot%20%26%20%5Ccdot%20%5C%5C%0A%20%20%20%20%5Ccdot%20%26%20%5Ccdot%20%26%20%5Ccdot%20%26%20%5Ccdot%20%5C%5C%0A%20%20%20%20c_%7B%5Cfrac%7BM%7D%7Bq%7D%2C1%7D%20%26%20%5Ccdot%20%26%20%5Ccdot%20%26%20c_%7B%5Cfrac%7BM%7D%7Bq%7D%2C%5Cfrac%7BN%7D%7Bq%7D%7D%0A%20%20%5Cend%7Bmatrix%7D%20%5Cright%20)_%7BC_%7B11%7D%7D%20%0A%20%20%20%0A%20%20%20%26%20C_%7B12%7D%20%26%20%5Ccdot%20%26%20C_%7B1q%7D%20%5C%5C%20%0A%20C_%7B21%7D%20%26%20%5Ccdot%20%26%20%5Ccdot%20%26%20%5Ccdot%20%5C%5C%20%0A%20%5Ccdot%20%26%20%5Ccdot%20%26%20%5Ccdot%20%26%20%5Ccdot%20%5C%5C%0A%20C_%7Bq1%7D%20%26%20%5Ccdot%20%26%20%5Ccdot%20%26%20C_%7Bqq%7D%20%0A%0A%5Cend%7Bmatrix%7D%20%5Cright%20)_%7BMN%7D" />
5656
5757
* Data Distribution on the 2-D Cartesian Topology Processes Mesh (Index syntax in Mathematical form: start from 1)
58+
* Data Mapping
59+
* | Data Mesh | Mapping | Process Mesh |
60+
| ------------- |:-------------:|:-------------:|
61+
| <img src="https://tex.s2cms.ru/svg/%5Cleft%20(%0A%5Cbegin%7Bmatrix%7D%0A%20A_%7B11%7D%20%26%20A_%7B12%7D%20%26%20%5Ccdot%20%26%20A_%7B1p%7D%20%5C%5C%20%0A%20A_%7B21%7D%20%26%20A_%7B22%7D%20%26%20%5Ccdot%20%26%20A_%7B2p%7D%20%5C%5C%20%0A%20%5Ccdot%20%26%20%5Ccdot%20%26%20%5Ccdot%20%26%20%5Ccdot%20%5C%5C%0A%20A_%7Bp1%7D%20%26%20A_%7Bp2%7D%20%26%20%5Ccdot%20%26%20A_%7Bpp%7D%20%5C%5C%0A%5Cend%7Bmatrix%7D%0A%5Cright%20)_%7BA_%7Bij%7D%7D"> | right-aligned | |
62+
| col 2 is | centered | |
63+
| zebra stripes | are neat | |

0 commit comments

Comments
 (0)