Skip to content

Offload slice support#153411

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Sa4dUs:offload-slices
Apr 21, 2026
Merged

Offload slice support#153411
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Sa4dUs:offload-slices

Conversation

@Sa4dUs
Copy link
Copy Markdown
Contributor

@Sa4dUs Sa4dUs commented Mar 4, 2026

This PR allows offload to support slice type arguments.

NOTE: this is built on top of #152283

r? @ZuseZ4

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 4, 2026
@rust-bors

This comment has been minimized.

@Sa4dUs Sa4dUs marked this pull request as ready for review March 9, 2026 23:18
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 9, 2026
@ZuseZ4
Copy link
Copy Markdown
Member

ZuseZ4 commented Mar 10, 2026

cc @workingjubilee

builder.store(geps[i as usize], gep2, Align::EIGHT);

if matches!(metadata[i as usize].payload_size, OffloadSize::Dynamic) {
if matches!(metadata[i as usize].payload_size, OffloadSize::Dynamic(_)) {
Copy link
Copy Markdown
Member

@ZuseZ4 ZuseZ4 Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try if let OffloadSize::Dynamic(dynamic_size: DynamicSize) = metadata[i as usize].payload_size {

and update the get_runtime_size below, so we don't have more unnecessary matches.

View changes since the review

pub enum OffloadSize {
Dynamic,
Static(u64),
Dynamic(DynamicSize),
Copy link
Copy Markdown
Member

@ZuseZ4 ZuseZ4 Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably for now directly add Slice under OffloadSize, at least until we handle more dynamic ones.

View changes since the review

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 16, 2026

⚠️ Warning ⚠️

@ZuseZ4
Copy link
Copy Markdown
Member

ZuseZ4 commented Apr 20, 2026

Thanks!

r=me with green CI
@bors delegate

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 20, 2026

✌️ @Sa4dUs, you can now approve this pull request!

If @ZuseZ4 told you to "r=me" after making some further change, then please make that change and post @bors r=ZuseZ4.

@Sa4dUs
Copy link
Copy Markdown
Contributor Author

Sa4dUs commented Apr 20, 2026

@bors r=ZuseZ4

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 20, 2026

📌 Commit af839a8 has been approved by ZuseZ4

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 20, 2026
rust-bors Bot pushed a commit that referenced this pull request Apr 21, 2026
Rollup of 5 pull requests

Successful merges:

 - #153411 (Offload slice support)
 - #154557 (Make E0284 generic argument suggestions more explicit)
 - #154933 (Suggest removing `&` when awaiting a reference to a future)
 - #155524 (Fix LLVM offload install docs to use semicolon-separated CMake lists)
 - #155568 (Update books)
@rust-bors rust-bors Bot merged commit 4c7e656 into rust-lang:main Apr 21, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 21, 2026
rust-timer added a commit that referenced this pull request Apr 21, 2026
Rollup merge of #153411 - Sa4dUs:offload-slices, r=ZuseZ4

Offload slice support

This PR allows offload to support slice type arguments.

~NOTE: this is built on top of #152283

r? @ZuseZ4
github-actions Bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Apr 21, 2026
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#153411 (Offload slice support)
 - rust-lang/rust#154557 (Make E0284 generic argument suggestions more explicit)
 - rust-lang/rust#154933 (Suggest removing `&` when awaiting a reference to a future)
 - rust-lang/rust#155524 (Fix LLVM offload install docs to use semicolon-separated CMake lists)
 - rust-lang/rust#155568 (Update books)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants