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

RFC: Make self-inplace broadcast vectorlizable based on our effect inference #43185

Closed
wants to merge 2 commits into from

Conversation

N5N3
Copy link
Member

@N5N3 N5N3 commented Nov 22, 2021

As found by #43153, self-inplace broadcast with dimension larger than 1 won't be vectorlized by LLVM, as it fails to prove a[I] and extrude(a)[I] share the same access pattern.
#43852 makes it possible to fix it on julia side, as @simd ivdep should be safe if bc[I] is proven to be effect_free, and dest is not self-aliased.

Currently the self-aliasing check for dest is pure type-based to avoid binary bloat.

@vtjnash vtjnash requested a review from mbauman November 22, 2021 04:37
@N5N3 N5N3 marked this pull request as draft November 22, 2021 09:02
@N5N3 N5N3 changed the title RFC: Add ivdep to make a .+= 1 vectorlizable RFC: Try to make a .+= 1 vectorlizable Nov 22, 2021
@N5N3 N5N3 marked this pull request as ready for review November 22, 2021 14:26
@N5N3 N5N3 marked this pull request as draft November 24, 2021 03:16
@N5N3 N5N3 marked this pull request as ready for review November 24, 2021 07:47
@N5N3 N5N3 changed the title RFC: Try to make a .+= 1 vectorlizable RFC: Try to make a .+= 1 vectorlizable when a isa Array Nov 24, 2021
@N5N3 N5N3 marked this pull request as draft November 30, 2021 05:15
@N5N3 N5N3 force-pushed the isivdepsafe branch 2 times, most recently from 2bf16ee to 0543f5d Compare January 26, 2022 09:46
@N5N3 N5N3 changed the title RFC: Try to make a .+= 1 vectorlizable when a isa Array RFC: Make self-inplace broadcast vectorlizable based on our effect inference Feb 11, 2022
@N5N3 N5N3 marked this pull request as ready for review February 11, 2022 13:06
@N5N3 N5N3 added broadcast Applying a function over a collection performance Must go faster labels Feb 11, 2022
Force to derive `effects` during inference stage.

Co-Authored-By: Takafumi Arakaki <29282+tkf@users.noreply.github.com>
@N5N3 N5N3 closed this Jan 31, 2023
@N5N3 N5N3 deleted the isivdepsafe branch January 31, 2023 15:06
@mcabbott
Copy link
Contributor

Can you comment on the status here -- does this cause problems, and are there possible alternatives? Would still be nice to solve #43153

@N5N3
Copy link
Member Author

N5N3 commented Jan 31, 2023

I just got messed when rebasing #44822 on master. Since we can't finish this PR without it, I thought it would be better to reopen this once #44822 get landed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
broadcast Applying a function over a collection performance Must go faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants