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:
committad av
GitHub
förälder
42e28835ad
incheckning
87f99e7ec6
@@ -92,6 +92,21 @@ __device__ void rocshmem_query_thread(int *provided) {
|
||||
|
||||
__device__ void rocshmem_wg_finalize() {}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* These host APIs use Device side symbol - ROCSHMEM_CTX_DEFAULT so it needs
|
||||
* to stay here to avoid getting pulled into other places in compilation
|
||||
******************************************************************************/
|
||||
|
||||
__host__ void * rocshmem_get_device_ctx() {
|
||||
void *ctx = nullptr;
|
||||
|
||||
CHECK_HIP(hipMemcpyFromSymbol(&ctx, HIP_SYMBOL(ROCSHMEM_CTX_DEFAULT),
|
||||
sizeof(rocshmem_ctx_t)));
|
||||
return ctx;
|
||||
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
************************** Default Context Wrappers **************************
|
||||
*****************************************************************************/
|
||||
|
||||
Referens i nytt ärende
Block a user