cuSOLVERMp C API#

Library Management#

cusolverMpCreate#

cusolverStatus_t cusolverMpCreate(
        cusolverMpHandle_t *handle,
        int deviceId,
        cudaStream_t stream)
This function initializes the cuSOLVERMp library handle (cusolverMpHandle_t) which holds the cuSOLVERMp library context. It allocates light hardware resources on the host and device, and must be called prior to making any other cuSOLVERMp library calls.
Calling any cuSOLVERMp function which uses cusolverMpHandle_t without a previous call of cusolverMpCreate() will return an error.
The cuSOLVERMp library context is tied to the CUDA device provided by deviceId and the CUDA stream stream.
The stream may be either the CUDA default stream or a user-created stream.
Only one handle per process and per GPU supported. Sharing a device with multiple processes will result in undefined behavior.
A cuSOLVERMp handle is not internally synchronized. Applications must not call cuSOLVERMp APIs concurrently with the same handle unless all such calls are externally synchronized.

Parameter

Memory

In/Out

Description

handle

Host

Out

cuSOLVERMp library handle.

deviceId

Host

In

Device that will be assigned to the handle.

stream

Host

In

Stream that will be assigned to the handle.

See cusolverStatus_t for the description of the return status.

cusolverMpDestroy#

cusolverStatus_t cusolverMpDestroy(
        cusolverMpHandle_t handle)
This function destroys the cuSOLVERMp library handle (cusolverMpHandle_t) which holds the cuSOLVERMp library context.
The cuSOLVERMp library context is tied to the CUDA device associated with the handle. Only one handle per process and per GPU supported.
Follow the standard cleanup order shown in the NCCL initialization guide: destroy matrix descriptors and grids, then destroy the cuSOLVERMp handle, then destroy NCCL communicators. This ensures communicator-backed resources cached by the handle are released before the application destroys the communicator.

Parameter

Memory

In/Out

Description

handle

Host

In/Out

cuSOLVERMp library handle.

See cusolverStatus_t for the description of the return status.

cusolverMpSetStream#

cusolverStatus_t cusolverMpSetStream(
        cusolverMpHandle_t handle,
        cudaStream_t stream)
This function updates the stream associated to the handle.
The stream may be either the CUDA default stream or a user-created stream.
The new stream must belong to the same CUDA context as the handle.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

stream

Host

In

New stream associated with the handle.

See cusolverStatus_t for the description of the return status.

cusolverMpGetStream#

cusolverStatus_t cusolverMpGetStream(
        cusolverMpHandle_t handle,
        cudaStream_t *stream)
This function returns the stream associated to the handle.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

stream

Host

Out

Stream associated with the handle.

See cusolverStatus_t for the description of the return status.

cusolverMpGetVersion#

cusolverStatus_t cusolverMpGetVersion(
        cusolverMpHandle_t handle,
        int *version)
This function returns the version number of the cuSOLVERMp library.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

version

Host

Out

cuSOLVERMp library version. Value is CUSOLVERMP_VER_MAJOR * 10000 + CUSOLVERMP_VER_MINOR * 100 + CUSOLVERMP_VER_PATCH.

See cusolverStatus_t for the description of the return status.

cusolverMpSetMathMode#

cusolverStatus_t cusolverMpSetMathMode(
        cusolverMpHandle_t handle,
        cusolverMathMode_t mode)
This function sets the math mode for the cuSOLVERMp library handle. It will be propagated to the internal cuBLAS and cuSOLVER handles. The math mode controls the behavior of mathematical operations performed by the library.

Note

Please note that the workspace sizes returned by *_bufferSize APIs may depend on the math mode.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

mode

Host

In

Math mode to be set for the handle. Available options are CUSOLVER_DEFAULT_MATH and CUSOLVER_FP32_EMULATED_BF16X9_MATH. See cusolverMathMode_t for details.

See cusolverStatus_t for the description of the return status.

cusolverMpGetMathMode#

cusolverStatus_t cusolverMpGetMathMode(
        cusolverMpHandle_t handle,
        cusolverMathMode_t *mode)
This function retrieves the current math mode from the cuSOLVERMp library handle.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

mode

Host

Out

Current math mode of the handle.

See cusolverStatus_t for the description of the return status.

cusolverMpSetEmulationStrategy#

cusolverStatus_t cusolverMpSetEmulationStrategy(
        cusolverMpHandle_t handle,
        cudaEmulationStrategy_t strategy)
This function sets the emulation strategy for the cuSOLVERMp library handle. It will be propagated to the internal cuBLAS, cuSOLVER, and cuBLASMp handles.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

strategy

Host

In

Emulation strategy to be set for the handle. Available options are CUDA_EMULATION_STRATEGY_DEFAULT, CUDA_EMULATION_STRATEGY_PERFORMANT, and CUDA_EMULATION_STRATEGY_EAGER. For more information about the effects of the corresponding strategies, please refer to the analogous definition of cublasEmulationStrategy_t.

The emulation strategy only has an effect if the math mode is set to CUSOLVER_FP32_EMULATED_BF16X9_MATH.
See cusolverStatus_t for the description of the return status.

cusolverMpGetEmulationStrategy#

cusolverStatus_t cusolverMpGetEmulationStrategy(
        cusolverMpHandle_t handle,
        cudaEmulationStrategy_t *strategy)
This function retrieves the current emulation strategy from the cuSOLVERMp library handle.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

strategy

Host

Out

Current emulation strategy of the handle.

See cusolverStatus_t for the description of the return status.

Grid Management#

cusolverMpCreateDeviceGrid#

cusolverStatus_t cusolverMpCreateDeviceGrid(
        cusolverMpHandle_t handle,
        cusolverMpGrid_t *grid,
        ncclComm_t comm,
        int32_t numRowDevices,
        int32_t numColDevices,
        cusolverMpGridMapping_t mapping)
This function initializes the grid opaque data structure. It maps the given resources (communicator, grid dimensions and grid layout) to a grid object.
All the processes defined to be in this grid must enter this function.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

grid

Host

Out

Grid object to be initialized.

comm

Host

In

Communicator that will be associated with the grid.

numRowDevices

Host

In

How many process rows the grid will contain.

numColDevices

Host

In

How many process columns the grid will contain.

mapping

Host

In

How to map processes to the grid. See description of cusolverMpGrid_t for further details.

See cusolverStatus_t for the description of the return status.

cusolverMpDestroyGrid#

cusolverStatus_t cusolverMpDestroyGrid(
        cusolverMpGrid_t grid)
This function destroys the given grid object.
All the processes defined to be in this grid must enter this function.

Before calling, ensure that no operation using this grid or a buffer registered with it is outstanding. Synchronize all streams used with the grid first.

Parameter

Memory

In/Out

Description

grid

Host

In/Out

Grid object to be destroyed.

See cusolverStatus_t for the description of the return status.

Memory Management#

cusolverMpBufferRegister#

cusolverStatus_t cusolverMpBufferRegister(
        cusolverMpGrid_t grid,
        void *ptr,
        size_t size)
Registers a device buffer with the grid to enable the best-performing communication paths when the buffer is used as a device workspace.

The buffer must be compatible with NCCL symmetric memory registration, for example when allocated with ncclMemAlloc. Registration is idempotent: re-registering the same pointer with the same size is a no-op.

This is a collective operation: all ranks in the grid must call this function together, each rank passing the pointer to its own local buffer, with the same size value on every rank. Re-registering the same pointer with a different size is invalid.

Before calling, ensure that no operation using this grid is outstanding. Synchronize all streams used with the grid first.

Note that the workspace size queries (cusolverMp<routine>_bufferSize) return each rank’s local requirement, which may differ across ranks. To register a workspace buffer, reduce the queried size to the grid-wide maximum (e.g., with MPI_Allreduce using MPI_MAX, or ncclAllReduce using ncclMax) before allocating and registering.

Currently, buffer registration is expected to yield performance benefits when the registered buffer is used as the device workspace for cusolverMpNewtonSchulz() and, on NVLink-connected Blackwell-generation GPUs (compute capability 10.x), cusolverMpSytrd() and the routines that use SYTRD internally (cusolverMpSyevd(), cusolverMpSygvd(), cusolverMpGesvd()).

If NCCL symmetric memory is not supported by the platform, or if ptr is not compatible with NCCL symmetric memory registration on any rank, this function returns CUSOLVER_STATUS_NOT_SUPPORTED on all ranks and registers nothing.

Parameter

Memory

In/Out

Description

grid

Host

In

Grid object.

ptr

Device

In

Device buffer compatible with NCCL symmetric memory registration.

size

Host

In

Buffer size in bytes.

See cusolverStatus_t for the description of the return status.

cusolverMpBufferDeregister#

cusolverStatus_t cusolverMpBufferDeregister(
        cusolverMpGrid_t grid,
        void *ptr)
Deregisters a device buffer previously registered with cusolverMpBufferRegister().

This is a collective operation: all ranks in the grid must call this function together, each rank passing the pointer it registered. Should be called before freeing the underlying allocation; otherwise behavior is undefined.

Before calling, ensure that no operation using this grid is outstanding. Synchronize all streams used with the grid first.

Deregistering a pointer that was not previously registered returns CUSOLVER_STATUS_INVALID_VALUE.

Parameter

Memory

In/Out

Description

grid

Host

In

Grid object.

ptr

Device

In

Device buffer to deregister.

See cusolverStatus_t for the description of the return status.

cusolverMpMalloc#

cusolverStatus_t cusolverMpMalloc(
        cusolverMpGrid_t grid,
        void **ptr,
        size_t size)
Convenience function that combines ncclMemAlloc and cusolverMpBufferRegister() into a single call. See cusolverMpBufferRegister() for details on how buffer registration affects the library’s communication paths.

This is a collective operation: all ranks in the grid must call this function together with the same size value. If allocation or registration fails on any rank, *ptr is set to NULL on every rank, the same status is returned on every rank, and no memory is leaked.

Before calling, ensure that no operation using this grid is outstanding. Synchronize all streams used with the grid first.

Note that the workspace size queries (cusolverMp<routine>_bufferSize) return each rank’s local requirement, which may differ across ranks. To allocate a workspace with this function, reduce the queried size to the grid-wide maximum (e.g., with MPI_Allreduce using MPI_MAX, or ncclAllReduce using ncclMax) first.

Use cusolverMpFree() to free buffers allocated with this function.

Parameter

Memory

In/Out

Description

grid

Host

In

Grid object.

ptr

Host

Out

Receives the allocated device buffer.

size

Host

In

Allocation size in bytes.

See cusolverStatus_t for the description of the return status.

cusolverMpFree#

cusolverStatus_t cusolverMpFree(
        cusolverMpGrid_t grid,
        void *ptr)
Deregisters and frees device memory allocated with cusolverMpMalloc().

This is a collective operation: all ranks in the grid must call this function together. As with cusolverMpBufferDeregister(), the buffer must not be freed by other means while registered.

Before calling, ensure that no operation using this grid is outstanding. Synchronize all streams used with the grid first.

Parameter

Memory

In/Out

Description

grid

Host

In

Grid object.

ptr

Device

In

Device buffer allocated with cusolverMpMalloc.

See cusolverStatus_t for the description of the return status.

Matrix Management#

cusolverMpCreateMatrixDesc#

cusolverStatus_t cusolverMpCreateMatrixDesc(
        cusolverMpMatrixDescriptor_t *desc,
        cusolverMpGrid_t grid,
        cudaDataType dataType,
        int64_t M_A,
        int64_t N_A,
        int64_t MB_A,
        int64_t NB_A,
        uint32_t RSRC_A,
        uint32_t CSRC_A,
        int64_t LLD_A)
This function initializes cusolverMpMatrixDescriptor_t object.

Parameter

Memory

In/Out

Description

desc

Host

Out

Matrix descriptor object initialized by this function.

grid

Host

In

Grid object associated with the global matrix A.

dataType

Host

In

Data type of the matrix A.

M_A

Host

In

Number of rows in the global matrix A.

N_A

Host

In

Number of columns in the global matrix A.

MB_A

Host

In

Blocking factor used to distribute the rows of the global matrix A.

NB_A

Host

In

Blocking factor used to distribute the columns of the global matrix A.

RSRC_A

Host

In

Process row over which the first row of the matrix A is distributed. Only the value of 0 is currently supported.

CSRC_A

Host

In

Process column over which the first column of the matrix A is distributed. Only the value of 0 is currently supported.

LLD_A

Host

In

Leading dimension of the local matrix.

Supported values for dataType argument are listed below:

Data Type of A

Description

CUDA_R_16F

Half precision real values.

CUDA_R_16BF

bfloat16 real values.

CUDA_R_32I

32-bit integer values.

CUDA_R_64I

64-bit integer values.

CUDA_R_32F

Single precision real values.

CUDA_R_64F

Double precision real values.

CUDA_C_32F

Single precision complex values.

CUDA_C_64F

Double precision complex values.

See cusolverStatus_t for the description of the return status.

cusolverMpDestroyMatrixDesc#

cusolverStatus_t cusolverMpDestroyMatrixDesc(
        cusolverMpMatrixDescriptor_t desc)
This function destroys cusolverMpMatrixDescriptor_t object.

Parameter

Memory

In/Out

Description

desc

Host

In/Out

Matrix descriptor object destroyed by this function.

See cusolverStatus_t for the description of the return status.

Newton-Schulz Properties#

cusolverMpNewtonSchulzDescriptorCreate#

cusolverStatus_t cusolverMpNewtonSchulzDescriptorCreate(
        cusolverMpNewtonSchulzDescriptor_t *nsDesc)
Creates a Newton-Schulz descriptor that controls the behavior of cusolverMpNewtonSchulz().
The descriptor is initialized with default values (normalization enabled, reduction via compute type disabled).

Parameter

Memory

In/Out

Description

nsDesc

Host

Out

cusolverMpNewtonSchulzDescriptor_t descriptor to be created.

See cusolverStatus_t for the description of the return status.

cusolverMpNewtonSchulzDescriptorDestroy#

cusolverStatus_t cusolverMpNewtonSchulzDescriptorDestroy(
        cusolverMpNewtonSchulzDescriptor_t nsDesc)
Destroys a Newton-Schulz descriptor previously created with cusolverMpNewtonSchulzDescriptorCreate().

Parameter

Memory

In/Out

Description

nsDesc

Host

In/Out

Newton-Schulz descriptor to be destroyed.

See cusolverStatus_t for the description of the return status.

cusolverMpNewtonSchulzDescriptorSetAttribute#

cusolverStatus_t cusolverMpNewtonSchulzDescriptorSetAttribute(
        cusolverMpNewtonSchulzDescriptor_t nsDesc,
        cusolverMpNewtonSchulzDescriptorAttribute_t attr,
        const void *buf,
        size_t sizeInBytes)
The following attributes are supported:
  • CUSOLVERMP_NEWTON_SCHULZ_DESCRIPTOR_ATTRIBUTE_NORMALIZE (int, default 1): When set to 1, the input matrix is normalized by its Frobenius norm before the iterations begin. Normalization is required for convergence. Set to 0 only when the input is already normalized (e.g., to avoid redundant normalization in a pipeline that pre-normalizes the matrix).

  • CUSOLVERMP_NEWTON_SCHULZ_DESCRIPTOR_ATTRIBUTE_REDUCE_VIA_COMPUTE_TYPE (int, default 0): When set to 1, the distributed Gram-matrix reduction path may communicate/reduce intermediate X^T X data using the compute type when the value type differs from the compute type.

Parameter

Memory

In/Out

Description

nsDesc

Host

In/Out

Newton-Schulz descriptor.

attr

Host

In

cusolverMpNewtonSchulzDescriptorAttribute_t attribute to set.

buf

Host

In

Pointer to the attribute value.

sizeInBytes

Host

In

Size of the attribute value in bytes.

See cusolverStatus_t for the description of the return status.

cusolverMpNewtonSchulzDescriptorGetAttribute#

cusolverStatus_t cusolverMpNewtonSchulzDescriptorGetAttribute(
        cusolverMpNewtonSchulzDescriptor_t nsDesc,
        cusolverMpNewtonSchulzDescriptorAttribute_t attr,
        void *buf,
        size_t sizeInBytes,
        size_t *sizeInBytesWritten)
Gets an attribute from a Newton-Schulz descriptor.

Parameter

Memory

In/Out

Description

nsDesc

Host

In

Newton-Schulz descriptor.

attr

Host

In

cusolverMpNewtonSchulzDescriptorAttribute_t attribute to query.

buf

Host

Out

Buffer to receive the attribute value.

sizeInBytes

Host

In

Size of the output buffer in bytes.

sizeInBytesWritten

Host

Out

Number of bytes actually written to buf.

See cusolverStatus_t for the description of the return status.

Polar Decomposition Properties#

cusolverMpPolarDescriptorCreate#

cusolverStatus_t cusolverMpPolarDescriptorCreate(
        cusolverMpPolarDescriptor_t *polarDesc)
