AccelerateHS / AccelerateHS/accelerate

Loop-invariant code motion

Aperta
#271 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
frontend new feature
Lingua principale
Haskell
Stelle
1k
Fork
135
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

We don't have any form of loop-invariant code-motion implemented. At the scalar level we could assume that the backend compiler (CUDA / LLVM) will do that for us, but at the array level we are on our own (given the current approach of compiling each collective operation individually).

In the mean time, the following little hack will force a thing to be executed before moving on:

``` haskell
licm :: (Arrays a, Arrays b) => Acc a -> (Acc a -> Acc b) -> Acc b
licm x f = (id >-> f) x
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.