AccelerateHS / AccelerateHS/accelerate

Loop-invariant code motion

Offen
#271 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
frontend new feature
Vorherrschende Sprache
Haskell
Sterne
1k
Forks
135
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.