Creates a polar decomposition descriptor for cusolverMpPolar().
The descriptor is initialized with default values: no requested perturbation and scalar diagnostic outputs set to NaN.

Parameter

Memory

In/Out

Description

polarDesc

Host

Out

cusolverMpPolarDescriptor_t descriptor to be created.

See cusolverStatus_t for the description of the return status.

cusolverMpPolarDescriptorDestroy#

cusolverStatus_t cusolverMpPolarDescriptorDestroy(
        cusolverMpPolarDescriptor_t polarDesc)
Destroys a polar decomposition descriptor previously created with cusolverMpPolarDescriptorCreate().

Parameter

Memory

In/Out

Description

polarDesc

Host

In/Out

Polar decomposition descriptor to be destroyed.

See cusolverStatus_t for the description of the return status.

cusolverMpPolarDescriptorSetAttribute#

cusolverStatus_t cusolverMpPolarDescriptorSetAttribute(
        cusolverMpPolarDescriptor_t polarDesc,
        cusolverMpPolarDescriptorAttribute_t attr,
        const void *buf,
        size_t sizeInBytes)

CUSOLVERMP_POLAR_DESCRIPTOR_ATTRIBUTE_REQUESTED_KSI is a double input attribute. buf must point to a double and sizeInBytes must equal sizeof(double). Values greater than 0 request a diagonal perturbation in original unscaled units. Values less than or equal to 0 request no perturbation.

Example:
double requested_ksi = 1.0e-6;
cusolverMpPolarDescriptorSetAttribute(
        polarDesc,
        CUSOLVERMP_POLAR_DESCRIPTOR_ATTRIBUTE_REQUESTED_KSI,
        &requested_ksi,
        sizeof(requested_ksi));

Parameter

Memory

In/Out

Description

polarDesc

Host

In/Out

Polar descriptor.

attr

Host

In

cusolverMpPolarDescriptorAttribute_t attribute to set.

buf

Host

In

Pointer to the attribute value.

sizeInBytes

Host

In

Size of the attribute value in bytes.

See cusolverStatus_t for the description of the return status.

cusolverMpPolarDescriptorGetAttribute#

cusolverStatus_t cusolverMpPolarDescriptorGetAttribute(
        cusolverMpPolarDescriptor_t polarDesc,
        cusolverMpPolarDescriptorAttribute_t attr,
        void *buf,
        size_t sizeInBytes,
        size_t *sizeInBytesWritten)
Gets an attribute from a polar descriptor. All attributes are returned as double values. buf must provide at least sizeof(double) bytes, and sizeInBytesWritten is set to sizeof(double) on success.

Parameter

Memory

In/Out

Description

polarDesc

Host

In

Polar descriptor.

attr

Host

In

cusolverMpPolarDescriptorAttribute_t attribute to query.

buf

Host

Out

Buffer to receive the attribute value.

sizeInBytes

Host

In

Size of the output buffer in bytes.

sizeInBytesWritten

Host

Out

Number of bytes actually written to buf.

See cusolverStatus_t for the description of the return status.

Singular Value Decomposition Properties#

cusolverMpGesvdDescriptorCreate#

cusolverStatus_t cusolverMpGesvdDescriptorCreate(
        cusolverMpGesvdDescriptor_t *gesvdDesc)
Creates a singular value decomposition descriptor for cusolverMpGesvd().
The descriptor stores input and diagnostic output attributes. Output attributes are reset to sentinel values at the entry of each cusolverMpGesvd() call.

Parameter

Memory

In/Out

Description

gesvdDesc

Host

Out

cusolverMpGesvdDescriptor_t descriptor to be created.

See cusolverStatus_t for the description of the return status.

cusolverMpGesvdDescriptorDestroy#

cusolverStatus_t cusolverMpGesvdDescriptorDestroy(
        cusolverMpGesvdDescriptor_t gesvdDesc)
Destroys a singular value decomposition descriptor previously created with cusolverMpGesvdDescriptorCreate().

Parameter

Memory

In/Out

Description

gesvdDesc

Host

In/Out

Singular value decomposition descriptor to be destroyed.

See cusolverStatus_t for the description of the return status.

cusolverMpGesvdDescriptorSetAttribute#

cusolverStatus_t cusolverMpGesvdDescriptorSetAttribute(
        cusolverMpGesvdDescriptor_t gesvdDesc,
        cusolverMpGesvdDescriptorAttribute_t attr,
        const void *buf,
        size_t sizeInBytes)

The following attributes are supported:
  • CUSOLVERMP_GESVD_DESCRIPTOR_ATTRIBUTE_COMPUTE_RESIDUAL (int, default 0): When set to a nonzero value, successful non-empty calls that request both U and V^H compute CUSOLVERMP_GESVD_DESCRIPTOR_ATTRIBUTE_RESIDUAL_FROBENIUS_ESTIMATE as the absolute, unnormalized reconstruction residual ||A_original - U * Sigma * V^H||_F. Empty calls and calls that do not request both vector factors leave that output attribute as NaN.

  • CUSOLVERMP_GESVD_DESCRIPTOR_ATTRIBUTE_SHAPE (cusolverMpGesvdOutputShape_t, default CUSOLVERMP_GESVD_OUTPUT_SHAPE_THIN): Selects THIN or FULL singular-vector output shape.

Diagnostic output attributes are read-only. Attempting to set one returns CUSOLVER_STATUS_INVALID_VALUE.

Parameter

Memory

In/Out

Description

gesvdDesc

Host

In/Out

Singular value decomposition descriptor.

attr

Host

In

cusolverMpGesvdDescriptorAttribute_t attribute to set.

buf

Host

In

Pointer to the attribute value.

sizeInBytes

Host

In

Size of the attribute value in bytes.

See cusolverStatus_t for the description of the return status.

cusolverMpGesvdDescriptorGetAttribute#

cusolverStatus_t cusolverMpGesvdDescriptorGetAttribute(
        cusolverMpGesvdDescriptor_t gesvdDesc,
        cusolverMpGesvdDescriptorAttribute_t attr,
        void *buf,
        size_t sizeInBytes,
        size_t *sizeInBytesWritten)
Gets an input or output attribute from a singular value decomposition descriptor. Output attributes are read-only, are reset to NaN (double attributes) or 0 (int64_t attributes) at the entry of every cusolverMpGesvd() call, and may be queried after that call returns.
If the output buffer is too small or the requested attribute is unsupported, sizeInBytesWritten is set to 0 and the routine returns CUSOLVER_STATUS_INVALID_VALUE.

Parameter

Memory

In/Out

Description

gesvdDesc

Host

In

Singular value decomposition descriptor.

attr

Host

In

cusolverMpGesvdDescriptorAttribute_t attribute to query.

buf

Host

Out

Buffer to receive the attribute value.

sizeInBytes

Host

In

Size of the output buffer in bytes.

sizeInBytesWritten

Host

Out

Number of bytes actually written to buf.

See cusolverStatus_t for the description of the return status.

Utility#

cusolverMpNUMROC#

int64_t cusolverMpNUMROC(
        int64_t n,
        int64_t nb,
        uint32_t iproc,
        uint32_t isrcproc,
        uint32_t nprocs)
Computes the number of rows or columns of a distributed matrix owned by the process indicated by iproc argument.

Parameter

Memory

In/Out

Description

n

Host

In

Number of rows or columns in the global distributed matrix.

nb

Host

In

Row or column blocking size of the global matrix.

iproc

Host

In

The coordinate of the process whose local array row or column is to be determined.

isrcproc

Host

In

The coordinate of the process that owns the first row or column of the distributed matrix.

nprocs

Host

In

The total number of row or column processes over which the matrix is distributed.

Returns the number of rows or columns of a distributed matrix owned by the process indicated by iproc argument.

cusolverMpMatrixGatherD2H#

cusolverStatus_t cusolverMpMatrixGatherD2H(
        cusolverMpHandle_t handle,
        int64_t M,
        int64_t N,
        const void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        int root,
        void *h_dst,
        int64_t h_lddst)
Gathers the global distributed matrix A on a buffer provided on process root. The input matrix A is originally distributed using 2D block-cyclic format, on output h_dst contains the matrix in column-major format.
Notice that, for this function, the input data is on the device and the output is stored on host memory.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

M

Host

In

Number of rows of the global distributed matrix A.

N

Host

In

Number of columns of the global distributed matrix A.

d_A

Device

In

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+N-1)). On entry, this array contains the local pieces of the M-by-N distributed matrix sub(A).

IA

Host

In

Row index in the global matrix A indicating the first row of sub(A). This function does not make any assumptions on the alignment of IA.

JA

Host

In

Column index in the global matrix A indicating the first column of sub(A). This function does not make any assumptions on the alignment of JA.

descA

Host

In

Matrix descriptor of the global matrix A.

root

Host

In

Process ID on which the matrix A will be gathered.

h_dst

Host

Out

Destination host buffer on root process. On output it contains the global matrix A stored in column-major format. Total size must be at least M*N words.

h_lddst

Host

In

Leading dimension of the h_dst on root process. Must be larger than M.

Return Status:
See cusolverStatus_t for the description of the return status.

Warning

This function is meant as a utility function to verify correctness of the data layouts and it is not intended to achieve high performance on large inputs.


cusolverMpMatrixScatterH2D#

cusolverStatus_t cusolverMpMatrixScatterH2D(
        cusolverMpHandle_t handle,
        int64_t M,
        int64_t N,
        void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        int root,
        const void *h_src,
        int64_t h_ldsrc)
Scatters the matrix stored in the local buffer h_src from root process to a distributed global matrix A.
The input matrix h_src is stored in column-major format. On output, d_A contains the local portions of the global matrix A distributed in 2D block-cyclic format.
Notice that, for this function, the input data is on the host and the output is stored on device memory.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

M

Host

In

Number of rows of the global distributed matrix A.

N

Host

In

Number of columns of the global distributed matrix A.

d_A

Device

Out

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+N-1)). On output, this array contains the local pieces of the M-by-N distributed matrix sub(A).

IA

Host

In

Row index in the global matrix A indicating the first row of sub(A). This function does not make any assumptions on the alignment of IA.

JA

Host

In

Column index in the global matrix A indicating the first column of sub(A). This function does not make any assumptions on the alignment of JA.

descA

Host

In

Matrix descriptor of the global matrix A.

root

Host

In

Process ID which the matrix A will be scattered from.

h_src

Host

In

Source buffer on root process. On input it contains the global M by N matrix A stored in column-major format.

h_ldsrc

Host

In

Leading dimension of the h_src on root process. Must be larger than M.

See cusolverStatus_t for the description of the return status.

Warning

This function is meant as a utility function to verify correctness of the data layouts and it is not intended to achieve high performance on large inputs.


Logging#

cusolverMpLoggerSetCallback#

cusolverStatus_t cusolverMpLoggerSetCallback(
        cusolverMpLoggerCallback_t callback)
This function sets the logging callback function.

Parameter

Memory

In/Out

Description

callback

Host

In

Pointer to a callback function. See cusolverMpLoggerCallback_t.

See cusolverStatus_t for the description of the return status.

Warning

This is an experimental feature.


cusolverMpLoggerSetFile#

cusolverStatus_t cusolverMpLoggerSetFile(
        FILE *file)
This function sets the logging output file. Note: once registered using this function call, the provided file handle must not be closed unless the function is called again to switch to a different file handle.

Parameter

Memory

In/Out

Description

file

Host

In

Pointer to an open file. File should have write permission.

See cusolverStatus_t for the description of the return status.

Warning

This is an experimental feature.


cusolverMpLoggerOpenFile#

cusolverStatus_t cusolverMpLoggerOpenFile(
        const char* logFile)
This function opens a logging output file in the given path.

Parameter

Memory

In/Out

Description

logFile

Host

In

Path of the logging output file.

See cusolverStatus_t for the description of the return status.

Warning

This is an experimental feature.


cusolverMpLoggerSetLevel#

cusolverStatus_t cusolverMpLoggerSetLevel(
        int level)
This function sets the logging level for cuSOLVERMp library. The logging level controls the verbosity of the logging output.

Parameter

Memory

In/Out

Description

level

Host

In

Value of the logging level. See cuSOLVERMp Logging.

See cusolverStatus_t for the description of the return status.

Warning

This is an experimental feature.


cusolverMpLoggerSetMask#

cusolverStatus_t cusolverMpLoggerSetMask(
        int mask)
This function sets the value of the logging mask.

Parameter

Memory

In/Out

Description

mask

Host

In

Value of the logging mask. See cuSOLVERMp Logging.

See cusolverStatus_t for the description of the return status.

Warning

This is an experimental feature.


cusolverMpLoggerForceDisable#

cusolverStatus_t cusolverMpLoggerForceDisable()
This function disables logging for the entire run.
See cusolverStatus_t for the description of the return status.

Warning

This is an experimental feature.


Dense Linear Algebra APIs#

Note

For every routine in this section, the returned cusolverStatus_t is the authoritative API status and must always be checked. Runtime device info outputs are optional; pass NULL to skip device-side info reporting. When a non-NULL info is supplied, successful calls reset it to 0 unless the routine reports a routine-specific positive value. For routines that define positive info values, a successful host status can still accompany info > 0; passing NULL suppresses those routine-specific reports, so provide info when singularity or convergence diagnostics are required. Malformed arguments return CUSOLVER_STATUS_INVALID_VALUE and, with a non-NULL info output, write a negative value identifying the offending API argument after handle. Valid but unsupported configurations return CUSOLVER_STATUS_NOT_SUPPORTED. Invalid handles are reported by the returned status. Use the routine-specific info parameter description for routine-specific positive values and whether those values accompany CUSOLVER_STATUS_SUCCESS or an error status.

cusolverMpGetrf#

cusolverStatus_t cusolverMpGetrf(
        cusolverMpHandle_t handle,
        int64_t M,
        int64_t N,
        void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        int64_t  *d_ipiv,
        cudaDataType_t computeType,
        void *d_work,
        size_t workspaceInBytesOnDevice,
        void *h_work,
        size_t workspaceInBytesOnHost,
        int *info)
This routine computes an LU factorization of a general M-by-N distributed matrix sub(A) using partial pivoting. The user can also disable pivoting by setting d_ipiv=NULL.
The factorization has the form:
\[sub(A) = P \cdot L \cdot U\]
where \(P\) is a permutation matrix, \(L\) is lower triangular with unit diagonal elements (lower trapezoidal if \(m > n\)), and \(U\) is upper triangular (upper trapezoidal if \(m < n\)). \(L\) and \(U\) are stored in sub(A).
The user can combine cusolverMpGetrf() and cusolverMpGetrs() to solve a system of linear equations.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

M

Host

In

Number of rows of sub(A).

N

Host

In

Number of columns of sub(A).

d_A

Device

In/Out

Pointer to the first entry of the local portion of the global matrix A. On output, the sub(A) is overwritten with the L and U factors.

IA

Host

In

Row index of the first row of the sub(A). This function does not make any assumptions on the alignment of IA.

JA

Host

In

Column index of the first column of the sub(A). This function does not make any assumptions on the alignment of JA.

descA

Host

In

Matrix descriptor associated to the global matrix A.

d_ipiv

Device

Out

Local array of dimension (LOCr(M_A)+MB_A). If the user set d_ipiv != NULL, on output, this array contains the pivoting information. d_ipiv[i] indicates the global row local row i was swapped with. This array is tied to the distributed matrix A.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

d_work

Device

Out

Device workspace of size workspaceInBytesOnDevice.

workspaceInBytesOnDevice

Host

In

The size in bytes of the local device workspace needed by the routine as provided by cusolverMpGetrf_bufferSize().

h_work

Host

Out

Host workspace of size workspaceInBytesOnHost.

workspaceInBytesOnHost

Host

In

The size in bytes of the local host workspace needed by the routine as provided by cusolverMpGetrf_bufferSize().

info

Device

Out

Optional. info = 0 on success. info = -i indicates an invalid value for the i-th API argument after handle. info > 0 indicates the index of the leading minor in the case of a singular matrix.

This routine supports the following combinations of data types:

Data Type of A

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpGetrf_bufferSize#

cusolverStatus_t cusolverMpGetrf_bufferSize(
        cusolverMpHandle_t handle,
        int64_t M,
        int64_t N,
        void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        int64_t *d_ipiv,
        cudaDataType_t computeType,
        size_t *workspaceInBytesOnDevice,
        size_t *workspaceInBytesOnHost)
Computes the size in bytes of the host and device working buffers required by cusolverMpGetrf().
The user can set d_ipiv=NULL so cusolverMpGetrf() will compute the LU factorization of the input matrix A without pivoting.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

M

Host

In

Number of rows of sub(A).

N

Host

In

Number of columns of sub(A).

d_A

Device

In

Pointer to the first entry of the local portion of the global matrix A.

IA

Host

In

Row index of the first row of the sub(A). This function does not make any assumptions on the alignment of IA.

JA

Host

In

Column index of the first column of the sub(A). This function does not make any assumptions on the alignment of JA.

descA

Host

