Skip to content

Commit

Permalink
fix clang and InitGraphStatefulDiffPrimitiveModel test
Browse files Browse the repository at this point in the history
  • Loading branch information
alvoron committed Feb 19, 2025
1 parent 3075684 commit 7b27f5c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/plugins/intel_cpu/src/graph_optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,9 @@ void GraphOptimizer::MergeEltwiseAndConvert(Graph& graph) {

auto fusedOps = parentNode->getFusedWith();
if (!fusedOps.empty()) {
fusedOps[fusedOps.size() - 1]->setOriginalOutputPrecisionAtPort(0, childNode->getOriginalOutputPrecisionAtPort(0));
fusedOps[fusedOps.size() - 1]->setOriginalOutputPrecisionAtPort(
0,
childNode->getOriginalOutputPrecisionAtPort(0));
}
parentNode->setOriginalOutputPrecisionAtPort(0, childNode->getOriginalOutputPrecisionAtPort(0));
parentNode->addOriginalLayer(childNode->getOriginalLayers());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ class InitGraphStatefulDiffPrimitiveModel : public InitGraphStatefulModelBase {

configuration.insert({"SNIPPETS_MODE", "DISABLE"});

bool directPair;
std::tie(inputShapes, directPair) = this->GetParam();

init_input_shapes(inputShapes);
Expand Down Expand Up @@ -250,12 +249,24 @@ class InitGraphStatefulDiffPrimitiveModel : public InitGraphStatefulModelBase {
}

void check_init_graph_node() override {
#if defined(OPENVINO_ARCH_ARM) || defined(OPENVINO_ARCH_ARM64)
// Convert node is fused into Eltwise on arm platforms
if (directPair) {
CheckNumberOfNodesWithType(compiledModel, "Convert", 0);
} else {
CheckNumberOfNodesWithType(compiledModel, "Convert", 1);
}
#else
CheckNumberOfNodesWithType(compiledModel, "Convert", 1);
#endif
}

ov::Shape get_state_shape(size_t i) override {
return inputShapes[0].second[i];
}

private:
bool directPair;
};

TEST_P(InitGraphStatefulDiffPrimitiveModel, CompareWithRefs) {
Expand Down

0 comments on commit 7b27f5c

Please sign in to comment.