add sret handling for scalar autodiff#139465
Merged
bors merged 2 commits intorust-lang:masterfrom Apr 7, 2025
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
oli-obk
reviewed
Apr 7, 2025
Comment on lines
+212
to
+213
| let param_tys = cx.func_params_types(fn_ty); | ||
| for (i, act) in attrs.input_activity.iter().enumerate() { |
Contributor
There was a problem hiding this comment.
Suggested change
| let param_tys = cx.func_params_types(fn_ty); | |
| for (i, act) in attrs.input_activity.iter().enumerate() { | |
| let param_tys = cx.func_params_types(fn_ty); | |
| for (act, param_ty) in attrs.input_activity.iter().zip(param_tys) { |
Member
Author
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 7, 2025
Rollup of 9 pull requests Successful merges: - rust-lang#139035 (Add new `PatKind::Missing` variants) - rust-lang#139108 (Simplify `thir::PatKind::ExpandedConstant`) - rust-lang#139112 (Implement `super let`) - rust-lang#139365 (Default auto traits: fix perf) - rust-lang#139397 (coverage: Build the CGU's global file table as late as possible) - rust-lang#139455 ( Remove support for `extern "rust-intrinsic"` blocks) - rust-lang#139461 (Stop calling `source_span` query in significant drop order code) - rust-lang#139465 (add sret handling for scalar autodiff) - rust-lang#139466 (Trivial tweaks to stop tracking source span directly) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 7, 2025
Rollup merge of rust-lang#139465 - EnzymeAD:autodiff-sret, r=oli-obk add sret handling for scalar autodiff r? `@oli-obk` Fixing one of the todo's which I left in my previous batching PR. This one handles sret for scalar autodiff. `sret` mostly shows up when we try to return a lot of scalar floats. People often start testing autodiff which toy functions which just use a few scalars as inputs and outputs, and those were the most likely to be affected by this issue. So this fix should make learning/teaching hopefully a bit easier. Tracking: - rust-lang#124509
This was referenced Apr 9, 2025
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
r? @oli-obk
Fixing one of the todo's which I left in my previous batching PR.
This one handles sret for scalar autodiff.
sretmostly shows up when we try to return a lot of scalar floats.People often start testing autodiff which toy functions which just use a few scalars as inputs and outputs, and those were the most likely to be affected by this issue. So this fix should make learning/teaching hopefully a bit easier.
Tracking: