-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[wasm] Expand interpreter PackedSimd support #87719
Conversation
Rearrange cases Add fp version of some intrinsics Add some bitwise intrinsics Refactorings Cleanup Add more packedsimd comparisons Checkpoint Checkpoint Prototype implementation Checkpoint Checkpoint
Add more wasm opcodes
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsThis PR refactors how PackedSimd intrinsics are defined in the interpreter (to simplify them) and expands the set of them that are supported. I still need to change the lookup into a binary search, which will require doing a thread-safe sort of the table at first use or something, haven't gotten to that yet.
|
I spent a bit trying to figure out a good way to use binary search for this and it requires introducing a mutex and some other stuff so I'm not sure it's worth it. Marking ready for review, I haven't found anything else wrong with it. |
See simd-intrinsics.c for examples on how to define and search these tables. |
The problem is that one table entry doesn't match one method, it's 1 entry to many methods. So I can't just binary search for (name, argtype) |
Couldn't we have the intrinsics defined in sorted by name order and then just do a binary search based on name ? And then also probe that entry and all the neighbouring entries as long as they have the same name. Should be easy enough and the lookup pretty much as fast as it can get. |
Yeah, I got half way through writing that. It'll miss this preview though
On June 21, 2023 2:28:55 AM PDT, Vlad Brezae ***@***.***> wrote:
Couldn't we have the intrinsics defined in sorted by name order and then just do a binary search based on name ? And then also probe that entry and all the neighbouring entries as long as they have the same name. Should be easy enough and the lookup pretty much as fast as it can get.
--
Reply to this email directly or view it on GitHub:
#87719 (comment)
You are receiving this because you were assigned.
Message ID: ***@***.***>
- kg (mobile)
|
Stumped about why the qsort is crashing like this. I can repro locally, but only in one of my test cases and not when running test suites. |
I think it's fixed now and is using the algorithm mentioned before (binary search by name, then scan forward and back for a match) |
Closing in favor of #87903 |
This PR refactors how PackedSimd intrinsics are defined in the interpreter (to simplify them) and expands the set of them that are supported.
I still need to change the lookup into a binary search, which will require doing a thread-safe sort of the table at first use or something, haven't gotten to that yet.