SetFixpipePreQuantFlag

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product AI Core

x

Atlas inference product Vector Core

x

Atlas training product

x

Function Usage

Sets the scalar quantization parameters in the real-time quantization process during DataCopy (CO1 -> GM or CO1 -> A1).

Prototype

1
2
template<template T>
__aicore__ inline void SetFixpipePreQuantFlag(uint64_t config)

Parameters

Table 1 Parameters

Parameter

Input/Output

Description

config

Input

Used to set the scalar quantization parameters used during quantization.

Returns

None

Restrictions

None

Examples

For details about the complete example, see Complete Example.

1
2
3
4
5
float tmp = (float)0.5;
// Convert tmp of float to deqScalar of uint64_t.
uint64_t deqScalar = static_cast<uint64_t>(*reinterpret_cast<int32_t*>(&tmp)); 
AscendC::SetFixpipePreQuantFlag(deqScalar);  // Set quantization parameters.
AscendC::PipeBarrier<PIPE_FIX>();