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

Add noalias option to jit decorator. #9108

Closed
wants to merge 11 commits into from
Closed

Conversation

DrTodd13
Copy link
Collaborator

Adds noalias option to jit decorator which the programmer can use to assert that none of the arguments to the function can share memory. Ultimately, this will cause all the pointers in the memory models for the argument to have the noalias LLVM qualifier set when the Numba IR is lowered to LLVM. This will enable more code to vectorize since the possibility of aliasing will frequently cause the LLVM vectorizer to give up.

Previously, parallel=True would try to do an analysis to see whether it can add the noalias flag to the arguments passed to the parallel region gufunc. This PR improves that process and uses the aliasing information from the outer function better and so if noalias is given for the outer function it will often enable parallel=True to add the noalias flag to the outlined gufunc as well.

…ng can be correctly seeded empty if the jit noalias flag is present.

2) Move the find_potential_aliases call for the fusion pass to run only once rather than for each fusion attempt.
3) For parfor lowering, first run find_potential_aliases on the whole function then filter the alias map and the arg aliases set by the parameters to the parfor.
4) If there are no aliases identified among the parfor params then add the noalias flag for the parfor gufunc compilation.
5) Since flags can be true in the outer compilation context, set noalias to false if there are aliases.
@github-actions
Copy link

This pull request is marked as stale as it has had no activity in the past 3 months. Please respond to this comment if you're still interested in working on this. Many thanks!

@github-actions github-actions bot added the stale Marker label for stale issues. label Oct 30, 2023
@github-actions github-actions bot added the abandoned - stale PRs automatically closed due to stale status label Nov 6, 2023
@github-actions github-actions bot closed this Nov 6, 2023
@itamarst
Copy link
Contributor

Any progress on this? Would love to see this make it in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 - In Progress abandoned - stale PRs automatically closed due to stale status stale Marker label for stale issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants