diff --git a/benchmark/benchmarks.jl b/benchmark/benchmarks.jl index b153f60ee..8e921b346 100644 --- a/benchmark/benchmarks.jl +++ b/benchmark/benchmarks.jl @@ -9,13 +9,16 @@ using Random if !haskey(ENV, "KA_BACKEND") const BACKEND = CPU() + const Ts = (Float32, Float64) else backend = ENV["KA_BACKEND"] if backend == "CPU" const BACKEND = CPU() + const Ts = (Float32, Float64) elseif backend == "CUDA" using CUDA const BACKEND = CUDABackend() + const Ts = (Float16, Float32, Float64) else error("Backend $backend not recognized") end @@ -31,7 +34,7 @@ end SUITE["saxpy"] = BenchmarkGroup() let static = BenchmarkGroup() - for T in (Float16, Float32, Float64) + for T in Ts dtype = BenchmarkGroup() for N in (64, 256, 512, 1024, 2048, 4096, 16384, 32768, 65536, 262144, 1048576) dtype[N] = @benchmarkable begin @@ -49,7 +52,7 @@ let static = BenchmarkGroup() end let default = BenchmarkGroup() - for T in (Float16, Float32, Float64) + for T in Ts dtype = BenchmarkGroup() for N in (64, 256, 512, 1024, 2048, 4096, 16384, 32768, 65536, 262144, 1048576) dtype[N] = @benchmarkable begin diff --git a/src/pocl/compiler/compilation.jl b/src/pocl/compiler/compilation.jl index e76ae2b86..5f88fba37 100644 --- a/src/pocl/compiler/compilation.jl +++ b/src/pocl/compiler/compilation.jl @@ -48,6 +48,7 @@ end supports_fp16 = "cl_khr_fp16" in dev.extensions supports_fp64 = "cl_khr_fp64" in dev.extensions + # create GPUCompiler objects target = SPIRVCompilerTarget(; supports_fp16, supports_fp64, version = v"1.2", kwargs...) params = OpenCLCompilerParams()