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

#### 产品支持情况

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


#### 功能说明

创建矩阵-向量乘的handle，输入数据的数据类型为int8_t，输出数据的数据类型为int32_t。

创建handle成功后，需调用acl.op.execute_with_handle接口执行算子。


#### 函数原型

- C函数原型
  1 2 3 4 5 aclError aclblasCreateHandleForS8gemv(aclTransType transA, int m, int n, aclComputeType type, aclopHandle **handle)

- python函数
  1 handle, ret = acl.blas.create_handle_for_s8gemv(trans_a, m, n, type)


#### 参数说明

| 参数名 | 说明 |
| --- | --- |
| trans\_a | int，矩阵A是否转置的标记。 |
| m | int，矩阵A的行数，存储矩阵乘数据时，行优先。 |
| n | int，矩阵A的列数。 |
| type | int，计算精度。 |


#### 返回值说明

| 返回值 | 说明 |
| --- | --- |
| handle | int，执行算子的handle数据的指针地址。 |
| ret | int，错误码，返回0表示成功，返回其它值表示失败。 |
