Skip to content

Cleanup offload datatransfer#151640

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
ZuseZ4:cleanup-datatransfer
Feb 8, 2026
Merged

Cleanup offload datatransfer#151640
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
ZuseZ4:cleanup-datatransfer

Conversation

@ZuseZ4
Copy link
Member

@ZuseZ4 ZuseZ4 commented Jan 25, 2026

There are 3 steps to run code on a GPU: Copy data from the host to the device, launch the kernel, and move it back.
At the moment, we have a single variable describing the memory handling to do in each step, but that makes it hard for LLVM's opt pass to understand what's going on. We therefore split it into three variables, each only including the bits relevant for the corresponding stage.

cc @jdoerfert @kevinsala

r? compiler

@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 Jan 25, 2026
@ZuseZ4 ZuseZ4 added the F-gpu_offload `#![feature(gpu_offload)]` label Jan 25, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@ZuseZ4 ZuseZ4 force-pushed the cleanup-datatransfer branch 2 times, most recently from d9def93 to 4f29cbe Compare January 25, 2026 09:57
@rust-log-analyzer

This comment has been minimized.

@ZuseZ4 ZuseZ4 force-pushed the cleanup-datatransfer branch 2 times, most recently from 014d61d to 6b45680 Compare January 25, 2026 23:32
@ZuseZ4 ZuseZ4 marked this pull request as ready for review January 26, 2026 03:47
@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 Jan 26, 2026
@ZuseZ4
Copy link
Member Author

ZuseZ4 commented Jan 26, 2026

I don't think jieyouxu will want to review this part of rustc.
r? @oli-obk

@rustbot rustbot assigned oli-obk and unassigned jieyouxu Jan 26, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 26, 2026

oli-obk is not on the review rotation at the moment.
They may take a while to respond.

@rust-bors

This comment has been minimized.

@ZuseZ4 ZuseZ4 force-pushed the cleanup-datatransfer branch from 6b45680 to 1c28bd8 Compare January 29, 2026 22:16
@rustbot

This comment has been minimized.

@ZuseZ4 ZuseZ4 force-pushed the cleanup-datatransfer branch 2 times, most recently from c310bf7 to b2b51e4 Compare January 29, 2026 23:09
@ZuseZ4 ZuseZ4 mentioned this pull request Feb 2, 2026
5 tasks
@ZuseZ4
Copy link
Member Author

ZuseZ4 commented Feb 2, 2026

@rustbot reroll

@rustbot rustbot assigned nnethercote and unassigned oli-obk Feb 2, 2026
@rust-lang rust-lang deleted a comment from rustbot Feb 2, 2026
@ZuseZ4 ZuseZ4 force-pushed the cleanup-datatransfer branch from d8a440f to 544a019 Compare February 6, 2026 20:36
@rustbot
Copy link
Collaborator

rustbot commented Feb 6, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@Zalathar
Copy link
Member

Zalathar commented Feb 7, 2026

The individual commits seem like they don't have a reason to be separate, so please squash them.

@ZuseZ4 ZuseZ4 force-pushed the cleanup-datatransfer branch from 544a019 to b28b622 Compare February 8, 2026 01:03
@ZuseZ4
Copy link
Member Author

ZuseZ4 commented Feb 8, 2026

One of the commits had gotten lost over one of the last rebases. I've re-added it and fused them.

@nnethercote
Copy link
Contributor

r=me, just one question about the subset operation above.

@ZuseZ4 ZuseZ4 force-pushed the cleanup-datatransfer branch from b28b622 to 6de0591 Compare February 8, 2026 01:34
@ZuseZ4
Copy link
Member Author

ZuseZ4 commented Feb 8, 2026

@bors r=nnethercote rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 8, 2026

📌 Commit 6de0591 has been approved by nnethercote

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 Feb 8, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 8, 2026
…thercote

Cleanup offload datatransfer

There are 3 steps to run code on a GPU: Copy data from the host to the device, launch the kernel, and move it back.
At the moment, we have a single variable describing the memory handling to do in each step, but that makes it hard for LLVM's opt pass to understand what's going on. We therefore split it into three variables, each only including the bits relevant for the corresponding stage.