In

Matrix descriptor associated to the global matrix A.

d_ipiv

Device

In

Indicates a pointer to a distributed integer array. When it is not null, workspace for pivoting is accounted.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

workspaceInBytesOnDevice

Host

Out

On output, contains the size in bytes of the local device workspace needed by cusolverMpGetrf().

workspaceInBytesOnHost

Host

Out

On output, contains the size in bytes of the local host workspace needed by cusolverMpGetrf().

This routine supports the following combinations of data types:

Data Type of A

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpGetrs#

cusolverStatus_t cusolverMpGetrs(
        cusolverMpHandle_t handle,
        cublasOperation_t trans,
        int64_t N,
        int64_t NRHS,
        const void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        const int64_t *d_ipiv,
        void *d_B,
        int64_t IB,
        int64_t JB,
        cusolverMpMatrixDescriptor_t descB,
        cudaDataType_t computeType,
        void *d_work,
        size_t workspaceInBytesOnDevice,
        void *h_work,
        size_t workspaceInBytesOnHost,
        int *d_info)
This routine solves a system of distributed linear equations
\[op(sub(A)) \cdot X = sub(B)\]
with a general N-by-N distributed matrix sub(A) using the LU factorization computed by cusolverMpGetrf().
Where \(op\) is defined by the argument trans, which allows to solve linear systems of the form:

trans

Form of the linear system

CUBLAS_OP_N

\(sub(A) \cdot X = sub(B)\)

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

trans

Host

In

Specifies the form of the linear system. Only CUBLAS_OP_N is currently supported.

N

Host

In

Number of rows of sub(A).

NRHS

Host

In

Number of columns of sub(B).

d_A

Device

In

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+N-1)). On entry, this array contains the local pieces of the M-by-N distributed L and U factors of sub(A) as computed by cusolverMpGetrf().

IA

Host

In

Row index of the first row of the sub(A). This function does not make any assumptions on the alignment of IA.

JA

Host

In

Column index of the first column of the sub(A). This function does not make any assumptions on the alignment of JA.

descA

Host

In

Matrix descriptor associated to the global matrix A.

d_ipiv

Device

In

Local array of dimension (LOCr(M_A)+MB_A) containing the pivoting information as computed by cusolverMpGetrf().

d_B

Device

In/Out

Pointer into the local memory to an array of dimension (LLD_B,LOCc(JB+NRHS-1)). On entry, the right hand sides sub(B). On exit, sub(B) is overwritten by the solution distributed matrix X.

IB

Host

In

Row index of the first row of the sub(B). This function does not require IB == IA or require IB to be block-aligned.

JB

Host

In

Column index of the first column of the sub(B). This function does not make any assumptions on the alignment of JB.

descB

Host

In

Matrix descriptor associated to the global matrix B.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

d_work

Device

Out

Device workspace of size workspaceInBytesOnDevice.

workspaceInBytesOnDevice

Host

In

The size in bytes of the local device workspace needed by the routine as provided by cusolverMpGetrs_bufferSize().

h_work

Host

Out

Host workspace of size workspaceInBytesOnHost.

workspaceInBytesOnHost

Host

In

The size in bytes of the local host workspace needed by the routine as provided by cusolverMpGetrs_bufferSize().

info

Device

Out

Optional. info = 0 on success. info = -i indicates an invalid value for the i-th API argument after handle.

This routine supports the following combinations of data types:

Data Type of A

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpGetrs_bufferSize#

cusolverStatus_t cusolverMpGetrs_bufferSize(
        cusolverMpHandle_t handle,
        cublasOperation_t trans,
        int64_t N,
        int64_t NRHS,
        const void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        const int64_t *d_ipiv,
        void *d_B,
        int64_t IB,
        int64_t JB,
        cusolverMpMatrixDescriptor_t descB,
        cudaDataType_t computeType,
        size_t *workspaceInBytesOnDevice,
        size_t *workspaceInBytesOnHost)
Computes the size in bytes of the host and device working buffers required by cusolverMpGetrs().
If pivoting was disabled during cusolverMpGetrf(), the user must set d_ipiv=NULL.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

trans

Host

In

Specifies the form of the linear system. Only CUBLAS_OP_N is currently supported.

N

Host

In

Number of rows of sub(A).

NRHS

Host

In

Number of columns of sub(B).

d_A

Device

In

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+N-1)). On entry, this array contains the local pieces of the M-by-N distributed L and U factors of sub(A) as computed by cusolverMpGetrf().

IA

Host

In

Row index of the first row of the sub(A). This function does not make any assumptions on the alignment of IA.

JA

Host

In

Column index of the first column of the sub(A). This function does not make any assumptions on the alignment of JA.

descA

Host

In

Matrix descriptor associated to the global matrix A.

d_ipiv

Device

In

Local array of dimension (LOCr(M_A)+MB_A) containing the pivoting information as computed by cusolverMpGetrf().

d_B

Device

In

Pointer to the first entry of the local portion of the global matrix B. On output, B is overwritten the solution of the linear system.

IB

Host

In

Row index of the first row of the sub(B). The corresponding cusolverMpGetrs() call does not require IB == IA or require IB to be block-aligned.

JB

Host

In

Column index of the first column of the sub(B). This function does not make any assumptions on the alignment of JB.

descB

Host

In

Matrix descriptor associated to the global matrix B.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

workspaceInBytesOnDevice

Host

Out

On output, contains the size in bytes of the local device workspace needed by cusolverMpGetrs().

workspaceInBytesOnHost

Host

Out

On output, contains the size in bytes of the local host workspace needed by cusolverMpGetrs().

This routine supports the following combinations of data types:

Data Type of A

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpPotrf#

cusolverStatus_t cusolverMpPotrf(
        cusolverMpHandle_t handle,
        cublasFillMode_t uplo,
        int64_t N,
        void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        cudaDataType_t computeType,
        void *d_work,
        size_t workspaceInBytesOnDevice,
        void *h_work,
        size_t workspaceInBytesOnHost,
        int *info)
Computes the Cholesky factorization of an N-by-N real symmetric or a complex hermitian positive definite distributed matrix sub(A) denoting A(IA:IA+N-1, JA:JA+N-1).
If A is upper triangular and uplo=CUBLAS_FILL_MODE_UPPER, the factorization has the form
\[sub(A) = U^H \cdot U\]
where U is upper triangular.
If the matrix is lower triangular and uplo is set to CUBLAS_FILL_MODE_LOWER, the factorization has the form
\[sub(A) = L \cdot L^H\]
where L is lower triangular.
The user can combine cusolverMpPotrf() and cusolverMpPotrs() to solve a system of linear equations.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

uplo

Host

In

Specifies if A is upper (CUBLAS_FILL_MODE_UPPER) or lower triangular matrix (CUBLAS_FILL_MODE_LOWER).

N

Host

In

Number of rows and columns of sub(A).

d_A

Device

In

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+N-1)). On entry, this array contains the local pieces of the N-by-N distributed matrix sub(A). On output, this array contains the L or U factors of A, depending on the value of uplo.

IA

Host

In

Row index of the first row of the sub(A). IA must be a multiple of the row blocking dimension MB_A.

JA

Host

In

Column index of the first column of the sub(A). JA must be a multiple of the column blocking dimension NB_A.

descA

Host

In

Matrix descriptor associated to the global matrix A.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

d_work

Device

Out

Device workspace of size workspaceInBytesOnDevice.

workspaceInBytesOnDevice

Host

In

The size in bytes of the local device workspace needed by the routine as provided by cusolverMpPotrf_bufferSize().

h_work

Host

Out

Host workspace of size workspaceInBytesOnHost.

workspaceInBytesOnHost

Host

In

The size in bytes of the local host workspace needed by the routine as provided by cusolverMpPotrf_bufferSize().

info

Device

Out

Optional. info = 0 on success. info = -i indicates an invalid value for the i-th API argument after handle. info > 0 indicates the index of the leading minor that is not positive definite.

This function requires square block size (MB_A == NB_A).
This routine supports the following combinations of data types:

Data Type of A

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpPotrf_bufferSize#

cusolverStatus_t cusolverMpPotrf_bufferSize(
        cusolverMpHandle_t handle,
        cublasFillMode_t uplo,
        int64_t N,
        const void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        cudaDataType_t computeType,
        size_t* workspaceInBytesOnDevice,
        size_t* workspaceInBytesOnHost)
Computes the size in bytes of the host and device working buffers required by cusolverMpPotrf().

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

uplo

Host

In

Specifies if A is upper (CUBLAS_FILL_MODE_UPPER) or lower triangular matrix (CUBLAS_FILL_MODE_LOWER).

N

Host

In

Number of rows and columns of sub(A).

d_A

Device

In

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+N-1)). On entry, this array contains the local pieces of the N-by-N distributed matrix sub(A). On output, this array contains the L or U factors of A, depending on the value of uplo.

IA

Host

In

Row index of the first row of the sub(A). This function does not make any assumptions on the alignment of IA.

JA

Host

In

Column index of the first column of the sub(A). This function does not make any assumptions on the alignment of JA.

descA

Host

In

Matrix descriptor associated to the global matrix A.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

workspaceInBytesOnDevice

Host

Out

On output, contains the size in bytes of the local device workspace needed by cusolverMpPotrf().

workspaceInBytesOnHost

Host

Out

On output, contains the size in bytes of the local host workspace needed by cusolverMpPotrf().

This routine supports the following combinations of data types:

Data Type of A

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpPotrs#

cusolverStatus_t cusolverMpPotrs(
        cusolverMpHandle_t handle,
        cublasFillMode_t uplo,
        int64_t N,
        int64_t NRHS,
        const void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        void *d_B,
        int64_t IB,
        int64_t JB,
        cusolverMpMatrixDescriptor_t descB,
        cudaDataType_t computeType,
        void *d_work,
        size_t workspaceInBytesOnDevice,
        void *h_work,
        size_t workspaceInBytesOnHost,
        int *info)
Solves a system of linear equations
\[sub(A) \cdot X = sub(B)\]
where sub(A) denotes A(IA:IA+N-1,JA:JA+N-1) and is a N-by-N symmetric or hermitian positive definite distributed matrix using the Cholesky factorization:
\[sub(A) = U^H \cdot U\]
or
\[sub(A) = L \cdot L^H\]
computed by cusolverMpPotrf() and sub(B) denotes the distributed matrix B(IB:IB+N-1,JB:JB+NRHS-1).

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

uplo

Host

In

Specifies if A is upper (CUBLAS_FILL_MODE_UPPER) or lower triangular matrix (CUBLAS_FILL_MODE_LOWER).

N

Host

In

Number of rows and columns of sub(A).

NRHS

Host

In

Number of columns of sub(B).

d_A

Device

In

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+N-1)). Contains the local pieces of the N-by-N distributed L or U factors of sub(A) as computed by cusolverMpPotrf().

IA

Host

In

Row index of the first row of the sub(A). IA must be a multiple of the row blocking dimension MB_A.

JA

Host

In

Column index of the first column of the sub(A). JA must be a multiple of the column blocking dimension NB_A.

descA

Host

In

Matrix descriptor associated to the global matrix A.

d_B

Device

In/Out

Pointer into the local memory to an array of dimension (LLD_B,LOCc(JB+NRHS-1)). On entry, the right hand sides sub(B). On exit, sub(B) is overwritten by the solution distributed matrix X.

IB

Host

In

Row index of the first row of the sub(B). This function does not make any assumptions on the alignment of IB.

JB

Host

In

Column index of the first column of the sub(B). This function does not make any assumptions on the alignment of JB.

descB

Host

In

Matrix descriptor associated to the global matrix B.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

d_work

Device

Out

Device workspace of size workspaceInBytesOnDevice.

workspaceInBytesOnDevice

Host

In

The size in bytes of the local device workspace needed by the routine as provided by cusolverMpPotrs_bufferSize().

h_work

Host

Out

Host workspace of size workspaceInBytesOnHost.

workspaceInBytesOnHost

Host

In

The size in bytes of the local host workspace needed by the routine as provided by cusolverMpPotrs_bufferSize().

info

Device

Out

Optional. info = 0 on success. info = -i indicates an invalid value for the i-th API argument after handle.

This function requires sub(A) and sub(B) to use the same value type. It requires square block size (MB_A == NB_A) and alignment of sub(A) and sub(B) matrices, meaning (MB_A == MB_B) and (IA == IB).
This routine supports the following combinations of data types:

Data Type of A

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpPotrs_bufferSize#

cusolverStatus_t cusolverMpPotrs_bufferSize(
        cusolverMpHandle_t handle,
        cublasFillMode_t uplo,
        int64_t n,
        int64_t nrhs,
        const void *a,
        int64_t ia,
        int64_t ja,
        cusolverMpMatrixDescriptor_t descA,
        const void *b,
        int64_t ib,
        int64_t jb,
        cusolverMpMatrixDescriptor_t descB,
        cudaDataType_t computeType,
        size_t* workspaceInBytesOnDevice,
        size_t* workspaceInBytesOnHost)
Computes the size in bytes of the host and device working buffers required by cusolverMpPotrs().

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

uplo

Host

In

Specifies if A is upper (CUBLAS_FILL_MODE_UPPER) or lower triangular matrix (CUBLAS_FILL_MODE_LOWER).

N

Host

In

Number of rows and columns of sub(A).

NRHS

Host

In

Number of columns of sub(B).

d_A

Device

In

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+N-1)). Contains the local pieces of the N-by-N distributed L or U factors of sub(A) as computed by cusolverMpPotrf().

IA

Host

In

Row index of the first row of the sub(A). IA must be a multiple of the row blocking dimension MB_A.

JA

Host

In

Column index of the first column of the sub(A). JA must be a multiple of the column blocking dimension NB_A.

descA

Host

In

Matrix descriptor associated to the global matrix A.

d_B

Device

In

Pointer into the local memory to an array of dimension (LLD_B,LOCc(JB+NRHS-1)). On entry, the right hand sides sub(B). On exit, sub(B) is overwritten by the solution distributed matrix X.

IB

Host

In

Row index of the first row of the sub(B). This function does not make any assumptions on the alignment of IB.

JB

Host

In

Column index of the first column of the sub(B). This function does not make any assumptions on the alignment of JB.

descB

Host

In

Matrix descriptor associated to the global matrix B.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

workspaceInBytesOnDevice

Host

Out

On output, contains the size in bytes of the local device workspace needed by cusolverMpPotrs().

workspaceInBytesOnHost

Host

Out

On output, contains the size in bytes of the local host workspace needed by cusolverMpPotrs().

This function requires sub(A) and sub(B) to use the same value type. It requires square block size (MB_A == NB_A) and alignment of sub(A) and sub(B) matrices, meaning (MB_A == MB_B) and (IA == IB).
This routine supports the following combinations of data types:

Data Type of A

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpGeqrf#

cusolverStatus_t cusolverMpGeqrf(
        cusolverMpHandle_t handle,
        int64_t M,
        int64_t N,
        void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        void *d_tau,
        cudaDataType_t computeType,
        void *d_work,
        size_t workspaceInBytesOnDevice,
        void *h_work,
        size_t workspaceInBytesOnHost,
        int *info)
Computes the QR factorization of a distributed M-by-N matrix sub(A) denoting A(IA:IA+M-1, JA:JA+N-1).
\[sub(A) = Q \cdot R\]
where Q is an orthogonal matrix represented by a product of Householder reflectors with the array of tau and R is upper triangular matrix.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

M

Host

In

Number of rows of sub(A).

N

Host

In

Number of columns of sub(A).

d_A

Device

In/Out

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+N-1)). On entry, this array contains the local pieces of the M-by-N distributed matrix sub(A). On output, this array contains the R factors of A and Householder reflectors below of diagonals with tau vector.

IA

Host

In

Row index of the first row of the sub(A). IA must be a multiple of the row blocking dimension MB_A.

JA

Host

In

Column index of the first column of the sub(A). JA must be a multiple of the column blocking dimension NB_A.

descA

Host

In

Matrix descriptor associated to the global matrix A.

d_tau

Device

Out

Pointer into the local memory to an array of dimension LOCc(JA+N-1). This array contains scalar factors of the Householder reflectors

computeType

Host

In

Data type used for computations. See table below for supported combinations.

d_work

Device

Out

Device workspace of size workspaceInBytesOnDevice.

workspaceInBytesOnDevice

Host

In

The size in bytes of the local device workspace needed by the routine as provided by cusolverMpGeqrf_bufferSize().

h_work

Host

Out

Host workspace of size workspaceInBytesOnHost.

workspaceInBytesOnHost

Host

In

The size in bytes of the local host workspace needed by the routine as provided by cusolverMpGeqrf_bufferSize().

info

Device

Out

Optional. info = 0 on success. info = -i indicates an invalid value for the i-th API argument after handle.

This function requires square block size (MB_A == NB_A).
This routine supports the following combinations of data types:

Data Type of A

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpGeqrf_bufferSize#

