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

Sync in portable-simd subtree #99491

Merged
merged 43 commits into from
Jul 22, 2022
Merged

Sync in portable-simd subtree #99491

merged 43 commits into from
Jul 22, 2022

Conversation

workingjubilee
Copy link
Contributor

r? @ghost

calebzulawski and others added 30 commits March 13, 2022 19:07
Co-authored-by: Jacob Lifshay <programmerjake@gmail.com>
…r and mask types

This is a documentation-only patch that standardizes the presentation of vector types like `u32x4` and mask types like `mask32x16`.

The reasoning behind the patch was as follows:
1. Standardized terminology should be preferred, so `element` instead of `value` and `SIMD vector` instead of `vector`. These terms appear in the rest of the documentation and tutorials.
2. Try to avoid situations where two numbers are next to each other. So `16 elements of 32 bits` instead of `16 32-bit elements`.
4. Try to anticipate what readers are looking for -- so state the full bit-width directly.

### Vector Types
- Before: Vector of 32 `i8` values
- After: A 256-bit SIMD vector with 32 elements of type `i8`.

### Mask Types
- Before: Vector of 16 16-bit masks
- After: A mask for SIMD vectors with 16 elements of 32 bits.
A simpler variant of rust-lang/portable-simd#206.

* Comparisons are moved to `SimdPartialEq`, `SimdPartialOrd`, and `SimdOrd`.  The function names are prefixed with `simd_` to disambiguate from the regular `PartialEq` etc functions.  With the functions on traits instead of `Simd` directly, shadowing the function names doesn't work very well.
* Floating point `Ord`-like functions are put into a `SimdFloat` trait.  The intention is that eventually (some time after this PR) all floating point functions will be moved from `Simd` to `SimdFloat`, and the same goes for future `SimdInt`/`SimdUint` traits.
…s, swizzle

Working through giving example documentation to every Simd function.

The major change in this patch is using doc macros to generate
type-specific examples for each function, using a visually-apparent type
constructor. This makes it feel nicer to have twelve separate
documentation entries for reduce_product(), for example.
…imd_mut()

This links to a practical suggestion for how to solve the issues brought up in this section.
Move element-specific functions to traits
programmerjake and others added 7 commits June 6, 2022 12:16
Change `Simd::splat` to not generate a loop
It looks like the last time had left some remaining cfg's -- which made me think
that the stage0 bump was actually successful. This brings us to a released 1.62
beta though.
@rustbot
Copy link
Collaborator

rustbot commented Jul 20, 2022

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@rust-log-analyzer

This comment has been minimized.

Within core, `use self::` does not work to import these items.
And because core is not core_simd, neither does the existing `use`.
So, use this quirky hack instead, switching the import on a feature.
@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 21, 2022
@workingjubilee
Copy link
Contributor Author

@bors r+

@bors
Copy link
Contributor

bors commented Jul 21, 2022

📌 Commit f8aa494 has been approved by workingjubilee

It is now in the queue for this repository.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 21, 2022
@Dylan-DPC
Copy link
Member

@bors rollup=never

@bors
Copy link
Contributor

bors commented Jul 22, 2022

⌛ Testing commit f8aa494 with merge 41419e7...

@bors
Copy link
Contributor

bors commented Jul 22, 2022

☀️ Test successful - checks-actions
Approved by: workingjubilee
Pushing 41419e7 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 22, 2022
@bors bors merged commit 41419e7 into rust-lang:master Jul 22, 2022
@rustbot rustbot added this to the 1.64.0 milestone Jul 22, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (41419e7): comparison url.

Instruction count

  • Primary benchmarks: 😿 relevant regressions found
  • Secondary benchmarks: 😿 relevant regressions found
mean1 max count2
Regressions 😿
(primary)
0.5% 1.0% 11
Regressions 😿
(secondary)
0.8% 1.3% 20
Improvements 🎉
(primary)
-0.2% -0.2% 1
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) 0.4% 1.0% 12

Max RSS (memory usage)

Results
  • Primary benchmarks: 😿 relevant regression found
  • Secondary benchmarks: mixed results
mean1 max count2
Regressions 😿
(primary)
1.4% 1.4% 1
Regressions 😿
(secondary)
2.7% 4.1% 4
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
-2.7% -2.8% 2
All 😿🎉 (primary) 1.4% 1.4% 1

Cycles

Results
  • Primary benchmarks: 😿 relevant regressions found
  • Secondary benchmarks: 🎉 relevant improvement found
mean1 max count2
Regressions 😿
(primary)
3.6% 6.1% 3
Regressions 😿
(secondary)
N/A N/A 0
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
-2.4% -2.4% 1
All 😿🎉 (primary) 3.6% 6.1% 3

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@rustbot rustbot added the perf-regression Performance regression. label Jul 22, 2022
@workingjubilee
Copy link
Contributor Author

...I got nothin'! I like genuinely have no idea why any of these changes, tbh.

@pnkfelix
Copy link
Member

All of the regressions here are on doc profiles. I don't think its worth us spending time trying to figure out 1% regressions to rustdoc performance. (And I made a topic for discussing the matter on zulip.)

Marking as triaged

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet