Add host API to query Device side context detail (#183)
* API support for enabling rocshmem bitcode integration * move implementation to along with host side APIs
This commit is contained in:
@@ -263,6 +263,14 @@ rocshmem_ctx_t ROCSHMEM_HOST_CTX_DEFAULT;
|
||||
return ROCSHMEM_SUCCESS;
|
||||
}
|
||||
|
||||
__host__ void * rocshmem_get_device_ctx() {
|
||||
void *ctx = nullptr;
|
||||
|
||||
CHECK_HIP(hipMemcpyFromSymbol(&ctx, HIP_SYMBOL(ROCSHMEM_CTX_DEFAULT),
|
||||
sizeof(rocshmem_ctx_t)));
|
||||
return ctx;
|
||||
}
|
||||
|
||||
[[maybe_unused]] __host__ int rocshmem_my_pe() {
|
||||
if (backend != nullptr) {
|
||||
return backend->getMyPE();
|
||||
|
||||
Reference in New Issue
Block a user