Skip to content

Rollup of 7 pull requests #138414

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 20 commits into from
Mar 12, 2025
Merged
Changes from 3 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
01795b1
change definitely non-productive cycles to error
lcnr Feb 27, 2025
18809a2
keep inductive cycles as ambig in coherence
lcnr Feb 28, 2025
1833737
uefi: fs: Implement FilePermission
Ayush1325 Mar 9, 2025
c717cc7
uefi: fs: Implement FileType
Ayush1325 Mar 9, 2025
e0a9dd3
uefi: fs: Partially implement FileAttr
Ayush1325 Mar 9, 2025
3b0c258
Convert `ShardedHashMap` to use `hashbrown::HashTable`
cuviper Feb 27, 2025
c9c8387
Use `RUSTC_LINT_FLAGS` more.
nnethercote Mar 11, 2025
55505ab
Add `unreachable_pub` to `RUSTC_LINT_FLAGS` for `compiler/` crates.
nnethercote Mar 11, 2025
ff0a5fe
Remove `#![warn(unreachable_pub)]` from all `compiler/` crates.
nnethercote Mar 11, 2025
ff5a8ad
Explain the actual reason why stripping binders is fine
oli-obk Feb 24, 2025
9882eca
Remove some dead code
oli-obk Mar 11, 2025
cf318a7
intrinsics: remove unnecessary leading underscore from argument names
RalfJung Mar 12, 2025
cb26079
fix incorrect tracing log
onur-ozkan Mar 12, 2025
d55e2e4
Rollup merge of #137314 - lcnr:cycles-with-unknown-kind, r=compiler-e…
matthiaskrgr Mar 12, 2025
4ffbc32
Rollup merge of #137701 - cuviper:sharded-hashtable, r=fmease
matthiaskrgr Mar 12, 2025
a21d41a
Rollup merge of #138269 - Ayush1325:uefi-fs-permission, r=joboet
matthiaskrgr Mar 12, 2025
d93ef39
Rollup merge of #138331 - nnethercote:use-RUSTC_LINT_FLAGS-more, r=on…
matthiaskrgr Mar 12, 2025
de7e5e9
Rollup merge of #138345 - oli-obk:autodiff-cleanup, r=compiler-errors
matthiaskrgr Mar 12, 2025
0c4415c
Rollup merge of #138387 - RalfJung:intrinsic-arg-names, r=oli-obk
matthiaskrgr Mar 12, 2025
579d058
Rollup merge of #138390 - onur-ozkan:fix-invalid-tracing-log, r=jieyouxu
matthiaskrgr Mar 12, 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
16 changes: 5 additions & 11 deletions compiler/rustc_monomorphize/src/partitioning/autodiff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,15 @@ fn adjust_activity_to_abi<'tcx>(tcx: TyCtxt<'tcx>, fn_ty: Ty<'tcx>, da: &mut Vec
if !matches!(fn_ty.kind(), ty::FnDef(..)) {
bug!("expected fn def for autodiff, got {:?}", fn_ty);
}
let fnc_binder: ty::Binder<'_, ty::FnSig<'_>> = fn_ty.fn_sig(tcx);

// If rustc compiles the unmodified primal, we know that this copy of the function
// also has correct lifetimes. We know that Enzyme won't free the shadow too early
// (or actually at all), so let's strip lifetimes when computing the layout.
let x = tcx.instantiate_bound_regions_with_erased(fnc_binder);
// We don't actually pass the types back into the type system.
// All we do is decide how to handle the arguments.
let sig = fn_ty.fn_sig(tcx).skip_binder();

let mut new_activities = vec![];
let mut new_positions = vec![];
for (i, ty) in x.inputs().iter().enumerate() {
for (i, ty) in sig.inputs().iter().enumerate() {
if let Some(inner_ty) = ty.builtin_deref(true) {
if ty.is_fn_ptr() {
// FIXME(ZuseZ4): add a nicer error, or just figure out how to support them,
// since Enzyme itself can handle them.
tcx.dcx().err("function pointers are currently not supported in autodiff");
}
if inner_ty.is_slice() {
// We know that the length will be passed as extra arg.
if !da.is_empty() {
Expand Down