Skip to content

Commit 4dae142

Browse files
authored
Merge pull request #11071 from wckzhang/querycuda
mpiext/cuda: Properly return CUDA status
2 parents 0f54160 + f96d9b8 commit 4dae142

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ompi/mpiext/cuda/c/mpiext_cuda.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,12 @@
2020
#include <stdio.h>
2121
#include <string.h>
2222

23-
#include "opal/constants.h"
24-
#include "opal/runtime/opal_params.h"
23+
#include "opal/mca/accelerator/base/base.h"
2524
#include "ompi/mpiext/cuda/c/mpiext_cuda_c.h"
2625

2726
/* If CUDA-aware support is configured in, return 1. Otherwise, return 0.
2827
* This API may be extended to return more features in the future. */
2928
int MPIX_Query_cuda_support(void)
3029
{
31-
return opal_built_with_cuda_support && opal_cuda_runtime_initialized;
30+
return 0 == strcmp(opal_accelerator_base_selected_component.base_version.mca_component_name, "cuda");
3231
}

0 commit comments

Comments
 (0)