Skip to content

Commit

Permalink
Fix readonly on julia 1.11 (#1777)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored Sep 2, 2024
1 parent 4aa1d5b commit c23a825
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/compiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6111,8 +6111,12 @@ function GPUCompiler.codegen(output::Symbol, job::CompilerJob{<:EnzymeTarget};
name = string(name)
name = T == Float32 ? name*"f" : name

handleCustom(llvmfn, name, [EnumAttribute("readnone", 0),
StringAttribute("enzyme_shouldrecompute")])
attrs = if LLVM.version().major <= 15
[LLVM.EnumAttribute("readnone"), StringAttribute("enzyme_shouldrecompute")]
else
[EnumAttribute("memory", NoEffects.data), StringAttribute("enzyme_shouldrecompute")]
end
handleCustom(llvmfn, name, attrs)
end

@assert actualRetType !== nothing
Expand Down

0 comments on commit c23a825

Please sign in to comment.