-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Split autodiff
into autodiff_forward
and autodiff_reverse
#140697
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
Conversation
This comment has been minimized.
This comment has been minimized.
I'd almost bet it has to do with bootstrapping, see e.g. https://github.com/rust-lang/rust/pull/129458/files#diff-ea30f57e78f3b861b784ae315b3ac31358b7cea2aa14a668084ad412de12e586 |
I don't remember exactly, can built-in attributes be namespaced now? E.g. |
I think |
Right sorry, I keep forgetting there's two |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
0197837
to
0218840
Compare
This comment has been minimized.
This comment has been minimized.
Try |
I'd say the tidy error it's because |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
5450e7f
to
375005a
Compare
This comment has been minimized.
This comment has been minimized.
12d1e79
to
71d0e7c
Compare
This comment has been minimized.
This comment has been minimized.
71d0e7c
to
aa6d358
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
6d3019f
to
ebd2a2d
Compare
Some changes occurred in compiler/rustc_passes/src/check_attr.rs Some changes occurred in compiler/rustc_builtin_macros/src/autodiff.rs cc @ZuseZ4 |
UI tests are pending, will depend on error messages change.
…des (`Forward`, `Reverse`) Since the mode is no longer part of `meta_item`, we must insert it manually (otherwise macro expansion with `#[rustc_autodiff]` won't work). This can be revised later if a more structured representation becomes necessary (using enums, annotated structs, etc). Some tests are currently failing. I'll address them next.
962d6c0
to
8917ff6
Compare
Now that we can't get the Forward/Reverse symbols from the input, using sym to create them seems like the right thing to do. We already have a few UI tests to make sure that our current autodiff symbol there doesn't colide with similar named user types, so adding Forward/Reverse to the list should also be fine. |
@bors r+ |
Split `autodiff` into `autodiff_forward` and `autodiff_reverse` This PR splits `#[autodiff]` macro so `#[autodiff(df, Reverse, args)]` would become `#[autodiff_reverse(df, args)]` and `#[autodiff(df, Forward, args)]` would become `#[autodiff_forwad(df, args)]`.
Rollup of 8 pull requests Successful merges: - #140369 (Add data_ptr method to Mutex and RwLock) - #140697 (Split `autodiff` into `autodiff_forward` and `autodiff_reverse`) - #141404 (Improve intrinsic handling in cg_ssa) - #141407 (Refactor the two-phase check for impls and impl items) - #141411 (rustdoc: linking to a local proc macro no longer warns) - #141548 (consider glob imports in cfg suggestion) - #141627 (Drop-build cleanups) - #141670 (Fix ICE in tokenstream with contracts from parser recovery) r? `@ghost` `@rustbot` modify labels: rollup
Split `autodiff` into `autodiff_forward` and `autodiff_reverse` This PR splits `#[autodiff]` macro so `#[autodiff(df, Reverse, args)]` would become `#[autodiff_reverse(df, args)]` and `#[autodiff(df, Forward, args)]` would become `#[autodiff_forwad(df, args)]`.
Rollup of 8 pull requests Successful merges: - #140369 (Add data_ptr method to Mutex and RwLock) - #140697 (Split `autodiff` into `autodiff_forward` and `autodiff_reverse`) - #141404 (Improve intrinsic handling in cg_ssa) - #141407 (Refactor the two-phase check for impls and impl items) - #141411 (rustdoc: linking to a local proc macro no longer warns) - #141548 (consider glob imports in cfg suggestion) - #141627 (Drop-build cleanups) - #141670 (Fix ICE in tokenstream with contracts from parser recovery) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 7 pull requests Successful merges: - #140369 (Add data_ptr method to Mutex and RwLock) - #140697 (Split `autodiff` into `autodiff_forward` and `autodiff_reverse`) - #141404 (Improve intrinsic handling in cg_ssa) - #141411 (rustdoc: linking to a local proc macro no longer warns) - #141548 (consider glob imports in cfg suggestion) - #141627 (Drop-build cleanups) - #141670 (Fix ICE in tokenstream with contracts from parser recovery) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #140697 - Sa4dUs:split-autodiff, r=ZuseZ4 Split `autodiff` into `autodiff_forward` and `autodiff_reverse` This PR splits `#[autodiff]` macro so `#[autodiff(df, Reverse, args)]` would become `#[autodiff_reverse(df, args)]` and `#[autodiff(df, Forward, args)]` would become `#[autodiff_forwad(df, args)]`.
Split `autodiff` into `autodiff_forward` and `autodiff_reverse` This PR splits `#[autodiff]` macro so `#[autodiff(df, Reverse, args)]` would become `#[autodiff_reverse(df, args)]` and `#[autodiff(df, Forward, args)]` would become `#[autodiff_forwad(df, args)]`.
This PR splits
#[autodiff]
macro so#[autodiff(df, Reverse, args)]
would become#[autodiff_reverse(df, args)]
and#[autodiff(df, Forward, args)]
would become#[autodiff_forwad(df, args)]
.