You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#![feature(autodiff)]use std::autodiff::autodiff;#[autodiff = "Forward"]fnf(x:f32) -> f32{
x * x
}#[autodiff]fng(x:f32) -> f32{
x * x
}fnmain(){}
complilation error:
error: autodiff must be applied to function
--> src/main.rs:5:1
|
5 | / fn f(x: f32) -> f32 {
6 | | x * x
7 | | }
| |_^
error: autodiff must be applied to function
--> src/main.rs:9:1
|
9 | / fn g(x: f32) -> f32 {
10 | | x * x
11 | | }
| |_^
error: could not compile `enzyme-test` (bin "enzyme-test") due to 2 previous errors
while both are wrong the error message stating the macro must be applied to functions only doesn't make sense here.
I don't know how the macro styles like #[foo] as opposed to #[foo(Bar)] are referred to hence the "style" in the title
The text was updated successfully, but these errors were encountered:
sYgbpNA5UEVufjsHNwF3Xvf9ANZi5bNs
changed the title
Wrong error message for using the wrong macro "style"
Wrong error message for using the wrong macro "style" for the autodiff macro
Nov 5, 2024
rustc +enzyme -vV
output:rustc 1.84.0-nightly (1203575 2024-10-30)
binary: rustc
commit-hash: 1203575
commit-date: 2024-10-30
host: x86_64-unknown-linux-gnu
release: 1.84.0-nightly
LLVM version: 19.1.1
example:
complilation error:
while both are wrong the error message stating the macro must be applied to functions only doesn't make sense here.
I don't know how the macro styles like
#[foo]
as opposed to#[foo(Bar)]
are referred to hence the "style" in the titleThe text was updated successfully, but these errors were encountered: