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

[SVE] Check for SVE target in VectorizeLoop #16893

Merged
merged 3 commits into from
Apr 22, 2024

Conversation

ekalda
Copy link
Contributor

@ekalda ekalda commented Apr 16, 2024

Check that we are compiling for an SVE enabled target when the extent of a loop marked for vectorizing is a vscale dependent expression.

The extent of a loop should be either a positive integer or an vscale dependent expression, in the latter case we'd expect the target to have has_sve feature.

@ekalda
Copy link
Contributor Author

ekalda commented Apr 16, 2024

@Lunderberg @lhutton1

This is a follow up from #16782, it makes sure that scalable vectors are created only for SVE target. In this implementation we check for target in function attributes, so we'd rely on BindTarget having run before. Alternatively we could access the "global" target via Target::Current(), which would be simpler, but would make it harder to mix SVE and non-SVE targets. I'm happy to go with either option :)

@ekalda ekalda force-pushed the target-in-loopvectorizer branch from 9b91c53 to 8c95c41 Compare April 18, 2024 10:08
@ekalda ekalda changed the title [SVE] Check for SVE target in func_attr from VectorizeLoop [SVE] Check for SVE target in VectorizeLoop Apr 18, 2024
@ekalda
Copy link
Contributor Author

ekalda commented Apr 18, 2024

I moved the implementation to use the current target since changing the graph executor's pipeline is breaking lots of CUDA tests.

ekalda added 3 commits April 19, 2024 15:17
Check that we are compiling for an SVE enabled target when the extent
of a loop marked for vectorizing has a vscale dependent extent.
Use Target::Current() in LoopVectorizer to check for SVE

Change-Id: I15363bad540d6752d6c2098c93efce25c107309b
Change-Id: I0569534397a2d0db9587db6424b1674846a76079
@ekalda ekalda force-pushed the target-in-loopvectorizer branch from 8c95c41 to acb0e74 Compare April 19, 2024 15:32
Copy link
Contributor

@lhutton1 lhutton1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ekalda, LGTM!

@lhutton1 lhutton1 merged commit 29534b7 into apache:main Apr 22, 2024
19 checks passed
@lhutton1
Copy link
Contributor

Thanks @ekalda!

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.

2 participants