Open turiya4 opened 4 days ago
Please post the backtrace in full, you cut out important information
Sorry. I have updated the original post with the full error.
I am confused? You removed even more information?
Could you please let me know now? I have updated the error.
Thanks this information is always important:
Did not have return index set when differentiating function
call %6 = call { { {} addrspace(10)* }, { {} addrspace(10)* } } inttoptr (i64 123305430303696 to { { {} addrspace(10)* }, { {} addrspace(10)* } } ({} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*)*)({} addrspace(10)* addrspacecast ({}* inttoptr (i64 123305469593184 to {}*) to {} addrspace(10)*), {} addrspace(10)* nonnull %1, {} addrspace(10)* nonnull %2) #9, !dbg !19
augmentcall %_augmented = call { i8*, { { {} addrspace(10)* }, { {} addrspace(10)* } } } %15({} addrspace(10)* addrspacecast ({}* inttoptr (i64 123305469593184 to {}*) to {} addrspace(10)*), {} addrspace(10)* addrspacecast ({}* inttoptr (i64 123305469593184 to {}*) to {} addrspace(10)*), {} addrspace(10)* %1, {} addrspace(10)* %"'", {} addrspace(10)* %2, {} addrspace(10)* %"'1"), !dbg !19
Yeah so this issue is that there’s an inttoptr (presumably a runtime function) that we didn’t restore and thus didn’t properly handle
Oh no, actually this is an instance of the deferred codegen not triggering or something?
In particular I presume the inttoptr call is from the inner AD.
We need to fix this, but just for fun what happens if you do set_abi(Reverse, InlineABI) for the innermost call
The following code (using Julia 1.10.6 and Enzyme 13.17) does simple Nested AD. However this results in an error.