Matmul descriptor functions

Matmul descriptor functions#

hipSPARSELt: Matmul descriptor functions
Matmul descriptor functions

Functions

hipsparseStatus_t hipsparseLtMatmulDescriptorInit (const hipsparseLtHandle_t *handle, hipsparseLtMatmulDescriptor_t *matmulDescr, hipsparseOperation_t opA, hipsparseOperation_t opB, const hipsparseLtMatDescriptor_t *matA, const hipsparseLtMatDescriptor_t *matB, const hipsparseLtMatDescriptor_t *matC, const hipsparseLtMatDescriptor_t *matD, hipsparseLtComputetype_t computeType)
 Initializes the matrix multiplication descriptor. More...
 
hipsparseStatus_t hipsparseLtMatmulDescSetAttribute (const hipsparseLtHandle_t *handle, hipsparseLtMatmulDescriptor_t *matmulDescr, hipsparseLtMatmulDescAttribute_t matmulAttribute, const void *data, size_t dataSize)
 Specify the matrix attribute of a matrix descriptor. More...
 
hipsparseStatus_t hipsparseLtMatmulDescGetAttribute (const hipsparseLtHandle_t *handle, const hipsparseLtMatmulDescriptor_t *matmulDescr, hipsparseLtMatmulDescAttribute_t matmulAttribute, void *data, size_t dataSize)
 Get the matrix type of a matrix descriptor. More...
 

Detailed Description

Defines how to matrix multiply

Function Documentation

◆ hipsparseLtMatmulDescGetAttribute()

hipsparseStatus_t hipsparseLtMatmulDescGetAttribute ( const hipsparseLtHandle_t handle,
const hipsparseLtMatmulDescriptor_t matmulDescr,
hipsparseLtMatmulDescAttribute_t  matmulAttribute,
void *  data,
size_t  dataSize 
)

Get the matrix type of a matrix descriptor.

hipsparseLtMatmulDescGetAttribute returns the matrix attribute of a matrix descriptor

Parameters
[in]handlethe hipsparselt handle
[in]matmulDescrthe matrix multiplication descriptor
[in]matmulAttributesee hipsparseLtMatmulDescAttribute_t
[in,out]datathe memory address containing the attribute value retrieved by this function
[in]dataSizesize in bytes of the attribute value used for verification.
Return values
HIPSPARSE_STATUS_SUCCESSthe operation completed successfully.
HIPSPARSE_STATUS_INVALID_VALUEhandle , matDescr , data or dataSize is invalid.
HIPSPARSE_STATUS_NOT_SUPPORTEDhipsparseLtMatmulDescAttribute_t is not supported.

◆ hipsparseLtMatmulDescriptorInit()

hipsparseStatus_t hipsparseLtMatmulDescriptorInit ( const hipsparseLtHandle_t handle,
hipsparseLtMatmulDescriptor_t matmulDescr,
hipsparseOperation_t  opA,
hipsparseOperation_t  opB,
const hipsparseLtMatDescriptor_t matA,
const hipsparseLtMatDescriptor_t matB,
const hipsparseLtMatDescriptor_t matC,
const hipsparseLtMatDescriptor_t matD,
hipsparseLtComputetype_t  computeType 
)

Initializes the matrix multiplication descriptor.

hipsparseLtMatmulDescriptorInit creates a matrix multiplication descriptor.

Parameters
[in]handlethe hipsparselt handle
[in,out]matmulDescrthe matrix multiplication descriptor
[in]opAhipsparse operation for Matrix A. HIPSPARSE_OPERATION_NON_TRANSPOSE or HIPSPARSE_OPERATION_TRANSPOSE
[in]opBhipsparse operation for Matrix B. HIPSPARSE_OPERATION_NON_TRANSPOSE or HIPSPARSE_OPERATION_TRANSPOSE
[in]matAthe matrix descriptor (only and must one of matA or matB is a structured sparsity matrix)
[in]matBthe matrix descriptor (only and must one of matA or matB is a structured sparsity matrix)
[in]matCthe matrix descriptor (dense matrix)
[in]matDthe matrix descriptor (dense matrix)
[in]computeTypesize in bytes of the attribute value used for verification.
Return values
HIPSPARSE_STATUS_SUCCESSthe operation completed successfully.
HIPSPARSE_STATUS_INVALID_VALUEhandle , matmulDescr , opA , opB , matA , matB , matC , matD or computeType ,is invalid.
HIPSPARSE_STATUS_NOT_SUPPORTEDopA , opB or computeType is invalid.

◆ hipsparseLtMatmulDescSetAttribute()

hipsparseStatus_t hipsparseLtMatmulDescSetAttribute ( const hipsparseLtHandle_t handle,
hipsparseLtMatmulDescriptor_t matmulDescr,
hipsparseLtMatmulDescAttribute_t  matmulAttribute,
const void *  data,
size_t  dataSize 
)

Specify the matrix attribute of a matrix descriptor.

hipsparseLtMatmulDescSetAttribute sets the value of the specified attribute belonging to matrix descr such as number of batches and their stride.

Parameters
[in]handlethe hipsparselt handle
[in,out]matmulDescrthe matrix multiplication descriptor
[in]matmulAttributesee hipsparseLtMatmulDescAttribute_t
[in]datapointer to the value to which the specified attribute will be set.
[in]dataSizesize in bytes of the attribute value used for verification.
Return values
HIPSPARSE_STATUS_SUCCESSthe operation completed successfully.
HIPSPARSE_STATUS_INVALID_VALUEhandle , matDescr , data or dataSize is invalid.
HIPSPARSE_STATUS_NOT_SUPPORTEDhipsparseLtMatmulDescAttribute_t is not supported.