Skip to content

Conversation

@Sa4dUs
Copy link
Contributor

@Sa4dUs Sa4dUs commented Mar 2, 2025

This PR replaces the following ICE error with a more user-friendly error message.

error: internal compiler error:
compiler/rustc_codegen_ssa/src/codegen_attrs.rs:935:13:
Invalid input activity Dual for Reverse mode

The issue was occurring specifically in the test file tests/ui/autodiff/autodiff_illegal.rs, affecting functions f5 and f6.

@rustbot
Copy link
Collaborator

rustbot commented Mar 2, 2025

r? @fmease

rustbot has assigned @fmease.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the A-attributes Area: Attributes (`#[…]`, `#![…]`) label Mar 2, 2025
@rustbot
Copy link
Collaborator

rustbot commented Mar 2, 2025

Some changes occurred in compiler/rustc_codegen_ssa/src/codegen_attrs.rs

cc @jdonszelmann

@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 Mar 2, 2025
Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a test. Also, there's no issue linked -- does this actually fix a real issue found by someone? You mention f5 and f6 from tests/ui/autodiff/autodiff_illegal.rs, but these are not ICEing on master, so can you explain more about how you encountered an ICE?

@Sa4dUs
Copy link
Contributor Author

Sa4dUs commented Mar 3, 2025

The errors were found by following the build guide from Enzyme's Rust installation page, running:

git clone --depth=1 [email protected]:rust-lang/rust.git
cd rust
./configure --enable-llvm-link-shared --enable-llvm-plugins --enable-llvm-enzyme --release-channel=nightly --enable-llvm-assertions --enable-clang --enable-lld --enable-option-checking --enable-ninja --disable-docs

./x.py build --stage 1 library

rustup toolchain link enzyme build/host/stage1
rustup toolchain install nightly # enables -Z unstable-options

And after that, testing that specific file using:

./x test tests/ui/autodiff/autodiff_illegal.rs

As long as I know, there is no issue related to this problem. I started looking into it because it was mentioned in a Zulip chat, specifically in this conversation. Since I did this, there doesn't seem to be any PR fixing it, so the error should still be there.

@Sa4dUs Sa4dUs marked this pull request as draft March 5, 2025 10:38
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Sa4dUs Sa4dUs closed this Mar 8, 2025
@fmease fmease added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

5 participants