cusolverStatus_t cusolverMpGeqrf_bufferSize(
        cusolverMpHandle_t handle,
        int64_t M,
        int64_t N,
        void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        cudaDataType_t computeType,
        size_t* workspaceInBytesOnDevice,
        size_t* workspaceInBytesOnHost)
Computes the size in bytes of the host and device working buffers required by cusolverMpGeqrf().

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

M

Host

In

Number of rows of sub(A).

N

Host

In

Number of columns of sub(A).

d_A

Device

In

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+N-1)).

IA

Host

In

Row index in the global matrix A indicating the first row of sub(A). This function does not make any assumptions on the alignment of IA.

JA

Host

In

Column index in the global matrix A indicating the first column of sub(A). This function does not make any assumptions on the alignment of JA.

descA

Host

In

Matrix descriptor associated to the global matrix A.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

workspaceInBytesOnDevice

Host

Out

On output, contains the size in bytes of the local device workspace needed by cusolverMpGeqrf().

workspaceInBytesOnHost

Host

Out

On output, contains the size in bytes of the local host workspace needed by cusolverMpGeqrf().

This routine supports the following combinations of data types:

Data Type of A

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpOrmqr#

cusolverStatus_t cusolverMpOrmqr(
        cusolverMpHandle_t handle,
        cublasSideMode_t side,
        cublasOperation_t trans,
        int64_t M,
        int64_t N,
        int64_t K,
        const void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        const void *d_tau,
        void *d_C,
        int64_t IC,
        int64_t JC,
        cusolverMpMatrixDescriptor_t descC,
        cudaDataType_t computeType,
        void *d_work,
        size_t workspaceInBytesOnDevice,
        void *h_work,
        size_t workspaceInBytesOnHost,
        int *info)
Multiply distributed M-by-N matrix sub(C) denoting C(IC:IC+M-1, JC:JC+N-1) by the orthogonal matrix Q can be given from cusolverMpGeqrf().
The function can perform the following matrix product and overwrite the result on sub(C).
\[\begin{split}sub(C) = op(Q) \cdot sub(C) \\ sub(C) = sub(C) \cdot op(Q)\end{split}\]
for the side of CUBLAS_SIDE_LEFT and CUBLAS_SIDE_RIGHT respectively. Currently, only CUBLAS_SIDE_LEFT is supported.
Q is a orthogonal matrix formed as the product of Householder reflectors returned from cusolverMpGeqrf().
\[Q = H(1) H(2) ... H(K)\]
The number of the Householder reflectors is constrained by K <= M and K <= N for CUBLAS_SIDE_LEFT and CUBLAS_SIDE_RIGHT respectively.
The op can be translated to \(Q\), \(Q^T\), \(Q^H\) based on the trans argument. Real types support CUBLAS_OP_N and CUBLAS_OP_T; complex types support CUBLAS_OP_N and CUBLAS_OP_C.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

side

Host

In

Indicate that Q is applied from left or right side.

trans

Host

In

Indicate that Q is applied with no-transpose or (conj)transpose. Real types support CUBLAS_OP_N and CUBLAS_OP_T; complex types support CUBLAS_OP_N and CUBLAS_OP_C.

M

Host

In

Number of rows of sub(C).

N

Host

In

Number of columns of sub(C).

K

Host

In

Number of Householder reflectors defining Q.

d_A

Device

In

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+K-1)). For the supported CUBLAS_SIDE_LEFT case, this array contains the M-by-K Householder reflectors returned by cusolverMpGeqrf().

IA

Host

In

1-based row index of the first row of sub(A).

JA

Host

In

1-based column index of the first column of sub(A).

descA

Host

In

Matrix descriptor associated to the global matrix A.

d_tau

Device

In

Pointer into the local memory to an array of dimension LOCc(JA+K-1). This array contains the scalar factors of the Householder reflectors as returned by cusolverMpGeqrf(); the entries corresponding to columns [JA, JA+K-1] are read. Must be non-null, even on ranks that own no local tau elements.

d_C

Device

In/Out

Pointer into the local memory to an array of dimension (LLD_C, LOCc(JC+N-1)). On entry, the array contains the local pieces of the M-by-N distributed matrix sub(C). On exit, the sub(C) is overwritten by op(Q)*sub(C) or sub(C)*op(Q).

IC

Host

In

1-based row index of the first row of sub(C).

JC

Host

In

1-based column index of the first column of sub(C).

descC

Host

In

Matrix descriptor associated to the global matrix C.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

d_work

Device

Out

Device workspace of size workspaceInBytesOnDevice.

workspaceInBytesOnDevice

Host

In

The size in bytes of the local device workspace needed by the routine as provided by cusolverMpOrmqr_bufferSize().

h_work

Host

Out

Host workspace of size workspaceInBytesOnHost.

workspaceInBytesOnHost

Host

In

The size in bytes of the local host workspace needed by the routine as provided by cusolverMpOrmqr_bufferSize().

info

Device

Out

Optional. info = 0 on success. info = -i indicates an invalid value for the i-th API argument after handle.

This function requires square block size (MB_A == NB_A) and alignment of sub(A) and sub(C) matrices, meaning (MB_A == MB_C) and (IA == IC).
This routine supports the following combinations of data types:

Data Type of A

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpOrmqr_bufferSize#

cusolverStatus_t cusolverMpOrmqr_bufferSize(
        cusolverMpHandle_t handle,
        cublasSideMode_t side,
        cublasOperation_t trans,
        int64_t M,
        int64_t N,
        int64_t K,
        const void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        const void *d_tau,
        void *d_C,
        int64_t IC,
        int64_t JC,
        cusolverMpMatrixDescriptor_t descC,
        cudaDataType_t computeType,
        size_t* workspaceInBytesOnDevice,
        size_t* workspaceInBytesOnHost)
Computes the size in bytes of the host and device working buffers required by cusolverMpOrmqr().

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

side

Host

In

Indicate that Q is applied from left or right side.

trans

Host

In

Indicate that Q is applied with no-transpose or (conj)transpose. Real types support CUBLAS_OP_N and CUBLAS_OP_T; complex types support CUBLAS_OP_N and CUBLAS_OP_C.

M

Host

In

Number of rows of sub(C).

N

Host

In

Number of columns of sub(C).

K

Host

In

Number of Householder reflectors defining Q.

d_A

Device

In

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+K-1)). For the supported CUBLAS_SIDE_LEFT case, this array contains the M-by-K Householder reflectors returned by cusolverMpGeqrf().

IA

Host

In

1-based row index of the first row of sub(A).

JA

Host

In

1-based column index of the first column of sub(A).

descA

Host

In

Matrix descriptor associated to the global matrix A.

d_tau

Device

In

Pointer into the local memory to an array of dimension LOCc(JA+K-1). This array contains the scalar factors of the Householder reflectors as returned by cusolverMpGeqrf(); the entries corresponding to columns [JA, JA+K-1] are read. Must be non-null, even on ranks that own no local tau elements.

d_C

Device

In

Pointer into the local memory to an array of dimension (LLD_C, LOCc(JC+N-1)). On entry, the array contains the local pieces of the M-by-N distributed matrix sub(C). On exit, the sub(C) is overwritten by op(Q)*sub(C) or sub(C)*op(Q).

IC

Host

In

1-based row index of the first row of sub(C).

JC

Host

In

1-based column index of the first column of sub(C).

descC

Host

In

Matrix descriptor associated to the global matrix C.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

workspaceInBytesOnDevice

Host

Out

The size in bytes of the local device workspace needed by cusolverMpOrmqr().

workspaceInBytesOnHost

Host

Out

The size in bytes of the local host workspace needed by cusolverMpOrmqr().

This routine supports the following combinations of data types:

Data Type of A

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpOrgqr#

cusolverStatus_t cusolverMpOrgqr(
        cusolverMpHandle_t handle,
        int64_t M,
        int64_t N,
        int64_t K,
        void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        const void *d_tau,
        cudaDataType_t computeType,
        void *d_work,
        size_t workspaceInBytesOnDevice,
        void *h_work,
        size_t workspaceInBytesOnHost,
        int *d_info)
Generates the M-by-N matrix Q with orthonormal columns from the QR factorization computed by cusolverMpGeqrf(). Q is defined as the product of K elementary Householder reflectors of order M:
\[Q = H(1) \cdot H(2) \cdot \ldots \cdot H(k)\]
where H(i) are the elementary reflectors stored in the lower triangular part of A(IA:IA+M-1, JA:JA+K-1) as returned by cusolverMpGeqrf(), with corresponding scalar factors in d_tau.

Requires M >= N >= K >= 0. When K = 0, the routine sets Q to the identity matrix.

On input, d_A contains the Householder reflectors and d_tau as output by cusolverMpGeqrf(). On output, the submatrix A(IA:IA+M-1, JA:JA+N-1) is overwritten with the first N columns of Q.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

M

Host

In

Number of rows of the matrix Q. M >= 0.

N

Host

In

Number of columns of the matrix Q. M >= N >= 0.

K

Host

In

Number of elementary reflectors. N >= K >= 0.

d_A

Device

In/Out

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+N-1)). On entry, contains the Householder reflectors as returned by cusolverMpGeqrf(). On exit, overwritten with the first N columns of Q.

IA

Host

In

Row index of the first row of the submatrix. IA >= 1.

JA

Host

In

Column index of the first column of the submatrix. JA >= 1.

descA

Host

In

Matrix descriptor associated to the global matrix A.

d_tau

Device

In

Pointer into the local memory to an array of dimension LOCc(JA+K-1). Contains the scalar factors of the Householder reflectors as returned by cusolverMpGeqrf(). Must be non-null when K > 0, even on ranks that own no local tau elements.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

d_work

Device

Out

Device workspace of size workspaceInBytesOnDevice.

workspaceInBytesOnDevice

Host

In

The size in bytes of the local device workspace needed by the routine as provided by cusolverMpOrgqr_bufferSize().

h_work

Host

Out

Host workspace of size workspaceInBytesOnHost.

workspaceInBytesOnHost

Host

In

The size in bytes of the local host workspace needed by the routine as provided by cusolverMpOrgqr_bufferSize().

d_info

Device

Out

Optional. d_info = 0 on success. d_info = -i indicates an invalid value for the i-th API argument after handle.

This routine supports the following combinations of data types:

Data Type of A

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpOrgqr_bufferSize#

cusolverStatus_t cusolverMpOrgqr_bufferSize(
        cusolverMpHandle_t handle,
        int64_t M,
        int64_t N,
        int64_t K,
        const void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        const void *d_tau,
        cudaDataType_t computeType,
        size_t *workspaceInBytesOnDevice,
        size_t *workspaceInBytesOnHost)
Computes the size in bytes of the host and device working buffers required by cusolverMpOrgqr().

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

M

Host

In

Number of rows of the matrix Q. M >= 0.

N

Host

In

Number of columns of the matrix Q. M >= N >= 0.

K

Host

In

Number of elementary reflectors. N >= K >= 0.

d_A

Device

In

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+N-1)).

IA

Host

In

Row index of the first row of the submatrix. IA >= 1.

JA

Host

In

Column index of the first column of the submatrix. JA >= 1.

descA

Host

In

Matrix descriptor associated to the global matrix A.

d_tau

Device

In

Pointer into the local memory to an array of dimension LOCc(JA+K-1).

computeType

Host

In

Data type used for computations. See table below for supported combinations.

workspaceInBytesOnDevice

Host

Out

On output, contains the size in bytes of the local device workspace needed by cusolverMpOrgqr().

workspaceInBytesOnHost

Host

Out

On output, contains the size in bytes of the local host workspace needed by cusolverMpOrgqr().

This routine supports the following combinations of data types:

Data Type of A

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpGels#

cusolverStatus_t cusolverMpGels(
        cusolverMpHandle_t handle,
        cublasOperation_t trans,
        int64_t M,
        int64_t N,
        int64_t NRHS,
        void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        void *d_B,
        int64_t IB,
        int64_t JB,
        cusolverMpMatrixDescriptor_t descB,
        cudaDataType_t computeType,
        void *d_work,
        size_t workspaceInBytesOnDevice,
        void *h_work,
        size_t workspaceInBytesOnHost,
        int *info)
Solves overdetermined or underdetermined linear systems involving a distributed M-by-N matrix sub(A) denoting A(IA:IA+M-1, JA:JA+N-1) or its transpose, using QR or LQ factorization of sub(A).
Note that the solution of overdetermined systems (M >= N) with a no-transpose option is only supported via QR factorization cusolverMpGeqrf().
\[X \leftarrow \mbox{argmin} | sub(B) - sub(A) \cdot X |\]
where sub(B) is a distributed M-by-NRHS multi-vector denoting B(IB:IB+M-1, JB:JB+NRHS-1) and the solution multi-vector X is overwritten on the sub(B).

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

trans

Host

In

Indicate that the linear system of sub(A) involves with no-transpose or (conj)transpose.

M

Host

In

Number of rows of sub(A).

N

Host

In

Number of columns of sub(A).

NRHS

Host

In

Number of right hand side vectors i.e., number of columns of sub(B) and X.

d_A

Device

In

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+N-1)).

IA

Host

In

Row index of the first row of the sub(A). IA - 1 must be a multiple of the row blocking dimension MB_A.

JA

Host

In

Column index of the first column of the sub(A). JA - 1 must be a multiple of the column blocking dimension NB_A.

descA

Host

In

Matrix descriptor associated to the global matrix A.

d_B

Device

In/Out

Pointer into the local memory to an array of dimension (LLD_B, LOCc(JB+NRHS-1)). On entry, the array contains the local pieces of the M-by-NRHS distributed matrix sub(B). On exit, the sub(B) is overwritten by the solution of the solution vectors.

IB

Host

In

Row index of the first row of the sub(B). IB - 1 must be a multiple of the row blocking dimension MB_B.

JB

Host

In

Column index of the first column of the sub(B). JB - 1 must be a multiple of the column blocking dimension NB_B.

descB

Host

In

Matrix descriptor associated to the global matrix B.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

d_work

Device

Out

Device workspace of size workspaceInBytesOnDevice.

workspaceInBytesOnDevice

Host

In

The size in bytes of the local device workspace needed by the routine as provided by cusolverMpGels_bufferSize().

h_work

Host

Out

Host workspace of size workspaceInBytesOnHost.

workspaceInBytesOnHost

Host

In

The size in bytes of the local host workspace needed by the routine as provided by cusolverMpGels_bufferSize().

info

Device

Out

Optional. info = 0 on success. info = -i indicates an invalid value for the i-th API argument after handle.

This function requires square block size (MB_A == NB_A) and alignment of sub(A) and sub(B) matrices, meaning (MB_A == MB_B) and (IA == IB).
This routine supports the following combinations of data types:

Data Type of A

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpGels_bufferSize#

cusolverStatus_t cusolverMpGels_bufferSize(
        cusolverMpHandle_t handle,
        cublasOperation_t trans,
        int64_t M,
        int64_t N,
        int64_t NRHS,
        void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        void *d_B,
        int64_t IB,
        int64_t JB,
        cusolverMpMatrixDescriptor_t descB,
        cudaDataType_t computeType,
        size_t* workspaceInBytesOnDevice,
        size_t* workspaceInBytesOnHost)
Computes the size in bytes of the host and device working buffers required by cusolverMpGels().

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

trans

Host

In

Indicate that the linear system of sub(A) involves with no-transpose or (conj)transpose.

M

Host

In

Number of rows of sub(A).

N

Host

In

Number of columns of sub(A).

NRHS

Host

In

Number of right hand side vectors i.e., number of columns of sub(B) and X.

d_A

Device

In

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+N-1)).

IA

Host

In

Row index of the first row of the sub(A). IA - 1 must be a multiple of the row blocking dimension MB_A.

JA

Host

In

Column index of the first column of the sub(A). JA - 1 must be a multiple of the column blocking dimension NB_A.

descA

Host

In

Matrix descriptor associated to the global matrix A.

d_B

Device

In

Pointer into the local memory to an array of dimension (LLD_B, LOCc(JB+NRHS-1)).

IB

Host

In

Row index of the first row of the sub(B). IB - 1 must be a multiple of the row blocking dimension MB_B.

JB

Host

In

Column index of the first column of the sub(B). JB - 1 must be a multiple of the column blocking dimension NB_B.

descB

Host

In

Matrix descriptor associated to the global matrix B.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

workspaceInBytesOnDevice

Host

Out

The size in bytes of the local device workspace needed by cusolverMpGels().

workspaceInBytesOnHost

Host

Out

The size in bytes of the local host workspace needed by cusolverMpGels().

This routine supports the following combinations of data types:

Data Type of A

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpSytrd#

cusolverStatus_t cusolverMpSytrd(
        cusolverMpHandle_t handle,
        cublasFillMode_t uplo,
        int64_t N,
        void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        void *d_d,
        void *d_e,
        void *d_tau,
        cudaDataType_t computeType,
        void *d_work,
        size_t workspaceInBytesOnDevice,
        void *h_work,
        size_t workspaceInBytesOnHost,
        int *info)
