SetHF32Mode
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
x |
|
x |
|
x |
Function Usage
Sets whether to enable the HF32 mode for the Mmad computation. After this mode is enabled, FP32 data in L0A/L0B is rounded off to HF32 before participating in the Mmad computation.
Prototype
1 | __aicore__ inline void SetHF32Mode(HF32Mode mode) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
mode |
Input |
Input parameter for controlling the Mmad HF32 mode. The value is of the HF32Mode type. The options are as follows:
|
Returns
None
Restrictions
None
Examples
1 | AscendC::SetHF32Mode(HF32Mode::ENABLE); // Control whether to use the HF32 mode for the mmad computation. |
Parent topic: Cube Computation