File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/plugins/intel_cpu/src/nodes Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1203,7 +1203,11 @@ void ScaledDotProductAttention::createPrimitive() {
12031203 std::shared_ptr<Executor> executor = nullptr ;
12041204#ifdef OPENVINO_ARCH_X86_64
12051205 if (rtPrecision == ov::element::bf16 ) {
1206- executor = std::make_shared<AttentionExecutor<KT_ONEDNN, ov::bfloat16>>(context);
1206+ if (ov::with_cpu_x86_bfloat16 ()) {
1207+ executor = std::make_shared<AttentionExecutor<KT_ONEDNN, ov::bfloat16>>(context);
1208+ } else {
1209+ executor = std::make_shared<AttentionExecutor<KT_REF, ov::bfloat16>>(context);
1210+ }
12071211 } else if (rtPrecision == ov::element::f16 ) {
12081212 if (with_cpu_x86_avx512_core_fp16 ()) {
12091213 executor = std::make_shared<AttentionExecutor<KT_ONEDNN, ov::float16>>(context);
You can’t perform that action at this time.
0 commit comments