Matmul algorithm functions

Matmul algorithm functions#

hipSPARSELt: Matmul algorithm functions
Matmul algorithm functions

Functions

hipsparseStatus_t hipsparseLtMatmulAlgSelectionInit (const hipsparseLtHandle_t *handle, hipsparseLtMatmulAlgSelection_t *algSelection, const hipsparseLtMatmulDescriptor_t *matmulDescr, hipsparseLtMatmulAlg_t alg)
 Initializes the algorithm selection descriptor.
hipsparseStatus_t hipsparseLtMatmulAlgSelectionDestroy (const hipsparseLtMatmulAlgSelection_t *algSelection)
 Destroy the algorithm selection descriptor.
hipsparseStatus_t hipsparseLtMatmulAlgSetAttribute (const hipsparseLtHandle_t *handle, hipsparseLtMatmulAlgSelection_t *algSelection, hipsparseLtMatmulAlgAttribute_t attribute, const void *data, size_t dataSize)
 Specify the algorithm attribute of a algorithm selection descriptor.
hipsparseStatus_t hipsparseLtMatmulAlgGetAttribute (const hipsparseLtHandle_t *handle, const hipsparseLtMatmulAlgSelection_t *algSelection, hipsparseLtMatmulAlgAttribute_t attribute, void *data, size_t dataSize)
 Get the specific algorithm attribute from the algorithm selection descriptor.

Detailed Description

Provides algorithms for matrix multiply operations.

Function Documentation

◆ hipsparseLtMatmulAlgGetAttribute()

hipsparseStatus_t hipsparseLtMatmulAlgGetAttribute ( const hipsparseLtHandle_t * handle,
const hipsparseLtMatmulAlgSelection_t * algSelection,
hipsparseLtMatmulAlgAttribute_t attribute,
void * data,
size_t dataSize )

Get the specific algorithm attribute from the algorithm selection descriptor.

hipsparseLtMatmulAlgGetAttribute returns the value of the queried attribute belonging to the algorithm selection descriptor.

Parameters
[in]handlethe hipsparselt handle.
[in]algSelectionthe algorithm selection descriptor.
[in]attributeattributes are specified in hipsparseLtMatmulAlgAttribute_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, algSelection, attribute, data, or dataSize is invalid.
HIPSPARSE_STATUS_NOT_SUPPORTEDattribute is not supported.

◆ hipsparseLtMatmulAlgSelectionDestroy()

hipsparseStatus_t hipsparseLtMatmulAlgSelectionDestroy ( const hipsparseLtMatmulAlgSelection_t * algSelection)

Destroy the algorithm selection descriptor.

hipsparseLtMatmulAlgSelectionDestroy releases the resources used by an instance of the algorithm selection. This function is the last call with a specific algorithm selection instance.

Parameters
[in]algSelectionthe algorithm selection descriptor
Return values
HIPSPARSE_STATUS_SUCCESSthe operation completed successfully.
HIPSPARSE_STATUS_INVALID_VALUEalgSelection is invalid.

◆ hipsparseLtMatmulAlgSelectionInit()

hipsparseStatus_t hipsparseLtMatmulAlgSelectionInit ( const hipsparseLtHandle_t * handle,
hipsparseLtMatmulAlgSelection_t * algSelection,
const hipsparseLtMatmulDescriptor_t * matmulDescr,
hipsparseLtMatmulAlg_t alg )

Initializes the algorithm selection descriptor.

hipsparseLtMatmulAlgSelectionInit creates a algorithm selection descriptor.

Parameters
[in]handlethe hipsparselt handle.
[out]algSelectionthe pointer to the algorithm selection descriptor.
[in]matmulDescrthe matrix multiplication descriptor.
[in]algthe algorithm used to perform the matrix multiplication.
Return values
HIPSPARSE_STATUS_SUCCESSthe operation completed successfully.
HIPSPARSE_STATUS_INVALID_VALUEhandle, matmulDescr, or algSelection is invalid.

◆ hipsparseLtMatmulAlgSetAttribute()

hipsparseStatus_t hipsparseLtMatmulAlgSetAttribute ( const hipsparseLtHandle_t * handle,
hipsparseLtMatmulAlgSelection_t * algSelection,
hipsparseLtMatmulAlgAttribute_t attribute,
const void * data,
size_t dataSize )

Specify the algorithm attribute of a algorithm selection descriptor.

hipsparseLtMatmulAlgSetAttribute sets the value of the specified attribute belonging to a algorithm selection descriptor.

Parameters
[in]handlethe hipsparselt handle.
[in,out]algSelectionthe algorithm selection descriptor.
[in]attributeattributes are specified in hipsparseLtMatmulAlgAttribute_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, algSelection, attribute, data, or dataSize is invalid.
HIPSPARSE_STATUS_NOT_SUPPORTEDattribute is not supported.