Skip to content

Commit

Permalink
Merge pull request PaddlePaddle#22 from tc20042008/xk-cinn-trivalop-fuse
Browse files Browse the repository at this point in the history
Xk cinn trivalop fuse
  • Loading branch information
tc20042008 authored Mar 6, 2024
2 parents 9430fcf + 7731441 commit 6aa34d7
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,16 @@ using ShardableReductionsPattern = std::vector<std::variant<ReductionPattern<T>,
// fuse rules:
// 1. IS * PS -> PS
// 2. PS * PS -> PS
// 3. R * PS -> RS
// 4. RS * (PS | R) -> RS
// 3. PS * R -> R
// 4. IS * R -> R

// OpsTopoPattern := IS | SR
// lifting rules:
// 1. R -> SR
// 2. PS -> SR
// 3. SR * SR -> SR

// OpTopoPattern := IS | SR
template <typename T>
using OpsTopoPattern = std::variant<InjectiveSourcePattern<T>, ShardableReductionsPattern<T>>;
using OpTopoPattern = std::variant<InjectiveSourcePattern<T>, ShardableReductionsPattern<T>>;

}

0 comments on commit 6aa34d7

Please sign in to comment.