AMDMIGraphX icon indicating copy to clipboard operation
AMDMIGraphX copied to clipboard

Simplify using distributive property of matrix multiplication

Open CharlieL7 opened this issue 7 months ago • 0 comments

  • 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.

CharlieL7 avatar Jul 08 '24 15:07 CharlieL7