cucapra/dahlia

Affine and shareable functions

Opened this issue · 0 comments

This paragraph from the MachSuite paper:

FFT/TRANSPOSEis a prime candidate for optimization.Within each benchmark exists a vast design space MachSuiteusers can explore and optimize. Without guidance, Vivadosynthesizes distinct logic each time a function is invoked.However,FFT/TRANSPOSEhas distinct program phases, alter-nating between the execution of smaller FFTs and reorganizinginputs and partial products by shuffling arrays that are thenthe inputs to the same small FFT computations. Having non-overlapping phases ensures the FFT and shuffling logic can beshared, reducing the number of required instantiations of thesefunctions without affecting performance.

This implies that FFT can be optimized better by creating shareable instances for each function. We can use graded modal types to restrict the number of instances of a function.