thomasrolinger / chapel

a Productive Parallel Programming Language
https://chapel-lang.org
Other
0 stars 1 forks source link

Task: Revise/update static analysis #16

Closed thomasrolinger closed 2 years ago

thomasrolinger commented 2 years ago

We have code generation in a good spot but we need to update a few things with the static analysis. These don't affect performance, or impact any of the real applications we have. But we still need them to be working.

This also includes more robust checks for what we do for the optimized inspector loop. We also need a tiny bit extra code generation/logic when the forall iterates over a domain rather than an array. In that case, we don't have something like ref elem = X[i].

Also, I believe we can relax our restriction about i having to be yielded by a loop iterating over B's domain or a subdomain. I'm still trying to recall the exact reason for this, but I believe that as long as we track the array/domain that i is yielded from, we should be OK. This will be helpful because our benchmarks that create subdomains are very slow in the data generation stage.

This is something I plan to do after generating all of the results for the April 2022 deadlines.

thomasrolinger commented 2 years ago

This has been addressed: https://github.com/thomasrolinger/chapel/commit/54fa458f028e0278f3281f4ea5f2c5841ef4b8c4

We do not require the loop that yields i to iterate over any specific domain or array. As long as it iterates over an array or domain, it is valid.

We also added a custom parallel iterator to deal with the complexities of the "forall to coforall" transformation. See https://github.com/thomasrolinger/chapel/issues/19 for more details.