From f38ffbf84dd0f1d569e9a118b525695f7f91ff7b Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Mon, 7 Jul 2025 16:51:44 -0500 Subject: [PATCH] Revert "Add host API to query Device side context detail (#183)" (#196) This reverts commit 31804fcad337e1b6b70d59c16f7aded8e7ccbad7. [ROCm/rocshmem commit: a66f7825400d45de06c65402c4dbaf861c52d3ab] --- projects/rocshmem/include/rocshmem/rocshmem.hpp | 11 ----------- projects/rocshmem/src/rocshmem.cpp | 8 -------- 2 files changed, 19 deletions(-) diff --git a/projects/rocshmem/include/rocshmem/rocshmem.hpp b/projects/rocshmem/include/rocshmem/rocshmem.hpp index 3541a93a0c..be4de8cf16 100644 --- a/projects/rocshmem/include/rocshmem/rocshmem.hpp +++ b/projects/rocshmem/include/rocshmem/rocshmem.hpp @@ -65,17 +65,6 @@ constexpr char VERSION[] = "3.0.0"; */ __host__ void rocshmem_init(MPI_Comm comm = MPI_COMM_WORLD); - -/** - * @brief Query rocSHMEM context from host API - * - * @param[out] ctx Returns ROCSHMEM_CTX_DEFAULT device pointer that users - * can query from one instance of rocshmem host library and - * use use later for dynamic module initialization in - * kernel bitcode device library in the same application - */ -__host__ void * rocshmem_get_device_ctx(); - /** * @brief Initialize the rocSHMEM runtime and underlying transport layer * with an attempt to enable the requested thread support. diff --git a/projects/rocshmem/src/rocshmem.cpp b/projects/rocshmem/src/rocshmem.cpp index e7a8aec48d..f992a70bbb 100644 --- a/projects/rocshmem/src/rocshmem.cpp +++ b/projects/rocshmem/src/rocshmem.cpp @@ -263,14 +263,6 @@ 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();