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

ir: add syntactic support for vscale, vscale_range #1121

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

artagnon
Copy link
Contributor

@artagnon artagnon commented Nov 28, 2024

In an effort to support checking of programs with scalable vectors, add syntactic support for vscale and vscale_range, making the vscale an smt::expr in State. For the moment, we fail to type-check any program using scalable vectors.

@nunoplopes
Copy link
Member

@lukel97
Copy link

lukel97 commented Nov 30, 2024

Apologies for the drive by review, I'd love to see scalable vector support. Is it safe to assume vscale is 1 though? E.g would this mean that an insertelement into a <vscale x 1 x i64> at index 2 would now always be equivalent to poison?

I know very little about alive2 though so I may be completely misunderstanding this!

@artagnon
Copy link
Contributor Author

Apologies for the drive by review, I'd love to see scalable vector support. Is it safe to assume vscale is 1 though? E.g would this mean that an insertelement into a <vscale x 1 x i64> at index 2 would now always be equivalent to poison?

True, but I'm not sure what else we can do when there is no information about what vscale could be: I was thinking this could be a minimum-first-patch, with the vscale_range function attribute support in a follow-up. vscale can only ever be a power of two, right? I think we have to solve for all powers of two in the vscale range, and report the minimally-refined solution.

@nunoplopes
Copy link
Member

This patch needs some work. The type system needs to enumerate concrete vector sizes in, e.g., [min, min + 32]. Alive2 runs the verification for all possible typings.
VectorType::getTypeConstraints() needs to create constraints to make that happen.

Also, there are still a bunch of undefs in the test cases

@nunoplopes
Copy link
Member

#923

In an effort to support checking of programs with scalable vectors, add
syntactic support for vscale and vscale_range, making the vscale an
smt::expr in State. For the moment, we fail to type-check any program
using scalable vectors.
@artagnon artagnon changed the title ir: add syntactic support for scalable vectors ir: add syntactic support for vscale, vscale_range Dec 9, 2024
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.

3 participants