Reduces a symmetric (or hermitian for a complex value type) distributed N-by-N matrix sub(A) denoting A(IA:IA+N-1, JA:JA+N-1) to a tridiagonal form.
\[A \rightarrow Q \cdot T \cdot Q^H\]
Currently, the public cusolverMpSytrd() API supports only CUBLAS_FILL_MODE_LOWER. The routine stores Householder reflectors in lower form; use CUBLAS_FILL_MODE_LOWER when applying these reflectors with cusolverMpOrmtr().
Performance tip. For best collective communication performance, allocate the device workspace with cusolverMpMalloc(), or with ncclMemAlloc registered via cusolverMpBufferRegister(), before calling this routine.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

uplo

Host

In

Indicate which triangular part of sub(A) is used. Currently, only CUBLAS_FILL_MODE_LOWER is supported.

N

Host

In

Number of rows/columns of square matrix sub(A).

d_A

Device

In/Out

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+N-1)). On entry, the array contains the local part of symmetric distributed matrix sub(A). On exit, the diagonal and first off-diagonal of the tridiagonal form overwrite sub(A), and Householder reflectors are stored below the subdiagonal of sub(A).

IA

Host

In

1-based row index of the first row of sub(A). Current support requires (IA - 1) to be a multiple of MB_A.

JA

Host

In

1-based column index of the first column of sub(A). Current support requires (JA - 1) to be a multiple of NB_A.

descA

Host

In

Matrix descriptor associated to the global matrix A.

d_d

Device

Out

Pointer into the local memory to an array of dimension LOCc(JA+N-1). The diagonal elements of tridiagonal matrix is stored: d(i) = A(i,i).

d_e

Device

Out

Pointer into the local memory to an array of dimension LOCc(JA+N-1). The off-diagonal elements of tridiagonal matrix are stored as e(i) = A(i+1,i) for the documented CUBLAS_FILL_MODE_LOWER mode.

d_tau

Device

Out

Pointer into the local memory to an array of dimension LOCc(JA+N-1). This array contains scalar factors of the Householder reflectors

computeType

Host

In

Data type used for computations. See table below for supported combinations.

d_work

Device

Out

Device workspace of size workspaceInBytesOnDevice.

workspaceInBytesOnDevice

Host

In

The size in bytes of the local device workspace needed by the routine as provided by cusolverMpSytrd_bufferSize().

h_work

Host

Out

Host workspace of size workspaceInBytesOnHost.

workspaceInBytesOnHost

Host

In

The size in bytes of the local host workspace needed by the routine as provided by cusolverMpSytrd_bufferSize().

info

Device

Out

Optional. info = 0 on success. info = -i indicates an invalid value for the i-th API argument after handle.

This function requires square block size (MB_A == NB_A) and block-aligned starts, i.e. (IA - 1) is a multiple of MB_A and (JA - 1) is a multiple of NB_A.
This routine supports the following combinations of data types:

Data Type of A

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpSytrd_bufferSize#

cusolverStatus_t cusolverMpSytrd_bufferSize(
        cusolverMpHandle_t handle,
        cublasFillMode_t uplo,
        int64_t N,
        void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        void *d_d,
        void *d_e,
        void *d_tau,
        cudaDataType_t computeType,
        size_t *workspaceInBytesOnDevice,
        size_t *workspaceInBytesOnHost)
Computes the size in bytes of the host and device working buffers required by cusolverMpSytrd().
The same support restrictions as cusolverMpSytrd() apply: currently, only CUBLAS_FILL_MODE_LOWER is supported, MB_A == NB_A, and starts must be block-aligned.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

uplo

Host

In

Indicate which triangular part of sub(A) is used. Currently, only CUBLAS_FILL_MODE_LOWER is supported.

N

Host

In

Number of rows/columns of square matrix sub(A).

d_A

Device

In

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+N-1)).

IA

Host

In

1-based row index of the first row of sub(A). Current support requires (IA - 1) to be a multiple of MB_A.

JA

Host

In

1-based column index of the first column of sub(A). Current support requires (JA - 1) to be a multiple of NB_A.

descA

Host

In

Matrix descriptor associated to the global matrix A.

d_d

Device

In

Pointer into the local memory to an array of dimension LOCc(JA+N-1).

d_e

Device

In

Pointer into the local memory to an array of dimension LOCc(JA+N-1).

d_tau

Device

In

Pointer into the local memory to an array of dimension LOCc(JA+N-1).

computeType

Host

In

Data type used for computations. See table below for supported combinations.

workspaceInBytesOnDevice

Host

Out

The size in bytes of the local device workspace needed by cusolverMpSytrd().

workspaceInBytesOnHost

Host

Out

The size in bytes of the local host workspace needed by cusolverMpSytrd().

This routine supports the following combinations of data types:

Data Type of A

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpStedc#

cusolverStatus_t cusolverMpStedc(
        cusolverMpHandle_t handle,
        char *compz,
        int64_t N,
        void *d_D,
        void *d_E,
        void *d_Q,
        int64_t IQ,
        int64_t JQ,
        cusolverMpMatrixDescriptor_t descQ,
        cudaDataType_t computeType,
        void *d_work,
        size_t workspaceInBytesOnDevice,
        void *h_work,
        size_t workspaceInBytesOnHost,
        int *info)
Computes all eigenvalues (compz=N) or all eigenvalues and eigenvectors (compz=I) of a symmetric tridiagonal matrix using the divide and conquer algorithm.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

compz

Host

In

Option to compute eigenvalues only (compz=N) or both eigenvalues/vectors (compz=I). Must be identical on all processes.

N

Host

In

Number of rows/columns of square matrix sub(A).

d_D

Device

In/Out

Pointer to an array of dimension N. On entry, the array contains diagonal elements of the tridiagonal matrix. On exit, the eigenvalues are stored in ascending order.

d_E

Device

In/Out

Pointer to an array of dimension N-1. On entry, the array contains subdiagonal elements of the tridiagonal matrix. On exit, the content of the array is destroyed.

d_Q

Device

Out

Pointer into the local memory to an array of dimension (LLD_Q, LOCc(JQ+N-1)). On output, the array contains the local elements of orthonormal eigenvectors of the symmetric tridiagonal matrix. Not referenced when compz=N (may be NULL); descQ is still required.

IQ

Host

In

1-based row index of the first row of sub(Q). Current support requires (IQ - 1) to be a multiple of MB_Q.

JQ

Host

In

1-based column index of the first column of sub(Q). Current support requires (JQ - 1) to be a multiple of NB_Q.

descQ

Host

In

Matrix descriptor associated to the global matrix Q.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

d_work

Device

Out

Device workspace of size workspaceInBytesOnDevice.

workspaceInBytesOnDevice

Host

In

The size in bytes of the local device workspace needed by the routine as provided by cusolverMpStedc_bufferSize().

h_work

Host

Out

Host workspace of size workspaceInBytesOnHost.

workspaceInBytesOnHost

Host

In

The size in bytes of the local host workspace needed by the routine as provided by cusolverMpStedc_bufferSize().

info

Device

Out

Optional. info = 0 on success. info = -i indicates an invalid value for the i-th API argument after handle. info > 0 indicates a STEDC convergence failure.

This function requires compz = I or compz = N, square block size for Q (MB_Q == NB_Q), and a block-aligned Q column start, i.e. (JQ - 1) is a multiple of NB_Q.
This routine supports the following combinations of data types:

Data Type of Tridiagonal Matrix

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.
This function uses the divide and conquer algorithm to compute eigenpairs.

cusolverMpStedc_bufferSize#

cusolverStatus_t cusolverMpStedc_bufferSize(
        cusolverMpHandle_t handle,
        char *compz,
        int64_t N,
        void *d_D,
        void *d_E,
        void *d_Q,
        int64_t IQ,
        int64_t JQ,
        cusolverMpMatrixDescriptor_t descQ,
        cudaDataType_t computeType,
        size_t *workspaceInBytesOnDevice,
        size_t *workspaceInBytesOnHost,
        int *iwork)
Computes the size in bytes of the host and device working buffers required by cusolverMpStedc().
The same support restrictions as cusolverMpStedc() apply.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

compz

Host

In

Option to compute eigenvalues only (compz=N) or both eigenvalues/vectors (compz=I). Must be identical on all processes.

N

Host

In

Number of rows/columns of square matrix sub(A).

d_D

Device

In

Pointer to an array of dimension N.

d_E

Device

In

Pointer to an array of dimension N-1.

d_Q

Device

In

Pointer into the local memory to an array of dimension (LLD_Q, LOCc(JQ+N-1)). Not referenced when compz=N (may be NULL).

IQ

Host

In

1-based row index of the first row of sub(Q). Current support requires (IQ - 1) to be a multiple of MB_Q.

JQ

Host

In

1-based column index of the first column of sub(Q). Current support requires (JQ - 1) to be a multiple of NB_Q.

descQ

Host

In

Matrix descriptor associated to the global matrix Q.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

workspaceInBytesOnDevice

Host

Out

The size in bytes of the local device workspace needed by the routine cusolverMpStedc().

workspaceInBytesOnHost

Host

Out

The size in bytes of the local host workspace needed by cusolverMpStedc().

iwork

Host

In/Out

Host scratch buffer used internally during buffer-size computation. Must be pre-allocated by the caller with at least max(N, 2*nprocs+1) ints, where nprocs is the size of the communicator in descQ. The contents after return are not meaningful and do not need to be passed to cusolverMpStedc().

This routine currently supports the following combinations of data types:

Data Type of Tridiagonal Matrix

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpOrmtr#

cusolverStatus_t cusolverMpOrmtr(
        cusolverMpHandle_t handle,
        cublasSideMode_t side,
        cublasFillMode_t uplo,
        cublasOperation_t trans,
        int64_t M,
        int64_t N,
        const void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        const void *d_tau,
        void *d_C,
        int64_t IC,
        int64_t JC,
        cusolverMpMatrixDescriptor_t descC,
        cudaDataType_t computeType,
        void *d_work,
        size_t workspaceInBytesOnDevice,
        void *h_work,
        size_t workspaceInBytesOnHost,
        int *info)
Multiply distributed M-by-N matrix sub(C) denoting C(IC:IC+M-1, JC:JC+N-1) by the orthogonal matrix Q can be given from cusolverMpSytrd().
The current implementation supports side = CUBLAS_SIDE_LEFT and uplo = CUBLAS_FILL_MODE_LOWER, where uplo describes the storage of the Householder reflectors in sub(A). It performs the following matrix product and overwrites the result on sub(C):
\[sub(C) = op(Q) \cdot sub(C)\]
The op can be translated to \(Q\), \(Q^T\), \(Q^H\) based on the trans argument. Real types support CUBLAS_OP_N and CUBLAS_OP_T; complex types support CUBLAS_OP_N and CUBLAS_OP_C.
For CUBLAS_FILL_MODE_LOWER, Q is an orthogonal matrix formed as the following product of Householder reflectors:
\[Q = H(nq-1) H(nq-2) ... H(1)\]
where nq is m for the supported CUBLAS_SIDE_LEFT case.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

side

Host

In

Indicate that Q is applied from left or right side. Currently, only CUBLAS_SIDE_LEFT is implemented.

uplo

Host

In

Indicate whether upper or lower triangular of sub(A) contains Householder reflectors. Currently, only CUBLAS_FILL_MODE_LOWER reflector storage is implemented.

trans

Host

In

Indicate that Q is applied with no-transpose or (conj)transpose. Real types support CUBLAS_OP_N and CUBLAS_OP_T; complex types support CUBLAS_OP_N and CUBLAS_OP_C.

M

Host

In

Number of rows of sub(C) and order of Q for the supported left-side case.

N

Host

In

Number of columns of sub(C).

d_A

Device

In

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+M-1)). This array contains Householder reflectors below the subdiagonal with the tau vector.

IA

Host

In

1-based row index of the first row of sub(A).

JA

Host

In

1-based column index of the first column of sub(A).

descA

Host

In

Matrix descriptor associated to the global matrix A.

d_tau

Device

In

Pointer into the local memory to an array of dimension LOCc(JA+M-1). This array contains scalar factors of the Householder reflectors

d_C

Device

In/Out

Pointer into the local memory to an array of dimension (LLD_C, LOCc(JC+N-1)). On entry, the array contains the local pieces of the M-by-N distributed matrix sub(C). On exit, the supported left-side case overwrites sub(C) with op(Q)*sub(C).

IC

Host

In

1-based row index of the first row of sub(C).

JC

Host

In

1-based column index of the first column of sub(C).

descC

Host

In

Matrix descriptor associated to the global matrix C.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

d_work

Device

Out

Device workspace of size workspaceInBytesOnDevice.

workspaceInBytesOnDevice

Host

In

The size in bytes of the local device workspace needed by the routine as provided by cusolverMpOrmtr_bufferSize().

h_work

Host

Out

Host workspace of size workspaceInBytesOnHost.

workspaceInBytesOnHost

Host

In

The size in bytes of the local host workspace needed by the routine as provided by cusolverMpOrmtr_bufferSize().

info

Device

Out

Optional. info = 0 on success. info = -i indicates an invalid value for the i-th API argument after handle.

This function requires square block size (MB_A == NB_A) and alignment of sub(A) and sub(B) matrices, meaning (MB_A == MB_C) and (IA == IC).
This routine supports the following combinations of data types:

Data Type of A and C

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpOrmtr_bufferSize#

cusolverStatus_t cusolverMpOrmtr_bufferSize(
        cusolverMpHandle_t handle,
        cublasSideMode_t side,
        cublasFillMode_t uplo,
        cublasOperation_t trans,
        int64_t M,
        int64_t N,
        const void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        const void *d_tau,
        void *d_C,
        int64_t IC,
        int64_t JC,
        cusolverMpMatrixDescriptor_t descC,
        cudaDataType_t computeType,
        size_t* workspaceInBytesOnDevice,
        size_t* workspaceInBytesOnHost)
Computes the size in bytes of the host and device working buffers required by cusolverMpOrmtr().
The same support restrictions as cusolverMpOrmtr() apply: currently, only side = CUBLAS_SIDE_LEFT and uplo = CUBLAS_FILL_MODE_LOWER reflector storage are implemented; A and C require compatible communicator and process-grid properties; MB_A == MB_C is required; descriptor grids with multiple ranks require IA = JA = IC = 1; and a non-unit JC is supported only when the multi-column-rank tile-span and active-owner-containment requirements are both satisfied.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

side

Host

In

Indicate that Q is applied from left or right side. Currently, only CUBLAS_SIDE_LEFT is implemented.

uplo

Host

In

Indicate whether upper or lower triangular of sub(A) contains Householder reflectors. Currently, only CUBLAS_FILL_MODE_LOWER reflector storage is implemented.

trans

Host

In

Indicate that Q is applied with no-transpose or (conj)transpose. Real types support CUBLAS_OP_N and CUBLAS_OP_T; complex types support CUBLAS_OP_N and CUBLAS_OP_C.

M

Host

In

Number of rows of sub(C) and order of Q for the supported left-side case.

N

Host

In

Number of columns of sub(C).

d_A

Device

In

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+M-1)). This array contains Householder reflectors below the subdiagonal with the tau vector.

IA

Host

In

1-based row index of the first row of sub(A).

JA

Host

In

1-based column index of the first column of sub(A).

descA

Host

In

Matrix descriptor associated to the global matrix A.

d_tau

Device

In

Pointer into the local memory to an array of dimension LOCc(JA+M-1). This array contains scalar factors of the Householder reflectors

d_C

Device

In

Pointer into the local memory to an array of dimension (LLD_C, LOCc(JC+N-1)). On entry, the array contains the local pieces of the M-by-N distributed matrix sub(C). On exit, the supported left-side case overwrites sub(C) with op(Q)*sub(C).

IC

Host

In

1-based row index of the first row of sub(C).

JC

Host

In

1-based column index of the first column of sub(C).

descC

Host

In

Matrix descriptor associated to the global matrix C.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

workspaceInBytesOnDevice

Host

Out

The size in bytes of the local device workspace needed by cusolverMpOrmtr().

workspaceInBytesOnHost

Host

Out

The size in bytes of the local host workspace needed by cusolverMpOrmtr().

This routine supports the following combinations of data types:

Data Type of A

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpSyevd#

cusolverStatus_t cusolverMpSyevd(
        cusolverMpHandle_t handle,
        char *jobz,
        cublasFillMode_t uplo,
        int64_t N,
        void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        void *d_D,
        void *d_Q,
        int64_t IQ,
        int64_t JQ,
        cusolverMpMatrixDescriptor_t descQ,
        cudaDataType_t computeType,
        void *d_work,
        size_t workspaceInBytesOnDevice,
        void *h_work,
        size_t workspaceInBytesOnHost,
        int *d_info)
