Skip to content

Commit

Permalink
bugfix: we must count the actual number of cuda devices to decide if we
Browse files Browse the repository at this point in the history
need to register (or not) the gpu workspaces

Signed-off-by: Aurelien Bouteiller <[email protected]>
  • Loading branch information
abouteiller committed Jan 22, 2024
1 parent f714942 commit ebb6d83
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions tests/testing_zgemm_dtd.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ int main(int argc, char ** argv)
parsec_task_class_t *zgemm_tc = parsec_dtd_create_zgemm_task_class(dtd_tp, TILE_FULL, PARSEC_DEV_ALL);

#if defined(DPLASMA_HAVE_CUDA)
gpus = parsec_mca_device_enabled();
for( int i = 0; i < parsec_mca_device_enabled(); i++ ) {
if( parsec_mca_device_get(i)->type != PARSEC_DEV_CUDA) {
gpus--;
}
}
if( gpus > 0 ){
CuHI = parsec_info_lookup(&parsec_per_stream_infos, "DPLASMA::CUDA::HANDLES", NULL);
assert( CuHI != -1);
Expand Down
8 changes: 7 additions & 1 deletion tests/testing_zpotrf_dtd.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,13 @@ int main(int argc, char **argv)

#if defined(DPLASMA_HAVE_CUDA)
zpotrf_dtd_workspace_info_t* infos = (zpotrf_dtd_workspace_info_t*) malloc(sizeof(zpotrf_dtd_workspace_info_t));
if( gpus > 0 ){
gpus = parsec_mca_device_enabled();
for( int i = 0; i < parsec_mca_device_enabled(); i++ ) {
if( parsec_mca_device_get(i)->type != PARSEC_DEV_CUDA) {
gpus--;
}
}
if( gpus > 0 ) {
CuHI = parsec_info_lookup(&parsec_per_stream_infos, "DPLASMA::CUDA::HANDLES", NULL);
assert(CuHI != -1);
}
Expand Down

0 comments on commit ebb6d83

Please sign in to comment.