Skip to content

Commit

Permalink
[CPU] [Snippets] Support inference precision f16 on Snippets for ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
xuchen-intel committed Sep 9, 2024
1 parent 4643e5f commit 536086c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -925,13 +925,7 @@ void Transformations::MainSnippets(void) {
CPU_REGISTER_PASS_X64(snippetsManager, SnippetsMarkSkipped, inferencePrecision == ov::element::bf16);
#endif
}
CPU_REGISTER_PASS_X64(snippetsManager, snippets::pass::SnippetsTokenization, tokenization_config);
// [126738] Remove precision constraint when Convert emitters are implemented on arm platform
// The redundant "if defined", used to WA error of "empty controlled statement found" should also be removed then.
#if defined(OPENVINO_ARCH_ARM64)
if (inferencePrecision == ov::element::f32)
CPU_REGISTER_PASS_ARM(snippetsManager, snippets::pass::SnippetsTokenization, tokenization_config);
#endif
CPU_REGISTER_PASS_COMMON(snippetsManager, snippets::pass::SnippetsTokenization, tokenization_config);

// - MHA has BRGEMM that is supported only on AVX512 platforms
// - CPU Plugin Subgraph supports only f32, bf16 (and quantized) BRGEMM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,6 @@ std::vector<std::string> disabledTestPatterns() {
retVector.emplace_back(R"(smoke_Snippets_Eltwise/TwoInputsAndOutputs.*)");
// arm jit_eltwise_emitters doesn't support jit_power_dynamic_emitter yet
retVector.emplace_back(R"(smoke_Snippets_Eltwise/MaxNumParamsEltwise.*)");
// TODO: 141292
retVector.emplace_back(R"(smoke_Snippets_Eltwise_FP16.*)");
#endif
#if defined(_WIN32)
retVector.emplace_back(R"(.*smoke_QuantizedConvolutionBatchNormTransposeOnWeights/QuantizedConvolutionBatchNorm.CompareWithRefs/conv_type=convolution_quantize_type=fake_quantize_intervals_type=per_(tensor|channel)_transpose_on_weights=true_device=CPU.*)");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_Snippets_Eltwise, Add,
::testing::Combine(
::testing::ValuesIn(inShapesStatic1),
::testing::ValuesIn(inShapesStatic2),
::testing::Values(ov::element::f32),
::testing::ValuesIn({ov::element::f32, ov::element::f16}),
::testing::Values(1), // Add
::testing::Values(1), // Subgraph is created, since the inputs are followed by converts
::testing::Values(ov::test::utils::DEVICE_CPU)),
Expand All @@ -50,7 +50,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_Snippets_Eltwise_Add, Add,
::testing::Combine(
::testing::ValuesIn(inShapesDynamic1),
::testing::ValuesIn(inShapesDynamic2),
::testing::Values(ov::element::f32),
::testing::ValuesIn({ov::element::f32, ov::element::f16}),
::testing::Values(1),
::testing::Values(1), // Subgraph is created, since the inputs are followed by converts
::testing::Values(ov::test::utils::DEVICE_CPU)),
Expand Down Expand Up @@ -86,7 +86,7 @@ std::vector<std::vector<InputShape>> inShapesAddPair {
INSTANTIATE_TEST_SUITE_P(smoke_Snippets_Eltwise, AddPair,
::testing::Combine(
::testing::ValuesIn(inShapesAddPair),
::testing::Values(ov::element::f32),
::testing::ValuesIn({ov::element::f32, ov::element::f16}),
::testing::Values(1),
::testing::Values(1), // Subgraph is created, since the inputs are followed by converts
::testing::Values(ov::test::utils::DEVICE_CPU)),
Expand Down

0 comments on commit 536086c

Please sign in to comment.