IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Mojo function

shmem_module_init

shmem_module_init(device_function: DeviceFunction[target=device_function.target, compile_options=device_function.compile_options, link_options=device_function.link_options, _ptxas_info_verbose=device_function._ptxas_info_verbose])

Initializes the device state in the compiled function module so that it's able to perform SHMEM operations. Must have completed device initialization prior to calling this function.

For NVSHMEM, this calls nvshmemx_cumodule_init(). For ROCSHMEM, this calls rocshmemx_hipmodule_init().

Args:

Raises:

String: If module initialization fails.