Skip to content

Commit

Permalink
update builtins library to add erf and erfc (#1194)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjodinchr authored Aug 22, 2023
1 parent 108b8c3 commit 833ec0f
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 0 deletions.
Binary file modified cmake/clspv--.bc
Binary file not shown.
Binary file modified cmake/clspv64--.bc
Binary file not shown.
10 changes: 10 additions & 0 deletions test/MathBuiltins/erf/erf_float.cl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// RUN: clspv %s -o %t.spv
// RUN: spirv-dis %t.spv -o %t.spvasm
// RUN: spirv-val %t.spv --target-env spv1.0

#pragma OPENCL EXTENSION cl_khr_fp16 : enable

kernel void foo(global float *s) {
unsigned gid = get_global_id(0);
s[gid] = erf(s[gid]);
}
10 changes: 10 additions & 0 deletions test/MathBuiltins/erf/erf_half.cl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// RUN: clspv %s -o %t.spv
// RUN: spirv-dis %t.spv -o %t.spvasm
// RUN: spirv-val %t.spv --target-env spv1.0

#pragma OPENCL EXTENSION cl_khr_fp16 : enable

kernel void foo(global half *s) {
unsigned gid = get_global_id(0);
s[gid] = erf(s[gid]);
}
10 changes: 10 additions & 0 deletions test/MathBuiltins/erfc/erfc_float.cl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// RUN: clspv %s -o %t.spv
// RUN: spirv-dis %t.spv -o %t.spvasm
// RUN: spirv-val %t.spv --target-env spv1.0

#pragma OPENCL EXTENSION cl_khr_fp16 : enable

kernel void foo(global float *s) {
unsigned gid = get_global_id(0);
s[gid] = erfc(s[gid]);
}
10 changes: 10 additions & 0 deletions test/MathBuiltins/erfc/erfc_half.cl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// RUN: clspv %s -o %t.spv
// RUN: spirv-dis %t.spv -o %t.spvasm
// RUN: spirv-val %t.spv --target-env spv1.0

#pragma OPENCL EXTENSION cl_khr_fp16 : enable

kernel void foo(global half *s) {
unsigned gid = get_global_id(0);
s[gid] = erfc(s[gid]);
}

0 comments on commit 833ec0f

Please sign in to comment.