Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add control dependencies in SYRK #97

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/zsyrk_LN.jdf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ descA [type = "const parsec_tiled_matrix_t*"]
beta [type = "dplasma_complex64_t"]
descC [type = "parsec_tiled_matrix_t*"]

/* Look ahead on both dimensions */
lookX [type = "int" hidden=on default="dplasma_aux_getGEMMLookahead(descC)"]


zsyrk(n, k) [ flops = inline_c %{ return FLOPS_ZSYRK(CLEAN_NB(descC, n), CLEAN_NB(descA, k)); %} ]
/* Execution Space */
Expand All @@ -36,6 +39,8 @@ zsyrk(n, k) [ flops = inline_c %{ return FLOPS_ZSYRK(CLEAN_NB(descC, n), CLEAN_N
-> ((descA->nt>=(k+2))) ? C zsyrk(n, k+1)
-> ((descA->nt==(k+1))) ? descC(n,n)

CTL ctlx -> (k < (descA->nt-lookX)) ? ctlx zsyrk_in_data_A0(n, k+lookX)

BODY
{
int tempnn = (n==(descC->nt-1)) ? (descC->n-(n*descC->nb)) : descC->nb;
Expand Down Expand Up @@ -64,6 +69,7 @@ zsyrk_in_data_A0(n, k) [profile = off]

READ A <- descA(n,k)
-> A zsyrk(n, k)
CTL ctlx <- (k >= lookX) ? ctlx zsyrk(n, k-lookX)

BODY
{
Expand All @@ -87,6 +93,9 @@ zgemm(n, m, k) [ flops = inline_c %{ return FLOPS_ZGEMM(CLEAN_MB(descC, m), CLEA
-> ((descA->nt==(k+1))) ? descC(m,n)
-> ((descA->nt>=(k+2))) ? C zgemm(n, m, k+1)

CTL ctla -> (k < (descA->nt-lookX)) ? ctla zgemm_in_data_A0(m, k+lookX)
CTL ctlb -> (k < (descA->nt-lookX)) ? ctlb zgemm_in_data_A1(n, k+lookX)

BODY
{
int tempmm = ((m)==(descC->mt-1)) ? (descC->m-(m*descC->mb)) : descC->mb;
Expand Down Expand Up @@ -118,6 +127,7 @@ zgemm_in_data_A1(n, k) [profile = off]

READ B <- descA(n,k)
-> B zgemm(n, (n+1)..(descC->mt-1), k)
CTL ctlb <- (k >= lookX) ? ctlb zgemm(n, (n+1) .. (descC->mt-1), k-lookX)

BODY
{
Expand All @@ -135,6 +145,7 @@ zgemm_in_data_A0(m, k) [profile = off]

READ A <- descA(m,k)
-> A zgemm(0..(descC->mt-2), m, k)
CTL ctla <- (k >= lookX) ? ctla zgemm(0 .. (m-1), m, k-lookX)

BODY
{
Expand Down
11 changes: 11 additions & 0 deletions src/zsyrk_LT.jdf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ descA [type = "const parsec_tiled_matrix_t*"]
beta [type = "dplasma_complex64_t"]
descC [type = "parsec_tiled_matrix_t*"]

/* Look ahead on both dimensions */
lookX [type = "int" hidden=on default="dplasma_aux_getGEMMLookahead(descC)"]


zsyrk(n, k) [ flops = inline_c %{ return FLOPS_ZSYRK(CLEAN_NB(descC, n), CLEAN_MB(descA, k)); %} ]
/* Execution Space */
Expand All @@ -36,6 +39,8 @@ zsyrk(n, k) [ flops = inline_c %{ return FLOPS_ZSYRK(CLEAN_NB(descC, n), CLEAN_M
-> ((descA->mt>=(2+k))) ? C zsyrk(n, k+1)
-> ((descA->mt==(1+k))) ? descC(n,n)

CTL ctlx -> (k < (descA->nt-lookX)) ? ctlx zsyrk_in_data_A0(n, k+lookX)

BODY
{
int tempnn = (n==(descC->nt-1)) ? (descC->n-(n*descC->nb)) : descC->nb;
Expand Down Expand Up @@ -64,6 +69,7 @@ zsyrk_in_data_A0(n, k) [profile = off]

READ A <- descA(k,n)
-> A zsyrk(n, k)
CTL ctlx <- (k >= lookX) ? ctlx zsyrk(n, k-lookX)

BODY
{
Expand All @@ -87,6 +93,9 @@ zgemm(n, m, k) [ flops = inline_c %{ return FLOPS_ZGEMM(CLEAN_MB(descC, m), CLEA
-> ((descA->mt==(k+1))) ? descC(m,n)
-> ((descA->mt>=(2+k))) ? C zgemm(n, m, k+1)

CTL ctla -> (k < (descA->nt-lookX)) ? ctla zgemm_in_data_A0(m, k+lookX)
CTL ctlb -> (k < (descA->nt-lookX)) ? ctlb zgemm_in_data_A1(n, k+lookX)

BODY
{
int tempmm = ((m)==(descC->mt-1)) ? (descC->m-(m*descC->mb)) : descC->mb;
Expand Down Expand Up @@ -117,6 +126,7 @@ zgemm_in_data_A1(n, k) [profile = off]

READ B <- descA(k,n)
-> B zgemm(n, (n+1)..(descC->mt-1), k)
CTL ctlb <- (k >= lookX) ? ctlb zgemm(n, (n+1) .. (descC->mt-1), k-lookX)

BODY
{
Expand All @@ -134,6 +144,7 @@ zgemm_in_data_A0(m, k) [profile = off]

READ A <- descA(k,m)
-> A zgemm(0..(descC->mt-2), m, k)
CTL ctla <- (k >= lookX) ? ctla zgemm(0 .. (m-1), m, k-lookX)

BODY
{
Expand Down
11 changes: 11 additions & 0 deletions src/zsyrk_UN.jdf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ descA [type = "const parsec_tiled_matrix_t*"]
beta [type = "dplasma_complex64_t"]
descC [type = "parsec_tiled_matrix_t*"]

/* Look ahead on both dimensions */
lookX [type = "int" hidden=on default="dplasma_aux_getGEMMLookahead(descC)"]


zsyrk(n, k) [ flops = inline_c %{ return FLOPS_ZSYRK(CLEAN_NB(descC, n), CLEAN_NB(descA, k)); %} ]
/* Execution Space */
Expand All @@ -36,6 +39,8 @@ zsyrk(n, k) [ flops = inline_c %{ return FLOPS_ZSYRK(CLEAN_NB(descC, n), CLEAN_N
-> ((descA->nt>=(2+k))) ? C zsyrk(n, k+1)
-> ((descA->nt==(k+1))) ? descC(n,n)

CTL ctlx -> (k < (descA->nt-lookX)) ? ctlx zsyrk_in_data_A0(n, k+lookX)

BODY
{
int tempnn = (n==(descC->nt-1)) ? (descC->n-(n*descC->nb)) : descC->nb;
Expand Down Expand Up @@ -63,6 +68,7 @@ zsyrk_in_data_A0(n, k) [profile = off]

READ A <- descA(n,k)
-> A zsyrk(n, k)
CTL ctlx <- (k >= lookX) ? ctlx zsyrk(n, k-lookX)

BODY
{
Expand All @@ -86,6 +92,9 @@ zgemm(n, m, k) [ flops = inline_c %{ return FLOPS_ZGEMM(CLEAN_NB(descC, n), CLEA
-> ((descA->nt>=(k+2))) ? C zgemm(n, m, k+1)
-> ((descA->nt==(k+1))) ? descC(n,m)

CTL ctla -> (k < (descA->nt-lookX)) ? ctla zgemm_in_data_A1(m, k+lookX)
CTL ctlb -> (k < (descA->nt-lookX)) ? ctlb zgemm_in_data_A0(n, k+lookX)

BODY
{
int tempnn = (n==(descC->nt-1)) ? (descC->n-(n*descC->nb)) : descC->nb;
Expand Down Expand Up @@ -117,6 +126,7 @@ zgemm_in_data_A1(m, k) [profile = off]

READ B <- descA(m,k)
-> B zgemm(0..(descC->mt-2), m, k)
CTL ctla <- (k >= lookX) ? ctla zgemm(0 .. (m-1), m, k-lookX)

BODY
{
Expand All @@ -134,6 +144,7 @@ zgemm_in_data_A0(n, k) [profile = off]

READ A <- descA(n,k)
-> A zgemm(n, (n+1)..(descC->mt-1), k)
CTL ctlb <- (k >= lookX) ? ctlb zgemm(n, (n+1) .. (descC->mt-1), k-lookX)

BODY
{
Expand Down
11 changes: 11 additions & 0 deletions src/zsyrk_UT.jdf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ descA [type = "const parsec_tiled_matrix_t*"]
beta [type = "dplasma_complex64_t"]
descC [type = "parsec_tiled_matrix_t*"]

/* Look ahead on both dimensions */
lookX [type = "int" hidden=on default="dplasma_aux_getGEMMLookahead(descC)"]


zsyrk(n, k) [ flops = inline_c %{ return FLOPS_ZSYRK(CLEAN_NB(descC, n), CLEAN_MB(descA, k)); %} ]
/* Execution Space */
Expand All @@ -36,6 +39,8 @@ zsyrk(n, k) [ flops = inline_c %{ return FLOPS_ZSYRK(CLEAN_NB(descC, n), CLEAN_M
-> ((descA->mt-1) > k) ? C zsyrk(n, k+1)
-> ((descA->mt-1) == k) ? descC(n,n)

CTL ctlx -> (k < (descA->nt-lookX)) ? ctlx zsyrk_in_data_A0(n, k+lookX)

BODY
{
int tempnn = (n==(descC->nt-1)) ? (descC->n-(n*descC->nb)) : descC->nb;
Expand Down Expand Up @@ -63,6 +68,7 @@ zsyrk_in_data_A0(n, k) [profile = off]

READ A <- descA(k,n)
-> A zsyrk(n, k)
CTL ctlx <- (k >= lookX) ? ctlx zsyrk(n, k-lookX)

BODY
{
Expand All @@ -86,6 +92,9 @@ zgemm(n, m, k) [ flops = inline_c %{ return FLOPS_ZGEMM(CLEAN_NB(descC, n), CLEA
-> ((descA->mt==(k+1))) ? descC(n,m)
-> ((descA->mt>=(2+k))) ? C zgemm(n, m, k+1)

CTL ctla -> (k < (descA->nt-lookX)) ? ctla zgemm_in_data_A1(m, k+lookX)
CTL ctlb -> (k < (descA->nt-lookX)) ? ctlb zgemm_in_data_A0(n, k+lookX)

BODY
{
int tempnn = (n==(descC->nt-1)) ? (descC->n-(n*descC->nb)) : descC->nb;
Expand Down Expand Up @@ -115,6 +124,7 @@ zgemm_in_data_A1(m, k) [profile = off]

READ B <- descA(k,m)
-> B zgemm(0..(descC->mt-2), m, k)
CTL ctla <- (k >= lookX) ? ctla zgemm(0 .. (m-1), m, k-lookX)

BODY
{
Expand All @@ -132,6 +142,7 @@ zgemm_in_data_A0(n, k) [profile = off]

READ A <- descA(k,n)
-> A zgemm(n, (n+1)..(descC->mt-1), k)
CTL ctlb <- (k >= lookX) ? ctlb zgemm(n, (n+1) .. (descC->mt-1), k-lookX)

BODY
{
Expand Down
Loading