Skip to content

Rollup of 11 pull requests #139396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 44 commits into from
Apr 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
222adac
Allow optimizing out `panic_bounds_check` in Unicode checks.
reitermarkus Mar 5, 2025
3e37404
Add test for `escape_debug` without bounds check.
reitermarkus Mar 5, 2025
34ac75b
Add second precondition for `skip_search`.
reitermarkus Mar 5, 2025
2272558
Never inline `lookup_slow`.
reitermarkus Mar 7, 2025
90ebc24
Use `intrinsics::assume` instead of `hint::assert_unchecked`.
reitermarkus Mar 7, 2025
224dad1
Fix formatting.
reitermarkus Mar 8, 2025
3628a8f
Remove unneeded parentheses.
reitermarkus Mar 8, 2025
bacd57a
Add integer to string formatting tests
GuillaumeGomez Mar 16, 2025
e41cce0
fix pthread-based tls on apple targets
xTachyon Mar 2, 2025
25900c2
Tweak integer to string conversion test a bit to be future-proof
GuillaumeGomez Mar 23, 2025
f9ef456
Implement `associated_items` api.
makai410 Apr 1, 2025
6ce74f7
replace extra_filename with strict version hash in metrics file names
yaahc Mar 25, 2025
53ef53a
settings.js: begin typechecking migration
lolbinarycat Apr 2, 2025
6ca7bd0
settings.js: add new rustdoc.Setting interface
lolbinarycat Apr 2, 2025
f056836
settings.js: remove dead code for adding <hr> to settings page
lolbinarycat Apr 2, 2025
9f8d3d0
settings.js: refactor settingsBlurHandler
lolbinarycat Apr 2, 2025
d2ff26b
settings.js: add some null checks to buildSettingsPage
lolbinarycat Apr 2, 2025
a805f52
settings.js: make top-level code typecheck
lolbinarycat Apr 2, 2025
8a34129
main.js: make hideAllModals docs clearer
lolbinarycat Apr 2, 2025
9f54910
settings.js: add elemContainsTarget utility function
lolbinarycat Apr 2, 2025
ef1827b
settings.js: fix whitespace
lolbinarycat Apr 2, 2025
4435c99
rustdoc js: satisfy eslint
lolbinarycat Apr 2, 2025
5c2a322
use lower case to match other error messages
tshepang Apr 2, 2025
842da5c
structure the message
tshepang Apr 2, 2025
087ffd7
add the autodiff batch mode frontend
ZuseZ4 Apr 3, 2025
e0c8ead
add autodiff batching middle-end
ZuseZ4 Apr 3, 2025
aa1b7bf
Remove an unwanted comment.
nnethercote Apr 3, 2025
b9e13cb
Apply `Recovery::Forbidden` when reparsing pasted macro fragments.
nnethercote Apr 3, 2025
b7c63a9
add autodiff batching backend
ZuseZ4 Apr 4, 2025
79e17bc
add new tests for autodiff batching and update old ones
ZuseZ4 Apr 4, 2025
89d8948
add new flag to print the module post-AD, before opts
ZuseZ4 Apr 4, 2025
cfcc47e
make `Arguments::as_statically_known_str` doc(hidden)
mejrs Apr 4, 2025
8ff7052
Expose algebraic floating point intrinsics
calder Feb 19, 2025
2e4e196
Rollup merge of #136457 - calder:master, r=tgross35
Zalathar Apr 5, 2025
c6bf3a0
Rollup merge of #137880 - EnzymeAD:autodiff-batching, r=oli-obk
Zalathar Apr 5, 2025
92bb726
Rollup merge of #137897 - xTachyon:tls-fix, r=thomcc,jieyouxu
Zalathar Apr 5, 2025
a038028
Rollup merge of #138024 - reitermarkus:unicode-panic-optimization, r=…
Zalathar Apr 5, 2025
338b878
Rollup merge of #138546 - GuillaumeGomez:integer-to-string-tests, r=A…
Zalathar Apr 5, 2025
93f7583
Rollup merge of #138826 - makai410:assoc-items, r=celinval
Zalathar Apr 5, 2025
ae745a0
Rollup merge of #138950 - yaahc:svh-metrics-name, r=bjorn3
Zalathar Apr 5, 2025
f04c935
Rollup merge of #139274 - lolbinarycat:rustdoc-js-less-expect-error-p…
Zalathar Apr 5, 2025
6907e01
Rollup merge of #139285 - tshepang:uniform-case, r=jieyouxu
Zalathar Apr 5, 2025
66ccc4f
Rollup merge of #139341 - nnethercote:fix-137874, r=petrochenkov
Zalathar Apr 5, 2025
e31ce50
Rollup merge of #139389 - mejrs:hidden, r=workingjubilee
Zalathar Apr 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions compiler/rustc_ast/src/expand/autodiff_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,17 @@ pub struct AutoDiffAttrs {
/// e.g. in the [JAX
/// Documentation](https://jax.readthedocs.io/en/latest/_tutorials/advanced-autodiff.html#how-it-s-made-two-foundational-autodiff-functions).
pub mode: DiffMode,
/// A user-provided, batching width. If not given, we will default to 1 (no batching).
/// Calling a differentiated, non-batched function through a loop 100 times is equivalent to:
/// - Calling the function 50 times with a batch size of 2
/// - Calling the function 25 times with a batch size of 4,
/// etc. A batched function takes more (or longer) arguments, and might be able to benefit from
/// cache locality, better re-usal of primal values, and other optimizations.
/// We will (before LLVM's vectorizer runs) just generate most LLVM-IR instructions `width`
/// times, so this massively increases code size. As such, values like 1024 are unlikely to
/// work. We should consider limiting this to u8 or u16, but will leave it at u32 for
/// experiments for now and focus on documenting the implications of a large width.
pub width: u32,
pub ret_activity: DiffActivity,
pub input_activity: Vec<DiffActivity>,
}
Expand Down Expand Up @@ -222,13 +233,15 @@ impl AutoDiffAttrs {
pub const fn error() -> Self {
AutoDiffAttrs {
mode: DiffMode::Error,
width: 0,
ret_activity: DiffActivity::None,
input_activity: Vec::new(),
}
}
pub fn source() -> Self {
AutoDiffAttrs {
mode: DiffMode::Source,
width: 0,
ret_activity: DiffActivity::None,
input_activity: Vec::new(),
}
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_ast_lowering/src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -676,12 +676,9 @@ impl<'hir> LoweringContext<'_, 'hir> {
let ty =
self.lower_ty(ty, ImplTraitContext::Disallowed(ImplTraitPosition::StaticTy));
let safety = self.lower_safety(*safety, hir::Safety::Unsafe);

// njn: where for this?
if define_opaque.is_some() {
self.dcx().span_err(i.span, "foreign statics cannot define opaque types");
}

(ident, hir::ForeignItemKind::Static(ty, *mutability, safety))
}
ForeignItemKind::TyAlias(box TyAlias { ident, .. }) => {
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_builtin_macros/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ builtin_macros_autodiff_ret_activity = invalid return activity {$act} in {$mode}
builtin_macros_autodiff_ty_activity = {$act} can not be used for this type
builtin_macros_autodiff_unknown_activity = did not recognize Activity: `{$act}`

builtin_macros_autodiff_width = autodiff width must fit u32, but is {$width}
builtin_macros_bad_derive_target = `derive` may only be applied to `struct`s, `enum`s and `union`s
.label = not applicable here
.label2 = not a `struct`, `enum` or `union`
Expand Down
Loading
Loading