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

SIMD Feature Build Failing as of nightly-2020-09-15 (on x86_64) #1684

Closed
danieldjewell opened this issue Sep 19, 2020 · 5 comments
Closed

SIMD Feature Build Failing as of nightly-2020-09-15 (on x86_64) #1684

danieldjewell opened this issue Sep 19, 2020 · 5 comments
Labels
wontfix A feature or bug that is unlikely to be implemented or fixed.

Comments

@danieldjewell
Copy link

Opening issue here after tracking it upstream:

Build of ripgrep failing as of nightly-2020-09-15 because of a build failure in packed_simd: rust-lang/packed_simd#288

This, in turn, appears to have been caused by rust-lang/stdarch#890

@danieldjewell
Copy link
Author

Also see rust-lang/rust#76295

@BurntSushi
Copy link
Owner

Thanks, but as you've helpfully linked, this isn't really an issue with ripgrep and the simd feature is nightly only for exactly this reason.

In any case, I'd suggest not using the simd feature unless you know you need it. The only benefit you get is when searching UTF-16 files. (ripgrep uses lots of SIMD in other places, but decoding UTF-16 is maintained by others and refuses to use the non-portable but stable SIMD APIs.)

@BurntSushi BurntSushi added the wontfix A feature or bug that is unlikely to be implemented or fixed. label Sep 19, 2020
@danieldjewell
Copy link
Author

In any case, I'd suggest not using the simd feature unless you know you need it. The only benefit you get is when searching UTF-16 files.

This is great info! Thank you for the clarification.

Perhaps this would be good to add into the readme? Maybe somewhere in here: 😁

ripgrep/README.md

Lines 369 to 390 in f511849

If you have a Rust nightly compiler and a recent Intel CPU, then you can enable
additional optional SIMD acceleration like so:
```
RUSTFLAGS="-C target-cpu=native" cargo build --release --features 'simd-accel'
```
The `simd-accel` feature enables SIMD support in certain ripgrep dependencies
(responsible for transcoding). They are not necessary to get SIMD optimizations
for search; those are enabled automatically. Hopefully, some day, the
`simd-accel` feature will similarly become unnecessary. **WARNING:** Currently,
enabling this option can increase compilation times dramatically.
Finally, optional PCRE2 support can be built with ripgrep by enabling the
`pcre2` feature:
```
$ cargo build --release --features 'pcre2'
```
(Tip: use `--features 'pcre2 simd-accel'` to also include compile time SIMD
optimizations, which will only work with a nightly compiler.)

@BurntSushi
Copy link
Owner

It is already, right in the section you quoted:

The simd-accel feature enables SIMD support in certain ripgrep dependencies (responsible for transcoding). They are not necessary to get SIMD optimizations for search; those are enabled automatically. Hopefully, some day, the simd-accel feature will similarly become unnecessary.

@BurntSushi
Copy link
Owner

If you think it could be clearer, please submit a PR with a clarification. :)

lilydjwg added a commit to archlinuxcn/repo that referenced this issue Oct 22, 2020
* it doesn't compile
* users barely benefit from it because it only makes sense with UTF-16
  files

See also BurntSushi/ripgrep#1684.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix A feature or bug that is unlikely to be implemented or fixed.
Projects
None yet
Development

No branches or pull requests

2 participants