mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-03 03:58:54 +00:00
[CPU] Fix mamtulnbits accuracy level (#22963)
### Description Fix mamtulnbits accuracy level ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. -->
This commit is contained in:
parent
a24723df16
commit
08abab0b14
2 changed files with 5 additions and 3 deletions
|
|
@ -33,6 +33,7 @@ constexpr size_t A = 0,
|
|||
};
|
||||
|
||||
typedef enum {
|
||||
Level0, /*!< input fp32, accumulator fp32 */
|
||||
Level1, /*!< input fp32, accumulator fp32 */
|
||||
Level2, /*!< input fp16, accumulator fp16 */
|
||||
Level3, /*!< input bf16, accumulator fp32 */
|
||||
|
|
|
|||
|
|
@ -274,11 +274,12 @@ void TestMatMulNBitsTyped() {
|
|||
base_opts.block_size = block_size;
|
||||
base_opts.accuracy_level = accuracy_level;
|
||||
|
||||
if constexpr (std::is_same<AType, MLFloat16>::value) {
|
||||
if (base_opts.accuracy_level == 4) {
|
||||
base_opts.output_abs_error = 0.1f;
|
||||
base_opts.output_rel_error = 0.02f;
|
||||
} else if constexpr (std::is_same<AType, MLFloat16>::value) {
|
||||
base_opts.output_abs_error = 0.055f;
|
||||
base_opts.output_rel_error = 0.02f;
|
||||
} else if (base_opts.accuracy_level == 4) {
|
||||
base_opts.output_abs_error = 0.1f;
|
||||
}
|
||||
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue