diff --git a/Project.toml b/Project.toml index 4069567..7d06745 100644 --- a/Project.toml +++ b/Project.toml @@ -20,7 +20,7 @@ libcxxwrap_julia_jll = "3eaa8342-bff7-56a5-9981-c04077f7cee7" [compat] Clang = "0.14, 0.17.4" CxxWrap = "0.14" -GPUCompiler = "0.21.4" +GPUCompiler = "0.25" JSON = "0.21.4" LLVM = "6" LinearAlgebra = "1" diff --git a/src/compiler/compiler.jl b/src/compiler/compiler.jl index 2d92875..60a88d5 100644 --- a/src/compiler/compiler.jl +++ b/src/compiler/compiler.jl @@ -36,15 +36,7 @@ macro device_override(ex) ex = eval(ex) error() end - code = quote - $GPUCompiler.@override($method_table, $ex) - end - if isdefined(Base.Experimental, Symbol("@overlay")) - return esc(code) - else - push!(overrides, code) - return - end + return esc(:( Base.Experimental.@overlay($method_table, $ex) )) end macro device_function(ex) diff --git a/test/compiler.jl b/test/compiler.jl index e9de74b..9022d2a 100644 --- a/test/compiler.jl +++ b/test/compiler.jl @@ -5,7 +5,7 @@ const check_bounds = Base.JLOptions().check_bounds == 1 using Test using IPUToolkit.IPUCompiler -using GPUCompiler: KernelError +using GPUCompiler: InvalidIRError using IPUToolkit.Poplar if Poplar.SDK_VERSION ≥ v"2.2.0" || !check_bounds using Enzyme @@ -58,8 +58,8 @@ function test_compiler_program(device) end # Test some invalid kernels - @test_throws KernelError @codelet graph f_access_out_scalar(x::VertexScalar{Float32, Out}) = @ipushow x[] - @test_throws KernelError @codelet graph f_set_in_scalar(x::VertexScalar{Float32, In}) = x[] = 3.14f0 + @test_throws InvalidIRError @codelet graph f_access_out_scalar(x::VertexScalar{Float32, Out}) = @ipushow x[] + @test_throws InvalidIRError @codelet graph f_set_in_scalar(x::VertexScalar{Float32, In}) = x[] = 3.14f0 # This function would contain a reference to a literal pointer, likely an # invalid memory address on the IPU.