Summary: |
Invalid result from char cast |
Product: |
Beignet
|
Reporter: |
Chris Cummins <chrisc.101> |
Component: |
Beignet | Assignee: |
Zhigang Gong <zhigang.gong> |
Status: |
RESOLVED
MOVED
|
QA Contact: |
|
Severity: |
normal
|
|
|
Priority: |
medium
|
|
|
Version: |
unspecified | |
|
Hardware: |
x86-64 (AMD64) | |
|
OS: |
Linux (All) | |
|
Whiteboard: |
|
i915 platform:
|
|
i915 features:
|
|
Attachments: |
Test case
|
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
Created attachment 133257 [details] Test case Hi, The following kernel computes b[0] = 127.0 when c[0] = 0.0, d = 256, and global size is 1x1x1: kernel void A(global float* b, global float* c, const int d) { int e = get_global_id(0); b[e] = (char)(c[e] + d); } Expected result: 0.0. Actual result: 127.0. Expected result confirmed on a number of different OpenCL implementations, including Intel's proprietary driver for the same CPU. Interestingly, changing the line to 'b[e] = (char)(d);' yields the correct result, despite c[e] = 0.0. Hardware: Intel(R) HD Graphics Haswell GT2 Desktop Driver: OpenCL 1.2 beignet 1.3, using llvm 3.6 OS: Ubuntu Linux 16.04 Full test case attached. Cheers, Chris