Files
rocm-systems/docs/api/ctx.rst
T

41 righe
1.5 KiB
ReStructuredText

2025-05-08 13:39:28 -04:00
.. meta::
:description: rocSHMEM intra-kernel networking runtime for AMD dGPUs on the ROCm platform.
:keywords: rocSHMEM, API, ROCm, documentation, HIP, Networking, Communication
.. _rocshmem-api-ctx:
-----------------------------------
2025-05-13 16:26:28 -04:00
Context management routines
2025-05-08 13:39:28 -04:00
-----------------------------------
ROCSHMEM_CTX_CREATE
-------------------
.. cpp:function:: __device__ int rocshmem_wg_ctx_create(int64_t options, rocshmem_ctx_t *ctx)
.. cpp:function:: __device__ int rocshmem_wg_team_create_ctx(rocshmem_team_t team, long options, rocshmem_ctx_t *ctx)
2025-05-13 16:26:28 -04:00
:param team: Team handle to derive the context from.
:param options: Options for context creation. Ignored in current design; use the value ``0``.
:param ctx: Context handle.
2025-05-08 13:39:28 -04:00
2025-05-13 16:26:28 -04:00
:returns: All threads returns ``0`` if the context was created successfully.
If any thread returns non-zero value, the operation fails and a higher number of
``ROCSHMEM_MAX_NUM_CONTEXTS`` is required.
2025-05-08 13:39:28 -04:00
**Description:**
2025-05-13 16:26:28 -04:00
This routine creates an OpenSHMEM context. By design, the context is private to the calling work-group.
It must be called collectively by all threads in the work-group.
2025-05-08 13:39:28 -04:00
ROCSHMEM_CTX_DESTROY
--------------------
.. cpp:function:: __device__ void rocshmem_wg_ctx_destroy(rocshmem_ctx_t *ctx)
2025-05-13 16:26:28 -04:00
:param ctx: Context handle.
2025-05-08 13:39:28 -04:00
2025-05-13 16:26:28 -04:00
:returns: None.
2025-05-08 13:39:28 -04:00
**Description:**
2025-05-13 16:26:28 -04:00
This routine destroys an rocSHMEM context.
It must be called collectively by all threads in the work-group.