Computes all eigenvalues, and optionally eigenvectors, of a symmetric distributed N-by-N matrix sub(A) A(IA:IA+N-1, JA:JA+N-1) using the divide and conquer algorithm cusolverMpStedc().
Eigenvalues are returned in ascending order.
Performance tip. For best collective communication performance, allocate the device workspace with cusolverMpMalloc(), or with ncclMemAlloc registered via cusolverMpBufferRegister(), before calling this routine.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

jobz

Host

In

If jobz = N, then eigenvalues are computed and if jobz = V, then eigenvalues and eigenvectors are computed.

uplo

Host

In

Indicate that upper or lower triangular of sub(A) is used to compute eigen solutions.

N

Host

In

Number of rows and columns of sub(A).

d_A

Device

In

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+N-1)). This array contains local parts of the symmetric matrix A.

IA

Host

In

Row index of the first row of the sub(A). IA must be a multiple of the row blocking dimension MB_A.

JA

Host

In

Column index of the first column of the sub(A). JA must be a multiple of the column blocking dimension NB_A.

descA

Host

In

Matrix descriptor associated to the global matrix A.

d_D

Device

Out

Pointer to a device buffer of length N replicated on every rank. On exit, this array contains real eigenvalues of the matrix A in ascending order. Element type is the real companion of computeType.

d_Q

Device

Out

Pointer into the local memory to an array of dimension (LLD_Q, LOCc(JQ+N-1)). On exit, the array contains local parts of orthonormal eigenvectors of the matrix A.

IQ

Host

In

Row index of the first row of the sub(Q). IQ must be a multiple of the row blocking dimension MB_Q.

JQ

Host

In

Column index of the first column of the sub(Q). JQ must be a multiple of the column blocking dimension NB_Q.

descQ

Host

In

Matrix descriptor associated to the global matrix Q.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

d_work

Device

Out

Device workspace of size workspaceInBytesOnDevice.

workspaceInBytesOnDevice

Host

In

The size in bytes of the local device workspace needed by the routine as provided by cusolverMpSyevd_bufferSize().

h_work

Host

Out

Host workspace of size workspaceInBytesOnHost.

workspaceInBytesOnHost

Host

In

The size in bytes of the local host workspace needed by the routine as provided by cusolverMpSyevd_bufferSize().

d_info

Device

Out

Optional. d_info = 0 on success. d_info = -i indicates an invalid value for the i-th API argument after handle. Positive values indicate an internal SYTRD, STEDC, or ORMTR failure and are also reported through the returned status when detected.

This function requires square block size (MB_A == NB_A) and alignment of sub(A) and sub(Q) matrices, meaning (MB_A == MB_Q) and (IA == IQ). The current implementation supports full-matrix submatrix starts (IA == JA == IQ == JQ == 1).
uplo selects which triangular part of the input sub(A) is read, and both CUBLAS_FILL_MODE_UPPER and CUBLAS_FILL_MODE_LOWER are supported. The standalone cusolverMpSytrd() and cusolverMpOrmtr() routines remain lower-only.
This routine supports the following combinations of data types:

Data Type of A and Q

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpSyevd_bufferSize#

cusolverStatus_t cusolverMpSyevd_bufferSize(
        cusolverMpHandle_t handle,
        char *jobz,
        cublasFillMode_t uplo,
        int64_t N,
        void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        void *d_D,
        void *d_Q,
        int64_t IQ,
        int64_t JQ,
        cusolverMpMatrixDescriptor_t descQ,
        cudaDataType_t computeType,
        size_t *workspaceInBytesOnDevice,
        size_t *workspaceInBytesOnHost)
Computes the size in bytes of the host and device working buffers required by cusolverMpSyevd().

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

jobz

Host

In

If jobz = N, then eigenvalues are computed and if jobz = V, then eigenvalues and eigenvectors are computed.

uplo

Host

In

Indicate that upper or lower triangular of sub(A) is used to compute eigen solutions.

N

Host

In

Number of rows and columns of sub(A).

d_A

Device

In

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+N-1)). This array contains local parts of the symmetric matrix A.

IA

Host

In

Row index of the first row of the sub(A). IA must be a multiple of the row blocking dimension MB_A.

JA

Host

In

Column index of the first column of the sub(A). JA must be a multiple of the column blocking dimension NB_A.

descA

Host

In

Matrix descriptor associated to the global matrix A.

d_D

Device

In

Pointer to a device buffer of length N replicated on every rank.

d_Q

Device

In

Pointer into the local memory to an array of dimension (LLD_Q, LOCc(JQ+N-1)).

IQ

Host

In

Row index of the first row of the sub(Q). IQ must be a multiple of the row blocking dimension MB_Q.

JQ

Host

In

Column index of the first column of the sub(Q). JQ must be a multiple of the column blocking dimension NB_Q.

descQ

Host

In

Matrix descriptor associated to the global matrix Q.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

workspaceInBytesOnDevice

Host

Out

The size in bytes of the local device workspace needed by cusolverMpSyevd().

workspaceInBytesOnHost

Host

Out

The size in bytes of the local host workspace needed by cusolverMpSyevd().

uplo selects which triangular part of the input sub(A) is read, and both CUBLAS_FILL_MODE_UPPER and CUBLAS_FILL_MODE_LOWER are supported. The reported workspace sizes do not depend on uplo.
This routine supports the following combinations of data types:

Data Type of A

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpSygst#

cusolverStatus_t cusolverMpSygst(
        cusolverMpHandle_t handle,
        cusolverEigType_t ibtype,
        cublasFillMode_t uplo,
        int64_t N,
        void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        const void *d_B,
        int64_t IB,
        int64_t JB,
        cusolverMpMatrixDescriptor_t descB,
        cudaDataType_t computeType,
        void *d_work,
        size_t workspaceInBytesOnDevice,
        void *h_work,
        size_t workspaceInBytesOnHost,
        int *info)
Reduces a hermitian-definite generalized eigenproblem to standard form. Denoting sub(A) and sub(B) as A(IA:IA+N-1, JA:JA+N-1) and B(IB:IB+N-1, JB:JB+N-1) respectively, the routine considers the following cases.
  • ibtype = CUSOLVER_EIG_TYPE_1: the problem is sub(A)*x = lambda*sub(B)*x, and sub(A) is overwritten by inv(L)*sub(A)*inv(L^H) or inv(U^H)*sub(A)*inv(U).

  • ibtype = CUSOLVER_EIG_TYPE_2 or 3: the problem is sub(A)*sub(B)*x = lambda*x or sub(B)*sub(A)*x = lambda*x, and sub(A) is overwritten by L^H*sub(A)*L or U*sub(A)*U^H.

The sub(B) includes lower or upper Cholesky factors previously computed by cusolverMpPotrf().

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

ibtype

Host

In

Indicate the eigen problem type sub(A)*x=(lambda)*sub(B)*x, sub(A)*sub(B)x=(lambda)*x, or sub(B)*sub(A)*x=(lambda)*x.

uplo

Host

In

Indicate that lower CUBLAS_FILL_MODE_LOWER or upper CUBLAS_FILL_MODE_UPPER triangular of sub(A) and sub(B) are used to compute eigen solutions.

N

Host

In

Number of rows and columns of sub(A) and sub(B).

d_A

Device

In/Out

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+N-1)). This array contains local parts of the symmetric matrix A.

IA

Host

In

Row index of the first row of the sub(A). IA must be a multiple of the row blocking dimension MB_A.

JA

Host

In

Column index of the first column of the sub(A). JA must be a multiple of the column blocking dimension NB_A.

descA

Host

In

Matrix descriptor associated to the global matrix A.

d_B

Device

In

Pointer into the local memory to an array of dimension (LLD_B, LOCc(JB+N-1)). This array contains local parts of the symmetric matrix B.

IB

Host

In

Row index of the first row of the sub(B). IB must be a multiple of the row blocking dimension MB_B.

JB

Host

In

Column index of the first column of the sub(B). JB must be a multiple of the column blocking dimension NB_B.

descB

Host

In

Matrix descriptor associated to the global matrix B.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

d_work

Device

Out

Device workspace of size workspaceInBytesOnDevice.

workspaceInBytesOnDevice

Host

In

The size in bytes of the local device workspace needed by cusolverMpSygst().

h_work

Host

Out

Host workspace of size workspaceInBytesOnHost.

workspaceInBytesOnHost

Host

In

The size in bytes of the local host workspace needed by cusolverMpSygst().

info

Device

Out

Optional. info = 0 on success. info = -i indicates an invalid value for the i-th API argument after handle.

The routine requires some alignment properties
  • Same square blocksize is used (MB == NB) for the matrix A and B.

  • The beginning row and column of A and B are aligned each other i.e., (IA == IB) and (JA == JB).

Note that the current implementation supports the inputs of ibtype = CUSOLVER_EIG_TYPE_1, uplo = CUBLAS_FILL_MODE_LOWER, and full-matrix submatrix starts (IA == JA == IB == JB == 1).
This routine supports the following combinations of data types:

Data Type of A

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpSygst_bufferSize#

cusolverStatus_t cusolverMpSygst_bufferSize(
        cusolverMpHandle_t handle,
        cusolverEigType_t ibtype,
        cublasFillMode_t uplo,
        int64_t N,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        int64_t IB,
        int64_t JB,
        cusolverMpMatrixDescriptor_t descB,
        cudaDataType_t computeType,
        size_t *workspaceInBytesOnDevice,
        size_t *workspaceInBytesOnHost)
Computes the size in bytes of the host and device working buffers required by cusolverMpSygst().

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

ibtype

Host

In

Indicate the eigen problem type sub(A)*x=(lambda)*sub(B)*x, sub(A)*sub(B)x=(lambda)*x, or sub(B)*sub(A)*x=(lambda)*x.

uplo

Host

In

Indicate that lower CUBLAS_FILL_MODE_LOWER or upper CUBLAS_FILL_MODE_UPPER triangular of sub(A) and sub(B) are used to compute eigen solutions.

N

Host

In

Number of rows and columns of sub(A) and sub(B).

IA

Host

In

Row index of the first row of the sub(A). IA must be a multiple of the row blocking dimension MB_A.

JA

Host

In

Column index of the first column of the sub(A). JA must be a multiple of the column blocking dimension NB_A.

descA

Host

In

Matrix descriptor associated to the global matrix A.

IB

Host

In

Row index of the first row of the sub(B). IB must be a multiple of the row blocking dimension MB_B.

JB

Host

In

Column index of the first column of the sub(B). JB must be a multiple of the column blocking dimension NB_B.

descB

Host

In

Matrix descriptor associated to the global matrix B.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

workspaceInBytesOnDevice

Host

Out

The size in bytes of the local device workspace needed by cusolverMpSygst().

workspaceInBytesOnHost

Host

Out

The size in bytes of the local host workspace needed by cusolverMpSygst().

The routine requires some alignment properties
  • Same square blocksize is used (MB == NB) for the matrix A and B.

  • The beginning row and column of A and B are aligned each other i.e., (IA == IB) and (JA == JB).

Note that the current implementation supports the inputs of ibtype = CUSOLVER_EIG_TYPE_1, uplo = CUBLAS_FILL_MODE_LOWER, and full-matrix submatrix starts (IA == JA == IB == JB == 1).
This routine supports the following combinations of data types:

Data Type of A

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpSygvd#

cusolverStatus_t cusolverMpSygvd(
        cusolverMpHandle_t handle,
        cusolverEigType_t ibtype,
        cusolverEigMode_t jobz,
        cublasFillMode_t uplo,
        int64_t N,
        void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        void *d_B,
        int64_t IB,
        int64_t JB,
        cusolverMpMatrixDescriptor_t descB,
        void *d_W,
        void *d_Z,
        int64_t IZ,
        int64_t JZ,
        cusolverMpMatrixDescriptor_t descZ,
        cudaDataType_t computeType,
        void *d_work,
        size_t workspaceInBytesOnDevice,
        void *h_work,
        size_t workspaceInBytesOnHost,
        int *info)
Computes a hermitian-definite generalized eigenproblem using cusolverMpSyevd(). Denoting sub(A) and sub(B) as A(IA:IA+N-1, JA:JA+N-1) and B(IB:IB+N-1, JB:JB+N-1) respectively, the routine considers the following cases.
  • ibtype = CUSOLVER_EIG_TYPE_1: the problem is sub(A)*x = lambda*sub(B)*x.

  • ibtype = CUSOLVER_EIG_TYPE_2: the problem is sub(A)*sub(B)*x = lambda*x.

  • ibtype = CUSOLVER_EIG_TYPE_3: the problem is sub(B)*sub(A)*x = lambda*x.

Performance tip. For best collective communication performance, allocate the device workspace with cusolverMpMalloc(), or with ncclMemAlloc registered via cusolverMpBufferRegister(), before calling this routine.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

ibtype

Host

In

Indicate the eigen problem type sub(A)*x=(lambda)*sub(B)*x, sub(A)*sub(B)x=(lambda)*x, or sub(B)*sub(A)*x=(lambda)*x.

jobz

Host

In

Indicate whether the routine computes eigenvalues only CUSOLVER_EIG_MODE_NOVECTOR or includes eigenvectors as well CUSOLVER_EIG_MODE_VECTOR.

uplo

Host

In

Indicate that lower CUBLAS_FILL_MODE_LOWER or upper CUBLAS_FILL_MODE_UPPER triangular of sub(A) and sub(B) are used to compute eigen solutions.

N

Host

In

Number of rows and columns of sub(A) and sub(B).

d_A

Device

In/Out

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+N-1)). This array contains local parts of the symmetric matrix A and will be overwritten with standard eigen problem.

IA

Host

In

Row index of the first row of the sub(A). IA must be a multiple of the row blocking dimension MB_A.

JA

Host

In

Column index of the first column of the sub(A). JA must be a multiple of the column blocking dimension NB_A.

descA

Host

In

Matrix descriptor associated to the global matrix A.

d_B

Device

In/Out

Pointer into the local memory to an array of dimension (LLD_B, LOCc(JB+N-1)). This array contains local parts of the symmetric matrix B and will be overwritten with Cholesky factors.

IB

Host

In

Row index of the first row of the sub(B). IB must be a multiple of the row blocking dimension MB_B.

JB

Host

In

Column index of the first column of the sub(B). JB must be a multiple of the column blocking dimension NB_B.

descB

Host

In

Matrix descriptor associated to the global matrix B.

d_W

Device

Out

Pointer into the memory to an array of global size N. On exit, this array contains real eigen values of the matrix A.

d_Z

Device

Out

Pointer into the local memory to an array of dimension (LLD_Z, LOCc(JZ+N-1)). On exit, the array contains local parts of orthonormal eigenvectors of the matrix A.

IZ

Host

In

Row index of the first row of the sub(Z). IZ must be a multiple of the row blocking dimension MB_Z.

JZ

Host

In

Column index of the first column of the sub(Z). JZ must be a multiple of the column blocking dimension NB_Z.

descZ

Host

In

Matrix descriptor associated to the global matrix Z.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

d_work

Device

Out

Device workspace of size workspaceInBytesOnDevice.

workspaceInBytesOnDevice

Host

In

The size in bytes of the local device workspace needed by the routine as provided by cusolverMpSygvd_bufferSize().

h_work

Host

Out

Host workspace of size workspaceInBytesOnHost.

workspaceInBytesOnHost

Host

In

The size in bytes of the local host workspace needed by the routine as provided by cusolverMpSygvd_bufferSize().

info

Device

Out

Optional. info = 0 on success. info = -i indicates an invalid value for the i-th API argument after handle. Positive values indicate an internal POTRF, SYGST, or SYEVD failure.

The routine requires some alignment properties
  • Same square blocksize is used (MB == NB) for the matrix A, B, and Z.

  • The beginning row and column of A, B and Z are aligned each other i.e., (IA == IB == IZ) and (JA == JB == JZ).

Currently, only generalized eigenproblem type 1 (ibtype = CUSOLVER_EIG_TYPE_1) is supported. The current implementation also requires jobz = CUSOLVER_EIG_MODE_VECTOR, uplo = CUBLAS_FILL_MODE_LOWER, and full-matrix submatrix starts (IA == JA == IB == JB == IZ == JZ == 1).
This routine supports the following combinations of data types:

Data Type of A, B, and Z

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpSygvd_bufferSize#

cusolverStatus_t cusolverMpSygvd_bufferSize(
        cusolverMpHandle_t handle,
        cusolverEigType_t ibtype,
        cusolverEigMode_t jobz,
        cublasFillMode_t uplo,
        int64_t N,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        int64_t IB,
        int64_t JB,
        cusolverMpMatrixDescriptor_t descB,
        int64_t IZ,
        int64_t JZ,
        cusolverMpMatrixDescriptor_t descZ,
        cudaDataType_t computeType,
        size_t *workspaceInBytesOnDevice,
        size_t *workspaceInBytesOnHost)
Computes the size in bytes of the host and device working buffers required by cusolverMpSygvd().

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

ibtype

Host

In

Indicate the eigen problem type sub(A)*x=(lambda)*sub(B)*x, sub(A)*sub(B)x=(lambda)*x, or sub(B)*sub(A)*x=(lambda)*x.

jobz

