intel / llvm

Intel staging area for llvm.org contribution. Home for Intel LLVM-based projects.
Other
1.22k stars 730 forks source link

bindless_images/read_sampled.cpp validation error on cuda/DG2 #15671

Open wenju-he opened 3 hours ago

wenju-he commented 3 hours ago

Describe the bug

char/uchar/short/ushort types in test read_sampled.cpp has validation error on DG2 and the difference is 1.

If we add int32 type to the test, the test will also report error on CUDA and difference is also 1:

addressing mode: repeat
coordinate normalization mode: normalized
filtering mode: linear
offset: 1.25
Running 2D int
Global Size: 32 32  Local Size: 8 8
        Result mismatch at [4][0] Expected: 38, Actual: 37
        Result mismatch at [7][0] Expected: 54, Actual: 53
        Result mismatch at [8][0] Expected: 50, Actual: 49

Is this a test issue related to reference value computation? Tag @intel/bindless-images-reviewers

To reproduce

  1. Apply following diff to the test
    diff --git a/sycl/test-e2e/bindless_images/read_sampled.cpp b/sycl/test-e2e/bindless_images/read_sampled.cpp
    index 3e786855381e..3e4e640bc41e 100644
    --- a/sycl/test-e2e/bindless_images/read_sampled.cpp
    +++ b/sycl/test-e2e/bindless_images/read_sampled.cpp
    @@ -587,6 +587,12 @@ bool runTests(sycl::range<2> dims, sycl::range<2> localSize, float offset,
       failed |= util::runTest<NDims, float, 4, sycl::image_channel_type::fp32,
                               class float4_2d2>({512, 512}, {8, 8}, offset,
                                                 samp, seed);
    +
    +      bindless_helpers::printTestName<NDims>("Running 2D int", {32, 32},
    +                                             {8, 8});
    +      failed |= util::runTest<NDims, int, 1, sycl::image_channel_type::signed_int32,
    +                              class int_2d>({512, 512}, {8, 8}, offset,
    +                                            samp, seed);
     }
    }
  2. Specify the command which should be used to compile the program clang++ -fsycl read_sampled.cpp -fsycl-targets=nvptx64-nvidia-cuda
  3. Specify the command which should be used to launch the program ./a.out
  4. Indicate what is wrong Output has error:
    An error has occurred!

    Environment

wenju-he commented 3 hours ago

@intel/bindless-images-reviewers could you please take a look?