Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang authored Feb 2, 2025
1 parent cc4ea66 commit 269c8a3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Src/Base/AMReX_ParallelDescriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1524,13 +1524,19 @@ Initialize ()
#if defined(OMPI_HAVE_MPI_EXT_ROCM) && OMPI_HAVE_MPI_EXT_ROCM
use_gpu_aware_mpi = (bool) MPIX_Query_rocm_support();
#elif defined(MPICH) && defined(MPIX_GPU_SUPPORT_HIP)
use_gpu_aware_mpi = (bool) MPIX_Query_hip_support();
int is_supported = 0;
if (MPIX_GPU_query_support(MPIX_GPU_SUPPORT_HIP, &is_supported) == MPI_SUCCESS) {
use_gpu_aware_mpi = (bool) is_supported;
}
#endif

#elif defined(AMREX_USE_SYCL)

#if defined(MPICH) && defined(MPIX_GPU_SUPPORT_ZE)
use_gpu_aware_mpi = (bool) MPIX_Query_ze_support();
int is_supported = 0;
if (MPIX_GPU_query_support(MPIX_GPU_SUPPORT_ZE, &is_supported) == MPI_SUCCESS) {
use_gpu_aware_mpi = (bool) is_supported;
}
#endif

#endif
Expand Down

0 comments on commit 269c8a3

Please sign in to comment.