Skip to content
版 本

asc_set_copy_pad_val

产 品 支 持 情 况

产 品是 否 支 持
Atlas A3 训 练 系 列 产 品/Atlas A3 推 理 系 列 产 品
Atlas A2 训 练 系 列 产 品/Atlas A2 推 理 系 列 产 品
Ascend 950PR/Ascend 950DT

功 能 说 明

和asc_copy_gm2ub_align或asc_copy_ub2gm_align接 口 配 合 使 用,设 置 连 续 搬 运 数 据 块 左 右 两 侧 需 要 填 补 的 数 据 值。

对 于Ascend 950PR/Ascend 950DT产 品:

  • 该 接 口 仅 对asc_copy_gm2ub_align接 口 有 效。
  • fp8_e8m0_t、fp8_e5m2_t、fp8_e4m3fn_t、fp4x2_e2m1_t、fp4x2_e1m2_t、hifloat8_t类 型 的 数 据 需 转 换 成int8_t类 型 后 再 调 用 本 接 口。

函 数 原 型

C++
__aicore__ inline void asc_set_copy_pad_val(int8_t pad_value)
__aicore__ inline void asc_set_copy_pad_val(uint8_t pad_value)
__aicore__ inline void asc_set_copy_pad_val(int16_t pad_value)
__aicore__ inline void asc_set_copy_pad_val(uint16_t pad_value)
__aicore__ inline void asc_set_copy_pad_val(half pad_value)
__aicore__ inline void asc_set_copy_pad_val(bfloat16_t pad_value)
__aicore__ inline void asc_set_copy_pad_val(int32_t pad_value)
__aicore__ inline void asc_set_copy_pad_val(uint32_t pad_value)
__aicore__ inline void asc_set_copy_pad_val(float pad_value)

参 数 说 明

参 数 名输 入/输 出描 述
pad_value输 入需 要 填 补 的 数 据 值。

返 回 值 说 明

流 水 类 型

PIPE_S

约 束 说 明

调 用 示 例

C++
// 源 操 作 数 非 对 齐,需 要 填 补 数 据
asc_set_copy_pad_val(0);
asc_copy_gm2ub_align(dst, src, 2, 48 * sizeof(int8_t), 0, 0, true, 0, 0, 0);

免 责 声 明:本 站 内 容 由 asc-devkit 仓 master 分 支 自 动 编 译 生 成,属 于 持 续 开 发 版 本,可 能 存 在 缺 陷,仅 供 预 览 与 参 考。如 需 稳 定 及 商 用 资 料,请 查 阅 官 方 昇 腾 社 区