Skip to content
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

Enzyme Incompatible Return Type #1

Open
jpmedinagl opened this issue Sep 25, 2024 · 0 comments
Open

Enzyme Incompatible Return Type #1

jpmedinagl opened this issue Sep 25, 2024 · 0 comments

Comments

@jpmedinagl
Copy link
Owner

Based on the new EnzymeAD/rust#162, enzyme could not autodiff through any function that returns integers.

$ RUSTFLAGS="-Z autodiff=LooseTypes" cargo +enzyme run --release --bin update
...
Attribute 'range(i32 0, 2)' applied to incompatible type!
ptr @fakeaugmented_CINTset_pairdata
...
rustc-LLVM ERROR: function failed verification (2)

LLVM-IR compressed

define noundef range(i32 0, 2) i32 @preprocess_CINT1e_loop(ptr nocapture readnone %0, ptr noundef %1, ptr noundef %2, i32 %3) unnamed_addr #108 {
  ...

88:                                               ; preds = %84, %4
  %89 = phi i32 [ 1, %84 ], [ 0, %4 ]
  ret i32 %89
}

; Function Attrs: mustprogress nounwind nonlazybind sanitize_hwaddress willreturn uwtable
define internal range(i32 0, 2) { ptr } @fakeaugmented_CINT1e_loop(ptr nocapture readnone %0, ptr noundef %1, ptr %2, ptr noundef %3, ptr %4, i32 %5) unnamed_addr #108 {
  ...

116:                                              ; preds = %110, %6
  ret { ptr } undef
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant