The Issue
On a GPU node when switching from StarPU version 1.3.11 to 1.4 versions we experience strange performance drop. For our new software NNTile it results in a 10x performance drop. Yes, it goes from 100% to only 10% percent.
Attempt to switch to a master branch (commit 50cf74508 at Inria gitlab repository) leads to different errors, related to data transfers between CPU and GPU. We tried some other commits from master branch and realized, that they only work with CPU and something strange with memory manager happens when it goes to GPU nodes. DARTS scheduler always fails, while DM and DMDA schedulers fail for some commits (e.g., 50cf74508) and work correctly for other commits (e.g., 2b8a91fe). I cannot present the output of master branch experiments right now, as this current issue is about performance degradation of 1.4 series of StarPU releases.
Although 10x performance drop happens on our new software, I prepared a simple example that shows performance for versions 1.2.10, 1.3.11 and 1.4.4. Most performance drop for the simple example happened when switching from 1.2.10 version to 1.3.11.
Steps to reproduce
I have implemented a simple test https://github.com/Muxas/starpu_gemm_redux to reproduce the issue. The repo simply implements several chains of matrix multiplications:
C[i] = A[i][0]*B[i][0] + A[i][1]*B[i][1] + ... +A[i][NB-1]*B[i][NB-1]
for i in range from 0 to D-1.
which can be simply described with the following C code (the first order of task submissions):
for(int r = 0; r < R; ++r) // Number of repeats
{
for(int i = 0; i < NB; ++i) // Number of A and B matrices in each chain of matrix multiplications
{
for(int j = 0; j < D; ++j) // Number of output C matrices
{
starpu_task_insert(&gemm_cl, STARPU_R, A[i*D+j], STARPU_R, B[i*D+j],
C_mode, C[j], 0);
}
}
}
or with the following C code (the other order of task submissions):
for(int r = 0; r < R; ++r) // Number of repeats
{
for(int j = 0; j < D; ++j) // Number of output C matrices
{
for(int i = 0; i < NB; ++i) // Number of A and B matrices in each chain of matrix multiplications
{
starpu_task_insert(&gemm_cl, STARPU_R, A[i*D+j], STARPU_R, B[i*D+j],
C_mode, C[j], 0);
}
}
}
Matrices A are of size M-by-K, matrices B are of size K-by-N and matrices C are of size M-by-N. No transpositions in matrix multiplications.
Our results are produced on a HGX node with 8 (eight) Nvidia A100 80GB SXM GPUs. We compiled the code and run two experimental setups:
M=N=K=1024, D=32, NB=100, R=50. with and without STARPU_REDUX access mode for the matrices C.
M=256, N=K=1532, D=32, NB=100, R=50. with and without STARPU_REDUX access mode for the matrices C.
StarPU-1.4.4 behavior
This section presents plots for the StarPU-1.4.4 version. The first plot shows warmup time (done by the first order of task submission), time for the first order of task submission and time for the other way of task submission with STARPU_RW|STARPU_COMMUTE access mode for the matrices C and M=N=K=1024:

The second plot shows the same timings but for the STARPU_REDUX access mode for the matrices C:

The third plot shows timings for M=256 and N=K=1532 with STARPU_RW|STARPU_COMMUTE access mode:

And the last plot in this section (for the STARPU_REDUX access mode):

We see, that most dumb scheduling algorithm, namely eager, outperforms smarter ones.
StarPU-1.3.11 behavior
This section presents plots for StarPU of version 1.3.11 in the same order as above.




We see, that most dumb scheduling algorithm, namely eager, outperforms smarter ones.
StarPU-1.2.10 behavior
This section presents plots for StarPU of version 1.2.10 in the same order as above.




