Skip to content

Commit

Permalink
[CPU] Moved Ngram fusion with SymbolicOpts
Browse files Browse the repository at this point in the history
  • Loading branch information
a-sidorova committed Feb 27, 2024
1 parent ddf7c44 commit 345caba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ inline void ConvertToCPUSpecificOpset(std::shared_ptr<ov::Model> &nGraphFunc) {
type_to_fuse_map{{}},
false,
false);
auto symbolic_pipeline = CPU_REGISTER_PASS_COMMON(manager, ov::pass::SymbolicOptimizations, false);
symbolic_pipeline->get_manager()->register_pass<NgramFusion>();
CPU_REGISTER_PASS_COMMON(manager, ov::pass::Validate);

manager.run_passes(nGraphFunc);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,11 @@ void Transformations::PostLpt() {
CPU_REGISTER_PASS_X64(postLPTPassManager, RoPEFusion);

CPU_REGISTER_PASS_X64(postLPTPassManager, StatefulSDPAFusion);

// Should be before Snippets pipeline because Ngram pattern contains eltwise nodes that can be tokenized by Snippets.
auto symbolic_pipeline = CPU_REGISTER_PASS_COMMON(postLPTPassManager, ov::pass::SymbolicOptimizations, false);
symbolic_pipeline->get_manager()->register_pass<NgramFusion>();

postLPTPassManager.run_passes(model);
}

Expand Down

0 comments on commit 345caba

Please sign in to comment.