OpenCL-CTS icon indicating copy to clipboard operation
OpenCL-CTS copied to clipboard

Image expectations problem

Open alan-baker opened this issue 2 years ago • 12 comments

Attempting to update my CTS to include #1616 leads to some bizarre image expectations.

Here is one of the failures I'm seeing in images/kernel_read_write for CL_FLOAT images:

[CL_RG   CL_FLOAT                 2] - CL_FILTER_LINEAR - CL_ADDRESS_CLAMP - NORMALIZED
FAILED norm_offsets: -0:
Sample 0: coord {-0.007285(-0x1.dd72a6p-8)} did not validate!
	Expected (0,0,0,1.0625),
	got      (0,0,0,1), error of 0
img size 652 (pitch 5216)
Step by step:
	Filter denormalizes x to -4.750000, 0.000000, 0.000000 (<-0.007285, 0.000000, 0.000000> * <652.000000, 1.000000, 1.000000>)
	Actual integer coords used (i = floor(x-.5)): i0:{ -1, 0 } and i1:{ -1, 0 }
	Array coordinate is 0.000000
	Sampled pixels (rgba order):
		p00: 0.000000, 0.000000, 0.000000, 1.000000
		p01: 0.000000, 0.000000, 0.000000, 1.000000
		p10: 0.000000, 0.000000, 0.000000, 1.000000
		p11: 0.000000, 0.000000, 0.000000, 1.000000
	frac( x - 0.5f ) = 0.750000,  frac( y - 0.5f ) = 0.500000
	ulps: 0.00, 0.00, 0.00, -524288.00  (max allowed: 65538.00)

FAILED: [CL_RG   CL_FLOAT                 2] - CL_FILTER_LINEAR - CL_ADDRESS_CLAMP - NORMALIZED

The A channel for the expectation seems wrong. Am I misinterpreting this message?

alan-baker avatar Feb 10 '23 17:02 alan-baker

6.15.15.7. Mapping image channels to color values returned by read_image and color values passed to write_image to image channels says that when reading from a CL_RG format, the result value is: (r, g, 0.0, 1.0)

dneto0 avatar Feb 10 '23 18:02 dneto0

...How did that happen??

Can you give me a log with all the failures?

cdavis5e avatar Feb 14 '23 17:02 cdavis5e

Here's the rest of the failures for that particular invocation (1D CL_FLOAT kernel_read_write).

test.log

alan-baker avatar Feb 14 '23 17:02 alan-baker

There were also failures with other image types/format. And failures in clFillImage tests too.

alan-baker avatar Feb 14 '23 17:02 alan-baker

What platform? What compile flags?

The failures are primarily in the linear case, which means that something is going wrong averaging the pixels.

cdavis5e avatar Feb 14 '23 22:02 cdavis5e

What platform? What compile flags?

Also, exactly what make and model of CPU are you running this on? I sure hope it's not an erratum...

cdavis5e avatar Feb 14 '23 22:02 cdavis5e

What platform? What compile flags?

Also, exactly what make and model of CPU are you running this on? I sure hope it's not an erratum...

@alan-baker Please respond soon. I'd like to fix this sooner rather than later, since it's apparently broken the tests.

cdavis5e avatar Feb 15 '23 19:02 cdavis5e

I don't have the exact cpu model, but it should be a skylake architecture. Fails in both -O1 and -O3 builds. Platform is Linux. No other compiler flags of note.

alan-baker avatar Feb 15 '23 20:02 alan-baker

So there were a few broken shuffles and an add to a wrong vector that gave the broken results you saw. These should be fixed in #1642. Are there any other broken results that might have been caused by my change? I can't find any.

cdavis5e avatar Feb 16 '23 10:02 cdavis5e

Hi. I notice some compilation errors on Intel Compiler which we use for compilation on Windows. Fix is introduced here #1652. After fixing compilation issues I noticed errors in my results of images tests on Windows (Intel Compiler) and Linux (GNU compiler). The tests were run on Coffee Lake (gen9 platform) and on Tiger Lake (gen11) Linux errors: -- The C compiler identification is GNU 9.3.0 -- The CXX compiler identification is GNU 9.3.0

test_image_streams CL_FILTER_NEAREST CL_DEVICE_TYPE_GPU test_image_streams max_images CL_FILTER_NEAREST CL_DEVICE_TYPE_GPU test_image_streams test_mipmaps CL_FILTER_NEAREST CL_DEVICE_TYPE_GPU test_image_streams use_pitches CL_FILTER_NEAREST CL_DEVICE_TYPE_GPU test_image_streams read 1D small_images NORMALIZED CL_FILTER_NEAREST CL_DEVICE_TYPE_GPU test_image_streams read 2D small_images use_pitches NORMALIZED CL_FILTER_NEAREST CL_DEVICE_TYPE_GPU test_image_streams read 3D small_images NORMALIZED CL_FILTER_NEAREST CL_DEVICE_TYPE_GPU

Windows errors: Intel C++ Compiler 2021.8.0.20221119 test_image_streams use_pitches CL_FILTER_NEAREST CL_DEVICE_TYPE_GPU test_cl_fill_images CL_DEVICE_TYPE_GPU test_cl_fill_images max_images CL_DEVICE_TYPE_GPU test_cl_fill_images use_pitches CL_DEVICE_TYPE_GPU

gwawiork avatar Feb 27 '23 13:02 gwawiork

@gwawiork do you have all of the other fixes from #1642? I'm trying to figure out if these are known failures or new failures. Thanks!

bashbaug avatar Feb 27 '23 15:02 bashbaug

@gwawiork do you have all of the other fixes from #1642? I'm trying to figure out if these are known failures or new failures. Thanks!

Yes I've rebuild binaries with these fixes.

gwawiork avatar Feb 27 '23 15:02 gwawiork