network_autotune_contraction#

cuquantum.bindings.cutensornet.network_autotune_contraction(
intptr_t handle,
intptr_t network_desc,
intptr_t work_desc,
intptr_t pref,
intptr_t stream,
)[source]#

Auto-tunes the internal contraction plan to find the best cutensorContractionPlan_t for each pair-wise contraction of the network contraction phase.

Parameters:
  • handle (intptr_t) – Opaque handle holding cuTensorNet’s library context.

  • network_desc (intptr_t) – The network descriptor whose internal contraction plan will be fine-tuned.

  • work_desc (intptr_t) – Opaque structure describing the workspace. The provided workspace must be valid (the workspace size must be the same as or larger than both the minimum needed and the value provided at contraction preparation). See network_prepare_contraction(), workspace_get_memory_size() & workspace_set_memory(). If a device memory handler is set, the work_desc can be set to null, or the workspace pointer in work_desc can be set to null, and the workspace size can be set either to 0 (in which case the “recommended” size is used, see CUTENSORNET_WORKSIZE_PREF_RECOMMENDED) or to a valid size. A workspace of the specified size will be drawn from the user’s mempool and released back once done.

  • pref (intptr_t) – Controls the auto-tuning process and gives the user control over how much time is spent in this routine.

  • stream (intptr_t) – The CUDA stream on which the computation is performed.