Skip to main content

cutensorMpCreatePlanPreference

Function cutensorMpCreatePlanPreference 

Source
pub unsafe extern "C" fn cutensorMpCreatePlanPreference(
    handle: cutensorMpHandle_t,
    pref: *mut cutensorMpPlanPreference_t,
    cutensormp_algo: cutensorMpAlgo_t,
    cutensormp_workspace_size_device: u64,
    cutensormp_workspace_size_host: u64,
) -> cutensorStatus_t
Expand description

Creates a plan preference object for controlling distributed tensor operation planning.

This function creates a preference object that allows users to control various aspects of the execution plan for distributed tensor operations. The preferences include algorithm selection, workspace size limits, and JIT compilation options that affect both the underlying cuTENSOR operations and the distributed communication patterns.

The plan preference provides fine-grained control over:

  • Local cuTENSOR algorithm selection and JIT mode
  • Distributed algorithm strategy (non-packing, packing with permutation, or packing with P2P)
  • Workspace size limits for both device and host memory
  • cuTENSOR workspace preferences

The user is responsible for calling cutensorMpDestroyPlanPreference to free the resources associated with the preference object.

Remark

non-blocking, no reentrant, and thread-safe.

§Parameters

  • handle: Opaque handle holding cutensorMp’s library context.
  • pref: Pointer to the plan preference object that will be created.
  • cutensormp_algo: Algorithm selection for distributed communication patterns.
  • cutensormp_workspace_size_device: Maximum device workspace size for cutensorMp operations (bytes), minimum 2GB is required.
  • cutensormp_workspace_size_host: Maximum host workspace size for cutensorMp operations (bytes).

§Return value