Files
rocm-systems/docs/api/ctx.rst
T
Yiltan f693c98fb2 Initial ROCm-docs (#92)
* Initial ROCm-docs commit

Co-authored-by: Aurélien Bouteiller <bouteill@icl.utk.edu>
Co-authored-by: Alex Xu <alex.xu@amd.com>
Co-authored-by: yugang-amd <yugang.wang@amd.com>
2025-05-08 13:39:28 -04:00

41 righe
1.4 KiB
ReStructuredText

.. 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:
-----------------------------------
Context Management Routines
-----------------------------------
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)
:param team: Team handle to derive the context from
:param options: Options for context creation (Ignored in current design, please use a value of 0)
:param ctx: Context handle
:returns: All threads returns 0 if the context was created successfully;
If any thread returns non-zero value, the operation failed and a higher number of
`ROCSHMEM_MAX_NUM_CONTEXTS` is required
**Description:**
Creates an OpenSHMEM context. By design, the context is private to the calling work-group.
Must be called collectively by all threads in the work-group.
ROCSHMEM_CTX_DESTROY
--------------------
.. cpp:function:: __device__ void rocshmem_wg_ctx_destroy(rocshmem_ctx_t *ctx)
:param ctx: Context handle
:returns: None
**Description:**
Destroys an rocSHMEM context.
Must be called collectively by all threads in the work-group.