Skip to content

Commit b22a3e6

Browse files
authored
Disable Float16 on the CPU backend (#609)
1 parent 4981147 commit b22a3e6

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

benchmark/benchmarks.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@ using Random
99

1010
if !haskey(ENV, "KA_BACKEND")
1111
const BACKEND = CPU()
12+
const Ts = (Float32, Float64)
1213
else
1314
backend = ENV["KA_BACKEND"]
1415
if backend == "CPU"
1516
const BACKEND = CPU()
17+
const Ts = (Float32, Float64)
1618
elseif backend == "CUDA"
1719
using CUDA
1820
const BACKEND = CUDABackend()
21+
const Ts = (Float16, Float32, Float64)
1922
else
2023
error("Backend $backend not recognized")
2124
end
@@ -31,7 +34,7 @@ end
3134
SUITE["saxpy"] = BenchmarkGroup()
3235

3336
let static = BenchmarkGroup()
34-
for T in (Float16, Float32, Float64)
37+
for T in Ts
3538
dtype = BenchmarkGroup()
3639
for N in (64, 256, 512, 1024, 2048, 4096, 16384, 32768, 65536, 262144, 1048576)
3740
dtype[N] = @benchmarkable begin
@@ -49,7 +52,7 @@ let static = BenchmarkGroup()
4952
end
5053

5154
let default = BenchmarkGroup()
52-
for T in (Float16, Float32, Float64)
55+
for T in Ts
5356
dtype = BenchmarkGroup()
5457
for N in (64, 256, 512, 1024, 2048, 4096, 16384, 32768, 65536, 262144, 1048576)
5558
dtype[N] = @benchmarkable begin

src/pocl/compiler/compilation.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ end
4848
supports_fp16 = "cl_khr_fp16" in dev.extensions
4949
supports_fp64 = "cl_khr_fp64" in dev.extensions
5050

51+
5152
# create GPUCompiler objects
5253
target = SPIRVCompilerTarget(; supports_fp16, supports_fp64, version = v"1.2", kwargs...)
5354
params = OpenCLCompilerParams()

0 commit comments

Comments
 (0)