Add host APIs for querying device ctx and remote heap pointer (#200)
* Add host APIs for querying device ctx and remote heap pointer * Host API to query device pointer for ROCSHMEM_DEFAULT_CONTEXT, this is needed to support dynamic module initialization via device kernel library bitcode. * Host API to query remote symmetric heap pointer that can be used in custom device kernel for RMA operations. * Added rocshmem_ptr implementation within the Host Context class * Enables pointer retrieval functionality for symmetric data objects * Copy IPC pointers to host memory in RO host context --------- Co-authored-by: avinashkethineedi <avinash.kethineedi@amd.com>
This commit is contained in:
@@ -300,6 +300,13 @@ rocshmem_ctx_t ROCSHMEM_HOST_CTX_DEFAULT;
|
||||
backend->heap.free(ptr);
|
||||
}
|
||||
|
||||
__host__ void * rocshmem_ptr(void * dest, int pe){
|
||||
|
||||
Context *ctx = reinterpret_cast<Context *>(ROCSHMEM_HOST_CTX_DEFAULT.ctx_opaque);
|
||||
|
||||
return ctx->shmem_ptr(dest, pe);
|
||||
}
|
||||
|
||||
[[maybe_unused]] __host__ void rocshmem_reset_stats() {
|
||||
VERIFY_BACKEND();
|
||||
backend->reset_stats();
|
||||
|
||||
Reference in New Issue
Block a user