Host

In

Indicate whether the routine computes eigenvalues only CUSOLVER_EIG_MODE_NOVECTOR or includes eigenvectors as well CUSOLVER_EIG_MODE_VECTOR.

uplo

Host

In

Indicate that lower CUBLAS_FILL_MODE_LOWER or upper CUBLAS_FILL_MODE_UPPER triangular of sub(A) and sub(B) are used to compute eigen solutions.

N

Host

In

Number of rows and columns of sub(A) and sub(B).

IA

Host

In

Row index of the first row of the sub(A). IA must be a multiple of the row blocking dimension MB_A.

JA

Host

In

Column index of the first column of the sub(A). JA must be a multiple of the column blocking dimension NB_A.

descA

Host

In

Matrix descriptor associated to the global matrix A.

IB

Host

In

Row index of the first row of the sub(B). IB must be a multiple of the row blocking dimension MB_B.

JB

Host

In

Column index of the first column of the sub(B). JB must be a multiple of the column blocking dimension NB_B.

descB

Host

In

Matrix descriptor associated to the global matrix B.

IZ

Host

In

Row index of the first row of the sub(Z). IZ must be a multiple of the row blocking dimension MB_Z.

JZ

Host

In

Column index of the first column of the sub(Z). JZ must be a multiple of the column blocking dimension NB_Z.

descZ

Host

In

Matrix descriptor associated to the global matrix Z.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

workspaceInBytesOnDevice

Host

Out

The size in bytes of the local device workspace needed by cusolverMpSygvd().

workspaceInBytesOnHost

Host

Out

The size in bytes of the local host workspace needed by cusolverMpSygvd().

The routine requires some alignment properties
  • Same square blocksize is used (MB == NB) for the matrix A, B, and Z.

  • The beginning row and column of A, B and Z are aligned each other i.e., (IA == IB == IZ) and (JA == JB == JZ).

Currently, only generalized eigenproblem type 1 (ibtype = CUSOLVER_EIG_TYPE_1) is supported. The current implementation also requires jobz = CUSOLVER_EIG_MODE_VECTOR, uplo = CUBLAS_FILL_MODE_LOWER, and full-matrix submatrix starts (IA == JA == IB == JB == IZ == JZ == 1).
This routine supports the following combinations of data types:

Data Type of A, B, and Z

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpLaset#

cusolverStatus_t cusolverMpLaset(
        cusolverMpHandle_t handle,
        cublasFillMode_t uplo,
        int64_t M,
        int64_t N,
        const void *alpha,
        const void *beta,
        void *d_A,
        int64_t IA,
        int64_t JA,
        cusolverMpMatrixDescriptor_t descA,
        int *d_info)
Initializes the off-diagonal elements of the M-by-N distributed submatrix A(IA:IA+M-1, JA:JA+N-1) with alpha and the diagonal elements with beta. This is the distributed equivalent of LAPACK’s xLASET.

The uplo parameter controls which part of the submatrix is initialized:
  • CUBLAS_FILL_MODE_LOWER: only the lower triangular part (below and including the first subdiagonal) is set to alpha, and diagonal elements are set to beta.

  • CUBLAS_FILL_MODE_UPPER: only the upper triangular part (above and including the first superdiagonal) is set to alpha, and diagonal elements are set to beta.

  • CUBLAS_FILL_MODE_FULL: all off-diagonal elements are set to alpha, and diagonal elements are set to beta.

The alpha and beta scalars may reside in either host or device memory. The pointer type is detected automatically at runtime.
This routine requires no workspace and does not perform any inter-process communication.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

uplo

Host

In

Specifies the part of the submatrix to initialize: CUBLAS_FILL_MODE_LOWER, CUBLAS_FILL_MODE_UPPER, or CUBLAS_FILL_MODE_FULL.

M

Host

In

Number of rows of the submatrix. M >= 0.

N

Host

In

Number of columns of the submatrix. N >= 0.

alpha

Host/Device

In

Scalar value for off-diagonal elements. Must match the data type of matrix A.

beta

Host/Device

In

Scalar value for diagonal elements. Must match the data type of matrix A.

d_A

Device

Out

Pointer into the local memory to an array of dimension (LLD_A, LOCc(JA+N-1)). On exit, the specified elements of the distributed submatrix are overwritten.

IA

Host

In

Row index of the first row of the submatrix. IA >= 1.

JA

Host

In

Column index of the first column of the submatrix. JA >= 1.

descA

Host

In

Matrix descriptor associated to the global matrix A.

d_info

Device

Out

Optional. d_info = 0 on success. d_info = -i indicates an invalid value for the i-th API argument after handle.

This routine supports the following data types (determined by the matrix descriptor):

Data Type of A

CUDA_R_32F

CUDA_R_64F

CUDA_C_32F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpNewtonSchulz#

cusolverStatus_t cusolverMpNewtonSchulz(
        cusolverMpHandle_t handle,
        cusolverMpNewtonSchulzDescriptor_t nsDesc,
        int64_t M,
        int64_t N,
        void *d_X,
        int64_t IX,
        int64_t JX,
        const cusolverMpMatrixDescriptor_t descX,
        int64_t numberOfNewtonSchulzIterations,
        const void *h_coeffs,
        cudaDataType_t computeType,
        void *d_work,
        size_t workspaceInBytesOnDevice,
        void *h_work,
        size_t workspaceInBytesOnHost,
        int *d_info)
Performs Newton-Schulz iterations to orthogonalize a tall or square (M >= N) distributed matrix X(IX:IX+M-1, JX:JX+N-1) in-place on supported Px1 process grids. The routine approximates the orthogonal polar factor U from the polar decomposition X = U * H, where U has orthonormal columns.

The routine performs a fixed number of user-specified iterations and does not check for convergence. The quality of the approximation depends on the number of iterations, the choice of coefficients, and the conditioning of the input matrix.

Algorithm. For the currently supported tall/square case (M >= N), each iteration i applies a polynomial update using three user-supplied coefficients (alpha_i, beta_i, gamma_i):
\[X \leftarrow \alpha_i \cdot X + \beta_i \cdot X (X^T X) + \gamma_i \cdot X (X^T X)^2\]
The input must be normalized for the iterations to converge. By default, the routine normalizes the input by its Frobenius norm: X := X / ||X||_F. This step can be disabled via the descriptor when the input is already normalized.

The coefficients h_coeffs must be provided as a host array of float triplets, with 3 * numberOfNewtonSchulzIterations elements stored as [alpha_0, beta_0, gamma_0, alpha_1, beta_1, gamma_1, ...]. See the Newton-Schulz sample for example coefficients optimized for quintic convergence in 5 iterations. The classical Newton-Schulz iteration can be recovered by setting (alpha, beta, gamma) = (1.5, -0.5, 0.0) for each iteration, though more iterations will be needed to converge.

Performance tip. For best collective communication performance, allocate the device workspace with cusolverMpMalloc(), or with ncclMemAlloc registered via cusolverMpBufferRegister(), before calling this routine.

Limitations:
  • Only Px1 process grids (1D row distribution with numColDevices = 1) are supported. 2D block-cyclic grids are not yet implemented.

  • Only tall or square matrices (M >= N) are supported. Wide rectangular matrices (M < N) are not yet supported.

  • Only IX = JX = 1 is supported (no submatrix offsets).

  • Only CUDA_R_16BF (bfloat16) and CUDA_R_32F (float32) value types are supported.

  • The only supported compute type is CUDA_R_32F.

  • RSRC = CSRC = 0 is required.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

nsDesc

Host

In

cusolverMpNewtonSchulzDescriptor_t descriptor (may be NULL for default behavior). See cusolverMpNewtonSchulzDescriptorCreate().

M

Host

In

Number of rows of the submatrix X. M >= 0.

N

Host

In

Number of columns of the submatrix X. N >= 0.

d_X

Device

In/Out

Pointer into the local memory to an array of dimension (LLD_X, LOCc(JX+N-1)). On entry, contains the input matrix. On exit, overwritten with the orthogonalized matrix.

IX

Host

In

Row index of the first row of the submatrix. IX >= 1.

JX

Host

In

Column index of the first column of the submatrix. JX >= 1.

descX

Host

In

Matrix descriptor associated to the global matrix X.

numberOfNewtonSchulzIterations

Host

In

Number of Newton-Schulz iterations to perform. >= 0. Typical value is 5.

h_coeffs

Host

In

Host array of triplets with 3 * numberOfNewtonSchulzIterations elements, storing the iteration coefficients (alpha, beta, gamma) for each iteration. The element type must match computeType.

computeType

Host

In

Data type used for computations. See table below for supported combinations.

d_work

Device

Out

Device workspace of size workspaceInBytesOnDevice.

workspaceInBytesOnDevice

Host

In

The size in bytes of the local device workspace needed by the routine as provided by cusolverMpNewtonSchulz_bufferSize().

h_work

Host

Out

Host workspace of size workspaceInBytesOnHost.

workspaceInBytesOnHost

Host

In

The size in bytes of the local host workspace needed by the routine as provided by cusolverMpNewtonSchulz_bufferSize().

d_info

Device

Out

Optional. d_info = 0 on success. d_info = -i indicates an invalid value for the i-th API argument after handle.

This routine supports the following combinations of data types:

Data Type of X

computeType

Output Data Type

CUDA_R_16BF

CUDA_R_32F

CUDA_R_16BF

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

See cusolverStatus_t for the description of the return status.

cusolverMpNewtonSchulz_bufferSize#

cusolverStatus_t cusolverMpNewtonSchulz_bufferSize(
        cusolverMpHandle_t handle,
        cusolverMpNewtonSchulzDescriptor_t nsDesc,
        int64_t M,
        int64_t N,
        void *d_X,
        int64_t IX,
        int64_t JX,
        const cusolverMpMatrixDescriptor_t descX,
        int64_t numberOfNewtonSchulzIterations,
        const void *h_coeffs,
        cudaDataType_t computeType,
        size_t *workspaceInBytesOnDevice,
        size_t *workspaceInBytesOnHost)
Computes the size in bytes of the host and device working buffers required by cusolverMpNewtonSchulz().
This routine has the same input constraints, supported data types, and current limitations as cusolverMpNewtonSchulz().

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

nsDesc

Host

In

Newton-Schulz descriptor (may be NULL).

M

Host

In

Number of rows of the submatrix X. M >= 0.

N

Host

In

Number of columns of the submatrix X. N >= 0.

d_X

Device

In

Pointer into the local memory to an array of dimension (LLD_X, LOCc(JX+N-1)).

IX

Host

In

Row index of the first row of the submatrix. IX >= 1.

JX

Host

In

Column index of the first column of the submatrix. JX >= 1.

descX

Host

In

Matrix descriptor associated to the global matrix X.

numberOfNewtonSchulzIterations

Host

In

Number of Newton-Schulz iterations to perform.

h_coeffs

Host

In

Host array of triplets with 3 * numberOfNewtonSchulzIterations elements, storing the iteration coefficients (alpha, beta, gamma) for each iteration. The element type must match computeType.

computeType

Host

In

Data type used for computations.

workspaceInBytesOnDevice

Host

Out

On output, contains the size in bytes of the local device workspace needed by cusolverMpNewtonSchulz().

workspaceInBytesOnHost

Host

Out

On output, contains the size in bytes of the local host workspace needed by cusolverMpNewtonSchulz().

This routine supports the same data type combinations as cusolverMpNewtonSchulz().
See cusolverStatus_t for the description of the return status.

cusolverMpPolar#

cusolverStatus_t cusolverMpPolar(
        cusolverMpHandle_t handle,
        cusolverMpPolarDescriptor_t polarDesc,
        cublasFillMode_t uplo,
        int64_t m,
        int64_t n,
        void *d_A,
        int64_t ia,
        int64_t ja,
        cusolverMpMatrixDescriptor_t descA,
        void *d_H,
        int64_t ih,
        int64_t jh,
        cusolverMpMatrixDescriptor_t descH,
        cudaDataType_t computeType,
        void *d_work,
        size_t workspaceInBytesOnDevice,
        void *h_work,
        size_t workspaceInBytesOnHost,
        int *d_info)
Computes a polar decomposition of a tall or square distributed matrix A(ia:ia+m-1, ja:ja+n-1), where m >= n. In the default unperturbed case, the decomposition satisfies A = Up * H. On exit, d_A is overwritten with the m-by-n polar factor Up. For full-rank inputs, Up has orthonormal columns (Up^H * Up = I). For rank-deficient or numerically singular inputs without a positive perturbation, Up is not guaranteed to have orthonormal columns; the inaccurate directions of Up lie in the null space of A, so they are filtered out in products with A. In the unperturbed case, the computed factors still satisfy ||A - Up * H||_F <= O(n) * eps * ||A||_F and ||H^2 - A^H * A||_F <= O(n) * eps * ||A||_F^2, where H = Up^H * A and eps is the machine precision of the compute type. If H is requested, d_H receives the n-by-n Hermitian positive semidefinite factor H after the always-on projection 0.5 * (H + H^H).

The routine uses the QR-based Dynamically Weighted Halley (QDWH) algorithm. If polarDesc is NULL or CUSOLVERMP_POLAR_DESCRIPTOR_ATTRIBUTE_REQUESTED_KSI is less than or equal to 0, no diagonal perturbation is applied. If REQUESTED_KSI is positive, that value is applied as a diagonal perturbation in original unscaled units. For perturbed square problems, the reported relation is A + ksi * I = Up * H. For perturbed rectangular problems, the reported relation is Up * H = Q_init * (R + ksi * I), where R is the n-by-n triangular factor and Q_init the orthonormal factor from the initial QR step. Equivalently, Up * H = A + ksi * Q_init, so the A-space residual ||A - Up * H||_F equals |ksi| * sqrt(n) in exact arithmetic.

uplo may be CUBLAS_FILL_MODE_FULL for a general tall or square input. uplo may be CUBLAS_FILL_MODE_UPPER only when m == n and the input is already upper triangular; in that case only the upper triangle is read.

Descriptors must use square tiles (MB == NB). The first tile of the submatrix must be owned by the same process row and process column as the first tile of the full matrix descriptor. In-bounds starts that are not tile-aligned or phase-preserving return CUSOLVER_STATUS_NOT_SUPPORTED.

descH selects whether H is computed and must be rank-uniform. To skip H computation, pass NULL for descH on all ranks; d_H, ih, and jh are then ignored. To compute H, pass a valid descH on all ranks and pass a non-NULL d_H on every rank that owns local storage for the requested submatrix H(ih:ih+n-1, jh:jh+n-1).

When H is requested, descH must be non-NULL on all ranks and compatible with descA: same communicator, process grid, grid layout, tile sizes, and data type. The n-by-n submatrix H(ih:ih+n-1, jh:jh+n-1) must be in bounds, and local d_H storage must not alias d_A or d_work.

If polarDesc is non-NULL, CUSOLVERMP_POLAR_DESCRIPTOR_ATTRIBUTE_A_NORM_FROBENIUS receives the Frobenius norm of the logical, unperturbed input before overwrite. With uplo = CUBLAS_FILL_MODE_UPPER, the ignored strict lower triangle is treated as zero. CUSOLVERMP_POLAR_DESCRIPTOR_ATTRIBUTE_RCOND_ESTIMATE receives an estimate of 1 / (||R||_1 ||R^{-1}||_1) for the initial unperturbed triangular factor R used to initialize the iteration. For a FULL input, R is the upper-triangular factor from QR of the logical input; for uplo = CUBLAS_FILL_MODE_UPPER, R is the input itself. Descriptor output attributes are reset to NaN at routine entry and populated only if the corresponding quantity is computed.

All control-flow inputs, including uplo, m, n, REQUESTED_KSI, and whether H is requested, must be identical on all ranks.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

polarDesc

Host

In

cusolverMpPolarDescriptor_t descriptor for perturbation control and scalar diagnostics. May be NULL for default behavior.

uplo

Host

In

Specifies the form of the input: CUBLAS_FILL_MODE_FULL for general input or CUBLAS_FILL_MODE_UPPER for square upper-triangular input.

m

Host

In

Number of rows of the submatrix A. m >= n.

n

Host

In

Number of columns of the submatrix A and order of H. n >= 0.

d_A

Device

In/Out

Pointer into the local memory for matrix A. On entry, contains the input submatrix. On exit, overwritten with the polar factor Up.

ia

Host

In

Row index of the first row of sub(A). Must satisfy the submatrix offset alignment rule above.

ja

Host

In

Column index of the first column of sub(A). Must satisfy the submatrix offset alignment rule above.

descA

Host

In

Matrix descriptor associated with A.

d_H

Device

Out

Pointer into the local memory for H when descH is non-NULL. Ignored when descH is NULL.

ih

Host

In

Row index of the first row of sub(H). Used only when H is requested.

jh

Host

In

Column index of the first column of sub(H). Used only when H is requested.

descH

Host

In

Matrix descriptor associated with H and the rank-uniform H-output selector. Pass NULL on all ranks to skip H, or the same valid descriptor on all ranks to compute H.

