spatial icon indicating copy to clipboard operation
spatial copied to clipboard

Categorical HM integration with Spatial kernel implementations

Open mattfel1 opened this issue 4 years ago • 2 comments

For example, can we do something like:

def innerProdMatMult(tileA: SRAM2[T], tileB: SRAM2[T], tileC: SRAM2[T]): Void = {
  Foreach(...){...} // fill tileC using inner products
}

def outerProdMatMult(tileA: SRAM2[T], tileB: SRAM2[T], tileC: SRAM2[T]): Void = {
  Foreach(...){...} // fill tileC using outer products
}

Accel{ 
  ...
  innerProductMatMult(tileA, tileB, tileC) (innerProductMatMult, outerProductMatMult)
  ...
} 

mattfel1 avatar Jun 15 '20 17:06 mattfel1

This may be problematic with Spatial's staging. Maybe you can use blackboxes as containers for kernel switching since those won't get dropped. Maybe there can be a generic BlackBoxUse node and store the possible drop-in replacements as Parameter metadata

mattfel1 avatar Jun 15 '20 18:06 mattfel1

To add some more motivation: Aetherling (https://github.com/David-Durst/embeddedHaskellAetherling) has multiple options for the same operation with different performance-resources trade-offs. This feature would allow treating both options as a single operator that can be configured by HM,

David-Durst avatar Jun 15 '20 19:06 David-Durst