-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[DNM] SIMD, take 2 #20344
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
[DNM] SIMD, take 2 #20344
Conversation
Can you make sure to test the validation tests of a release no-assertions build to ensure they pass after the new overloads are added? Specifically the tests in Some of those run on one of the builders but do not get tested by the normal PR testing (other tests, the ones based on |
f0ab959
to
852303e
Compare
@swift-ci please test |
Build failed |
Build failed |
@rxwei FYI, this is the updated patch with some renamings to consider if you are interested. |
The proposal hasn't been updated to reflect the implementation. I have comments (many, i think) but I'd like to quote contents of the proposal instead of the PR. |
Also changes elementCount to scalarCount, per review thread.
Move all SIMD-associated things under SIMD names, both for clarity and so we can use the name Vector for math vectors at some future point if we want. - Vectorizable -> SIMDScalar - SIMDVector -> SIMD - SIMDMaskVector -> SIMDMask - VectorStorage -> SIMDStorage - Vector${N} -> SIMD${N} This also removes the SIMDMask protocol entirely, leaving only the concrete type, by reworking how the mask associated type works.
fe5af74
to
8b10812
Compare
@swift-ci Please test |
Build failed |
Build failed |
Also updates GenClangType.cpp to be able to map from SIMD types to ExtVectors (the reverse mapping and importer support are not done yet, and will be in a follow-on patch), and updates tests to account for the new spellings.
@swift-ci Please test |
@swift-ci please test source compatibility |
Build failed |
Build failed |
@swift-ci Please test |
Build failed |
Build failed |
@swift-ci please test |
Build failed |
Build failed |
@swift-ci please test |
@swift-ci please test source compatibility |
Build failed |
Build failed |
@swift-ci please test |
Build failed |
Build failed |
@swift-ci please test OS X |
@stephentyrone woot! |
I think this should have been reviewed by either me or @rudkx, it looks like after these changes multiple previously resolved crashers are now crashing again (which is very concerning), and performance of expressions with multiple iterators have degraded... |
Updated SIMD implementation, based on feedback from first round of review.
This approach, suggested by Chris, is probably more flexible in the long run, but in the short-term we'll have some fairly ugly codegen with -Onone (-O builds are mostly OK except where masks come into it). We'll need some
@_semantics
wizardry to make this really work, but it definitely lets us have significantly less boilerplate going forward.Under discussion as SE-0229