Skip to content

Commit 8837fb9

Browse files
committed
replace copysign.f16 for pocl backend
companion PR to JuliaGPU/GPUCompiler.jl#722
1 parent f37bc2d commit 8837fb9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.github/workflows/Test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ jobs:
135135
echo 'default_memory_backend="${{ matrix.memory_backend }}"' >> test/LocalPreferences.toml
136136
julia --project -e '
137137
using Pkg
138+
Pkg.add(name="GPUCompiler", rev="sds/replace_copysign_f16")
138139
Pkg.develop(path="lib/intrinsics")'
139140
140141
- name: Test OpenCL.jl

src/compiler/compilation.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@ end
4747
@noinline function _compiler_config(dev; kernel=true, name=nothing, always_inline=false, kwargs...)
4848
supports_fp16 = "cl_khr_fp16" in dev.extensions
4949
supports_fp64 = "cl_khr_fp64" in dev.extensions
50+
replace_copysign_f16 = dev.platform.name == "Portable Computing Language"
5051

5152
# create GPUCompiler objects
52-
target = SPIRVCompilerTarget(; supports_fp16, supports_fp64, validate=true, kwargs...)
53+
target = SPIRVCompilerTarget(; supports_fp16, supports_fp64, replace_copysign_f16, validate=true, kwargs...)
5354
params = OpenCLCompilerParams()
5455
CompilerConfig(target, params; kernel, name, always_inline)
5556
end

0 commit comments

Comments
 (0)