SetFixpipePreQuantFlag
产品支持情况
产品 |
是否支持 |
|---|---|
√ |
|
√ |
|
√ |
|
x |
|
x |
|
x |
功能说明
DataCopy(CO1->GM、CO1->A1)过程中进行随路量化时,通过调用该接口设置量化流程中标量量化参数。
函数原型
1 2 | template<template T> __aicore__ inline void SetFixpipePreQuantFlag(uint64_t config) |
参数说明
参数名称 |
输入/输出 |
含义 |
|---|---|---|
config |
输入 |
量化过程中使用到的标量量化参数。 |
返回值说明
无
约束说明
无
调用示例
完整示例可参考完整示例。
1 2 3 4 5 | float tmp = (float)0.5; // 将float的tmp转换成uint64_t的deqScalar uint64_t deqScalar = static_cast<uint64_t>(*reinterpret_cast<int32_t*>(&tmp)); AscendC::SetFixpipePreQuantFlag(deqScalar); // 设置量化参数 AscendC::PipeBarrier<PIPE_FIX>(); |
父主题: 数据搬运