intel / llvm

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

[OpaquePointers] Fix SYCL end-to-end tests with enabled opaque pointers. #10682

Open bader opened 1 year ago

bader commented 1 year ago

Following 7 tests are failing due to issues related to opaque pointers support. See https://github.com/intel/llvm/pull/9828.

~sycl/test-e2e/BFloat16/bfloat16_conversions.cpp~ Enabled by https://github.com/intel/llvm/pull/13695. ~sycl/test-e2e/BFloat16/bfloat16_type.cpp~ Enabled by https://github.com/intel/llvm/pull/13695. sycl/test-e2e/BFloat16/bfloat16_vec.cpp
~sycl/test-e2e/DeviceLib/string_test.cpp~ Enabled by https://github.com/intel/llvm/pull/13695. ~sycl/test-e2e/ESIMD/ext_math.cpp~ Fixed by https://github.com/intel/llvm/pull/10848 ~sycl/test-e2e/KernelFusion/internalize_array_wrapper.cpp~ Fixed by https://github.com/intel/llvm/pull/10882. ~sycl/test-e2e/Reduction/reduction_usm.cpp~ Enabled by https://github.com/intel/llvm/pull/13695. sycl/test-e2e/Regression/local-arg-align.cpp

We need to investigate these failures and re-enable execution with enabled opaque pointers.

bader commented 1 year ago

@stdale-intel, could you find someone to investigate failures for these tests (we have owners for other two tests):

  1. sycl/test-e2e/BFloat16/bfloat16_conversions.cpp
  2. sycl/test-e2e/BFloat16/bfloat16_type.cpp
  3. sycl/test-e2e/DeviceLib/string_test.cpp
  4. sycl/test-e2e/Reduction/reduction_usm.cpp - fails only on Windows.
  5. sycl/test-e2e/Regression/local-arg-align.cpp

First three tests are failing only on CPU device with the same error message: __devicelib_ConvertBF16ToFINTEL [passing parameter 1 with incompatible type], so I think the root cause is the same for all three tests.

stdale-intel commented 1 year ago

@cperkinsintel and @againull will help

asudarsa commented 1 year ago

I can try looking at sycl/test-e2e/BFloat16/bfloat16_conversions.cpp sycl/test-e2e/BFloat16/bfloat16_type.cpp if no one else is looking.

Thanks

cperkinsintel commented 1 year ago

So looking at bfloat16_conversions.cpp, one difference is that the current SYCL branch compiles 4 SPIR-V kernels, but the OpaquePointers branch only compiles 3. The SYCL branch generates two SPIR-V entrypoints:

typeinfo name for test_device<sycl::_V1::detail::half_impl::half>(sycl::_V1::queue)::{lambda(sycl::_V1::handler&)#1}::operator()(sycl::_V1::handler&) const::{lambda()#1}
and
typeinfo name for test_device<float>(sycl::_V1::queue)::{lambda(sycl::_V1::handler&)#1}::operator()(sycl::_V1::handler&) const::{lambda()#1}

but with OpaquePointers, only that second one is created. So the kernel for half is absent. There are minor differences between the two matching float kernels, but difficult to assess how important. I'm guessing the missing half one might be a clue?

jopperm commented 1 year ago

sycl/test-e2e/KernelFusion/internalize_array_wrapper.cpp is addressed in #10882.

bader commented 1 year ago

@asudarsa, @cperkinsintel, do you have any updates?

asudarsa commented 1 year ago

Let me take a look at this today.

Thanks

bader commented 11 months ago

@asudarsa, @cperkinsintel, do you have any updates?

asudarsa commented 3 months ago

Hi @bader Sorry for the long delay. We are looking at this now and will provide an update soon.

Thanks

bader commented 3 months ago

@asudarsa, I think @steffenlarsen already updated all these tests. @steffenlarsen, am I right?

steffenlarsen commented 3 months ago

https://github.com/intel/llvm/pull/13695 aims to enable all but sycl/test-e2e/Regression/local-arg-align.cpp on Gen12.

steffenlarsen commented 3 months ago

The failure in local-arg-align occurs on DG2 as well. As such, I suspect it working on other platforms is just coincidence. https://github.com/intel/llvm/pull/14602 disables the test again until it can be investigated.

bader commented 3 months ago

As such, I suspect it working on other platforms is just coincidence.

AFAIK, the problem is in SPIR-V -> LLVM translator used by Intel GPU compiler. Non-Intel devices (e.g. AMD and NVIDIA) devices should not be affected.