SoA should allow arbitrary initialization of matrix if it isn't elementwise accessed thereafter
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 160
- Forks
- 59
- Avg merge
- 21h 45m
- Merged PRs (30d)
- 26
Description
Currently, the memory pattern optimization relies on all functions being inlined and then searches for elementwise accesses as its heuristic to disable function promotion.
It would be really nice if we instead allowed things like
transformed parameters {
matrix[N,M] foo = some_function(N, M, other_arguments) + possibly_other_expressions;
}
to be code generated to something like auto foo = to_soa(some_function(...) ...) when there are no further elementwise accesses of foo, even if the code in some_function does use for-loops to construct it. This is sort of on-the-way to something like a comprehension, but I believe it is implementable right now for many models.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by tracing the memory pattern optimization and its elementwise-access heuristic, then examine how matrix initialization is code generated. Done means non-elementwise matrix construction can use the requested SoA representation when there are no later elementwise accesses, including constructions using loops.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, ocaml
- Domain
- compilers, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100