Here we see, that in case of STARPU_RW|STARPU_COMMUTE access mode smart schedulers DMDA and DMDAR perform nearly perfectly, just as EAGER. The problem with DMDA and DMDAR appears when switching to 1.3.11 or 1.4.4 StarPU version.
Configuration
The configure line we used is within config.log files in the section below.
Configuration result
This is a config file for StarPU-1.2.10:
config-1.2.10.log
This is a config file for StarPU-1.3.11:
config-1.3.11.log
This is a config file for StarPU-1.4.4:
config-1.4.4.log
Distribution
Inria Gitlab repository
Version of StarPU
We used starpu-1.3.11 and starpu-1.4.4 tags of Inria GitLab repository
Version of GPU drivers
We use CUDA 12.3, hwloc 2.9.3
The Issue
On a GPU node when switching from StarPU version 1.3.11 to 1.4 versions we experience strange performance drop. For our new software NNTile it results in a 10x performance drop. Yes, it goes from 100% to only 10% percent.
Attempt to switch to a master branch (commit 50cf74508 at Inria gitlab repository) leads to different errors, related to data transfers between CPU and GPU. We tried some other commits from master branch and realized, that they only work with CPU and something strange with memory manager happens when it goes to GPU nodes. DARTS scheduler always fails, while DM and DMDA schedulers fail for some commits (e.g., 50cf74508) and work correctly for other commits (e.g., 2b8a91fe). I cannot present the output of master branch experiments right now, as this current issue is about performance degradation of 1.4 series of StarPU releases.
Although 10x performance drop happens on our new software, I prepared a simple example that shows performance for versions 1.2.10, 1.3.11 and 1.4.4. Most performance drop for the simple example happened when switching from 1.2.10 version to 1.3.11.
Steps to reproduce
I have implemented a simple test https://github.com/Muxas/starpu_gemm_redux to reproduce the issue. The repo simply implements several chains of matrix multiplications:
for
iin range from0toD-1.which can be simply described with the following C code (the first order of task submissions):
or with the following C code (the other order of task submissions):
Matrices
Aare of sizeM-by-K, matricesBare of sizeK-by-Nand matrices C are of sizeM-by-N. No transpositions in matrix multiplications.Our results are produced on a HGX node with 8 (eight) Nvidia A100 80GB SXM GPUs. We compiled the code and run two experimental setups:
M=N=K=1024, D=32, NB=100, R=50.with and without STARPU_REDUX access mode for the matricesC.M=256, N=K=1532, D=32, NB=100, R=50.with and without STARPU_REDUX access mode for the matricesC.StarPU-1.4.4 behavior
This section presents plots for the StarPU-1.4.4 version. The first plot shows warmup time (done by the first order of task submission), time for the first order of task submission and time for the other way of task submission with STARPU_RW|STARPU_COMMUTE access mode for the matrices
CandM=N=K=1024:The second plot shows the same timings but for the STARPU_REDUX access mode for the matrices
C:The third plot shows timings for
M=256andN=K=1532with STARPU_RW|STARPU_COMMUTE access mode:And the last plot in this section (for the STARPU_REDUX access mode):
We see, that most dumb scheduling algorithm, namely
eager, outperforms smarter ones.StarPU-1.3.11 behavior
This section presents plots for StarPU of version 1.3.11 in the same order as above.
We see, that most dumb scheduling algorithm, namely
eager, outperforms smarter ones.StarPU-1.2.10 behavior
This section presents plots for StarPU of version 1.2.10 in the same order as above.
Here we see, that in case of STARPU_RW|STARPU_COMMUTE access mode smart schedulers DMDA and DMDAR perform nearly perfectly, just as EAGER. The problem with DMDA and DMDAR appears when switching to 1.3.11 or 1.4.4 StarPU version.
Configuration
The
configureline we used is within config.log files in the section below.Configuration result
This is a config file for StarPU-1.2.10:
config-1.2.10.log
This is a config file for StarPU-1.3.11:
config-1.3.11.log
This is a config file for StarPU-1.4.4:
config-1.4.4.log
Distribution
Inria Gitlab repository
Version of StarPU
We used starpu-1.3.11 and starpu-1.4.4 tags of Inria GitLab repository
Version of GPU drivers
We use CUDA 12.3, hwloc 2.9.3