Skip to content

Conversation

@stevesuzuki-arm
Copy link
Contributor

Fix the issue that runtime vscale assert never failed whatever vector_bits is set in Target because llvm compiler asserts llvm.vscale value at compile-time and optimize away the runtime call if the function has the attribute of vscale_range(n,m) where n==m.

Fix the issue that runtime vscale assert never failed whatever
vector_bits is set in Target because llvm compiler asserts
llvm.vscale value at compile-time and optimize away the runtime call
if the function has the attribute of vscale_range(n,m) where n==m.
@zvookin
Copy link
Member

zvookin commented Nov 19, 2025

Approve pending spelling errors. Thank you for the fix. Seems an obvious thing in retrospect, but such is the issue with not having hardware or a good sim environment to test on.

By way of code review, I'm wondering if we should favor having the intrinsic code in a .ll file aded to the runtime rather than generating it in CodeGen_LLVM. Perhaps a question for @abadams or @alexreinking.

@stevesuzuki-arm
Copy link
Contributor Author

if we should favor having the intrinsic code in a .ll file aded to the runtime rather than generating it in CodeGen_LLVM. Perhaps a question for @abadams or @alexreinking.

I had added it to aarch64.ll, but I realized the intrinsic itself is not specific to ARM. And I couldn't find a good existing .ll file.

@zvookin zvookin merged commit d9963e4 into halide:main Nov 19, 2025
3 checks passed
@stevesuzuki-arm stevesuzuki-arm deleted the pr-vscale-check branch December 1, 2025 20:22
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