cc @jdoerfert @kevinsala

r? compiler
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 8, 2026
…thercote

Cleanup offload datatransfer

There are 3 steps to run code on a GPU: Copy data from the host to the device, launch the kernel, and move it back.
At the moment, we have a single variable describing the memory handling to do in each step, but that makes it hard for LLVM's opt pass to understand what's going on. We therefore split it into three variables, each only including the bits relevant for the corresponding stage.

cc @jdoerfert @kevinsala

r? compiler
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 8, 2026
…thercote

Cleanup offload datatransfer

There are 3 steps to run code on a GPU: Copy data from the host to the device, launch the kernel, and move it back.
At the moment, we have a single variable describing the memory handling to do in each step, but that makes it hard for LLVM's opt pass to understand what's going on. We therefore split it into three variables, each only including the bits relevant for the corresponding stage.

cc @jdoerfert @kevinsala

r? compiler
rust-bors bot pushed a commit that referenced this pull request Feb 8, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #151455 (Fix `SourceFile::normalized_byte_pos`)
 - #152250 (Remove support for slugs in diagnostic messages)
 - #152322 (Replace some `feature(core_intrinsics)` with stable hints)
 - #152328 (Fix a few diagnostics)
 - #151640 (Cleanup offload datatransfer)
 - #152212 (Port some attributes to the attr parser)
 - #152309 (Fix bound var resolution for trait aliases)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 8, 2026
…thercote

Cleanup offload datatransfer

There are 3 steps to run code on a GPU: Copy data from the host to the device, launch the kernel, and move it back.
At the moment, we have a single variable describing the memory handling to do in each step, but that makes it hard for LLVM's opt pass to understand what's going on. We therefore split it into three variables, each only including the bits relevant for the corresponding stage.

cc @jdoerfert @kevinsala

r? compiler
rust-bors bot pushed a commit that referenced this pull request Feb 8, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #151455 (Fix `SourceFile::normalized_byte_pos`)
 - #152250 (Remove support for slugs in diagnostic messages)
 - #152322 (Replace some `feature(core_intrinsics)` with stable hints)
 - #151640 (Cleanup offload datatransfer)
 - #152212 (Port some attributes to the attr parser)
 - #152309 (Fix bound var resolution for trait aliases)
 - #152339 (diagnostics: fix ICE in closure signature mismatch)
 - #152341 (`cfg_select!`: allow optional comma after `{ /* ... */ }`)
rust-bors bot pushed a commit that referenced this pull request Feb 8, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #151455 (Fix `SourceFile::normalized_byte_pos`)
 - #152250 (Remove support for slugs in diagnostic messages)
 - #152322 (Replace some `feature(core_intrinsics)` with stable hints)
 - #152328 (Fix a few diagnostics)
 - #151640 (Cleanup offload datatransfer)
 - #152212 (Port some attributes to the attr parser)
 - #152309 (Fix bound var resolution for trait aliases)
 - #152339 (diagnostics: fix ICE in closure signature mismatch)
 - #152341 (`cfg_select!`: allow optional comma after `{ /* ... */ }`)
@rust-bors rust-bors bot merged commit 16c7ee5 into rust-lang:main Feb 8, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 8, 2026
rust-timer added a commit that referenced this pull request Feb 8, 2026
Rollup merge of #151640 - ZuseZ4:cleanup-datatransfer, r=nnethercote

Cleanup offload datatransfer

There are 3 steps to run code on a GPU: Copy data from the host to the device, launch the kernel, and move it back.
At the moment, we have a single variable describing the memory handling to do in each step, but that makes it hard for LLVM's opt pass to understand what's going on. We therefore split it into three variables, each only including the bits relevant for the corresponding stage.

cc @jdoerfert @kevinsala

r? compiler
@ZuseZ4 ZuseZ4 deleted the cleanup-datatransfer branch February 8, 2026 23:32
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. F-gpu_offload `#![feature(gpu_offload)]` 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.

8 participants