Skip to content

Properly pass offload sizes to kernel args#152283

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Sa4dUs:offload-handle-alloca
Mar 5, 2026
Merged

Properly pass offload sizes to kernel args#152283
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Sa4dUs:offload-handle-alloca

Conversation

@Sa4dUs

@Sa4dUs Sa4dUs commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

This PRs prevents offload from creating an unnecessary alloca when all the arg sizes are static.
I'll implement the first dynamic-size data type in a follow up PR (slice support).

r? @ZuseZ4

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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. labels Feb 7, 2026
@Sa4dUs Sa4dUs force-pushed the offload-handle-alloca branch from 7e0a135 to cdc35ab Compare February 8, 2026 11:08
@rust-bors

This comment has been minimized.

@Sa4dUs Sa4dUs force-pushed the offload-handle-alloca branch from cdc35ab to b454716 Compare February 9, 2026 00:02
@rustbot

rustbot commented Feb 9, 2026

Copy link
Copy Markdown
Collaborator

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.

@ZuseZ4 ZuseZ4 mentioned this pull request Feb 11, 2026
5 tasks
Comment thread tests/codegen-llvm/gpu_offload/gpu_host.rs
@ZuseZ4

ZuseZ4 commented Mar 2, 2026

Copy link
Copy Markdown
Member

Thanks, I think those should be all. Can you squash and put up the slice PR since you mentioned you had it working?
We should add some -O0 tests in the future, but I can do that as part of my opt PR.

@Sa4dUs Sa4dUs force-pushed the offload-handle-alloca branch from bace45b to abb86d6 Compare March 3, 2026 10:53
@Sa4dUs Sa4dUs mentioned this pull request Mar 4, 2026
@ZuseZ4

ZuseZ4 commented Mar 4, 2026

Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors

rust-bors Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

📌 Commit abb86d6 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 Mar 4, 2026
rust-bors Bot pushed a commit that referenced this pull request Mar 5, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #153361 (enable `PassMode::Indirect { on_stack: true, .. }` tail call arguments)
 - #153369 (library/test: always enable unstable features for miri)
 - #152283 (Properly pass offload sizes to kernel args)
 - #153323 (Remove `impl QueryVTable`)
 - #153385 (Fix comment on `is_horizontal_whitespace`)
 - #153394 (fix(thir): Include `NoneWithError` in Enum Struct Tail Assertion)
 - #153419 (rustc_llvm: add missing `-` to flag-comparison logic)
 - #153423 (Update dispatch2 to v0.3.1)
@rust-bors rust-bors Bot merged commit 7595e5b into rust-lang:main Mar 5, 2026
11 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 5, 2026
rust-timer added a commit that referenced this pull request Mar 5, 2026
Rollup merge of #152283 - Sa4dUs:offload-handle-alloca, r=ZuseZ4

Properly pass offload sizes to kernel args

This PRs prevents offload from creating an unnecessary alloca when all the arg sizes are static.
I'll implement the first dynamic-size data type in a follow up PR (slice support).

r? @ZuseZ4
@ZuseZ4 ZuseZ4 added the F-gpu_offload `#![feature(gpu_offload)]` label Mar 11, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Apr 21, 2026
Offload slice support

This PR allows offload to support slice type arguments.

~NOTE: this is built on top of rust-lang#152283

r? @ZuseZ4
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
Offload slice support

This PR allows offload to support slice type arguments.

~NOTE: this is built on top of rust-lang/rust#152283

r? @ZuseZ4
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.

3 participants