ROCm / ROCm/AMDMIGraphX

Simplify using distributive property of matrix multiplication

Open
#3,250 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.