diff --git a/Project.toml b/Project.toml index 3f533402..a34cc83b 100644 --- a/Project.toml +++ b/Project.toml @@ -48,7 +48,7 @@ CEnum = "0.5, 1" Crayons = "4" ExprTools = "0.1" GPUArrays = "12.1" -GPUCompiler = "2.13" +GPUCompiler = "2.17" GPUToolbox = "3.4" IntelITT = "0.2" KernelAbstractions = "0.10" diff --git a/test/device/codegen.jl b/test/device/codegen.jl index 003b9329..9885a1d8 100644 --- a/test/device/codegen.jl +++ b/test/device/codegen.jl @@ -51,8 +51,6 @@ end const SKIPPED = Set{Tuple{String, DataType}}( if oneL0.LTS[] [ - # llvm-spirv: `InvalidBitWidth: 63` — `_cpow` narrows an `Int` to `i63` - ("x^x", ComplexF16), ("x^x", ComplexF32), ("x^x", ComplexF64), # llvm-spirv: `Unexpected llvm intrinsic: llvm.smul.with.overflow` ("checked_mul", Int32), ("checked_mul", Int64), ] diff --git a/test/execution.jl b/test/execution.jl index d9804c29..a61be703 100644 --- a/test/execution.jl +++ b/test/execution.jl @@ -676,6 +676,29 @@ end @oneapi f(oneArray(zeros(Float32, 1))) end +@testset "#172: switch narrowed to an invalid integer" begin + # without native integer widths in the datalayout, InstCombine narrows this to a + # `switch i2`, which the Khronos translator rejects or crashes on + function f(out, x) + i = get_global_id() + v = x[i] & 3 + if v == 1 + out[i] = 10 + elseif v == 2 + out[i] = 20 + elseif v == 3 + out[i] = 30 + else + out[i] = 0 + end + return + end + x = oneArray(collect(0:7)) + out = similar(x) + @oneapi items=8 f(out, x) + @test Array(out) == [0, 10, 20, 30, 0, 10, 20, 30] +end + @testset "#160: barrier intrinsincs should be convergent" begin # Solve L*x = r and store the result in r. function cpu(n::Int, r::Vector{Float32})