KhronosGroup / KhronosGroup/OpenCL-CTS
A Bug in write image for error check
- Dominant language
- C++
- Stars
- 232
- Forks
- 235
- Avg merge
- 8d 7h
- Merged PRs (30d)
- 18
Description
Both master and cl12_trunk branch have a bug in write images ofr error check.
error code like this:
```
else
{
// Exact result passes every time
if( memcmp( resultBuffer, resultPtr, get_pixel_size( imageInfo->format ) ) != 0 )
{
// result is inexact. Calculate error
int failure = 1;
float errors[4] = {NAN, NAN, NAN, NAN};
pack_image_pixel_error( (float *)imagePtr, imageInfo->format, resultBuffer, errors );
```
the third argument `resultBuffer` is src data which come from `imagePtr`, here should be `resultPtr` -- the data read from GPU. for the error chec.
files in images/kernel_read_write/ dictionary, they all have the same problem:
```
test_write_1D.cpp
test_write_1D_array.cpp
test_write_2D_array.cpp
test_write_3D.cpp
test_write_image.cpp
```
Best Reagrds,
Wu
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by inspecting the error-checking path in images/kernel_read_write/test_write_1D.cpp, then compare the same code in test_write_1D_array.cpp, test_write_2D_array.cpp, test_write_3D.cpp, and test_write_image.cpp. Confirm the error calculation uses the GPU-read data, and verify that all five files are consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100