[DOC] Fixed formatting issues in tutorial
This commit is contained in:
committed by
Philippe Tillet
parent
5778eea546
commit
97293440fc
@@ -35,7 +35,7 @@ Matrix multiplications of the form `C = A x B` can be implemented in Triton-C fa
|
|||||||
TYPE a[TM, TK] = *pa; //(9)
|
TYPE a[TM, TK] = *pa; //(9)
|
||||||
TYPE b[TK, TN] = *pb; //(10)
|
TYPE b[TK, TN] = *pb; //(10)
|
||||||
// matrix-multiply accumulate
|
// matrix-multiply accumulate
|
||||||
c += a @ b; //(11)
|
c += dot(a, b); //(11)
|
||||||
// increment pointers
|
// increment pointers
|
||||||
pa = pa + TK * 1; //(12)
|
pa = pa + TK * 1; //(12)
|
||||||
pb = pb + TK * ldb; //(13)
|
pb = pb + TK * ldb; //(13)
|
||||||
@@ -88,7 +88,7 @@ The purpose of pre-fetching is to overlap the update of the accumulator `c` with
|
|||||||
TYPE a[TM, TK] = *pa; //(9)
|
TYPE a[TM, TK] = *pa; //(9)
|
||||||
TYPE b[TK, TN] = *pb; //(10)
|
TYPE b[TK, TN] = *pb; //(10)
|
||||||
for(int k = K; k > 0; k-= TK){
|
for(int k = K; k > 0; k-= TK){
|
||||||
c += a @ b;
|
c += dot(a, b);
|
||||||
pa = pa + TK * 1;
|
pa = pa + TK * 1;
|
||||||
pb = pb + TK * ldb;
|
pb = pb + TK * ldb;
|
||||||
// don't prefetch last iteration
|
// don't prefetch last iteration
|
||||||
@@ -144,7 +144,7 @@ It is common for optimized matrix-multiplication implementations (e.g., BLAS) to
|
|||||||
TYPE b[SHAPE_B] = (*pb);
|
TYPE b[SHAPE_B] = (*pb);
|
||||||
// reduction loop
|
// reduction loop
|
||||||
for(int k = K; k > 0; k-= TK){
|
for(int k = K; k > 0; k-= TK){
|
||||||
c += USE_A @ USE_B;
|
c += dot(USE_A, USE_B);
|
||||||
pa = pa + TK * STRIDE_AK;
|
pa = pa + TK * STRIDE_AK;
|
||||||
pb = pb + TK * STRIDE_BK;
|
pb = pb + TK * STRIDE_BK;
|
||||||
a = *pa;
|
a = *pa;
|
||||||
|
@@ -53,7 +53,7 @@ which will be used in statements (5) and (6) to construct tiles of pointers
|
|||||||
|
|
||||||
- Statements (5) constructs the following array of pointers `px` using numpy-style broadcasting semantics:
|
- Statements (5) constructs the following array of pointers `px` using numpy-style broadcasting semantics:
|
||||||
|
|
||||||
.. code-block:: C
|
::
|
||||||
|
|
||||||
│ X + (pidm*TM + 0) + (pidn*TN + 0)*ldx, ..., ..., X + (pidm*TM + 0) + (pidn*TN + TN - 1)*ldx) │
|
│ X + (pidm*TM + 0) + (pidn*TN + 0)*ldx, ..., ..., X + (pidm*TM + 0) + (pidn*TN + TN - 1)*ldx) │
|
||||||
│ ⋮ ⋮ │
|
│ ⋮ ⋮ │
|
||||||
@@ -63,7 +63,7 @@ which will be used in statements (5) and (6) to construct tiles of pointers
|
|||||||
|
|
||||||
- Statement (6) constructs the following array of pointers `py` using numpy-style broadcasting semantics:
|
- Statement (6) constructs the following array of pointers `py` using numpy-style broadcasting semantics:
|
||||||
|
|
||||||
.. code-block:: C
|
::
|
||||||
|
|
||||||
│ Y + (pidn*TN + 0) + (pidm*TM + 0)*ldy, ..., ..., Y + (pidn*TN + 0) + (pidm*TM + TM - 1)*ldy) │
|
│ Y + (pidn*TN + 0) + (pidm*TM + 0)*ldy, ..., ..., Y + (pidn*TN + 0) + (pidm*TM + TM - 1)*ldy) │
|
||||||
│ ⋮ ⋮ │
|
│ ⋮ ⋮ │
|
||||||
|
Reference in New Issue
Block a user