computeType

Host

In

Data type used for computation. Must match the data type of descA.

d_work

Device

Out

Device workspace of size workspaceInBytesOnDevice.

workspaceInBytesOnDevice

Host

In

The size in bytes of the local device workspace needed by the routine as provided by cusolverMpPolar_bufferSize().

h_work

Host

Out

Host workspace of size workspaceInBytesOnHost.

workspaceInBytesOnHost

Host

In

The size in bytes of the local host workspace needed by the routine as provided by cusolverMpPolar_bufferSize().

d_info

Device

Out

Optional. d_info = 0 on success. d_info = -i indicates an invalid value for the i-th API argument after handle. d_info > 0 indicates a QDWH convergence failure and is returned with CUSOLVER_STATUS_SUCCESS. CUSOLVER_STATUS_NOT_SUPPORTED leaves d_info untouched. Passing NULL suppresses these routine-specific positive reports.

This routine supports the following combinations of data types:

Data Type of A and H

computeType

Output Data Type

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_C_32F

CUDA_C_64F

CUDA_C_64F

CUDA_C_64F

See cusolverStatus_t for the description of the return status.

cusolverMpPolar_bufferSize#

cusolverStatus_t cusolverMpPolar_bufferSize(
        cusolverMpHandle_t handle,
        cusolverMpPolarDescriptor_t polarDesc,
        cublasFillMode_t uplo,
        int64_t m,
        int64_t n,
        const void *d_A,
        int64_t ia,
        int64_t ja,
        cusolverMpMatrixDescriptor_t descA,
        const void *d_H,
        int64_t ih,
        int64_t jh,
        cusolverMpMatrixDescriptor_t descH,
        cudaDataType_t computeType,
        size_t *workspaceInBytesOnDevice,
        size_t *workspaceInBytesOnHost)
Computes the size in bytes of the host and device working buffers required by cusolverMpPolar().

This routine has the same input constraints, supported data types, descriptor compatibility requirements, and rank-uniformity requirements as cusolverMpPolar(). To exclude H computation from the workspace query, pass NULL for descH. To include H computation, pass a valid descH. The query does not inspect d_H.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

polarDesc

Host

In

Polar descriptor. May be NULL for default behavior.

uplo

Host

In

Specifies the form of the input: CUBLAS_FILL_MODE_FULL or CUBLAS_FILL_MODE_UPPER.

m

Host

In

Number of rows of the submatrix A. m >= n.

n

Host

In

Number of columns of the submatrix A and order of H. n >= 0.

d_A

Device

In

Pointer into the local memory for matrix A.

ia

Host

In

Row index of the first row of sub(A). Must satisfy the submatrix offset alignment rule for cusolverMpPolar().

ja

Host

In

Column index of the first column of sub(A). Must satisfy the submatrix offset alignment rule for cusolverMpPolar().

descA

Host

In

Matrix descriptor associated with A.

d_H

Device

In

Not inspected by the workspace query. descH selects whether H workspace is included.

ih

Host

In

Row index of the first row of sub(H). Used only when H computation is included.

jh

Host

In

Column index of the first column of sub(H). Used only when H computation is included.

descH

Host

In

Matrix descriptor associated with H and the H-workspace selector. Pass NULL to exclude H workspace or a valid descriptor to include it.

computeType

Host

In

Data type used for computation. Must match the data type of descA.

workspaceInBytesOnDevice

Host

Out

On output, contains the size in bytes of the local device workspace needed by cusolverMpPolar().

workspaceInBytesOnHost

Host

Out

On output, contains the size in bytes of the local host workspace needed by cusolverMpPolar().

This routine supports the same data type combinations as cusolverMpPolar().
See cusolverStatus_t for the description of the return status.

cusolverMpGesvd#

cusolverStatus_t cusolverMpGesvd(
        cusolverMpHandle_t handle,
        cusolverMpGesvdDescriptor_t gesvdDesc,
        cusolverEigMode_t jobu,
        cusolverEigMode_t jobvt,
        int64_t m,
        int64_t n,
        void *d_A,
        int64_t ia,
        int64_t ja,
        cusolverMpMatrixDescriptor_t descA,
        void *d_S,
        void *d_U,
        int64_t iu,
        int64_t ju,
        cusolverMpMatrixDescriptor_t descU,
        void *d_VT,
        int64_t ivt,
        int64_t jvt,
        cusolverMpMatrixDescriptor_t descVT,
        cudaDataType_t computeType,
        void *d_work,
        size_t workspaceInBytesOnDevice,
        void *h_work,
        size_t workspaceInBytesOnHost,
        int *d_info)
Computes the singular value decomposition A = U * Sigma * V^H of the distributed submatrix A(ia:ia+m-1, ja:ja+n-1). The routine supports both tall (m >= n) and wide (m < n) inputs.

Let k = min(m,n). The singular values are written in descending order to the replicated device vector d_S of length k on every rank. By default, requested singular-vector outputs use THIN shape: if jobu is CUSOLVER_EIG_MODE_VECTOR, d_U receives the m-by-k thin left singular vectors; if jobvt is CUSOLVER_EIG_MODE_VECTOR, d_VT receives the k-by-n thin right singular vectors as V^H. Set CUSOLVERMP_GESVD_DESCRIPTOR_ATTRIBUTE_SHAPE to CUSOLVERMP_GESVD_OUTPUT_SHAPE_FULL to request full factors: U is m by m and V^H is n by n. If either mode is CUSOLVER_EIG_MODE_NOVECTOR, the corresponding pointer, descriptor, and offsets are ignored.

The input window A(ia:ia+m-1, ja:ja+n-1) must fit inside descA. Its offsets must be at least 1 and must start on a source-owned tile boundary in descA; bounds failures return CUSOLVER_STATUS_INVALID_VALUE and tile/phase failures return CUSOLVER_STATUS_NOT_SUPPORTED. When a factor is requested, its submatrix offsets must be at least 1 and must start on a source-owned tile boundary in the parent descriptor. The requested output window must also fit inside the parent descriptor. THIN requires descU.M >= iu - 1 + m and descU.N >= ju - 1 + k for U, and descVT.M >= ivt - 1 + k and descVT.N >= jvt - 1 + n for V^H. FULL requires descU.M >= iu - 1 + m and descU.N >= ju - 1 + m for U, and descVT.M >= ivt - 1 + n and descVT.N >= jvt - 1 + n for V^H. Larger parent descriptors are allowed as storage capacity; the descriptor shape attribute, not descriptor capacity alone, selects FULL.

descA and the descriptors for requested U and V^H outputs must use square tiles (MB == NB) and RSRC = CSRC = 0. Requested output descriptors must also be structurally compatible with descA: same communicator, grid layout, process grid dimensions, tile sizes, and source ranks. Unsupported structural mismatches return CUSOLVER_STATUS_NOT_SUPPORTED. computeType must be one of the supported GESVD compute types and must match the data type of descA and every requested output descriptor; datatype mismatches return CUSOLVER_STATUS_INVALID_VALUE. Local-memory overlap between d_S and requested A, U, or V^H storage, or between the requested A, U, and V^H windows, is not supported and returns CUSOLVER_STATUS_NOT_SUPPORTED. The input storage d_A may be overwritten.

For non-empty problems, d_A and replicated d_S must be non-NULL on every rank. When jobu or jobvt requests vectors, d_U or d_VT must also be non-NULL on every rank, including ranks that own no local elements of the corresponding distributed window; empty-owner ranks may pass a minimal dummy allocation. In CUSOLVER_EIG_MODE_NOVECTOR mode, the corresponding pointer, descriptor, and offsets are ignored.

If gesvdDesc is non-NULL, descriptor attributes control optional behavior, and diagnostic output attributes are reset at routine entry and populated as the algorithm progresses. Query output attributes after the call returns using cusolverMpGesvdDescriptorGetAttribute(). Passing NULL uses default attributes and discards diagnostics.

GESVD computes the singular value decomposition of the original input matrix; no diagonal perturbation is applied. Requested singular-vector factors are orthonormal even for rank-deficient or numerically singular inputs. FULL-shape outputs include an orthonormal completion of the corresponding subspace.

All control-flow inputs, including jobu, jobvt, m, n, computeType, ia, ja, the requested-output offsets iu, ju, ivt, and jvt when the corresponding vector factor is requested, and GESVD descriptor input attributes (COMPUTE_RESIDUAL, SHAPE, and future attributes that affect behavior), must be identical on all ranks.

Performance tip. For best collective communication performance, allocate the device workspace with cusolverMpMalloc(), or with ncclMemAlloc registered via cusolverMpBufferRegister(), before calling this routine.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

gesvdDesc

Host

In

cusolverMpGesvdDescriptor_t descriptor for attributes and scalar diagnostics. May be NULL to use defaults and discard diagnostics.

jobu

Host

In

Specifies whether to compute left singular vectors: CUSOLVER_EIG_MODE_VECTOR or CUSOLVER_EIG_MODE_NOVECTOR.

jobvt

Host

In

Specifies whether to compute right singular vectors as V^H: CUSOLVER_EIG_MODE_VECTOR or CUSOLVER_EIG_MODE_NOVECTOR.

m

Host

In

Number of rows of the submatrix A. m >= 0.

n

Host

In

Number of columns of the submatrix A. n >= 0.

d_A

Device

In/Out

Pointer into the local memory for matrix A. Required on every rank for non-empty problems; empty-owner ranks may pass a minimal dummy allocation. The input contents may be overwritten.

ia

Host

In

Row index of the first row of sub(A). Must be at least 1, fit the requested A window inside descA, and start on a source-owned tile boundary.

ja

Host

In

Column index of the first column of sub(A). Must be at least 1, fit the requested A window inside descA, and start on a source-owned tile boundary.

descA

Host

In

Matrix descriptor associated with A.

d_S

Device

Out

Replicated device vector of length min(m,n) that receives singular values on every rank. Required on every rank when min(m,n) > 0. The element type is the real companion of computeType.

d_U

Device

Out

Pointer into the local memory for U. When jobu is CUSOLVER_EIG_MODE_VECTOR, required on every rank for non-empty problems; empty-owner ranks may pass a minimal dummy allocation. Ignored when jobu is CUSOLVER_EIG_MODE_NOVECTOR.

iu

Host

In

Row index of the first row of sub(U). Used only when jobu is CUSOLVER_EIG_MODE_VECTOR and must start on a source-owned tile boundary.

ju

Host

In

Column index of the first column of sub(U). Used only when jobu is CUSOLVER_EIG_MODE_VECTOR and must start on a source-owned tile boundary.

descU

Host

In

Matrix descriptor associated with U. Used only when jobu is CUSOLVER_EIG_MODE_VECTOR.

d_VT

Device

Out

Pointer into the local memory for V^H. When jobvt is CUSOLVER_EIG_MODE_VECTOR, required on every rank for non-empty problems; empty-owner ranks may pass a minimal dummy allocation. Ignored when jobvt is CUSOLVER_EIG_MODE_NOVECTOR.

ivt

Host

In

Row index of the first row of sub(VT). Used only when jobvt is CUSOLVER_EIG_MODE_VECTOR and must start on a source-owned tile boundary.

jvt

Host

In

Column index of the first column of sub(VT). Used only when jobvt is CUSOLVER_EIG_MODE_VECTOR and must start on a source-owned tile boundary.

descVT

Host

In

Matrix descriptor associated with V^H. Used only when jobvt is CUSOLVER_EIG_MODE_VECTOR.

computeType

Host

In

Data type used for computation. Must match the data type of descA.

d_work

Device

Out

Device workspace of size workspaceInBytesOnDevice.

workspaceInBytesOnDevice

Host

In

The size in bytes of the local device workspace needed by the routine as provided by cusolverMpGesvd_bufferSize().

h_work

Host

Out

Host workspace of size workspaceInBytesOnHost.

workspaceInBytesOnHost

Host

In

The size in bytes of the local host workspace needed by the routine as provided by cusolverMpGesvd_bufferSize().

d_info

Device

Out

Optional. d_info = 0 on success; d_info = -i means the i-th argument after handle is illegal; d_info = 1 means singular-value computation did not complete; and d_info = 2 means all singular values were produced but requested singular-vector computation did not complete. Positive values are returned with CUSOLVER_STATUS_SUCCESS. On d_info = 1, d_S and all requested singular-vector outputs are unspecified. On d_info = 2, d_S contains all min(m,n) singular values in descending order, but all requested singular-vector outputs are unspecified. Passing NULL suppresses device-side info reporting while preserving the host status. Singular values are always returned as nonnegative; small negative rounding artifacts are clamped to zero.

This routine supports the following combinations of data types:

Data Type of A, U, and VT

computeType

Output Data Type of S

CUDA_R_32F

CUDA_R_32F

CUDA_R_32F

CUDA_R_64F

CUDA_R_64F

CUDA_R_64F

CUDA_C_32F

CUDA_C_32F

CUDA_R_32F

CUDA_C_64F

CUDA_C_64F

CUDA_R_64F

See cusolverStatus_t for the description of the return status.

cusolverMpGesvd_bufferSize#

cusolverStatus_t cusolverMpGesvd_bufferSize(
        cusolverMpHandle_t handle,
        cusolverMpGesvdDescriptor_t gesvdDesc,
        cusolverEigMode_t jobu,
        cusolverEigMode_t jobvt,
        int64_t m,
        int64_t n,
        const void *d_A,
        int64_t ia,
        int64_t ja,
        cusolverMpMatrixDescriptor_t descA,
        const void *d_S,
        const void *d_U,
        int64_t iu,
        int64_t ju,
        cusolverMpMatrixDescriptor_t descU,
        const void *d_VT,
        int64_t ivt,
        int64_t jvt,
        cusolverMpMatrixDescriptor_t descVT,
        cudaDataType_t computeType,
        size_t *workspaceInBytesOnDevice,
        size_t *workspaceInBytesOnHost)
Computes the size in bytes of the host and device working buffers required by cusolverMpGesvd().

This routine has the same scalar input constraints, supported data types, descriptor compatibility requirements, and rank-uniformity requirements as cusolverMpGesvd(). Workspace depends on the matrix shape, submatrix offsets, whether U and V^H are requested, and GESVD descriptor attributes; query workspace with the same control-flow inputs and descriptor attributes used for execution. The device pointer values d_A, d_S, d_U, and d_VT are not dereferenced by the workspace query.

Parameter

Memory

In/Out

Description

handle

Host

In

cuSOLVERMp library handle.

gesvdDesc

Host

In

Singular value decomposition descriptor. May be NULL to use defaults and discard diagnostics.

jobu

Host

In

Specifies whether to compute left singular vectors: CUSOLVER_EIG_MODE_VECTOR or CUSOLVER_EIG_MODE_NOVECTOR.

jobvt

Host

In

Specifies whether to compute right singular vectors as V^H: CUSOLVER_EIG_MODE_VECTOR or CUSOLVER_EIG_MODE_NOVECTOR.

m

Host

In

Number of rows of the submatrix A. m >= 0.

n

Host

In

Number of columns of the submatrix A. n >= 0.

d_A

Device

In

Pointer argument corresponding to matrix A. Not dereferenced by this workspace query.

ia

Host

In

Row index of the first row of sub(A).

ja

Host

In

Column index of the first column of sub(A).

descA

Host

In

Matrix descriptor associated with A.

d_S

Device

In

Pointer argument corresponding to the replicated singular-value vector. Not dereferenced by this workspace query.

d_U

Device

In

Pointer argument corresponding to U. Not dereferenced by this workspace query.

iu

Host

In

Row index of the first row of sub(U). Used only when jobu is CUSOLVER_EIG_MODE_VECTOR and must start on a source-owned tile boundary.

ju

Host

In

Column index of the first column of sub(U). Used only when jobu is CUSOLVER_EIG_MODE_VECTOR and must start on a source-owned tile boundary.

descU

Host

In

Matrix descriptor associated with U. Used only when jobu is CUSOLVER_EIG_MODE_VECTOR.

d_VT

Device

In

Pointer argument corresponding to V^H. Not dereferenced by this workspace query.

ivt

Host

In

Row index of the first row of sub(VT). Used only when jobvt is CUSOLVER_EIG_MODE_VECTOR and must start on a source-owned tile boundary.

jvt

Host

In

Column index of the first column of sub(VT). Used only when jobvt is CUSOLVER_EIG_MODE_VECTOR and must start on a source-owned tile boundary.

descVT

Host

In

Matrix descriptor associated with V^H. Used only when jobvt is CUSOLVER_EIG_MODE_VECTOR.

computeType

Host

In

Data type used for computation. Must match the data type of descA.

workspaceInBytesOnDevice

Host

Out

On output, contains the size in bytes of the local device workspace needed by cusolverMpGesvd().

workspaceInBytesOnHost

Host

Out

On output, contains the size in bytes of the local host workspace needed by cusolverMpGesvd().

This routine supports the same data type combinations as cusolverMpGesvd().
See cusolverStatus_t for the description of the return status.