pub unsafe extern "C" fn cutensorMpCreatePlan(
handle: cutensorMpHandle_t,
plan: *mut cutensorMpPlan_t,
desc: cutensorMpOperationDescriptor_t,
pref: cutensorMpPlanPreference_t,
) -> cutensorStatus_tExpand description
Creates an execution plan for distributed tensor contractions.
This function creates an optimized execution plan for the distributed tensor contraction encoded by the operation descriptor. The plan selects the most appropriate algorithms and communication strategies based on the tensor distributions, available resources, and user preferences.
The planning process analyzes the distributed tensor layout, communication requirements, and computational resources to determine an efficient execution strategy. This may involve data redistribution, local contractions, and result aggregation phases that minimize communication overhead while maximizing computational efficiency.
The user is responsible for calling cutensorMpDestroyPlan to free the resources associated with the plan once it is no longer needed.
Remark
calls asynchronous functions, no reentrant, and thread-safe.
§Parameters
handle: Opaque handle holding cutensorMp’s library context.plan: Pointer to the execution plan object that will be created.desc: Operation descriptor encoding the distributed contraction (created by cutensorMpCreateContraction).pref: Plan preference object specifying algorithm and workspace preferences (may be NULL for default preferences).
§Return value
cutensorStatus_t::CUTENSOR_STATUS_INVALID_VALUE: if some input data is invalid (this typically indicates a user error).cutensorStatus_t::CUTENSOR_STATUS_NOT_INITIALIZED: if the handle is not initialized.cutensorStatus_t::CUTENSOR_STATUS_NOT_SUPPORTED: if no viable execution plan could be found.cutensorStatus_t::CUTENSOR_STATUS_SUCCESS: The operation completed successfully.