Tracking Issue for GPU-offload
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
This is a tracking issue for the GPU offload experiment.
The feature gate for the issue will be #![feature(gpu_offload)].
This work is part of the project goal for Scientific Computing in Rust.
This project will use LLVM's offload infrastructure, which is already used to support OpenMP Offload in other languages like C++.
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.
Steps
- Get lang experiment approved.
- We approved this in the lang triage meeting on 2024-05-01.
- Land the experimental implementation in nightly.
- https://github.com/rust-lang/rust/pull/131527
- https://github.com/rust-lang/rust/pull/142097 // automatic data movement to/from the GPU
- https://github.com/rust-lang/rust/pull/144383 // fix an amdgcn breakage
- https://github.com/rust-lang/rust/pull/142696 // launch gpu kernels
- https://github.com/rust-lang/rust/pull/145768 // Fix kernel generation to make runtime test pass
- https://github.com/rust-lang/rust/pull/147936 // Rewrite our frontend by introducing an offload intrinsic
- https://github.com/rust-lang/rust/pull/149170 // Reduce the number of steps to compile programs (1/X)
- https://github.com/rust-lang/rust/pull/149202 // Reduce the number of steps further (2/X)
- https://github.com/rust-lang/rust/pull/149827 // Reduce compilation to two cargo invocations (3/3)
- https://github.com/rust-lang/rust/pull/150108 // Build Offload as a single Step
- https://github.com/rust-lang/rust/pull/148671 // Enable offload in CI
- https://github.com/rust-lang/rust/pull/149788 // Clean up or global vs per-kernel definitions
- https://github.com/rust-lang/rust/pull/150511 // Support offload calls from more locations
- https://github.com/rust-lang/rust/pull/150444 // Expose Kernel launch options
- https://github.com/rust-lang/rust/pull/150683 // Add a new offload_arg intrinsic.
- https://github.com/rust-lang/rust/pull/150288 // diverse benchmark fixes
- https://github.com/rust-lang/rust/pull/150893 // Move omp/ol library registration from code to global ctor/dtor
- https://github.com/rust-lang/rust/pull/151071 // Enable the openmp-opt pass
- https://github.com/rust-lang/rust/pull/151549 // Enable offload for Intel GPUs
- https://github.com/rust-lang/rust/pull/151640 // Cleanup datatransfer to support the openmp-opt pass
- https://github.com/rust-lang/rust/pull/152283 // Use a global, not alloca, for const sizes.
- https://github.com/rust-lang/rust/pull/156941 // Update file naming convention
- https://github.com/rust-lang/rust/pull/160335 // dlopen offload
- https://github.com/rust-lang/rust/pull/159064 // distribute offload in CI
- https://github.com/rust-lang/rust/pull/160991 // add (partial) offload component to nightly
- https://github.com/rust-lang/rust/pull/152283 // Properly pass offload sizes to kernel args
- https://github.com/rust-lang/rust/pull/153411 // Offload slice support
- https://github.com/rust-lang/rust/pull/156642 // Offload Kernel macro expansion
- https://github.com/rust-lang/rust/pull/158693 // Add type-check to offload intrinisc calls
- https://github.com/rust-lang/rust/pull/159566 // Add support for generics
- https://github.com/rust-lang/rust/pull/160454 // fix compile time regression from generic support
- https://github.com/rust-lang/rust/pull/161055 // offload! function-like macro
- https://github.com/rust-lang/rust/pull/162309 // offload: automate manual clang-linker-wrapper step
- https://github.com/rust-lang/rust/issues/160584 // bootstrap build order - missing lld for autodiff/offload
- https://github.com/rust-lang/rust/pull/162824 // link Enzyme and the offload with in-tree lld if possible
- https://github.com/rust-lang/rust/pull/162305 // Improve Offload artifact creation
- https://github.com/rust-lang/rust/pull/162196 // Offload cmake cleanups
- Adjust documentation (see instructions on rustc-dev-guide)
- Formatting for new syntax has been added to the Style Guide (nightly-style-procedure)
- Stabilization PR (see instructions on rustc-dev-guide)
Related
- https://github.com/rust-lang/rust/pull/149637
- https://github.com/rust-lang/stdarch/pull/1976
- https://github.com/rust-lang/rust/pull/150851 // spirv target
Unresolved Questions
TODO.
Implementation history
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the tracking checklist, the GPU-Offload project goal, and the linked implementation pull requests; no source file or test is named here. Implementation is already spread across many pull requests, while documentation, style-guide formatting, and stabilization remain unchecked, so confirm with maintainers which checklist item is still available before contributing.
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