[LLVMCPU] fix: return valid vscale range only for targets supporting SVE#24522
Open
ziereis wants to merge 1 commit into
Open
[LLVMCPU] fix: return valid vscale range only for targets supporting SVE#24522ziereis wants to merge 1 commit into
ziereis wants to merge 1 commit into
Conversation
Signed-off-by: default <ziereis@roofline.ai>
dff6848 to
c33c7a1
Compare
bjacob
approved these changes
May 22, 2026
egebeysel
reviewed
May 22, 2026
Contributor
egebeysel
left a comment
There was a problem hiding this comment.
The main functionality LGTM, but we could maybe refactor this a bit and move some things around 🤔
| @@ -1748,11 +1753,14 @@ bool hasFusedLeadingOp(linalg::LinalgOp rootOp) { | |||
|
|
|||
| std::optional<vector::VscaleRange> | |||
| getDefaultVscaleRange(IREE::HAL::ExecutableTargetAttr targetAttr) { | |||
Contributor
There was a problem hiding this comment.
Should we maybe move this function to CPUUtils instead? I think vscale is only relevant to CPUs and this could be kept there, as well as the hasAnySVEFeature method.
| return triple && triple.value().isRISCV64(); | ||
| } | ||
|
|
||
| static bool hasAnySVEFeature(DictionaryAttr targetConfig) { |
Contributor
There was a problem hiding this comment.
I think there is a method for this already, maybe we could converge to using this one:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes the
getDefaultVscaleRangeto only return a vscale range if the target supports it.