---
title: 函数：s8gemv
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendgraphapi/aclpythondevg_01_0806.html
sourcePath: /source/zh/canncommercial/900/API/ascendgraphapi/aclpythondevg_01_0806.html
indexId: 7e2e664b1211127f9c4363147ebb72973354bd68c01389e9307dec380ad7239775
---
# 函数：s8gemv

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | √ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |
| Atlas 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | √ |


#### 功能说明

执行矩阵-向量的乘法，y = αAx + βy，输入数据的数据类型为int8_t，输出数据的数据类型为int32_t，异步接口。


#### 函数原型

- C函数原型
  1 2 3 4 5 6 7 8 9 10 11 12 13 aclError aclblasS8gemv(aclTransType transA, int m, int n, const int32_t *alpha, const int8_t *a, int lda, const int8_t *x, int incx, const int32_t *beta, int32_t *y, int incy, aclComputeType type, aclrtStream stream)

- python函数
  1 ret = acl.blas.s8gemv(trans_a, m, n, alpha, a, lda, x, incx, beta, y, incy, type, stream)


#### 参数说明

| 参数名 | 说明 |
| --- | --- |
| trans\_a | int，矩阵A是否转置的标记。 |
| m | int，矩阵A的行数，存储矩阵乘数据时，行优先。 |
| n | int，矩阵A的列数。 |
| alpha | int， 用于执行乘操作的标量alpha数据指针地址。 |
| a | int，矩阵A的数据指针地址。 |
| lda | int，A矩阵的主位，此时选择转置，按行优先，则lda为A的列数。预留参数，当前只能设置为\-1。 |
| x | int，向量x的数据指针地址。 |
| incx | int，x连续元素之间的步长。预留参数，当前只能设置为\-1。 |
| beta | int，用于执行乘操作的标量beta的数据指针地址。 |
| y | int，向量y的数据指针地址。 |
| incy | int，y连续元素之间的步长。预留参数，当前只能设置为\-1。 |
| type | int，计算精度。 |
| stream | int，执行算子所在的Stream。 |


#### 返回值说明

| 返回值 | 说明 |
| --- | --- |
| ret | int，错误码，返回0表示成功，返回其它值表示失败。 |


#### 资源参考

接口调用流程，参见接口调用流程(https://www.hiascend.comdocument/detail/zh/canncommercial/900/programug/acldevg/aclpythondevg_0069.html)。
