Skip to content

Commit

Permalink
streamSync for HIP only
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang committed Feb 9, 2024
1 parent 08a6670 commit 4b2f611
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/reactions/Castro_react.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,9 @@ Castro::react_state(MultiFab& s, MultiFab& r, Real time, Real dt, const int stra
#endif
});

#if defined(AMREX_USE_HIP)
Gpu::streamSynchronize(); // otherwise HIP may faile to allocate the necessary resources.
#endif
}

#if defined(AMREX_USE_GPU)
Expand Down Expand Up @@ -803,7 +805,9 @@ Castro::react_state(Real time, Real dt)
#endif
});

#if defined(AMREX_USE_HIP)
Gpu::streamSynchronize(); // otherwise HIP may faile to allocate the necessary resources.
#endif
}

#if defined(AMREX_USE_GPU)
Expand Down

0 comments on commit 4b2f611

Please sign in to comment.