Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some Lift programs do not have valid access annotations in Rise #228

Open
Bastacyclop opened this issue Feb 17, 2022 · 0 comments
Open

Some Lift programs do not have valid access annotations in Rise #228

Bastacyclop opened this issue Feb 17, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@Bastacyclop
Copy link
Member

Example from #220:

    val e = depFun((n: Nat) => fun(n`.`f32)(in =>
      in |> split(32) |> mapWorkGroup(fun(x =>
        zip(x)(x) |> mapLocal(fun(y =>
          makePair(fst(y) |> toLocal)(snd(y) |> toGlobal)
        )) |> gather(reverse) |>
        mapLocal(fun(p => fst(p) + snd(p)))
      ))
    ))

In many cases we have been able to rewrite such Lift programs differently to make them work in Rise with access annotations. However, in this case it does not seem possible.
What should we do about it?
Should we make toMem more flexible, maybe by accepting a memory layout: toMem: {t: DataType} -> (a: AddrSpaceLayout[t]) -> exp[t, wr] -> exp[t, rd]?
Should patterns like mapSeq/mapLocal be allowed to be read -> read instead of read -> write? Would that require changing how memory is allocated? (i.e hoisting allocations outside of loops)

cc @bastian-koepcke

@Bastacyclop Bastacyclop added the enhancement New feature or request label Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant