AccelerateHS / AccelerateHS/accelerate

Loop-invariant code motion

未关闭
#271 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
frontend new feature
主要语言
Haskell
星标
1k
派生
135
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。