/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-hipsparselt/checkouts/latest/projects/hipsparselt/library/include/hipsparselt.h Source File

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-hipsparselt/checkouts/latest/projects/hipsparselt/library/include/hipsparselt.h Source File#

hipSPARSELt: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-hipsparselt/checkouts/latest/projects/hipsparselt/library/include/hipsparselt.h Source File
hipsparselt.h
Go to the documentation of this file.
1 /*******************************************************************************
2  *
3  * MIT License
4  *
5  * Copyright (c) 2022-2026 Advanced Micro Devices, Inc.
6  *
7  * Permission is hereby granted, free of charge, to any person obtaining a copy
8  * of this software and associated documentation files (the "Software"), to deal
9  * in the Software without restriction, including without limitation the rights
10  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11  * copies of the Software, and to permit persons to whom the Software is
12  * furnished to do so, subject to the following conditions:
13  *
14  * The above copyright notice and this permission notice shall be included in
15  * all copies or substantial portions of the Software.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23  * SOFTWARE.
24  *
25  *******************************************************************************/
26 
40 //
41 
67 #pragma once
68 #ifndef _HIPSPARSELT_H_
69 #define _HIPSPARSELT_H_
70 
71 #include <hipsparse/hipsparse.h>
72 #include <hipsparselt/hipsparselt-export.h>
73 #include <hipsparselt/hipsparselt-version.h>
74 
75 #include <hip/hip_complex.h>
76 #include <hip/hip_runtime_api.h>
77 
78 #if defined(__HIP_PLATFORM_AMD__)
79 #include <hip/hip_bfloat16.h>
80 #include <hip/hip_fp16.h>
81 #include <hip/hip_fp8.h>
82 #include <hip/library_types.h>
83 #else
84 #include <cuda_bf16.h>
85 #include <cuda_fp16.h>
86 #include <cuda_fp8.h>
87 #include <library_types.h>
88 #endif
89 
90 /* Opaque structures holding information */
91 // clang-format off
92 
93 #if defined(__HIP_PLATFORM_AMD__)
103 typedef struct hipsparseLtHandle_t {uint8_t data[11024];} hipsparseLtHandle_t;
104 
115 
125 
133 
143 typedef struct hipsparseLtMatmulPlan_t {uint8_t data[11024];} hipsparseLtMatmulPlan_t;
144 #elif defined(__HIP_PLATFORM_NVIDIA__)
145 typedef __nv_bfloat16 hip_bfloat16;
146 typedef struct {uint8_t data[11024];} hipsparseLtHandle_t;
147 typedef struct {uint8_t data[11024];} hipsparseLtMatDescriptor_t;
148 typedef struct {uint8_t data[11024];} hipsparseLtMatmulDescriptor_t;
149 typedef struct {uint8_t data[11024];} hipsparseLtMatmulAlgSelection_t;
150 typedef struct {uint8_t data[11024];} hipsparseLtMatmulPlan_t;
151 #endif
152 
161 typedef enum {
166 
174 typedef enum {
178 
184 typedef enum {
193 
201 typedef enum {
226 
233 typedef enum {
236 
244 typedef enum {
252 
259 typedef enum {
263 
270 typedef enum {
274 
275 // clang-format on
276 
277 #ifdef __cplusplus
278 extern "C" {
279 #endif
280 
289 HIPSPARSELT_EXPORT
291 
306 HIPSPARSELT_EXPORT
307 hipsparseStatus_t hipsparseLtGetVersion(const hipsparseLtHandle_t* handle, int* version);
308 
322 HIPSPARSELT_EXPORT
323 hipsparseStatus_t hipsparseLtGetProperty(hipLibraryPropertyType propertyType, int* value);
324 
325 HIPSPARSELT_EXPORT
326 hipsparseStatus_t hipsparseLtGetGitRevision(hipsparseLtHandle_t handle, char* rev);
327 
328 HIPSPARSELT_EXPORT
329 hipsparseStatus_t hipsparseLtGetArchName(char** archName);
330 
346 /* hipSPARSE initialization and management routines */
347 HIPSPARSELT_EXPORT
348 hipsparseStatus_t hipsparseLtInit(hipsparseLtHandle_t* handle);
349 
363 HIPSPARSELT_EXPORT
364 hipsparseStatus_t hipsparseLtDestroy(const hipsparseLtHandle_t* handle);
365 
366 /* matrix descriptor */
394 HIPSPARSELT_EXPORT
395 hipsparseStatus_t hipsparseLtDenseDescriptorInit(const hipsparseLtHandle_t* handle,
396  hipsparseLtMatDescriptor_t* matDescr,
397  int64_t rows,
398  int64_t cols,
399  int64_t ld,
400  uint32_t alignment,
401  hipDataType valueType,
402  hipsparseOrder_t order);
403 
434 HIPSPARSELT_EXPORT
436  hipsparseLtMatDescriptor_t* matDescr,
437  int64_t rows,
438  int64_t cols,
439  int64_t ld,
440  uint32_t alignment,
441  hipDataType valueType,
442  hipsparseOrder_t order,
443  hipsparseLtSparsity_t sparsity);
444 
458 HIPSPARSELT_EXPORT
460 
482 HIPSPARSELT_EXPORT
483 hipsparseStatus_t hipsparseLtMatDescSetAttribute(const hipsparseLtHandle_t* handle,
484  hipsparseLtMatDescriptor_t* matDescr,
485  hipsparseLtMatDescAttribute_t matAttribute,
486  const void* data,
487  size_t dataSize);
488 
510 HIPSPARSELT_EXPORT
511 hipsparseStatus_t hipsparseLtMatDescGetAttribute(const hipsparseLtHandle_t* handle,
512  const hipsparseLtMatDescriptor_t* matDescr,
513  hipsparseLtMatDescAttribute_t matAttribute,
514  void* data,
515  size_t dataSize);
516 
517 /* matmul descriptor */
547 HIPSPARSELT_EXPORT
548 hipsparseStatus_t hipsparseLtMatmulDescriptorInit(const hipsparseLtHandle_t* handle,
549  hipsparseLtMatmulDescriptor_t* matmulDescr,
550  hipsparseOperation_t opA,
551  hipsparseOperation_t opB,
552  const hipsparseLtMatDescriptor_t* matA,
553  const hipsparseLtMatDescriptor_t* matB,
554  const hipsparseLtMatDescriptor_t* matC,
555  const hipsparseLtMatDescriptor_t* matD,
556  hipsparseLtComputetype_t computeType);
557 
580 HIPSPARSELT_EXPORT
581 hipsparseStatus_t
583  hipsparseLtMatmulDescriptor_t* matmulDescr,
584  hipsparseLtMatmulDescAttribute_t matmulAttribute,
585  const void* data,
586  size_t dataSize);
587 
610 HIPSPARSELT_EXPORT
611 hipsparseStatus_t
613  const hipsparseLtMatmulDescriptor_t* matmulDescr,
614  hipsparseLtMatmulDescAttribute_t matmulAttribute,
615  void* data,
616  size_t dataSize);
617 
618 /* algorithm selection */
636 HIPSPARSELT_EXPORT
637 hipsparseStatus_t
639  hipsparseLtMatmulAlgSelection_t* algSelection,
640  const hipsparseLtMatmulDescriptor_t* matmulDescr,
642 
656 HIPSPARSELT_EXPORT
658 
681 HIPSPARSELT_EXPORT
683  hipsparseLtMatmulAlgSelection_t* algSelection,
685  const void* data,
686  size_t dataSize);
687 
711 HIPSPARSELT_EXPORT
712 hipsparseStatus_t
714  const hipsparseLtMatmulAlgSelection_t* algSelection,
716  void* data,
717  size_t dataSize);
718 
719 /* matmul plan */
736 HIPSPARSELT_EXPORT
737 hipsparseStatus_t hipsparseLtMatmulGetWorkspace(const hipsparseLtHandle_t* handle,
738  const hipsparseLtMatmulPlan_t* plan,
739  size_t* workspaceSize);
740 
759 HIPSPARSELT_EXPORT
760 hipsparseStatus_t hipsparseLtMatmulPlanInit(const hipsparseLtHandle_t* handle,
762  const hipsparseLtMatmulDescriptor_t* matmulDescr,
763  const hipsparseLtMatmulAlgSelection_t* algSelection);
764 
778 HIPSPARSELT_EXPORT
780 
781 /* matmul execution */
827 HIPSPARSELT_EXPORT
828 hipsparseStatus_t hipsparseLtMatmul(const hipsparseLtHandle_t* handle,
829  const hipsparseLtMatmulPlan_t* plan,
830  const void* alpha,
831  const void* d_A,
832  const void* d_B,
833  const void* beta,
834  const void* d_C,
835  void* d_D,
836  void* workspace,
837  hipStream_t* streams,
838  int32_t numStreams);
839 
894 HIPSPARSELT_EXPORT
895 hipsparseStatus_t hipsparseLtMatmulSearch(const hipsparseLtHandle_t* handle,
897  const void* alpha,
898  const void* d_A,
899  const void* d_B,
900  const void* beta,
901  const void* d_C,
902  void* d_D,
903  void* workspace,
904  hipStream_t* streams,
905  int32_t numStreams);
906 
907 /* helper */
908 // prune
935 HIPSPARSELT_EXPORT
936 hipsparseStatus_t hipsparseLtSpMMAPrune(const hipsparseLtHandle_t* handle,
937  const hipsparseLtMatmulDescriptor_t* matmulDescr,
938  const void* d_in,
939  void* d_out,
940  hipsparseLtPruneAlg_t pruneAlg,
941  hipStream_t stream);
942 
965 HIPSPARSELT_EXPORT
966 hipsparseStatus_t hipsparseLtSpMMAPruneCheck(const hipsparseLtHandle_t* handle,
967  const hipsparseLtMatmulDescriptor_t* matmulDescr,
968  const void* d_in,
969  int* d_valid,
970  hipStream_t stream);
971 
1003 HIPSPARSELT_EXPORT
1004 hipsparseStatus_t hipsparseLtSpMMAPrune2(const hipsparseLtHandle_t* handle,
1005  const hipsparseLtMatDescriptor_t* sparseMatDescr,
1006  int isSparseA,
1007  hipsparseOperation_t op,
1008  const void* d_in,
1009  void* d_out,
1010  hipsparseLtPruneAlg_t pruneAlg,
1011  hipStream_t stream);
1012 
1039 HIPSPARSELT_EXPORT
1040 hipsparseStatus_t hipsparseLtSpMMAPruneCheck2(const hipsparseLtHandle_t* handle,
1041  const hipsparseLtMatDescriptor_t* sparseMatDescr,
1042  int isSparseA,
1043  hipsparseOperation_t op,
1044  const void* d_in,
1045  int* d_valid,
1046  hipStream_t stream);
1047 
1048 // compression
1068 HIPSPARSELT_EXPORT
1069 hipsparseStatus_t hipsparseLtSpMMACompressedSize(const hipsparseLtHandle_t* handle,
1070  const hipsparseLtMatmulPlan_t* plan,
1071  size_t* compressedSize,
1072  size_t* compressBufferSize);
1073 
1099 HIPSPARSELT_EXPORT
1100 hipsparseStatus_t hipsparseLtSpMMACompress(const hipsparseLtHandle_t* handle,
1101  const hipsparseLtMatmulPlan_t* plan,
1102  const void* d_dense,
1103  void* d_compressed,
1104  void* d_compressBuffer,
1105  hipStream_t stream);
1106 
1127 HIPSPARSELT_EXPORT
1129  const hipsparseLtMatDescriptor_t* sparseMatDescr,
1130  size_t* compressedSize,
1131  size_t* compressBufferSize);
1132 
1162 HIPSPARSELT_EXPORT
1163 hipsparseStatus_t hipsparseLtSpMMACompress2(const hipsparseLtHandle_t* handle,
1164  const hipsparseLtMatDescriptor_t* sparseMatDescr,
1165  int isSparseA,
1166  hipsparseOperation_t op,
1167  const void* d_dense,
1168  void* d_compressed,
1169  void* d_compressBuffer,
1170  hipStream_t stream);
1171 
1172 #ifdef __cplusplus
1173 }
1174 #endif
1175 
1176 #endif // _HIPSPARSELT_H_
hipsparseStatus_t hipsparseLtGetGitRevision(hipsparseLtHandle_t handle, char *rev)
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.
hipsparseLtSparsity_t
Specify the sparsity of the structured matrix.
Definition: hipsparselt.h:161
@ HIPSPARSELT_SPARSITY_50_PERCENT
Definition: hipsparselt.h:162
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)
Prune a dense matrix.
hipsparseStatus_t hipsparseLtSpMMACompressedSize2(const hipsparseLtHandle_t *handle, const hipsparseLtMatDescriptor_t *sparseMatDescr, size_t *compressedSize, size_t *compressBufferSize)
Provide the size of the compressed matrix.
void hipsparseLtInitialize()
Initialize hipSPARSELt for the current HIP device.
hipsparseStatus_t hipsparseLtGetArchName(char **archName)
hipsparseLtMatmulAlg_t
Specify the algorithm for matrix-matrix multiplication.
Definition: hipsparselt.h:233
@ HIPSPARSELT_MATMUL_ALG_DEFAULT
Definition: hipsparselt.h:234
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.
hipsparseStatus_t hipsparseLtInit(hipsparseLtHandle_t *handle)
Create a hipSPARSELt handle.
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)
Create a descriptor for a structured matrix.
hipsparseStatus_t hipsparseLtMatDescGetAttribute(const hipsparseLtHandle_t *handle, const hipsparseLtMatDescriptor_t *matDescr, hipsparseLtMatDescAttribute_t matAttribute, void *data, size_t dataSize)
Get the matrix type of a matrix descriptor.
hipsparseLtMatmulAlgAttribute_t
Specify the matrix multiplication algorithm attributes.
Definition: hipsparselt.h:244
@ HIPSPARSELT_MATMUL_SPLIT_K
Definition: hipsparselt.h:248
@ HIPSPARSELT_MATMUL_SPLIT_K_BUFFERS
Definition: hipsparselt.h:250
@ HIPSPARSELT_MATMUL_SEARCH_ITERATIONS
Definition: hipsparselt.h:247
@ HIPSPARSELT_MATMUL_SPLIT_K_MODE
Definition: hipsparselt.h:249
@ HIPSPARSELT_MATMUL_ALG_CONFIG_ID
Definition: hipsparselt.h:245
@ HIPSPARSELT_MATMUL_ALG_CONFIG_MAX_ID
Definition: hipsparselt.h:246
hipsparseStatus_t hipsparseLtMatDescSetAttribute(const hipsparseLtHandle_t *handle, hipsparseLtMatDescriptor_t *matDescr, hipsparseLtMatDescAttribute_t matAttribute, const void *data, size_t dataSize)
Specify the matrix attribute of a matrix descriptor.
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)
Compress a dense matrix to structured matrix.
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)
Check the correctness of the pruning structure for a given matrix.
hipsparseLtComputetype_t
Specify the compute precision modes of the matrix.
Definition: hipsparselt.h:184
@ HIPSPARSELT_COMPUTE_32F
Definition: hipsparselt.h:187
@ HIPSPARSELT_COMPUTE_TF32_FAST
Definition: hipsparselt.h:190
@ HIPSPARSELT_COMPUTE_TF32
Definition: hipsparselt.h:188
@ HIPSPARSELT_COMPUTE_32I
Definition: hipsparselt.h:186
@ HIPSPARSELT_COMPUTE_16F
Definition: hipsparselt.h:185
hipsparseStatus_t hipsparseLtMatmulAlgSelectionInit(const hipsparseLtHandle_t *handle, hipsparseLtMatmulAlgSelection_t *algSelection, const hipsparseLtMatmulDescriptor_t *matmulDescr, hipsparseLtMatmulAlg_t alg)
Initializes the algorithm selection descriptor.
hipsparseStatus_t hipsparseLtGetVersion(const hipsparseLtHandle_t *handle, int *version)
Retrieve the version number of the hipSPARSELt library.
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)
Create a descriptor for a dense matrix.
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)
Sparse matrix and dense matrix multiplication.
hipsparseStatus_t hipsparseLtSpMMAPrune(const hipsparseLtHandle_t *handle, const hipsparseLtMatmulDescriptor_t *matmulDescr, const void *d_in, void *d_out, hipsparseLtPruneAlg_t pruneAlg, hipStream_t stream)
Prune a dense matrix.
hipsparseStatus_t hipsparseLtMatmulAlgSelectionDestroy(const hipsparseLtMatmulAlgSelection_t *algSelection)
Destroy the algorithm selection descriptor.
hipsparseStatus_t hipsparseLtSpMMACompressedSize(const hipsparseLtHandle_t *handle, const hipsparseLtMatmulPlan_t *plan, size_t *compressedSize, size_t *compressBufferSize)
Provide the size of the compressed matrix.
hipsparseLtSplitKMode_t
Specify the Split-K mode value.
Definition: hipsparselt.h:270
@ HIPSPARSELT_SPLIT_K_MODE_TWO_KERNELS
Definition: hipsparselt.h:272
@ HIPSPARSELT_SPLIT_K_MODE_ONE_KERNEL
Definition: hipsparselt.h:271
hipsparseStatus_t hipsparseLtSpMMACompress(const hipsparseLtHandle_t *handle, const hipsparseLtMatmulPlan_t *plan, const void *d_dense, void *d_compressed, void *d_compressBuffer, hipStream_t stream)
Compress a dense matrix to structured matrix.
hipsparseStatus_t hipsparseLtDestroy(const hipsparseLtHandle_t *handle)
Destroy a hipSPARSELt handle.
hipsparseLtMatmulDescAttribute_t
Specify the additional attributes of a matrix multiplication descriptor.
Definition: hipsparselt.h:201
@ HIPSPARSELT_MATMUL_ACTIVATION_RELU_UPPERBOUND
Definition: hipsparselt.h:203
@ HIPSPARSELT_MATMUL_BIAS_STRIDE
Definition: hipsparselt.h:209
@ HIPSPARSELT_MATMUL_BIAS_POINTER
Definition: hipsparselt.h:210
@ HIPSPARSELT_MATMUL_ACTIVATION_LEAKYRELU
Definition: hipsparselt.h:212
@ HIPSPARSELT_MATMUL_BIAS_TYPE
Definition: hipsparselt.h:218
@ HIPSPARSELT_MATMUL_ACTIVATION_LEAKYRELU_ALPHA
Definition: hipsparselt.h:213
@ HIPSPARSELT_MATMUL_ACTIVATION_TANH_BETA
Definition: hipsparselt.h:217
@ HIPSPARSELT_MATMUL_ACTIVATION_GELU_SCALING
Definition: hipsparselt.h:206
@ HIPSPARSELT_MATMUL_GATE_RESIDUAL_MAT_POINTER
Definition: hipsparselt.h:223
@ HIPSPARSELT_MATMUL_ALPHA_VECTOR_SCALING
Definition: hipsparselt.h:207
@ HIPSPARSELT_MATMUL_GATE_RESIDUAL_DESC
Definition: hipsparselt.h:224
@ HIPSPARSELT_MATMUL_ACTIVATION_TANH
Definition: hipsparselt.h:215
@ HIPSPARSELT_MATMUL_ACTIVATION_SIGMOID
Definition: hipsparselt.h:214
@ HIPSPARSELT_MATMUL_ACTIVATION_TANH_ALPHA
Definition: hipsparselt.h:216
@ HIPSPARSELT_MATMUL_BETA_VECTOR_SCALING
Definition: hipsparselt.h:208
@ HIPSPARSELT_MATMUL_ACTIVATION_RELU
Definition: hipsparselt.h:202
@ HIPSPARSELT_MATMUL_ACTIVATION_GELU
Definition: hipsparselt.h:205
@ HIPSPARSELT_MATMUL_ACTIVATION_ABS
Definition: hipsparselt.h:211
@ HIPSPARSELT_MATMUL_ACTIVATION_RELU_THRESHOLD
Definition: hipsparselt.h:204
@ HIPSPARSELT_MATMUL_SPARSE_MAT_POINTER
Definition: hipsparselt.h:222
hipsparseStatus_t hipsparseLtGetProperty(hipLibraryPropertyType propertyType, int *value)
Retrieve the value of the requested property.
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 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)
Sparse matrix and dense matrix multiplication.
hipsparseLtPruneAlg_t
Specify the pruning algorithm to apply to the structured matrix before the compression.
Definition: hipsparselt.h:259
@ HIPSPARSELT_PRUNE_SPMMA_TILE
Definition: hipsparselt.h:260
@ HIPSPARSELT_PRUNE_SPMMA_STRIP
Definition: hipsparselt.h:261
hipsparseStatus_t hipsparseLtMatDescriptorDestroy(const hipsparseLtMatDescriptor_t *matDescr)
Destroy a matrix 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.
hipsparseStatus_t hipsparseLtMatmulGetWorkspace(const hipsparseLtHandle_t *handle, const hipsparseLtMatmulPlan_t *plan, size_t *workspaceSize)
Determines the required workspace size.
hipsparseLtMatDescAttribute_t
Specify the additional attributes of a matrix descriptor.
Definition: hipsparselt.h:174
@ HIPSPARSELT_MAT_BATCH_STRIDE
Definition: hipsparselt.h:176
@ HIPSPARSELT_MAT_NUM_BATCHES
Definition: hipsparselt.h:175
hipsparseStatus_t hipsparseLtMatmulPlanDestroy(const hipsparseLtMatmulPlan_t *plan)
Destroy a matrix multiplication plan descriptor.
hipsparseStatus_t hipsparseLtMatmulPlanInit(const hipsparseLtHandle_t *handle, hipsparseLtMatmulPlan_t *plan, const hipsparseLtMatmulDescriptor_t *matmulDescr, const hipsparseLtMatmulAlgSelection_t *algSelection)
Initializes the matrix multiplication plan descriptor.
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.
hipsparseStatus_t hipsparseLtSpMMAPruneCheck(const hipsparseLtHandle_t *handle, const hipsparseLtMatmulDescriptor_t *matmulDescr, const void *d_in, int *d_valid, hipStream_t stream)
Check the correctness of the pruning structure for a given matrix.
Handle to the hipSPARSELt library context queue.
Definition: hipsparselt.h:103
uint8_t data[11024]
Definition: hipsparselt.h:103
Descriptor of the matrix.
Definition: hipsparselt.h:114
uint8_t data[11024]
Definition: hipsparselt.h:114
Descriptor of the matrix multiplication algorithm.
Definition: hipsparselt.h:132
uint8_t data[11024]
Definition: hipsparselt.h:132
Descriptor of the matrix multiplication operation.
Definition: hipsparselt.h:124
uint8_t data[11024]
Definition: hipsparselt.h:124
Descriptor of the matrix multiplication execution plan.
Definition: hipsparselt.h:143
uint8_t data[11024]
Definition: hipsparselt.h:143