Skip to content

Commit

Permalink
[ReactantCUDAExt] Skip precompile load on Julia v1.11.3
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano committed Feb 1, 2025
1 parent 1e6037f commit 4b0d07e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 4 additions & 2 deletions ext/ReactantCUDAExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -952,12 +952,14 @@ function __init__()
return nothing
end

@static if !Sys.isapple() && Sys.ARCH != :aarch64
# In Julia v1.11.3 precompiling this module caches bad code:
# <https://github.com/EnzymeAD/Reactant.jl/issues/614>.
@static if !Sys.isapple()
Reactant.PrecompileTools.@setup_workload begin
Reactant.initialize_dialect()
client = Reactant.XLA.CPUClient(; checkcount=false)
Reactant.PrecompileTools.@compile_workload begin
@static if Reactant.precompilation_supported()
@static if Reactant.precompilation_supported() && VERSION != v"1.11.3"
function square_kernel!(x)
i = CUDA.threadIdx().x
x[i] *= x[i]
Expand Down
3 changes: 0 additions & 3 deletions test/integration/cuda.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ function square!(x, y)
return nothing
end

# https://github.com/EnzymeAD/Reactant.jl/issues/614
const skip_non_cuda_tests = true

@static if !Sys.isapple()
@testset "Square Kernel" begin
oA = collect(1:1:64)
Expand Down

0 comments on commit 4b0d07e

Please sign in to comment.