tensor_svd#

cuquantum.bindings.cutensornet.tensor_svd(
intptr_t handle,
intptr_t desc_tensor_in,
intptr_t raw_data_in,
intptr_t desc_tensor_u,
intptr_t u,
intptr_t s,
intptr_t desc_tensor_v,
intptr_t v,
intptr_t svd_config,
intptr_t svd_info,
intptr_t work_desc,
intptr_t stream,
)[source]#

Performs SVD decomposition of a tensor.

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

  • desc_tensor_in (intptr_t) – Describes the modes, extents, and other metadata information of a tensor.

  • raw_data_in (intptr_t) – Pointer to the raw data of the input tensor (in device memory).

  • desc_tensor_u (intptr_t) – Describes the modes, extents, and other metadata information of the output tensor U. The extents for uncontracted modes are expected to be consistent with desc_tensor_in.

  • u (intptr_t) – Pointer to the output tensor data U (in device memory).

  • s (intptr_t) – Pointer to the output tensor data S (in device memory). Can be NULL when the CUTENSORNET_TENSOR_SVD_CONFIG_S_PARTITION attribute of svd_config is not set to default (CUTENSORNET_TENSOR_SVD_PARTITION_NONE).

  • desc_tensor_v (intptr_t) – Describes the modes, extents, and other metadata information of the output tensor V.

  • v (intptr_t) – Pointer to the output tensor data V (in device memory).

  • svd_config (intptr_t) – This data structure holds the user-requested SVD parameters. Can be NULL if users do not need to perform value-based truncation or singular value partitioning.

  • svd_info (intptr_t) – Opaque structure holding all information about the trucation at runtime. Can be NULL if runtime information on singular value truncation is not needed.

  • 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 the minimum needed). See workspace_get_memory_size() & workspace_set_memory().

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