-
Notifications
You must be signed in to change notification settings - Fork 63
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
Cannot deduce type of copy call void @llvm.memcpy.p10i8.p0i8.i64
#1547
Comments
The problem is that this type doesn't have any ino when taking a typetree of it between bytes 16 and 24. %box34 = call noalias nonnull dereferenceable(240) "enzyme_type"="{[-1]:Pointer, [-1,0]:Integer, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer, [-1,16]:Integer, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Float@float, [-1,40]:Float@double, [-1,48]:Integer, [-1,49]:Integer, [-1,50]:Integer, [-1,51]:Integer, [-1,52]:Integer, [-1,53]:Integer, [-1,54]:Integer, [-1,55]:Integer, [-1,56]:Float@double, [-1,64]:Integer, [-1,65]:Integer, [-1,66]:Integer, [-1,67]:Integer, [-1,68]:Integer, [-1,69]:Integer, [-1,70]:Integer, [-1,71]:Integer, [-1,72]:Integer, [-1,73]:Integer, [-1,74]:Integer, [-1,75]:Integer, [-1,76]:Integer, [-1,77]:Integer, [-1,78]:Integer, [-1,79]:Integer, [-1,80]:Integer, [-1,81]:Integer, [-1,82]:Integer, [-1,83]:Integer, [-1,84]:Integer, [-1,85]:Integer, [-1,86]:Integer, [-1,87]:Integer, [-1,88]:Integer, [-1,89]:Integer, [-1,90]:Integer, [-1,91]:Integer, [-1,92]:Integer, [-1,93]:Integer, [-1,94]:Integer, [-1,95]:Integer, [-1,96]:Integer, [-1,97]:Integer, [-1,98]:Integer, [-1,99]:Integer, [-1,100]:Integer, [-1,101]:Integer, [-1,102]:Integer, [-1,103]:Integer, [-1,104]:Integer, [-1,105]:Integer, [-1,106]:Integer, [-1,107]:Integer, [-1,108]:Integer, [-1,109]:Integer, [-1,110]:Integer, [-1,111]:Integer, [-1,112]:Integer, [-1,113]:Integer, [-1,114]:Integer, [-1,115]:Integer, [-1,116]:Integer, [-1,117]:Integer, [-1,118]:Integer, [-1,119]:Integer, [-1,120]:Integer, [-1,121]:Integer, [-1,122]:Integer, [-1,123]:Integer, [-1,124]:Integer, [-1,125]:Integer, [-1,126]:Integer, [-1,127]:Integer, [-1,128]:Integer, [-1,136]:Integer, [-1,137]:Integer, [-1,138]:Integer, [-1,139]:Integer, [-1,140]:Integer, [-1,141]:Integer, [-1,142]:Integer, [-1,143]:Integer, [-1,144]:Float@float, [-1,152]:Float@double, [-1,160]:Integer, [-1,161]:Integer, [-1,162]:Integer, [-1,163]:Integer, [-1,164]:Integer, [-1,165]:Integer, [-1,166]:Integer, [-1,167]:Integer, [-1,168]:Float@double, [-1,176]:Integer, [-1,177]:Integer, [-1,178]:Integer, [-1,179]:Integer, [-1,180]:Integer, [-1,181]:Integer, [-1,182]:Integer, [-1,183]:Integer, [-1,184]:Integer, [-1,185]:Integer, [-1,186]:Integer, [-1,187]:Integer, [-1,188]:Integer, [-1,189]:Integer, [-1,190]:Integer, [-1,191]:Integer, [-1,192]:Integer, [-1,193]:Integer, [-1,194]:Integer, [-1,195]:Integer, [-1,196]:Integer, [-1,197]:Integer, [-1,198]:Integer, [-1,199]:Integer, [-1,200]:Integer, [-1,201]:Integer, [-1,202]:Integer, [-1,203]:Integer, [-1,204]:Integer, [-1,205]:Integer, [-1,206]:Integer, [-1,207]:Integer, [-1,208]:Integer, [-1,209]:Integer, [-1,210]:Integer, [-1,211]:Integer, [-1,212]:Integer, [-1,213]:Integer, [-1,214]:Integer, [-1,215]:Integer, [-1,216]:Integer, [-1,217]:Integer, [-1,218]:Integer, [-1,219]:Integer, [-1,220]:Integer, [-1,221]:Integer, [-1,222]:Integer, [-1,223]:Integer, [-1,224]:Integer, [-1,225]:Integer, [-1,226]:Integer, [-1,227]:Integer, [-1,228]:Integer, [-1,229]:Integer, [-1,230]:Integer, [-1,231]:Integer, [-1,232]:Integer, [-1,233]:Integer, [-1,234]:Integer, [-1,235]:Integer, [-1,236]:Integer, [-1,237]:Integer, [-1,238]:Integer, [-1,239]:Integer}" {} addrspace(10)* @julia.gc_alloc_obj({}** nonnull %current_task1, i64 noundef 240, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 137776915697616 to {}*) to {} addrspace(10)*)) #46, !dbg !757
%35 = bitcast {} addrspace(10)* %box34 to i8 addrspace(10)*, !dbg !757
julia> obj(137776915697616)
AutoBody{WaterLily.var"#comp#232"{Bool, var"#sdf#3"{Int64}, var"#map#2"{Bool, Int64, Float32, Float64, Int64, Float64, SVector{2, Rational{Int64}}, SVector{2, Rational{Int64}}}}, var"#map#2"{Bool, Int64, Float32, Float64, Int64, Float64, SVector{2, Rational{Int64}}, SVector{2, Rational{Int64}}}} |
okay I'm deeply confused by this memcpy of 7 bytes. Why is this happening. where does it come from? |
logs of relevance so we don't need to rerun:
|
This is likely LLVM optimizing a copy loop? But why 7 and not 9 I do not know. |
okay I've fixed the actual issues from this issue at hand. However now it.....segfaults |
This is now resolved on main, both original error and segfault. The total code doesn't run however due to Enzyme's cache algorithm getting confused:
|
Now with EnzymeAD/Enzyme#2089 it now hits #1781 |
Hey, thanks for working on this! I have followed the thread of fixes and I understand you managed to fix them all? Does KA need to be updated before I can try to run our example in WaterLily using Enzyme in GPU simulations? |
You may need JuliaGPU/KernelAbstractions.jl#534 as well. However locally running while the above issue is fixed there was still a strange memory issue going awry with a full model. @b-fg if you're able to reduce any remaining issues to a MWE, we can try to get them fixed |
Reproducer:
Full log: https://gist.github.com/vchuravy/8e70c7ff38fd150f941fef6a7af6cc92
The text was updated successfully, but these errors were encountered: