Add host API for enqueuing barrier on given stream (#274)

* add host API for enqueuing barrier on given stream
Этот коммит содержится в:
Dimple Prajapati
2025-10-15 14:29:07 -07:00
коммит произвёл GitHub
родитель 4ecdbc026c
Коммит a44b581997
10 изменённых файлов: 53 добавлений и 0 удалений
+10
Просмотреть файл
@@ -324,6 +324,16 @@ __host__ void HostInterface::barrier_all(WindowInfo* window_info) {
return;
}
__host__ void HostInterface::barrier_all_on_stream(hipStream_t stream) {
// launch kernel to do barrier with given stream, if non, use default stream
if (stream == nullptr) {
stream = hipStreamDefault;
}
rocshmem_barrier_all_kernel<<<1, 1, 0, stream>>>();
}
__host__ void HostInterface::barrier_for_sync() {
if (host_comm_world_ != MPI_COMM_NULL) {
mpilib_ftable_.Barrier(host_comm_world_);
+2
Просмотреть файл
@@ -193,6 +193,8 @@ class HostInterface {
__host__ void quiet(WindowInfo* window_info);
__host__ void barrier_all(WindowInfo* window_info);
__host__ void barrier_all_on_stream(hipStream_t stream);
__host__ void barrier_for_sync();