linebender / linebender/fearless_simd

Optimize AVX2 vector shifts once rustc codegen bugs are fixed

Open
#280 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
457
Forks
30
Avg merge
1d 10h
Merged PRs (30d)
25

Description

I've tried optimizing the 16-bit variable-vector shifts for AVX2 and got formulations that should be much better than autovectorization: https://github.com/Shnatsel/fearless_simd/commit/95666a57f5cd1f1f0dbf0c77f4a2e70b3e958ade

However, the actual codegen is poor due to a compiler bug, with intrinsics not lowering into the instructions they're supposed to: https://github.com/rust-lang/rust/issues/159831

We should revisit this once the upstream codegen bugs are fixed. Even if they were fixed today we likely won't get the upstream LLVM fixes till January.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with commit 95666a57f5cd1f1f0dbf0c77f4a2e70b3e958ade and the linked rust-lang compiler issue about AVX2 intrinsic codegen. Revisit the 16-bit variable-vector shifts after the upstream compiler and LLVM fixes land; done means the improved formulations produce the intended AVX2 instructions.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.