-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update builtins library to add erf and erfc (#1194)
- Loading branch information
Showing
6 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]); | ||
} |