forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 8
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
eprintln! thread error #139
Comments
This should probably just be marked as inactive
…On Thu, Jul 25, 2024 at 3:00 PM JP ***@***.***> wrote:
When trying to autodiff a function that has the eprintln! macro, there is
an error:
@__cxa_thread_atexit_impl = extern_weak global i8
at context: call void @_ZN3std2io5stdio7_eprint17h1ff923295f510774E(ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %1) #110```
I tried creating a minimal reproducible with ENZYME_OPT=1 and llvm-extract for the enzyme explorer ([out.txt](https://github.com/user-attachments/files/16382559/out.txt)) but the explorer gives a slightly different error
```error: <unknown>:0:0: in function preprocess__ZN3std2io5stdio31print_to_buffer_if_capture_used17hf768171844a00e61E i1 (ptr): Enzyme: cannot compute with global variable that doesn't have marked shadow global
@_ZN3std2io5stdio14OUTPUT_CAPTURE7__getit5__KEY17h15828b3e0884a413E.llvm.11955502528429326793 = external hidden thread_local global <{ [8 x i8], [8 x i8], [1 x i8], [7 x i8] }>, align 8```
Not sure if its the same error.
Below is the rust file and cargo. Generated the error with `cargo +enzyme build --release --bin file`
```#![feature(autodiff)]
#[no_mangle]
#[autodiff(diff, Reverse)]
fn eprintfunc() {
eprintln!("eprintln error");
}
fn main() {
diff();
}```
```[package]
name = "lib"
version = "0.1.0"
edition = "2021"
[profile.release]
lto = "fat"
[[bin]]
name = "file"
path = "file.rs"```
—
Reply to this email directly, view it on GitHub
<#139>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJTUXDDLUP2E6KBC3BPWK3ZOFDMNAVCNFSM6AAAAABLPEHEM2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGQZTANZZGQ4TQNQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
try if you can add it to one of these functions |
closed by EnzymeAD/Enzyme#2022 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When trying to autodiff a function that has the eprintln! macro, there is an error:
I tried creating a minimal reproducible with ENZYME_OPT=1 and llvm-extract for the enzyme explorer (out.txt) but the explorer gives a slightly different error
Not sure if its the same error.
Below is the rust file and cargo. Generated the error with
cargo +enzyme build --release --bin file
The text was updated successfully, but these errors were encountered: