rocm.bindings.hipsparselt#
2026-09-24
31 min read time
Advanced Micro Devices, Inc.
Classes#
Handle to the hipSPARSELt library context queue. |
|
Descriptor of the matrix. |
|
Descriptor of the matrix multiplication operation. |
|
Descriptor of the matrix multiplication algorithm. |
|
Descriptor of the matrix multiplication execution plan |
|
Specify the sparsity of the structured matrix. |
|
Specify the additional attributes of a matrix descriptor. |
|
Specify the compute precision modes of the matrix. |
|
Specify the additional attributes of a matrix multiplication descriptor. |
|
Specify the algorithm for matrix-matrix multiplication. |
|
Specify the matrix multiplication algorithm attributes. |
|
Specify the pruning algorithm to apply to the structured matrix before the compression. |
|
Specify the Split-K mode value. |
Functions#
|
|
Initialize hipSPARSELt for the current HIP device. |
|
|
Retrieve the version number of the hipSPARSELt library. |
|
Retrieve the value of the requested property. |
|
(No short description, might be part of a group.) |
(No short description, might be part of a group.) |
|
|
Create a hipSPARSELt handle |
|
Destroy a hipSPARSELt handle. |
|
Create a descriptor for a dense matrix |
|
Create a descriptor for a structured matrix. |
|
Destroy a matrix descriptor. |
|
Specify the matrix attribute of a matrix descriptor. |
|
Get the matrix type of a matrix descriptor. |
|
Initializes the matrix multiplication descriptor. |
|
Specify the matrix attribute of a matrix descriptor. |
|
Get the matrix type of a matrix descriptor. |
|
Initializes the algorithm selection descriptor. |
|
Destroy the algorithm selection descriptor. |
|
Specify the algorithm attribute of a algorithm selection descriptor. |
|
Get the specific algorithm attribute from the algorithm selection descriptor. |
|
Determines the required workspace size. |
|
Initializes the matrix multiplication plan descriptor. |
Destroy a matrix multiplication plan descriptor. |
|
|
Sparse matrix and dense matrix multiplication. |
|
Sparse matrix and dense matrix multiplication |
|
Prune a dense matrix. |
|
Check the correctness of the pruning structure for a given matrix. |
|
Prune a dense matrix. |
|
Check the correctness of the pruning structure for a given matrix. |
|
Provide the size of the compressed matrix. |
|
Compress a dense matrix to structured matrix. |
|
Provide the size of the compressed matrix. |
|
Compress a dense matrix to structured matrix. |
Module Contents#
- class rocm.bindings.hipsparselt.hipsparseLtHandle_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerHandle to the hipSPARSELt library context queue.
The hipSPARSELt handle is a structure holding the hipSPARSELt library context. It must be initialized using
hipsparseLtInitand the returned handle must be passed to all subsequent library function calls. It should be destroyed at the end usinghipsparseLtDestroy.- data: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.hipsparselt.hipsparseLtMatDescriptor_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerDescriptor of the matrix.
The hipSPARSELt matrix descriptor is a structure holding all properties of a matrix. It must be initialized using
hipsparseLtDenseDescriptorInitand the returned descriptor must be passed to all subsequent library calls that involve the matrix. It should be destroyed at the end usinghipsparseLtMatDescriptorDestroy.- data: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.hipsparselt.hipsparseLtMatmulDescriptor_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerDescriptor of the matrix multiplication operation.
The hipSPARSELt matrix multiplication descriptor is a structure holding the description of the matrix multiplication operation. It is initialized with the
hipsparseLtMatmulDescriptorInitfunction.- data: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.hipsparselt.hipsparseLtMatmulAlgSelection_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerDescriptor of the matrix multiplication algorithm.
It is initialized with the
hipsparseLtMatmulAlgSelectionInitfunction.- data: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.hipsparselt.hipsparseLtMatmulPlan_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerDescriptor of the matrix multiplication execution plan
The hipSPARSELt matrix multiplication execution plan descriptor is a structure holding all the information necessary to execute the
hipsparseLtMatmuloperation. It is initialized and destroyed using thehipsparseLtMatmulPlanInitandhipsparseLtMatmulPlanDestroyfunctions, respectively.- data: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.hipsparselt.hipsparseLtSparsity_t#
Bases:
enum.IntEnumSpecify the sparsity of the structured matrix.
The enumerator specifies the sparsity ratio of the structured matrix as sparsity = nnz / total elements. The sparsity property is used in the
hipsparseLtStructuredDescriptorInitfunction.
- class rocm.bindings.hipsparselt.hipsparseLtMatDescAttribute_t#
Bases:
enum.IntEnumSpecify the additional attributes of a matrix descriptor.
The
hipsparseLtMatDescAttribute_tenumeration is used in thehipsparseLtMatDescSetAttributeandhipsparseLtMatDescGetAttributefunctions.
- class rocm.bindings.hipsparselt.hipsparseLtComputetype_t#
Bases:
enum.IntEnumSpecify the compute precision modes of the matrix.
- class rocm.bindings.hipsparselt.hipsparseLtMatmulDescAttribute_t#
Bases:
enum.IntEnumSpecify the additional attributes of a matrix multiplication descriptor.
The
hipsparseLtMatmulDescAttribute_tenumeration is used in thehipsparseLtMatmulDescSetAttributeandhipsparseLtMatmulDescGetAttributefunctions.
- class rocm.bindings.hipsparselt.hipsparseLtMatmulAlg_t#
Bases:
enum.IntEnumSpecify the algorithm for matrix-matrix multiplication.
The
hipsparseLtMatmulAlg_tenumeration is used in thehipsparseLtMatmulAlgSelectionInitfunction.
- class rocm.bindings.hipsparselt.hipsparseLtMatmulAlgAttribute_t#
Bases:
enum.IntEnumSpecify the matrix multiplication algorithm attributes.
The
hipsparseLtMatmulAlgAttribute_tenumeration is used in thehipsparseLtMatmulAlgGetAttributeandhipsparseLtMatmulAlgSetAttributefunctions.
- class rocm.bindings.hipsparselt.hipsparseLtPruneAlg_t#
Bases:
enum.IntEnumSpecify the pruning algorithm to apply to the structured matrix before the compression.
The
hipsparseLtPruneAlg_tenumeration is used in thehipsparseLtSpMMAPruneandhipsparseLtSpMMAPrune2functions.
- class rocm.bindings.hipsparselt.hipsparseLtSplitKMode_t#
Bases:
enum.IntEnumSpecify the Split-K mode value.
The
hipsparseLtSplitKMode_tenumeration is used by theHIPSPARSELT_MATMUL_SPLIT_K_MODEattribute inhipsparseLtMatmulAlgAttribute_t.
- rocm.bindings.hipsparselt.hipsparseLtInitialize()#
Initialize hipSPARSELt for the current HIP device.
hipsparseLtInitializeInitialize hipSPARSELt for the current HIP device to avoid costly startup time at the first call on that device. This function is only supported by the HIP backend.- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t:Always returns
HIPSPARSE_STATUS_SUCCESS.
C signature
void hipsparseLtInitialize()
- rocm.bindings.hipsparselt.hipsparseLtGetVersion(handle)#
Retrieve the version number of the hipSPARSELt library.
hipsparseLtGetVersionreturns the version number of the hipSPARSELt library.- Args:
- handle (
hipsparseLtHandle_t/object) – IN: hipsparselt library handle.
- handle (
- Returns:
A
tupleof size 2 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_INVALID_VALUE: thehandleis invalid.
int:the version number of the library.
C signature
hipsparseStatus_t hipsparseLtGetVersion(const hipsparseLtHandle_t * handle, int * version)
- rocm.bindings.hipsparselt.hipsparseLtGetProperty(propertyType)#
Retrieve the value of the requested property.
hipsparseLtGetPropertyreturns the value of the requested property.- Args:
- propertyType (
hipLibraryPropertyType) – IN: hipLibraryPropertyType property type (as defined in library_types.h).
- propertyType (
- Returns:
A
tupleof size 2 that contains (in that order):int:value of the requested property.
C signature
hipsparseStatus_t hipsparseLtGetProperty(hipLibraryPropertyType propertyType, int * value)
- rocm.bindings.hipsparselt.hipsparseLtGetGitRevision(handle, rev)#
(No short description, might be part of a group.)
- Args:
- handle (
hipsparseLtHandle_t): (undocumented)
- rev (
Pointer/object): (undocumented)
- handle (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: (undocumented)
C signature
hipsparseStatus_t hipsparseLtGetGitRevision(hipsparseLtHandle_t handle, char * rev)
- rocm.bindings.hipsparselt.hipsparseLtGetArchName()#
(No short description, might be part of a group.)
- Returns:
A
tupleof size 2 that contains (in that order):hipsparseStatus_t: (undocumented)
C signature
hipsparseStatus_t hipsparseLtGetArchName(char ** archName)
- rocm.bindings.hipsparselt.hipsparseLtInit(handle)#
Create a hipSPARSELt handle
hipsparseLtInitcreates the hipSPARSELt library context. It must be initialized before any other hipSPARSELt API function is invoked and must be passed to all subsequent library function calls. The handle should be destroyed at the end usinghipsparseLtDestroy_handle().- Args:
- handle (
hipsparseLtHandle_t/object) – OUT: hipsparselt library handle.
- handle (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the initialization succeeded.HIPSPARSE_STATUS_INVALID_VALUE: thehandleis invalid.
C signature
hipsparseStatus_t hipsparseLtInit(hipsparseLtHandle_t * handle)
- rocm.bindings.hipsparselt.hipsparseLtDestroy(handle)#
Destroy a hipSPARSELt handle.
hipsparseLtDestroydestroys the hipSPARSELt library context and releases all resources used by the hipSPARSELt library.- Args:
- handle (
hipsparseLtHandle_t/object) – IN: hipsparselt library handle
- handle (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_NOT_INITIALIZED: thehandleis invalid.
C signature
hipsparseStatus_t hipsparseLtDestroy(const hipsparseLtHandle_t * handle)
- rocm.bindings.hipsparselt.hipsparseLtDenseDescriptorInit(handle, matDescr, rows, cols, ld, alignment, valueType, order)#
Create a descriptor for a dense matrix
hipsparseLtDenseDescriptorInitcreates and initializes a matrix descriptor. It should be destroyed at the end usinghipsparseLtMatDescriptorDestroy().- Args:
- handle (
hipsparseLtHandle_t/object) – IN: the hipsparselt handle.
- matDescr (
hipsparseLtMatDescriptor_t/object) – OUT: the pointer to the dense matrix descriptor.
- rows (
int) – IN: number of rows.
- cols (
int) – IN: number of columns.
- ld (
int) – IN: leading dimension.
- alignment (
int) – IN: memory alignment in bytes (not used by the HIP backend).
- valueType (
hipDataType) – IN: data type of the matrix. Data type: hipDataType.
- order (
hipsparseOrder_t) – IN: memory layout:
HIPSPARSE_ORDER_COLorHIPSPARSE_ORDER_ROW.
- handle (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_INVALID_VALUE:handle,descr,rows,cols,orldis invalid.HIPSPARSE_STATUS_NOT_SUPPORTED:rows,cols,ld,alignment,valueType,ororderis not supported.
C signature
hipsparseStatus_t hipsparseLtDenseDescriptorInit(const hipsparseLtHandle_t * handle, hipsparseLtMatDescriptor_t * matDescr, int64_t rows, int64_t cols, int64_t ld, uint32_t alignment, hipDataType valueType, hipsparseOrder_t order)
- rocm.bindings.hipsparselt.hipsparseLtStructuredDescriptorInit(handle, matDescr, rows, cols, ld, alignment, valueType, order, sparsity)#
Create a descriptor for a structured matrix.
hipsparseLtStructuredDescriptorInitcreates and initializes a matrix descriptor. It should be destroyed at the end usinghipsparseLtMatDescriptorDestroy().- Args:
- handle (
hipsparseLtHandle_t/object) – IN: the hipsparselt handle.
- matDescr (
hipsparseLtMatDescriptor_t/object) – OUT: the pointer to the dense matrix descriptor.
- rows (
int) – IN: number of rows.
- cols (
int) – IN: number of columns.
- ld (
int) – IN: leading dimension.
- alignment (
int) – IN: memory alignment in bytes (not used by the HIP backend).
- valueType (
hipDataType) – IN: data type of the matrix. Data type: hipDataType.
- order (
hipsparseOrder_t) – IN: memory layout:
HIPSPARSE_ORDER_COLorHIPSPARSE_ORDER_ROW.- sparsity (
hipsparseLtSparsity_t) – IN: matrix sparsity ratio. See
hipsparseLtSparsity_t.
- handle (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_INVALID_VALUE:handle,descr,rows,cols,orldis invalid.HIPSPARSE_STATUS_NOT_SUPPORTED:rows,cols,ld,alignment,valueType,ororderis not supported.
C signature
hipsparseStatus_t hipsparseLtStructuredDescriptorInit(const hipsparseLtHandle_t * handle, hipsparseLtMatDescriptor_t * matDescr, int64_t rows, int64_t cols, int64_t ld, uint32_t alignment, hipDataType valueType, hipsparseOrder_t order, hipsparseLtSparsity_t sparsity)
- rocm.bindings.hipsparselt.hipsparseLtMatDescriptorDestroy(matDescr)#
Destroy a matrix descriptor.
hipsparseLtMatDescriptorDestroydestroys a matrix descriptor and releases all resources used by the descriptor.- Args:
- matDescr (
hipsparseLtMatDescriptor_t/object) – IN: the matrix descriptor.
- matDescr (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_INVALID_VALUE:descris invalid.
C signature
hipsparseStatus_t hipsparseLtMatDescriptorDestroy(const hipsparseLtMatDescriptor_t * matDescr)
- rocm.bindings.hipsparselt.hipsparseLtMatDescSetAttribute(handle, matDescr, matAttribute, data, dataSize)#
Specify the matrix attribute of a matrix descriptor.
hipsparseLtMatDescSetAttributesets the value of the specified attribute belonging to a matrix descriptor, such as number of batches and their stride.- Args:
- handle (
hipsparseLtHandle_t/object) – IN: the hipsparselt handle.
- matDescr (
hipsparseLtMatDescriptor_t/object) – INOUT: the matrix descriptor.
- matAttribute (
hipsparseLtMatDescAttribute_t) – IN: HIPSPARSELT_MAT_NUM_BATCHESorHIPSPARSELT_MAT_BATCH_STRIDE.- data (
Pointer/object) – IN: pointer to the value to which the specified attribute will be set.
- dataSize (
int) – IN: size in bytes of the attribute value used for verification.
- handle (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_INVALID_VALUE:handle,matmulDescr,data,ordataSizeis invalid.
C signature
hipsparseStatus_t hipsparseLtMatDescSetAttribute(const hipsparseLtHandle_t * handle, hipsparseLtMatDescriptor_t * matDescr, hipsparseLtMatDescAttribute_t matAttribute, const void * data, size_t dataSize)
- rocm.bindings.hipsparselt.hipsparseLtMatDescGetAttribute(handle, matDescr, matAttribute, data, dataSize)#
Get the matrix type of a matrix descriptor.
hipsparseLtMatDescGetAttributereturns the matrix attribute of a matrix descriptor.- Args:
- handle (
hipsparseLtHandle_t/object) – IN: the hipsparselt handle.
- matDescr (
hipsparseLtMatDescriptor_t/object) – IN: the matrix descriptor.
- matAttribute (
hipsparseLtMatDescAttribute_t) – IN: HIPSPARSELT_MAT_NUM_BATCHESorHIPSPARSELT_MAT_BATCH_STRIDE.- data (
Pointer/object) – INOUT: the memory address containing the attribute value retrieved by this function.
- dataSize (
int) – IN: size in bytes of the attribute value used for verification.
- handle (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_INVALID_VALUE:handle,descr,data,ordataSizeis invalid.
C signature
hipsparseStatus_t hipsparseLtMatDescGetAttribute(const hipsparseLtHandle_t * handle, const hipsparseLtMatDescriptor_t * matDescr, hipsparseLtMatDescAttribute_t matAttribute, void * data, size_t dataSize)
- rocm.bindings.hipsparselt.hipsparseLtMatmulDescriptorInit(handle, matmulDescr, opA, opB, matA, matB, matC, matD, computeType)#
Initializes the matrix multiplication descriptor.
hipsparseLtMatmulDescriptorInitcreates a matrix multiplication descriptor.- Args:
- handle (
hipsparseLtHandle_t/object) – IN: the hipsparselt handle.
- matmulDescr (
hipsparseLtMatmulDescriptor_t/object) – INOUT: the matrix multiplication descriptor.
- opA (
hipsparseOperation_t) – IN: hipsparse operation for Matrix A:
HIPSPARSE_OPERATION_NON_TRANSPOSEorHIPSPARSE_OPERATION_TRANSPOSE.- opB (
hipsparseOperation_t) – IN: hipsparse operation for Matrix B:
HIPSPARSE_OPERATION_NON_TRANSPOSEorHIPSPARSE_OPERATION_TRANSPOSE.- matA (
hipsparseLtMatDescriptor_t/object) – IN: the matrix descriptor (one and only one of matA or matB is a structured sparsity matrix).
- matB (
hipsparseLtMatDescriptor_t/object) – IN: the matrix descriptor (one and only one of matA or matB is a structured sparsity matrix).
- matC (
hipsparseLtMatDescriptor_t/object) – IN: the matrix descriptor (dense matrix).
- matD (
hipsparseLtMatDescriptor_t/object) – IN: the matrix descriptor (dense matrix).
- computeType (
hipsparseLtComputetype_t) – IN: size in bytes of the attribute value used for verification.
- handle (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_INVALID_VALUE:handle,matmulDescr,opA,opB,matA,matB,matC,matD,orcomputeTypeis invalid.HIPSPARSE_STATUS_NOT_SUPPORTED:opA,opB,orcomputeTypeis invalid.
C signature
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)
- rocm.bindings.hipsparselt.hipsparseLtMatmulDescSetAttribute(handle, matmulDescr, matmulAttribute, data, dataSize)#
Specify the matrix attribute of a matrix descriptor.
hipsparseLtMatmulDescSetAttributesets the value of the specified attribute belonging to a matrix descriptor, such as number of batches and their stride.- Args:
- handle (
hipsparseLtHandle_t/object) – IN: the hipsparselt handle.
- matmulDescr (
hipsparseLtMatmulDescriptor_t/object) – INOUT: the matrix multiplication descriptor.
- matmulAttribute (
hipsparseLtMatmulDescAttribute_t) – IN: see
hipsparseLtMatmulDescAttribute_t.- data (
Pointer/object) – IN: pointer to the value to which the specified attribute will be set.
- dataSize (
int) – IN: size in bytes of the attribute value used for verification.
- handle (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_INVALID_VALUE:handle,matDescr,data,ordataSizeis invalid.HIPSPARSE_STATUS_NOT_SUPPORTED:hipsparseLtMatmulDescAttribute_tis not supported.
C signature
hipsparseStatus_t hipsparseLtMatmulDescSetAttribute(const hipsparseLtHandle_t * handle, hipsparseLtMatmulDescriptor_t * matmulDescr, hipsparseLtMatmulDescAttribute_t matmulAttribute, const void * data, size_t dataSize)
- rocm.bindings.hipsparselt.hipsparseLtMatmulDescGetAttribute(handle, matmulDescr, matmulAttribute, data, dataSize)#
Get the matrix type of a matrix descriptor.
hipsparseLtMatmulDescGetAttributereturns the matrix attribute of a matrix descriptor.- Args:
- handle (
hipsparseLtHandle_t/object) – IN: the hipsparselt handle.
- matmulDescr (
hipsparseLtMatmulDescriptor_t/object) – IN: the matrix multiplication descriptor.
- matmulAttribute (
hipsparseLtMatmulDescAttribute_t) – IN: see
hipsparseLtMatmulDescAttribute_t.- data (
Pointer/object) – INOUT: the memory address containing the attribute value retrieved by this function.
- dataSize (
int) – IN: size in bytes of the attribute value used for verification.
- handle (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_INVALID_VALUE:handle,matDescr,data,ordataSizeis invalid.HIPSPARSE_STATUS_NOT_SUPPORTED:hipsparseLtMatmulDescAttribute_tis not supported.
C signature
hipsparseStatus_t hipsparseLtMatmulDescGetAttribute(const hipsparseLtHandle_t * handle, const hipsparseLtMatmulDescriptor_t * matmulDescr, hipsparseLtMatmulDescAttribute_t matmulAttribute, void * data, size_t dataSize)
- rocm.bindings.hipsparselt.hipsparseLtMatmulAlgSelectionInit(handle, algSelection, matmulDescr, alg)#
Initializes the algorithm selection descriptor.
hipsparseLtMatmulAlgSelectionInitcreates a algorithm selection descriptor.- Args:
- handle (
hipsparseLtHandle_t/object) – IN: the hipsparselt handle.
- algSelection (
hipsparseLtMatmulAlgSelection_t/object) – OUT: the pointer to the algorithm selection descriptor.
- matmulDescr (
hipsparseLtMatmulDescriptor_t/object) – IN: the matrix multiplication descriptor.
- alg (
hipsparseLtMatmulAlg_t) – IN: the algorithm used to perform the matrix multiplication.
- handle (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_INVALID_VALUE:handle,matmulDescr,oralgSelectionis invalid.
C signature
hipsparseStatus_t hipsparseLtMatmulAlgSelectionInit(const hipsparseLtHandle_t * handle, hipsparseLtMatmulAlgSelection_t * algSelection, const hipsparseLtMatmulDescriptor_t * matmulDescr, hipsparseLtMatmulAlg_t alg)
- rocm.bindings.hipsparselt.hipsparseLtMatmulAlgSelectionDestroy(algSelection)#
Destroy the algorithm selection descriptor.
hipsparseLtMatmulAlgSelectionDestroyreleases the resources used by an instance of the algorithm selection. This function is the last call with a specific algorithm selection instance.- Args:
- algSelection (
hipsparseLtMatmulAlgSelection_t/object) – IN: the algorithm selection descriptor
- algSelection (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_INVALID_VALUE:algSelectionis invalid.
C signature
hipsparseStatus_t hipsparseLtMatmulAlgSelectionDestroy(const hipsparseLtMatmulAlgSelection_t * algSelection)
- rocm.bindings.hipsparselt.hipsparseLtMatmulAlgSetAttribute(handle, algSelection, attribute, data, dataSize)#
Specify the algorithm attribute of a algorithm selection descriptor.
hipsparseLtMatmulAlgSetAttributesets the value of the specified attribute belonging to a algorithm selection descriptor.- Args:
- handle (
hipsparseLtHandle_t/object) – IN: the hipsparselt handle.
- algSelection (
hipsparseLtMatmulAlgSelection_t/object) – INOUT: the algorithm selection descriptor.
- attribute (
hipsparseLtMatmulAlgAttribute_t) – IN: attributes are specified in
hipsparseLtMatmulAlgAttribute_t.- data (
Pointer/object) – IN: pointer to the value to which the specified attribute will be set.
- dataSize (
int) – IN: size in bytes of the attribute value used for verification.
- handle (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_INVALID_VALUE:handle,algSelection,attribute,data,ordataSizeis invalid.HIPSPARSE_STATUS_NOT_SUPPORTED:attributeis not supported.
C signature
hipsparseStatus_t hipsparseLtMatmulAlgSetAttribute(const hipsparseLtHandle_t * handle, hipsparseLtMatmulAlgSelection_t * algSelection, hipsparseLtMatmulAlgAttribute_t attribute, const void * data, size_t dataSize)
- rocm.bindings.hipsparselt.hipsparseLtMatmulAlgGetAttribute(handle, algSelection, attribute, data, dataSize)#
Get the specific algorithm attribute from the algorithm selection descriptor.
hipsparseLtMatmulAlgGetAttributereturns the value of the queried attribute belonging to the algorithm selection descriptor.- Args:
- handle (
hipsparseLtHandle_t/object) – IN: the hipsparselt handle.
- algSelection (
hipsparseLtMatmulAlgSelection_t/object) – IN: the algorithm selection descriptor.
- attribute (
hipsparseLtMatmulAlgAttribute_t) – IN: attributes are specified in
hipsparseLtMatmulAlgAttribute_t.- data (
Pointer/object) – INOUT: the memory address containing the attribute value retrieved by this function.
- dataSize (
int) – IN: size in bytes of the attribute value used for verification.
- handle (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_INVALID_VALUE:handle,algSelection,attribute,data,ordataSizeis invalid.HIPSPARSE_STATUS_NOT_SUPPORTED:attributeis not supported.
C signature
hipsparseStatus_t hipsparseLtMatmulAlgGetAttribute(const hipsparseLtHandle_t * handle, const hipsparseLtMatmulAlgSelection_t * algSelection, hipsparseLtMatmulAlgAttribute_t attribute, void * data, size_t dataSize)
- rocm.bindings.hipsparselt.hipsparseLtMatmulGetWorkspace(handle, plan, workspaceSize)#
Determines the required workspace size.
hipsparseLtMatmulGetWorkspacedetermines the required workspace size associated with the selected algorithm.- Args:
- handle (
hipsparseLtHandle_t/object) – IN: hipsparselt library handle.
- plan (
hipsparseLtMatmulPlan_t/object) – IN: the matrix multiplication plan descriptor.
- workspaceSize (
PointerToUInt64/object) – OUT: workspace size in bytes.
- handle (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_INVALID_VALUE:handle,algSelection,orworkspaceSizeis invalid.
C signature
hipsparseStatus_t hipsparseLtMatmulGetWorkspace(const hipsparseLtHandle_t * handle, const hipsparseLtMatmulPlan_t * plan, size_t * workspaceSize)
- rocm.bindings.hipsparselt.hipsparseLtMatmulPlanInit(handle, plan, matmulDescr, algSelection)#
Initializes the matrix multiplication plan descriptor.
hipsparseLtMatmulPlanInitcreates a matrix multiplication plan descriptor. It should be destroyed at the end usinghipsparseLtMatmulPlanDestroy.- Args:
- handle (
hipsparseLtHandle_t/object) – IN: hipsparselt library handle.
- plan (
hipsparseLtMatmulPlan_t/object) – OUT: the matrix multiplication plan descriptor.
- matmulDescr (
hipsparseLtMatmulDescriptor_t/object) – IN: the matrix multiplication descriptor.
- algSelection (
hipsparseLtMatmulAlgSelection_t/object) – IN: the algorithm selection descriptor.
- handle (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_INVALID_VALUE:handle,plan,matmulDescr,algSelection,orworkspaceSizeis invalid.HIPSPARSELT_MAT_NUM_BATCHESfrom matrix A to D are inconsistent.
C signature
hipsparseStatus_t hipsparseLtMatmulPlanInit(const hipsparseLtHandle_t * handle, hipsparseLtMatmulPlan_t * plan, const hipsparseLtMatmulDescriptor_t * matmulDescr, const hipsparseLtMatmulAlgSelection_t * algSelection)
- rocm.bindings.hipsparselt.hipsparseLtMatmulPlanDestroy(plan)#
Destroy a matrix multiplication plan descriptor.
hipsparseLtMatmulPlanDestroyreleases the resources used by an instance of the matrix multiplication plan. This function is the last call with a specific plan instance.- Args:
- plan (
hipsparseLtMatmulPlan_t/object) – IN: the matrix multiplication plan descriptor.
- plan (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_INVALID_VALUE:planis invalid.
C signature
hipsparseStatus_t hipsparseLtMatmulPlanDestroy(const hipsparseLtMatmulPlan_t * plan)
- rocm.bindings.hipsparselt.hipsparseLtMatmul(handle, plan, alpha, d_A, d_B, beta, d_C, d_D, workspace, numStreams)#
Sparse matrix and dense matrix multiplication.
hipsparseLtMatmulcomputes the matrix multiplication of matricesAandBto produce the output matrixD, according to the following operation:\[D := Activation(\alpha \cdot op(A) \cdot op(B) + \beta \cdot C + bias) * scale\]- Note:
This function is non-blocking and executed asynchronously with respect to the host. It can return before the actual computation has finished.
- Note:
This function only supports the case where
Dhas the same shape ofC.- Args:
- handle (
hipsparseLtHandle_t/object) – IN: hipsparselt library handle.
- plan (
hipsparseLtMatmulPlan_t/object) – IN: matrix multiplication plan.
- alpha (
Pointer/object) – IN: scalar \(\alpha\) (float).
- d_A (
Pointer/object) – IN: Pointer to the structured matrix A.
- d_B (
Pointer/object) – IN: Pointer to the dense matrix B.
- beta (
Pointer/object) – IN: scalar \(\beta\) (float).
- d_C (
Pointer/object) – IN: Pointer to the dense matrix C.
- d_D (
Pointer/object) – OUT: Pointer to the dense matrix D.
- workspace (
Pointer/object) – IN: Pointer to the workspace.
- numStreams (
int) – IN: Number of HIP streams in
streams.
- handle (
- Returns:
A
tupleof size 2 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_NOT_INITIALIZED:handleorplanis invalid.HIPSPARSE_STATUS_INVALID_VALUE:handle,plan,alpha,d_A,d_B,beta,d_C,d_D,workspace,streams,ornumStreamsis invalid.HIPSPARSE_STATUS_NOT_SUPPORTED: the problem is not supported.
ihipStream_t:Pointer to HIP stream array for the computation.
C signature
hipsparseStatus_t hipsparseLtMatmul(const hipsparseLtHandle_t * handle, const hipsparseLtMatmulPlan_t * plan, const void * alpha, const void * d_A, const void * d_B, const void * beta, const void * d_C, void * d_D, void * workspace, hipStream_t * streams, int32_t numStreams)
- rocm.bindings.hipsparselt.hipsparseLtMatmulSearch(handle, plan, alpha, d_A, d_B, beta, d_C, d_D, workspace, numStreams)#
Sparse matrix and dense matrix multiplication
hipsparseLtMatmulSearchevaluates all available algorithms for the matrix multiplication and automatically updates the plan by selecting the fastest one. The functionality is intended to be used for auto-tuning purposes when the same operation is repeated multiple times over different inputs.- Note:
The behavior of this function is the same as
hipsparseLtMatmul.- Note:
d_Candd_Dmust be two different memory buffers, otherwise the output will be incorrect.- Note:
This function is NOT asynchronous with respect to
streams[0](blocking call).- Note:
The number of iterations for the evaluation can be set by using
hipsparseLtMatmulAlgSetAttribute()withHIPSPARSELT_MATMUL_SEARCH_ITERATIONS.- Note:
The selected algorithm id can be retrieved by using
- Args:
- handle (
hipsparseLtHandle_t/object) – IN: hipsparselt library handle.
- plan (
hipsparseLtMatmulPlan_t/object) – IN: matrix multiplication plan.
- alpha (
Pointer/object) – IN: scalar \(\alpha\) (float).
- d_A (
Pointer/object) – IN: pointer to the structured matrix A.
- d_B (
Pointer/object) – IN: pointer to the dense matrix B.
- beta (
Pointer/object) – IN: scalar \(\beta\) (float).
- d_C (
Pointer/object) – IN: pointer to the dense matrix C.
- d_D (
Pointer/object) – OUT: pointer to the dense matrix D.
- workspace (
Pointer/object) – IN: pointer to the worksapce.
- numStreams (
int) – IN: number of HIP streams in
streams.
- handle (
- Returns:
A
tupleof size 2 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_NOT_INITIALIZED:handleorplanis invalid.HIPSPARSE_STATUS_INVALID_VALUE:handle,plan,alpha,d_A,d_B,beta,d_C,d_D,workspace,streams,ornumStreamsis invalid.HIPSPARSE_STATUS_NOT_SUPPORTED: the problem is not supported.
ihipStream_t:pointer to HIP stream array for the computation.
C signature
hipsparseStatus_t hipsparseLtMatmulSearch(const hipsparseLtHandle_t * handle, hipsparseLtMatmulPlan_t * plan, const void * alpha, const void * d_A, const void * d_B, const void * beta, const void * d_C, void * d_D, void * workspace, hipStream_t * streams, int32_t numStreams)
- rocm.bindings.hipsparselt.hipsparseLtSpMMAPrune(handle, matmulDescr, d_in, d_out, pruneAlg, stream)#
Prune a dense matrix.
hipsparseLtSpMMAPruneprunes the dense matrixd_inaccording to the specified algorithmpruneAlg, which can beHIPSPARSELT_PRUNE_SPMMA_TILEorHIPSPARSELT_PRUNE_SPMMA_STRIP.- Note:
The function requires no extra storage. It supports asynchronous execution with respect to
stream.- Args:
- handle (
hipsparseLtHandle_t/object) – IN: hipsparselt library handle.
- matmulDescr (
hipsparseLtMatmulDescriptor_t/object) – IN: matrix multiplication descriptor.
- d_in (
Pointer/object) – IN: pointer to the dense matrix.
- d_out (
Pointer/object) – OUT: pointer to the pruned matrix.
- pruneAlg (
hipsparseLtPruneAlg_t) – IN: pruning algorithm.
- stream (
Pointer/object) – IN: HIP stream for the computation.
- handle (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_INVALID_VALUE:handle,matmulDescr,d_in,ord_outis invalid.
C signature
hipsparseStatus_t hipsparseLtSpMMAPrune(const hipsparseLtHandle_t * handle, const hipsparseLtMatmulDescriptor_t * matmulDescr, const void * d_in, void * d_out, hipsparseLtPruneAlg_t pruneAlg, hipStream_t stream)
- rocm.bindings.hipsparselt.hipsparseLtSpMMAPruneCheck(handle, matmulDescr, d_in, d_valid, stream)#
Check the correctness of the pruning structure for a given matrix.
hipsparseLtSpMMAPruneCheckchecks the correctness of the pruning structure for a given matrix. Contents in the provided matrix must have a sparsity of 2:4.- Args:
- handle (
hipsparseLtHandle_t/object) – IN: hipsparselt library handle.
- matmulDescr (
hipsparseLtMatmulDescriptor_t/object) – IN: matrix multiplication descriptor.
- d_in (
Pointer/object) – IN: pointer to the matrix to check.
- d_valid (
PointerToInt/object) – OUT: validation results (0 is correct, and 1 is incorrect).
- stream (
Pointer/object) – IN: HIP stream for the computation.
- handle (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_INVALID_VALUE:handle,matmulDescr,d_in,ord_validis invalid.
C signature
hipsparseStatus_t hipsparseLtSpMMAPruneCheck(const hipsparseLtHandle_t * handle, const hipsparseLtMatmulDescriptor_t * matmulDescr, const void * d_in, int * d_valid, hipStream_t stream)
- rocm.bindings.hipsparselt.hipsparseLtSpMMAPrune2(handle, sparseMatDescr, isSparseA, op, d_in, d_out, pruneAlg, stream)#
Prune a dense matrix.
hipsparseLtSpMMAPrune2prunes the dense matrixd_inaccording to the specified algorithmpruneAlg, which can beHIPSPARSELT_PRUNE_SPMMA_TILEorHIPSPARSELT_PRUNE_SPMMA_STRIP.- Note:
The function requires no extra storage. It supports asynchronous execution with respect to
stream.- Args:
- handle (
hipsparseLtHandle_t/object) – IN: hipsparselt library handle.
- sparseMatDescr (
hipsparseLtMatDescriptor_t/object) – IN: structured (sparse) matrix descriptor.
- isSparseA (
int) – IN: specify if the structured (or sparse) matrix is in the first position (matA or matB). (It currently only supports matA.)
- op (
hipsparseOperation_t) – IN: operation that will be applied to the structured (or sparse) matrix in the multiplication.
- d_in (
Pointer/object) – IN: pointer to the dense matrix.
- d_out (
Pointer/object) – OUT: pointer to the pruned matrix.
- pruneAlg (
hipsparseLtPruneAlg_t) – IN: pruning algorithm.
- stream (
Pointer/object) – IN: HIP stream for the computation.
- handle (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_INVALID_VALUE:handle,sparseMatDescr,op,d_in,ord_outis invalid.HIPSPARSE_STATUS_NOT_SUPPORTED: the problem is not supported.
C signature
hipsparseStatus_t hipsparseLtSpMMAPrune2(const hipsparseLtHandle_t * handle, const hipsparseLtMatDescriptor_t * sparseMatDescr, int isSparseA, hipsparseOperation_t op, const void * d_in, void * d_out, hipsparseLtPruneAlg_t pruneAlg, hipStream_t stream)
- rocm.bindings.hipsparselt.hipsparseLtSpMMAPruneCheck2(handle, sparseMatDescr, isSparseA, op, d_in, d_valid, stream)#
Check the correctness of the pruning structure for a given matrix.
hipsparseLtSpMMAPruneCheck2checks the correctness of the pruning structure for a given matrix. Contents in the provided matrix must have a sparsity of 2:4.- Args:
- handle (
hipsparseLtHandle_t/object) – IN: hipsparselt library handle.
- sparseMatDescr (
hipsparseLtMatDescriptor_t/object) – IN: structured (sparse) matrix descriptor.
- isSparseA (
int) – IN: specify if the structured (or sparse) matrix is in the first position (matA or matB). (The HIP backend only supports matA.)
- op (
hipsparseOperation_t) – IN: operation that will be applied to the structured (or sparse) matrix in the multiplication.
- d_in (
Pointer/object) – IN: pointer to the matrix to check.
- d_valid (
PointerToInt/object) – OUT: validation results (0 is correct, and 1 is incorrect).
- stream (
Pointer/object) – IN: HIP stream for the computation.
- handle (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_INVALID_VALUE:handle,sparseMatDescr,op,d_in,ord_validis invalid.HIPSPARSE_STATUS_NOT_SUPPORTED: the problem is not supported.
C signature
hipsparseStatus_t hipsparseLtSpMMAPruneCheck2(const hipsparseLtHandle_t * handle, const hipsparseLtMatDescriptor_t * sparseMatDescr, int isSparseA, hipsparseOperation_t op, const void * d_in, int * d_valid, hipStream_t stream)
- rocm.bindings.hipsparselt.hipsparseLtSpMMACompressedSize(handle, plan, compressedSize, compressBufferSize)#
Provide the size of the compressed matrix.
hipsparseLtSpMMACompressedSizeprovides the size of the compressed matrix to be allocated before callinghipsparseLtSpMMACompress() orhipsparseLtSpMMACompress2().- Args:
- handle (
hipsparseLtHandle_t/object) – IN: hipsparselt library handle.
- plan (
hipsparseLtMatmulPlan_t/object) – IN: matrix multiplication plan descriptor.
- compressedSize (
PointerToUInt64/object) – OUT: size in bytes of the compressed matrix.
- compressBufferSize (
PointerToUInt64/object) – OUT: size in bytes for the buffer needed for the matrix compression.
- handle (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_INVALID_VALUE:handle,plan,compressedSize,orcompressBufferSizeis invalid.
C signature
hipsparseStatus_t hipsparseLtSpMMACompressedSize(const hipsparseLtHandle_t * handle, const hipsparseLtMatmulPlan_t * plan, size_t * compressedSize, size_t * compressBufferSize)
- rocm.bindings.hipsparselt.hipsparseLtSpMMACompress(handle, plan, d_dense, d_compressed, d_compressBuffer, stream)#
Compress a dense matrix to structured matrix.
hipsparseLtSpMMACompresscompresses the dense matrixd_dense. The compressed matrix is intended to be used as the first/second operand A/B in thehipsparseLtMatmul() function.- Args:
- handle (
hipsparseLtHandle_t/object) – IN: handle to the hipsparselt library context queue.
- plan (
hipsparseLtMatmulPlan_t/object) – IN: matrix multiplication plan descriptor.
- d_dense (
Pointer/object) – IN: pointer to the dense matrix.
- d_compressed (
Pointer/object) – OUT: compressed matrix and metadata.
- d_compressBuffer (
Pointer/object) – OUT: temporary buffer for the compression.
- stream (
Pointer/object) – IN: HIP stream for the computation.
- handle (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_INVALID_VALUE:handle,plan,d_dense,ord_compressedis invalid.HIPSPARSE_STATUS_NOT_SUPPORTED: the problem is not supported.
C signature
hipsparseStatus_t hipsparseLtSpMMACompress(const hipsparseLtHandle_t * handle, const hipsparseLtMatmulPlan_t * plan, const void * d_dense, void * d_compressed, void * d_compressBuffer, hipStream_t stream)
- rocm.bindings.hipsparselt.hipsparseLtSpMMACompressedSize2(handle, sparseMatDescr, compressedSize, compressBufferSize)#
Provide the size of the compressed matrix.
hipsparseLtSpMMACompressedSize2provides the size of the compressed matrix to be allocated before callinghipsparseLtSpMMACompressorhipsparseLtSpMMACompress2.- Args:
- handle (
hipsparseLtHandle_t/object) – IN: hipsparselt library handle.
- sparseMatDescr (
hipsparseLtMatDescriptor_t/object) – IN: structured (sparse) matrix descriptor.
- compressedSize (
PointerToUInt64/object) – OUT: size in bytes of the compressed matrix.
- compressBufferSize (
PointerToUInt64/object) – OUT: size in bytes for the buffer needed for the matrix compression.
- handle (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_NOT_INITIALIZED:handle,sparseMatDescr,compressedSize,orcompressBufferSizeis invalid.HIPSPARSE_STATUS_NOT_SUPPORTED: the problem is not supported.
C signature
hipsparseStatus_t hipsparseLtSpMMACompressedSize2(const hipsparseLtHandle_t * handle, const hipsparseLtMatDescriptor_t * sparseMatDescr, size_t * compressedSize, size_t * compressBufferSize)
- rocm.bindings.hipsparselt.hipsparseLtSpMMACompress2(handle, sparseMatDescr, isSparseA, op, d_dense, d_compressed, d_compressBuffer, stream)#
Compress a dense matrix to structured matrix.
hipsparseLtSpMMACompress2compresses the dense matrixd_dense. The compressed matrix is intended to be used as the first/second operand A/B in thehipsparseLtMatmul() function.- Args:
- handle (
hipsparseLtHandle_t/object) – IN: handle to the hipsparselt library context queue.
- sparseMatDescr (
hipsparseLtMatDescriptor_t/object) – IN: structured (sparse) matrix descriptor.
- isSparseA (
int) – IN: specify whether the structured (or sparse) matrix is in the first position (matA or matB).
- op (
hipsparseOperation_t) – IN: operation that will be applied to the structured (or sparse) matrix in the multiplication.
- d_dense (
Pointer/object) – IN: pointer to the dense matrix.
- d_compressed (
Pointer/object) – OUT: compressed matrix and metadata.
- d_compressBuffer (
Pointer/object) – OUT: temporary buffer for the compression.
- stream (
Pointer/object) – IN: HIP stream for the computation.
- handle (
- Returns:
A
tupleof size 1 that contains (in that order):hipsparseStatus_t: One of:HIPSPARSE_STATUS_SUCCESS: the operation completed successfully.HIPSPARSE_STATUS_INVALID_VALUE:handle,sparseMatDescr,op,d_dense,ord_compressedis invalid.HIPSPARSE_STATUS_NOT_SUPPORTED: the problem is not supported.
C signature
hipsparseStatus_t hipsparseLtSpMMACompress2(const hipsparseLtHandle_t * handle, const hipsparseLtMatDescriptor_t * sparseMatDescr, int isSparseA, hipsparseOperation_t op, const void * d_dense, void * d_compressed, void * d_compressBuffer, hipStream_t stream)