Add host API for enqueuing barrier on given stream (#274)
* add host API for enqueuing barrier on given stream
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4ecdbc026c
Коммит
a44b581997
@@ -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_);
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user