Implement rocshmem_g API and optimize memory usage
- Implement `rocshmem_g` API
- Free up memory space allocated for `rocshmem_g` and atomic operations' return values
[ROCm/rocshmem commit: 757d7e53ca]
Этот коммит содержится в:
@@ -72,10 +72,6 @@ IPCBackend::IPCBackend(MPI_Comm comm)
|
||||
*/
|
||||
assert(num_pes == ipcImpl.shm_size);
|
||||
|
||||
auto *bp{ipc_backend_proxy.get()};
|
||||
|
||||
bp->heap_ptr = &heap;
|
||||
|
||||
/* Initialize the host interface */
|
||||
host_interface = std::make_shared<HostInterface>(hdp_proxy_.get(),
|
||||
thread_comm,
|
||||
@@ -85,10 +81,6 @@ IPCBackend::IPCBackend(MPI_Comm comm)
|
||||
|
||||
ROCSHMEM_HOST_CTX_DEFAULT.ctx_opaque = default_host_ctx.get();
|
||||
|
||||
init_g_ret(&heap, thread_comm, MAX_NUM_BLOCKS, &bp->g_ret);
|
||||
|
||||
allocate_atomic_region(&bp->atomic_ret, MAX_NUM_BLOCKS);
|
||||
|
||||
setup_team_world();
|
||||
|
||||
init_wrk_sync_buffer();
|
||||
@@ -107,17 +99,6 @@ IPCBackend::IPCBackend(MPI_Comm comm)
|
||||
}
|
||||
|
||||
IPCBackend::~IPCBackend() {
|
||||
/*
|
||||
* Validate that a handle was passed that is not a nullptr.
|
||||
*/
|
||||
auto *bp{ipc_backend_proxy.get()};
|
||||
assert(bp);
|
||||
|
||||
/*
|
||||
* Free the atomic_ret array.
|
||||
*/
|
||||
CHECK_HIP(hipFree(bp->atomic_ret->atomic_base_ptr));
|
||||
|
||||
/**
|
||||
* Destroy teams infrastructure
|
||||
* and team world
|
||||
|
||||
Ссылка в новой задаче
Block a user