-
Notifications
You must be signed in to change notification settings - Fork 104
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
intrinsics: add support for X86 vector intrinsics #1117
base: master
Are you sure you want to change the base?
Conversation
This work was originally authored by Zhengyang Liu <[email protected]>, and was motivated by the development of the Minotaur project [https://arxiv.org/abs/2306.00229].
a few comments about this, in no particular order.
|
in particular, the approximation stuff requires some careful thought |
I can't say that I'm familiar with X86 vector intrinsics, but it seems like a small additional burden over the RISC-V vector intrinsics, which I plan to add and maintain. The code is quite independent, and should be easy to strip out if it falls out of maintenance in the future. I will split out the parts that will also be useful for RISC-V vector intrinsics (FP approximation, FakeShuffle), so that the X86-specific parts can be reverted easily. An alternative is to maintain the X86 and RISC-V specific parts downstream, and just get the generic support merged: I'm quite open to this, as I don't think the mechanical intrinsic-matching code needs review. Like John said, I do need the FP approximation part reviewed. |
This would be great to have! I suggest we start with the intrinsics that have precise semantics. Then work over the approximations, as these require more thought. |
I think you misunderstood: all the intrinsics have precise semantics, and the FP exactness is a configuration option that's not required for correctness of X86 intrinsics within Alive2: it is used by Minotaur to synthesize certain fp operations correctly. Thanks for the suggestions; I've put up #1128 and #1129. With both applied, all tests in Minotaur pass. The rest of the code in this draft is unnecessary/dead. |
@@ -19,6 +19,8 @@ using namespace smt; | |||
using namespace util; | |||
using namespace std; | |||
|
|||
bool useApprox = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This option along with all its users is dead code.
This work was originally authored by Zhengyang Liu [email protected], and was motivated by the development of the Minotaur project [https://arxiv.org/abs/2306.00229]. This is a draft, asking the maintainers of Alive2 if there is interest in having this work be part of Alive2 upstream: if so, some work is required to clean up the patch, and break it up into digestible bits. I've fixed up Minotaur, and checked that all tests pass, when it is based on this work. The motivation to try and upstream this is so that we can get more eyes on this code to iron out the bugs: I plan to build upon this work to also support RISC-V vectors; my employer is very supportive of the project.
CC: @regehr