diff --git a/Manifest.toml b/Manifest.toml index 006948fe5d..5b6529181e 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -83,9 +83,9 @@ version = "6.2.2" [[GPUCompiler]] deps = ["DataStructures", "ExprTools", "InteractiveUtils", "LLVM", "Libdl", "Logging", "Scratch", "Serialization", "TimerOutputs", "UUIDs"] -git-tree-sha1 = "a5a239b8c688f59872eb689edd75395e97cc6641" +git-tree-sha1 = "7f13030524614d90c876332c980fd1edef2331e8" uuid = "61eb1bfa-7361-4325-ad38-22787b887f55" -version = "0.11.2" +version = "0.11.3" [[InteractiveUtils]] deps = ["Markdown"] diff --git a/Project.toml b/Project.toml index b19a8b5caa..e680b8ac78 100644 --- a/Project.toml +++ b/Project.toml @@ -37,7 +37,7 @@ CEnum = "0.2, 0.3, 0.4" DataStructures = "0.17, 0.18" ExprTools = "0.1" GPUArrays = "6.1.0" -GPUCompiler = "0.11.1" +GPUCompiler = "0.11.3" LLVM = "3" MacroTools = "0.5" Memoize = "0.4" diff --git a/test/device/intrinsics.jl b/test/device/intrinsics.jl index 2e0265b38f..e5cf244dff 100644 --- a/test/device/intrinsics.jl +++ b/test/device/intrinsics.jl @@ -81,6 +81,21 @@ end @test testf(a->op.(a, T(2)), T[-1]) end end + + @testset "rsqrt" begin + # GPUCompiler.jl#173: a CUDA-only device function fails to validate + function kernel(a) + a[] = CUDA.rsqrt(a[]) + return + end + + # make sure this test uses an actual device function + @test_throws ErrorException kernel(ones(1)) + + a = CuArray{Float32}([4]) + @cuda kernel(a) + @test Array(a) == [0.5] + end end