Skip to content

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 from 4f29cbe to 014d61d Compare January 25, 2026 22:36
@ZuseZ4 ZuseZ4 force-pushed the cleanup-datatransfer branch 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.

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-review Status: Awaiting review from the assignee but also interested parties. 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.

5 participants