Skip to content

Refactor host alignment to enable specializing#5793

Closed
dsharletg wants to merge 7 commits intomasterfrom
dsharletg/refactor-host-alignment
Closed

Refactor host alignment to enable specializing#5793
dsharletg wants to merge 7 commits intomasterfrom
dsharletg/refactor-host-alignment

Conversation

@dsharletg
Copy link
Contributor

This PR refactors the implementation of host alignment logic to use the analysis from the simplifier, and bakes it into the Load/Store alignment.

This enables adding an is_host_aligned helper function for OutputImageParam that allows specializing based on the alignment of the host pointer. This can help avoid performance regressions from #5784 in some cases.

This PR loses the ability of JIT to learn alignment from the actual allocation of internal images.

@dsharletg dsharletg requested review from abadams and shoaibkamil March 8, 2021 15:19
@abadams
Copy link
Member

abadams commented Mar 8, 2021

I'm a bit worried about this from an IR definition perspective. The alignment of an underlying pointer is a lower-level concept than Load and Store. Load/Store/Allocate could be backed by a hash table, for example, if the allocation is only used sparsely, so while it makes sense to talk about the alignment of the index, which is an integer, I'm not sure it strictly makes sense to talk about the alignment of the memory address it represents. That's a backend-dependent property.

@steven-johnson
Copy link
Contributor

Monday morning review ping: where does this PR stand?

@dsharletg dsharletg closed this Apr 12, 2021
@alexreinking alexreinking modified the milestone: v12.0.0 May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants