rust-lang / rust-lang/portable-simd

Get Cranelifted

Open
#40 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-cranelift A-LLVM A-simd blocks-nightly C-feature-request C-tracking-issue E-hard F-simd_ffi
Dominant language
Rust
Stars
1.1k
Forks
108
Avg merge
22h 53m
Merged PRs (30d)
3

Description

Per the conversation on Zulip in t-compiler and project-portable-simd, we are going to find Cranelift landing a direct challenge to our landing in std, because the last one in is a rotten egg has to implement support for the other... but while we could "race" them, it seems integration might require a total redesign anyways. So, collaboration! But we need to

  1. Figure out what Cranelift needs from us
  2. Figure out what we need from Cranelift
  3. Figure out what additional consequences landing std::simd has for Cranelift support
  4. Figure out what additional consequences landing Cranelift support has for std::simd
  5. Solve all that

@bjorn3 said:

I hope most if not all of the operations used by portable simd could use (newly introduced) simd_* platform intrinsics that are architecture and vector size independent. This would allow easy emulation of them implemented once per operation.

This has led to some immediate questions:

  1. What exactly are "platform-intrinsics" supposed to be? Our current understanding is that they're LLVM ops... but Cranelift isn't LLVM, obviously. So...
  2. What changes about them when moving from LLVM to Cranelift?
  3. What does this do for SIMD FFI?
  4. Can we find a way around the SIMD FFI question?

Contributor guide

Open the contributing guide

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 the linked Zulip discussions in t-compiler and project-portable-simd, then map the issue's numbered questions about platform intrinsics, Cranelift, and SIMD FFI. Done means the collaboration requirements and integration consequences are resolved in a concrete plan, but the issue names no files or tests to begin with.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.