Skip to content

Commit f96d9b8

Browse files
committed
mpiext/cuda: Properly return CUDA status
Signed-off-by: William Zhang <wilzhang@amazon.com>
1 parent d0bbb75 commit f96d9b8

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)