Skip to content

Commit

Permalink
enforce inference precision to f16 for GNR acc verify
Browse files Browse the repository at this point in the history
  • Loading branch information
liubo-intel committed Dec 24, 2024
1 parent 92edc91 commit de77c8d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/plugins/intel_cpu/src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,11 @@ void Config::readProperties(const ov::AnyMap& prop, const ModelType modelType) {
} else {
OPENVINO_THROW("invalid value");
}
// enforce inference precision to f16 for GNR acc verify
if (mayiuse(avx512_core_amx_fp16)) {
// inferencePrecision = ov::element::f16;
inferencePrecision = ov::element::bf16;
}
} catch (ov::Exception&) {
OPENVINO_THROW("Wrong value ",
val.as<std::string>(),
Expand Down Expand Up @@ -401,6 +406,11 @@ void Config::readProperties(const ov::AnyMap& prop, const ModelType modelType) {
} else {
inferencePrecision = ov::element::undefined;
}
// enforce inference precision to f16 for GNR acc verify
if (mayiuse(avx512_core_amx_fp16)) {
// inferencePrecision = ov::element::f16;
inferencePrecision = ov::element::bf16;
}
}
// enable ACL fast math in PERFORMANCE mode
#if defined(OV_CPU_WITH_ACL)
Expand Down

0 comments on commit de77c8d

Please sign in to comment.