* Copyright (c) 2026 Huawei Technologies Co., Ltd.
* This program is free software, you can redistribute it and/or modify it under the terms and conditions of
* CANN Open Software License Agreement Version 2.0 (the "License").
* Please refer to the License for details. You may not use this file except in compliance with the License.
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
* See LICENSE in the root of the software repository for the full text of the License.
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
typedef enum aclblasStatus {
ACLBLAS_STATUS_SUCCESS = 0,
ACLBLAS_STATUS_NOT_INITIALIZED = 1,
ACLBLAS_STATUS_ALLOC_FAILED = 2,
ACLBLAS_STATUS_INVALID_VALUE = 3,
ACLBLAS_STATUS_MAPPING_ERROR = 4,
ACLBLAS_STATUS_EXECUTION_FAILED = 5,
ACLBLAS_STATUS_INTERNAL_ERROR = 6,
ACLBLAS_STATUS_NOT_SUPPORTED = 7,
ACLBLAS_STATUS_ARCH_MISMATCH = 8,
ACLBLAS_STATUS_HANDLE_IS_NULLPTR = 9,
ACLBLAS_STATUS_INVALID_ENUM = 10,
ACLBLAS_STATUS_UNKNOWN = 11
} aclblasStatus_t;
typedef aclblasStatus_t aclblasLtStatus;
typedef enum aclblasFillMode {
ACLBLAS_UPPER = 121,
ACLBLAS_LOWER = 122
} aclblasFillMode_t;
typedef enum aclblasDiagType {
ACLBLAS_NON_UNIT = 131,
ACLBLAS_UNIT = 132
} aclblasDiagType_t;
typedef enum aclblasSideMode {
ACLBLAS_SIDE_LEFT = 141,
ACLBLAS_SIDE_RIGHT = 142
} aclblasSideMode_t;
#ifndef ACLBLAS_OPERATION_DECLARED
#define ACLBLAS_OPERATION_DECLARED
typedef enum aclblasOperation {
ACLBLAS_OP_N = 111,
ACLBLAS_OP_T = 112,
ACLBLAS_OP_C = 113
} aclblasOperation_t;
#elif __cplusplus >= 201103L
static_assert(ACLBLAS_OP_N == 111, "Inconsistent declaration of ACLBLAS_OP_N");
static_assert(ACLBLAS_OP_T == 112, "Inconsistent declaration of ACLBLAS_OP_T");
static_assert(ACLBLAS_OP_C == 113, "Inconsistent declaration of ACLBLAS_OP_C");
#endif
typedef struct aclblasComplex {
float real;
float imag;
} aclblasComplex;
* Note that support for compute types is largely dependent on backend. */
typedef enum aclblasComputeType {
ACLBLAS_COMPUTE_16F = 0,
ACLBLAS_COMPUTE_16F_PEDANTIC = 1,
ACLBLAS_COMPUTE_32F = 2,
ACLBLAS_COMPUTE_32F_PEDANTIC = 3,
ACLBLAS_COMPUTE_32F_FAST_16F = 4,
ACLBLAS_COMPUTE_32F_FAST_16BF = 5,
ACLBLAS_COMPUTE_32F_FAST_TF32 = 6,
ACLBLAS_COMPUTE_64F = 7,
ACLBLAS_COMPUTE_64F_PEDANTIC = 8,
ACLBLAS_COMPUTE_32I = 9,
ACLBLAS_COMPUTE_32I_PEDANTIC = 10,
} aclblasComputeType_t;
typedef enum aclblasLogLevel {
ACLBLAS_LOG_LEVEL_DEBUG = 0,
ACLBLAS_LOG_LEVEL_INFO = 1,
ACLBLAS_LOG_LEVEL_ERROR = 2,
} aclblasLogLevel_t;
* Note that support for algorithms is largely dependent on backend. */
typedef enum aclblasGemmAlgo {
ACLBLAS_GEMM_DEFAULT = 0,
ACLBLAS_GEMM_ALGO0 = 1,
ACLBLAS_GEMM_ALGO1 = 2,
ACLBLAS_GEMM_ALGO2 = 3,
ACLBLAS_GEMM_ALGO3 = 4,
ACLBLAS_GEMM_ALGO4 = 5,
ACLBLAS_GEMM_ALGO5 = 6,
ACLBLAS_GEMM_ALGO6 = 7,
ACLBLAS_GEMM_ALGO7 = 8,
} aclblasGemmAlgo_t;
*
* Convention (matches LAPACK xINFO semantics):
* = 0 : successful exit
* < 0 : if info = -i, the i-th argument had an illegal value
*
* Argument numbering follows standard LAPACK convention: `info` itself is
* excluded from counting. For ACLBLAS wrappers, the `aclblas handle` is
* also excluded (reported separately via ACLBLAS_STATUS_HANDLE_IS_NULLPTR).
* For example, for `aclblasSgeqrfBatched(handle, m, n, Aarray, lda, TauArray, info, batchSize)`,
* argument numbering (excluding handle and info) is:
* m=1, n=2, Aarray=3, lda=4, TauArray=5, batchSize=6.
*/
typedef enum aclblasLapackInfo {
ACLBLAS_LAPACK_INFO_OK = 0,
ACLBLAS_LAPACK_INFO_ARG_1 = -1,
ACLBLAS_LAPACK_INFO_ARG_2 = -2,
ACLBLAS_LAPACK_INFO_ARG_3 = -3,
ACLBLAS_LAPACK_INFO_ARG_4 = -4,
ACLBLAS_LAPACK_INFO_ARG_5 = -5,
ACLBLAS_LAPACK_INFO_ARG_6 = -6,
ACLBLAS_LAPACK_INFO_ARG_7 = -7,
ACLBLAS_LAPACK_INFO_ARG_8 = -8
} aclblasLapackInfo_t;
#ifdef __cplusplus
}
#endif