Simplify using distributive property of matrix multiplication
Open
Nobody has claimed this yet.
enhancement
Perf Improve
- Dominant language
- C++
- Stars
- 333
- Forks
- 150
- Avg merge
- 4d 19h
- Merged PRs (30d)
- 54
Description
- During the migraphx graph optimizations introduction presentation I showed a situation where we could have used the distributive property of matrix multiplication to produce a more optimized graph then what we currently do with horizontal fusions
- The property is that given that A, B, and C are matrices: AB + AC = A(B + C)
- In this situation I showed B and C were literal matrices, so rearranging the graph to do B + C first would reduce the number of GEMMs and literals.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file, test, or entry point is named. Start by locating the existing horizontal fusion graph optimization and the handling of literal matrices, then compare it with the stated AB + AC = A(B + C) transformation. Done means applicable graphs use fewer GEMMs and literals without changing results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- machine-learning, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100