Skip to content

feat: support nested functions with #[offload_kernel] - #163077

Open
xkevio wants to merge 8 commits into
rust-lang:mainfrom
xkevio:patch-1
Open

xkevio wants to merge 8 commits into
rust-lang:mainfrom
xkevio:patch-1

Conversation

@xkevio

@xkevio xkevio commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Related to #131513.

Allows annotating nested functions with #[offload_kernel], similar to autodiff.

Also fixes the error message when #[offload_kernel] is used on anything other than functions.

r? @ZuseZ4

(@Sa4dUs, ping)

@rustbot rustbot added 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 Sep 20, 2026
@rustbot

This comment has been minimized.

@rustbot rustbot added has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 20, 2026
@rustbot

rustbot commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

Error: Failed to set assignee to Sa4dUs: invalid assignee

Note: Only org members with at least the repository "read" role, users with write permissions, or people who have commented on the PR may be assigned.

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #triagebot on Zulip.

@xkevio
xkevio marked this pull request as draft September 20, 2026 17:03
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 20, 2026
@xkevio
xkevio marked this pull request as ready for review September 20, 2026 17:28
@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. has-merge-commits PR has merge commits, merge with caution. labels Sep 20, 2026
@rust-bors

This comment has been minimized.

Comment thread tests/pretty/offload/offload_kernel_nested.rs Outdated
@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@xkevio

xkevio commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor Author

I think the test runner just took too long? In any case, I finally had a bit more time for thorough testing and can confirm that it works without issues.

My main goal was to actually enable nested offload functions in main but I only realized after implementing that due to conditional compilation via cfg(target_os), that that might not work as I had hoped ^^

@ZuseZ4

ZuseZ4 commented Oct 24, 2026

Copy link
Copy Markdown
Member

Our CI timeout is after 6hrs iirc, some of our runners regulary take over 3hrs. Just force-push to trigger a rerun, this might be a spurious failure. github CI is often a bit flaky.

@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rustbot

rustbot commented Oct 24, 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.

@rust-log-analyzer

This comment has been minimized.

@xkevio

xkevio commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

PR is rebased, checks are green and the new unimplemented! expansion is reflected in the tests!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

4 participants