Skip to main content
`Ctrl`+`K`

# /build/hipsparselt-2uLnx3/hipsparselt-7.2.4+ds/library/include/hipsparselt.h Source File

hipSPARSELt: /build/hipsparselt-2uLnx3/hipsparselt-7.2.4+ds/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-2025 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
31
40//
41
66
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
114 typedef struct hipsparseLtMatDescriptor_t {uint8_t data[11024];} hipsparseLtMatDescriptor_t;
115
124 typedef struct hipsparseLtMatmulDescriptor_t {uint8_t data[11024];} hipsparseLtMatmulDescriptor_t;
125
132 typedef struct hipsparseLtMatmulAlgSelection_t {uint8_t data[11024];} hipsparseLtMatmulAlgSelection_t;
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 {
162 HIPSPARSELT_SPARSITY_50_PERCENT
164} hipsparseLtSparsity_t;
165
173 typedef enum {
174 HIPSPARSELT_MAT_NUM_BATCHES,
175 HIPSPARSELT_MAT_BATCH_STRIDE,
176} hipsparseLtMatDescAttribute_t;
177
183 typedef enum {
184 HIPSPARSELT_COMPUTE_16F = 0,
185 HIPSPARSELT_COMPUTE_32I,
186 HIPSPARSELT_COMPUTE_32F,
187 HIPSPARSELT_COMPUTE_TF32,
189 HIPSPARSELT_COMPUTE_TF32_FAST
191} hipsparseLtComputetype_t;
192
200 typedef enum {
201 HIPSPARSELT_MATMUL_ACTIVATION_RELU = 0,
202 HIPSPARSELT_MATMUL_ACTIVATION_RELU_UPPERBOUND = 1,
203 HIPSPARSELT_MATMUL_ACTIVATION_RELU_THRESHOLD = 2,
204 HIPSPARSELT_MATMUL_ACTIVATION_GELU = 3,
205 HIPSPARSELT_MATMUL_ACTIVATION_GELU_SCALING = 4,
206 HIPSPARSELT_MATMUL_ALPHA_VECTOR_SCALING = 5,
207 HIPSPARSELT_MATMUL_BETA_VECTOR_SCALING = 6,
208 HIPSPARSELT_MATMUL_BIAS_STRIDE = 7,
209 HIPSPARSELT_MATMUL_BIAS_POINTER = 8,
210 HIPSPARSELT_MATMUL_ACTIVATION_ABS = 9,
211 HIPSPARSELT_MATMUL_ACTIVATION_LEAKYRELU = 10,
212 HIPSPARSELT_MATMUL_ACTIVATION_LEAKYRELU_ALPHA = 11,
213 HIPSPARSELT_MATMUL_ACTIVATION_SIGMOID = 12,
214 HIPSPARSELT_MATMUL_ACTIVATION_TANH = 13,
215 HIPSPARSELT_MATMUL_ACTIVATION_TANH_ALPHA = 14,
216 HIPSPARSELT_MATMUL_ACTIVATION_TANH_BETA = 15,
217 HIPSPARSELT_MATMUL_BIAS_TYPE = 16,
221 HIPSPARSELT_MATMUL_SPARSE_MAT_POINTER = 17,
222} hipsparseLtMatmulDescAttribute_t;
223
230 typedef enum {
231 HIPSPARSELT_MATMUL_ALG_DEFAULT
232} hipsparseLtMatmulAlg_t;
233
241 typedef enum {
242 HIPSPARSELT_MATMUL_ALG_CONFIG_ID = 0, // READ/WRITE
243 HIPSPARSELT_MATMUL_ALG_CONFIG_MAX_ID = 1, // READ-ONLY
244 HIPSPARSELT_MATMUL_SEARCH_ITERATIONS = 2, // READ/WRITE
245 HIPSPARSELT_MATMUL_SPLIT_K = 3,
246 HIPSPARSELT_MATMUL_SPLIT_K_MODE = 4,
247 HIPSPARSELT_MATMUL_SPLIT_K_BUFFERS = 5,
248} hipsparseLtMatmulAlgAttribute_t;
249
256 typedef enum {
257 HIPSPARSELT_PRUNE_SPMMA_TILE = 0,
258 HIPSPARSELT_PRUNE_SPMMA_STRIP = 1,
259} hipsparseLtPruneAlg_t;
260
267 typedef enum {
268 HIPSPARSELT_SPLIT_K_MODE_ONE_KERNEL = 0,
269 HIPSPARSELT_SPLIT_K_MODE_TWO_KERNELS = 1,
270} hipsparseLtSplitKMode_t;
271
272// clang-format on
273
274#ifdef __cplusplus
275 extern "C" {
276#endif
277
286HIPSPARSELT_EXPORT
287 void hipsparseLtInitialize();
288
303HIPSPARSELT_EXPORT
304hipsparseStatus_t hipsparseLtGetVersion(const hipsparseLtHandle_t* handle, int* version);
305
319HIPSPARSELT_EXPORT
320hipsparseStatus_t hipsparseLtGetProperty(hipLibraryPropertyType propertyType, int* value);
321
322HIPSPARSELT_EXPORT
323hipsparseStatus_t hipsparseLtGetGitRevision(hipsparseLtHandle_t handle, char* rev);
324
325HIPSPARSELT_EXPORT
326hipsparseStatus_t hipsparseLtGetArchName(char** archName);
327
343/* hipSPARSE initialization and management routines */
344HIPSPARSELT_EXPORT
345hipsparseStatus_t hipsparseLtInit(hipsparseLtHandle_t* handle);
346
360HIPSPARSELT_EXPORT
361hipsparseStatus_t hipsparseLtDestroy(const hipsparseLtHandle_t* handle);
362
363/* matrix descriptor */
391HIPSPARSELT_EXPORT
392hipsparseStatus_t hipsparseLtDenseDescriptorInit(const hipsparseLtHandle_t* handle,
393 hipsparseLtMatDescriptor_t* matDescr,
394 int64_t rows,
395 int64_t cols,
396 int64_t ld,
397 uint32_t alignment,
398 hipDataType valueType,
399 hipsparseOrder_t order);
400
431HIPSPARSELT_EXPORT
432hipsparseStatus_t hipsparseLtStructuredDescriptorInit(const hipsparseLtHandle_t* handle,
433 hipsparseLtMatDescriptor_t* matDescr,
434 int64_t rows,
435 int64_t cols,
436 int64_t ld,
437 uint32_t alignment,
438 hipDataType valueType,
439 hipsparseOrder_t order,
440 hipsparseLtSparsity_t sparsity);
441
455HIPSPARSELT_EXPORT
456hipsparseStatus_t hipsparseLtMatDescriptorDestroy(const hipsparseLtMatDescriptor_t* matDescr);
457
479HIPSPARSELT_EXPORT
480hipsparseStatus_t hipsparseLtMatDescSetAttribute(const hipsparseLtHandle_t* handle,
481 hipsparseLtMatDescriptor_t* matDescr,
482 hipsparseLtMatDescAttribute_t matAttribute,
483 const void* data,
484 size_t dataSize);
485
507HIPSPARSELT_EXPORT
508hipsparseStatus_t hipsparseLtMatDescGetAttribute(const hipsparseLtHandle_t* handle,
509 const hipsparseLtMatDescriptor_t* matDescr,
510 hipsparseLtMatDescAttribute_t matAttribute,
511 void* data,
512 size_t dataSize);
513
514/* matmul descriptor */
544HIPSPARSELT_EXPORT
545hipsparseStatus_t hipsparseLtMatmulDescriptorInit(const hipsparseLtHandle_t* handle,
546 hipsparseLtMatmulDescriptor_t* matmulDescr,
547 hipsparseOperation_t opA,
548 hipsparseOperation_t opB,
549 const hipsparseLtMatDescriptor_t* matA,
550 const hipsparseLtMatDescriptor_t* matB,
551 const hipsparseLtMatDescriptor_t* matC,
552 const hipsparseLtMatDescriptor_t* matD,
553 hipsparseLtComputetype_t computeType);
554
577HIPSPARSELT_EXPORT
578hipsparseStatus_t
579 hipsparseLtMatmulDescSetAttribute(const hipsparseLtHandle_t* handle,
580 hipsparseLtMatmulDescriptor_t* matmulDescr,
581 hipsparseLtMatmulDescAttribute_t matmulAttribute,
582 const void* data,
583 size_t dataSize);
584
607HIPSPARSELT_EXPORT
608hipsparseStatus_t
609 hipsparseLtMatmulDescGetAttribute(const hipsparseLtHandle_t* handle,
610 const hipsparseLtMatmulDescriptor_t* matmulDescr,
611 hipsparseLtMatmulDescAttribute_t matmulAttribute,
612 void* data,
613 size_t dataSize);
614
615/* algorithm selection */
633HIPSPARSELT_EXPORT
634hipsparseStatus_t
635 hipsparseLtMatmulAlgSelectionInit(const hipsparseLtHandle_t* handle,
636 hipsparseLtMatmulAlgSelection_t* algSelection,
637 const hipsparseLtMatmulDescriptor_t* matmulDescr,
638 hipsparseLtMatmulAlg_t alg);
639
662HIPSPARSELT_EXPORT
663hipsparseStatus_t hipsparseLtMatmulAlgSetAttribute(const hipsparseLtHandle_t* handle,
664 hipsparseLtMatmulAlgSelection_t* algSelection,
665 hipsparseLtMatmulAlgAttribute_t attribute,
666 const void* data,
667 size_t dataSize);
668
692HIPSPARSELT_EXPORT
693hipsparseStatus_t
694 hipsparseLtMatmulAlgGetAttribute(const hipsparseLtHandle_t* handle,
695 const hipsparseLtMatmulAlgSelection_t* algSelection,
696 hipsparseLtMatmulAlgAttribute_t attribute,
697 void* data,
698 size_t dataSize);
699
700/* matmul plan */
717HIPSPARSELT_EXPORT
718hipsparseStatus_t hipsparseLtMatmulGetWorkspace(const hipsparseLtHandle_t* handle,
719 const hipsparseLtMatmulPlan_t* plan,
720 size_t* workspaceSize);
721
740HIPSPARSELT_EXPORT
741hipsparseStatus_t hipsparseLtMatmulPlanInit(const hipsparseLtHandle_t* handle,
742 hipsparseLtMatmulPlan_t* plan,
743 const hipsparseLtMatmulDescriptor_t* matmulDescr,
744 const hipsparseLtMatmulAlgSelection_t* algSelection);
745
759HIPSPARSELT_EXPORT
760hipsparseStatus_t hipsparseLtMatmulPlanDestroy(const hipsparseLtMatmulPlan_t* plan);
761
762/* matmul execution */
808HIPSPARSELT_EXPORT
809hipsparseStatus_t hipsparseLtMatmul(const hipsparseLtHandle_t* handle,
810 const hipsparseLtMatmulPlan_t* plan,
811 const void* alpha,
812 const void* d_A,
813 const void* d_B,
814 const void* beta,
815 const void* d_C,
816 void* d_D,
817 void* workspace,
818 hipStream_t* streams,
819 int32_t numStreams);
820
875HIPSPARSELT_EXPORT
876hipsparseStatus_t hipsparseLtMatmulSearch(const hipsparseLtHandle_t* handle,
877 hipsparseLtMatmulPlan_t* plan,
878 const void* alpha,
879 const void* d_A,
880 const void* d_B,
881 const void* beta,
882 const void* d_C,
883 void* d_D,
884 void* workspace,
885 hipStream_t* streams,
886 int32_t numStreams);
887
888/* helper */
889// prune
919HIPSPARSELT_EXPORT
920hipsparseStatus_t hipsparseLtSpMMAPrune(const hipsparseLtHandle_t* handle,
921 const hipsparseLtMatmulDescriptor_t* matmulDescr,
922 const void* d_in,
923 void* d_out,
924 hipsparseLtPruneAlg_t pruneAlg,
925 hipStream_t stream);
926
949HIPSPARSELT_EXPORT
950hipsparseStatus_t hipsparseLtSpMMAPruneCheck(const hipsparseLtHandle_t* handle,
951 const hipsparseLtMatmulDescriptor_t* matmulDescr,
952 const void* d_in,
953 int* d_valid,
954 hipStream_t stream);
955
990HIPSPARSELT_EXPORT
991hipsparseStatus_t hipsparseLtSpMMAPrune2(const hipsparseLtHandle_t* handle,
992 const hipsparseLtMatDescriptor_t* sparseMatDescr,
993 int isSparseA,
994 hipsparseOperation_t op,
995 const void* d_in,
996 void* d_out,
997 hipsparseLtPruneAlg_t pruneAlg,
998 hipStream_t stream);
999
1026HIPSPARSELT_EXPORT
1027hipsparseStatus_t hipsparseLtSpMMAPruneCheck2(const hipsparseLtHandle_t* handle,
1028 const hipsparseLtMatDescriptor_t* sparseMatDescr,
1029 int isSparseA,
1030 hipsparseOperation_t op,
1031 const void* d_in,
1032 int* d_valid,
1033 hipStream_t stream);
1034
1035// compression
1055HIPSPARSELT_EXPORT
1056hipsparseStatus_t hipsparseLtSpMMACompressedSize(const hipsparseLtHandle_t* handle,
1057 const hipsparseLtMatmulPlan_t* plan,
1058 size_t* compressedSize,
1059 size_t* compressBufferSize);
1060
1086HIPSPARSELT_EXPORT
1087hipsparseStatus_t hipsparseLtSpMMACompress(const hipsparseLtHandle_t* handle,
1088 const hipsparseLtMatmulPlan_t* plan,
1089 const void* d_dense,
1090 void* d_compressed,
1091 void* d_compressBuffer,
1092 hipStream_t stream);
1093
1114HIPSPARSELT_EXPORT
1115hipsparseStatus_t hipsparseLtSpMMACompressedSize2(const hipsparseLtHandle_t* handle,
1116 const hipsparseLtMatDescriptor_t* sparseMatDescr,
1117 size_t* compressedSize,
1118 size_t* compressBufferSize);
1119
1149HIPSPARSELT_EXPORT
1150hipsparseStatus_t hipsparseLtSpMMACompress2(const hipsparseLtHandle_t* handle,
1151 const hipsparseLtMatDescriptor_t* sparseMatDescr,
1152 int isSparseA,
1153 hipsparseOperation_t op,
1154 const void* d_dense,
1155 void* d_compressed,
1156 void* d_compressBuffer,
1157 hipStream_t stream);
1158
1159#ifdef __cplusplus
1160}
1161#endif
1162
1163#endif // _HIPSPARSELT_H_
hipsparseLtInitialize
void hipsparseLtInitialize()
Initialize hipSPARSELt for the current HIP device.
hipsparseLtSpMMAPrune2
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)
Purnes a dense matrix.
hipsparseLtSpMMACompressedSize2
hipsparseStatus_t hipsparseLtSpMMACompressedSize2(const hipsparseLtHandle_t *handle, const hipsparseLtMatDescriptor_t *sparseMatDescr, size_t *compressedSize, size_t *compressBufferSize)
provide the size of the compressed matrix.
hipsparseLtSpMMACompress2
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)
compresses a dense matrix to structured matrix.
hipsparseLtSpMMAPruneCheck2
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)
checks the correctness of the pruning structure for a given matrix.
hipsparseLtSpMMAPrune
hipsparseStatus_t hipsparseLtSpMMAPrune(const hipsparseLtHandle_t *handle, const hipsparseLtMatmulDescriptor_t *matmulDescr, const void *d_in, void *d_out, hipsparseLtPruneAlg_t pruneAlg, hipStream_t stream)
Purnes a dense matrix.
hipsparseLtSpMMACompressedSize
hipsparseStatus_t hipsparseLtSpMMACompressedSize(const hipsparseLtHandle_t *handle, const hipsparseLtMatmulPlan_t *plan, size_t *compressedSize, size_t *compressBufferSize)
provide the size of the compressed matrix.
hipsparseLtSpMMACompress
hipsparseStatus_t hipsparseLtSpMMACompress(const hipsparseLtHandle_t *handle, const hipsparseLtMatmulPlan_t *plan, const void *d_dense, void *d_compressed, void *d_compressBuffer, hipStream_t stream)
compresses a dense matrix to structured matrix.
hipsparseLtSpMMAPruneCheck
hipsparseStatus_t hipsparseLtSpMMAPruneCheck(const hipsparseLtHandle_t *handle, const hipsparseLtMatmulDescriptor_t *matmulDescr, const void *d_in, int *d_valid, hipStream_t stream)
checks the correctness of the pruning structure for a given matrix.
hipsparseLtInit
hipsparseStatus_t hipsparseLtInit(hipsparseLtHandle_t *handle)
Create a hipsparselt handle.
hipsparseLtGetVersion
hipsparseStatus_t hipsparseLtGetVersion(const hipsparseLtHandle_t *handle, int *version)
Retrive the version number of the hipSPARSELt library.
hipsparseLtDestroy
hipsparseStatus_t hipsparseLtDestroy(const hipsparseLtHandle_t *handle)
Destroy a hipsparselt handle.
hipsparseLtGetProperty
hipsparseStatus_t hipsparseLtGetProperty(hipLibraryPropertyType propertyType, int *value)
Retrive the value of the requested property.
hipsparseLtMatmulAlgSelectionInit
hipsparseStatus_t hipsparseLtMatmulAlgSelectionInit(const hipsparseLtHandle_t *handle, hipsparseLtMatmulAlgSelection_t *algSelection, const hipsparseLtMatmulDescriptor_t *matmulDescr, hipsparseLtMatmulAlg_t alg)
Initializes the algorithm selection descriptor.
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.
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 algorithm selection descriptor.
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.
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.
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.
hipsparseLtMatmulSearch
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 dense matrix multiplication.
hipsparseLtMatmul
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 dense matrix multiplication.
hipsparseLtMatmulGetWorkspace
hipsparseStatus_t hipsparseLtMatmulGetWorkspace(const hipsparseLtHandle_t *handle, const hipsparseLtMatmulPlan_t *plan, size_t *workspaceSize)
Determines the required workspace size.
hipsparseLtMatmulPlanDestroy
hipsparseStatus_t hipsparseLtMatmulPlanDestroy(const hipsparseLtMatmulPlan_t *plan)
Destroy a matrix multiplication plan descriptor.
hipsparseLtMatmulPlanInit
hipsparseStatus_t hipsparseLtMatmulPlanInit(const hipsparseLtHandle_t *handle, hipsparseLtMatmulPlan_t *plan, const hipsparseLtMatmulDescriptor_t *matmulDescr, const hipsparseLtMatmulAlgSelection_t *algSelection)
Initializes the matrix multiplication plan descriptor.
hipsparseLtStructuredDescriptorInit
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 structured matrix.
hipsparseLtMatDescGetAttribute
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.
hipsparseLtMatDescSetAttribute
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.
hipsparseLtDenseDescriptorInit
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 dense matrix.
hipsparseLtMatDescriptorDestroy
hipsparseStatus_t hipsparseLtMatDescriptorDestroy(const hipsparseLtMatDescriptor_t *matDescr)
Destroy a matrix descriptor.
hipsparseLtSparsity_t
hipsparseLtSparsity_t
Specify the sparsity of the structured matrix.
Definition hipsparselt.h:161
hipsparseLtMatmulAlg_t
hipsparseLtMatmulAlg_t
Specify the algorithm for matrix-matrix multiplication.
Definition hipsparselt.h:230
hipsparseLtMatmulAlgAttribute_t
hipsparseLtMatmulAlgAttribute_t
Specify the matrix multiplication algorithm attributes.
Definition hipsparselt.h:241
hipsparseLtComputetype_t
hipsparseLtComputetype_t
Specify the compute precision modes of the matrix.
Definition hipsparselt.h:183
hipsparseLtSplitKMode_t
hipsparseLtSplitKMode_t
Specify the split k mode value.
Definition hipsparselt.h:267
hipsparseLtMatmulDescAttribute_t
hipsparseLtMatmulDescAttribute_t
Specify the additional attributes of a matrix multiplication descriptor.
Definition hipsparselt.h:200
hipsparseLtPruneAlg_t
hipsparseLtPruneAlg_t
Specify the pruning algorithm to apply to the structured matrix before the compression.
Definition hipsparselt.h:256
hipsparseLtMatDescAttribute_t
hipsparseLtMatDescAttribute_t
Specify the additional attributes of a matrix descriptor.
Definition hipsparselt.h:173
HIPSPARSELT_SPARSITY_50_PERCENT
@ HIPSPARSELT_SPARSITY_50_PERCENT
Definition hipsparselt.h:162
HIPSPARSELT_MATMUL_ALG_DEFAULT
@ HIPSPARSELT_MATMUL_ALG_DEFAULT
Definition hipsparselt.h:231
HIPSPARSELT_MATMUL_SPLIT_K
@ HIPSPARSELT_MATMUL_SPLIT_K
Definition hipsparselt.h:245
HIPSPARSELT_MATMUL_SPLIT_K_BUFFERS
@ HIPSPARSELT_MATMUL_SPLIT_K_BUFFERS
Definition hipsparselt.h:247
HIPSPARSELT_MATMUL_SEARCH_ITERATIONS
@ HIPSPARSELT_MATMUL_SEARCH_ITERATIONS
Definition hipsparselt.h:244
HIPSPARSELT_MATMUL_SPLIT_K_MODE
@ HIPSPARSELT_MATMUL_SPLIT_K_MODE
Definition hipsparselt.h:246
HIPSPARSELT_MATMUL_ALG_CONFIG_ID
@ HIPSPARSELT_MATMUL_ALG_CONFIG_ID
Definition hipsparselt.h:242
HIPSPARSELT_MATMUL_ALG_CONFIG_MAX_ID
@ HIPSPARSELT_MATMUL_ALG_CONFIG_MAX_ID
Definition hipsparselt.h:243
HIPSPARSELT_COMPUTE_32F
@ HIPSPARSELT_COMPUTE_32F
Definition hipsparselt.h:186
HIPSPARSELT_COMPUTE_TF32_FAST
@ HIPSPARSELT_COMPUTE_TF32_FAST
Definition hipsparselt.h:189
HIPSPARSELT_COMPUTE_TF32
@ HIPSPARSELT_COMPUTE_TF32
Definition hipsparselt.h:187
HIPSPARSELT_COMPUTE_32I
@ HIPSPARSELT_COMPUTE_32I
Definition hipsparselt.h:185
HIPSPARSELT_COMPUTE_16F
@ HIPSPARSELT_COMPUTE_16F
Definition hipsparselt.h:184
HIPSPARSELT_SPLIT_K_MODE_TWO_KERNELS
@ HIPSPARSELT_SPLIT_K_MODE_TWO_KERNELS
Definition hipsparselt.h:269
HIPSPARSELT_SPLIT_K_MODE_ONE_KERNEL
@ HIPSPARSELT_SPLIT_K_MODE_ONE_KERNEL
Definition hipsparselt.h:268
HIPSPARSELT_MATMUL_ACTIVATION_RELU_UPPERBOUND
@ HIPSPARSELT_MATMUL_ACTIVATION_RELU_UPPERBOUND
Definition hipsparselt.h:202
HIPSPARSELT_MATMUL_BIAS_STRIDE
@ HIPSPARSELT_MATMUL_BIAS_STRIDE
Definition hipsparselt.h:208
HIPSPARSELT_MATMUL_BIAS_POINTER
@ HIPSPARSELT_MATMUL_BIAS_POINTER
Definition hipsparselt.h:209
HIPSPARSELT_MATMUL_ACTIVATION_LEAKYRELU
@ HIPSPARSELT_MATMUL_ACTIVATION_LEAKYRELU
Definition hipsparselt.h:211
HIPSPARSELT_MATMUL_BIAS_TYPE
@ HIPSPARSELT_MATMUL_BIAS_TYPE
Definition hipsparselt.h:217
HIPSPARSELT_MATMUL_ACTIVATION_LEAKYRELU_ALPHA
@ HIPSPARSELT_MATMUL_ACTIVATION_LEAKYRELU_ALPHA
Definition hipsparselt.h:212
HIPSPARSELT_MATMUL_ACTIVATION_TANH_BETA
@ HIPSPARSELT_MATMUL_ACTIVATION_TANH_BETA
Definition hipsparselt.h:216
HIPSPARSELT_MATMUL_ACTIVATION_GELU_SCALING
@ HIPSPARSELT_MATMUL_ACTIVATION_GELU_SCALING
Definition hipsparselt.h:205
HIPSPARSELT_MATMUL_ALPHA_VECTOR_SCALING
@ HIPSPARSELT_MATMUL_ALPHA_VECTOR_SCALING
Definition hipsparselt.h:206
HIPSPARSELT_MATMUL_ACTIVATION_TANH
@ HIPSPARSELT_MATMUL_ACTIVATION_TANH
Definition hipsparselt.h:214
HIPSPARSELT_MATMUL_ACTIVATION_SIGMOID
@ HIPSPARSELT_MATMUL_ACTIVATION_SIGMOID
Definition hipsparselt.h:213
HIPSPARSELT_MATMUL_ACTIVATION_TANH_ALPHA
@ HIPSPARSELT_MATMUL_ACTIVATION_TANH_ALPHA
Definition hipsparselt.h:215
HIPSPARSELT_MATMUL_BETA_VECTOR_SCALING
@ HIPSPARSELT_MATMUL_BETA_VECTOR_SCALING
Definition hipsparselt.h:207
HIPSPARSELT_MATMUL_ACTIVATION_RELU
@ HIPSPARSELT_MATMUL_ACTIVATION_RELU
Definition hipsparselt.h:201
HIPSPARSELT_MATMUL_ACTIVATION_GELU
@ HIPSPARSELT_MATMUL_ACTIVATION_GELU
Definition hipsparselt.h:204
HIPSPARSELT_MATMUL_ACTIVATION_ABS
@ HIPSPARSELT_MATMUL_ACTIVATION_ABS
Definition hipsparselt.h:210
HIPSPARSELT_MATMUL_ACTIVATION_RELU_THRESHOLD
@ HIPSPARSELT_MATMUL_ACTIVATION_RELU_THRESHOLD
Definition hipsparselt.h:203
HIPSPARSELT_MATMUL_SPARSE_MAT_POINTER
@ HIPSPARSELT_MATMUL_SPARSE_MAT_POINTER
Definition hipsparselt.h:221
HIPSPARSELT_PRUNE_SPMMA_TILE
@ HIPSPARSELT_PRUNE_SPMMA_TILE
Definition hipsparselt.h:257
HIPSPARSELT_PRUNE_SPMMA_STRIP
@ HIPSPARSELT_PRUNE_SPMMA_STRIP
Definition hipsparselt.h:258
HIPSPARSELT_MAT_BATCH_STRIDE
@ HIPSPARSELT_MAT_BATCH_STRIDE
Definition hipsparselt.h:175
HIPSPARSELT_MAT_NUM_BATCHES
@ HIPSPARSELT_MAT_NUM_BATCHES
Definition hipsparselt.h:174
hipsparseLtGetGitRevision
hipsparseStatus_t hipsparseLtGetGitRevision(hipsparseLtHandle_t handle, char *rev)
hipsparseLtGetArchName
hipsparseStatus_t hipsparseLtGetArchName(char **archName)
hipsparseLtHandle_t
Handle to the hipSPARSELt library context queue.
Definition hipsparselt.h:103
hipsparseLtHandle_t::data
uint8_t data[11024]
Definition hipsparselt.h:103
hipsparseLtMatDescriptor_t
Descriptor of the matrix.
Definition hipsparselt.h:114
hipsparseLtMatDescriptor_t::data
uint8_t data[11024]
Definition hipsparselt.h:114
hipsparseLtMatmulAlgSelection_t
Descriptor of the matrix multiplication algorithm.
Definition hipsparselt.h:132
hipsparseLtMatmulAlgSelection_t::data
uint8_t data[11024]
Definition hipsparselt.h:132
hipsparseLtMatmulDescriptor_t
Descriptor of the matrix multiplication operation.
Definition hipsparselt.h:124
hipsparseLtMatmulDescriptor_t::data
uint8_t data[11024]
Definition hipsparselt.h:124
hipsparseLtMatmulPlan_t
Descriptor of the matrix multiplication execution plan.
Definition hipsparselt.h:143
hipsparseLtMatmulPlan_t::data
uint8_t data[11024]
Definition hipsparselt.h:143