Repository navigation
Less CPU VLAs - #2133
Less CPU VLAs#2133jeremylt wants to merge 2 commits into
Conversation
ac75974 to
f1932f2
Compare
zatkins-dev
left a comment
There was a problem hiding this comment.
Assuming perf doesn't change much, I think I'm on board. I still think that using the block size from the Ceed context and automatically blocking num_elem > block_size would also be totally acceptable (that would remove the only cases in which this blows out the stack). But this is probably more safe for high-order 3D (which I guess could also blow up mem usage).
zatkins-dev
left a comment
There was a problem hiding this comment.
Note: /cpu/self/gen/* has the same issue, which I've just cheated for high order by letting the stack reallocate (-fsplit-stack). Should we add some stack protection flags to CI? See e.g. https://developers.redhat.com/articles/2022/06/02/use-compiler-flags-stack-protection-gcc-and-clang
f1932f2 to
b134e21
Compare
|
About re-blocking: Since the blocking requires the elements to be interleaved for CPU backends, its non-trivial for the basis to shuffle and then shuffle back the memory to extract blocks of 8 or less if more than 8 elements are passed. That's why I went with a cutoff of 8 About cpu/gen: I think adding this there will require a bit more thought, especially with the possibility of turning of OpenMP support coming as a student PR soon. |
Purpose:
I don't imagine this would have a performance impact, but we (I, really) should check.
Closes: #N/A
LLM/GenAI Disclosure:
None
By submitting this PR, the author certifies to its contents as described by the Developer's Certificate of Origin.
Please follow the Contributing Guidelines for all PRs.