llvm icon indicating copy to clipboard operation
llvm copied to clipboard

[SYCL] Several tests failed with OpenCL FPGA in precommit

Open uditagarwal97 opened this issue 1 year ago • 2 comments

Describe the bug Testing in #12673 shows the following tests failed with opencl:fpga. Assert tests failed because the tests did not produce the desired output.

Affected tests: ~~Assert/assert_in_kernels.cpp~~ ~~Assert/assert_in_multiple_tus.cpp~~ ~~Assert/assert_in_multiple_tus_one_ndebug.cpp~~ ~~Assert/assert_in_one_kernel.cpp~~ ~~Assert/assert_in_simultaneous_kernels.cpp~~ ~~Assert/assert_in_simultaneously_multiple_tus.cpp~~ DeviceLib/string_test.cpp ~~Matrix/joint_matrix_opt_kernel_feature_unsupported_hw.cpp~~ ~~syclcompat/atomic/atomic_arith.cpp~~ ~~syclcompat/atomic/atomic_comp_exchange.cpp~~

DeviceLib/string_test failed with the following error:

executed command: env ONEAPI_DEVICE_SELECTOR=opencl:fpga /__w/llvm/llvm/builde2e/DeviceLib/Output/string_test.cpp.tmp.out
terminate called after throwing an instance of 'sycl::_V1::compile_program_error'
what():  The program was built for 1 devices
Build program log for 'Intel(R) FPGA Emulation Device':
 Linking started
 Error: call of function(s) with different signature:
__devicelib_memcpy [passing parameter 1 with incompatible type]
Linking failed
 -17 (PI_ERROR_LINK_PROGRAM_FAILURE)

Detailed test logs: here

To Reproduce Run sycl-e2e tests on a machine with FPGA enabled. No special LIT/CMake option needed to reproduce these failures.

*Environment

  • OS: Linux
  • Target device and vendor: OpenCL FPGA
  • DPC++ version: intel/llvm 73d34739bff

Update:- The testing infrastructure of Assert/* tests and joint_matrix test was updated and these tests are no longer failing on FPGA. Update#2:- syclcompact/Atomic/* tests were fixed. See https://github.com/intel/llvm/pull/12673#pullrequestreview-1882815140

uditagarwal97 avatar Feb 09 '24 19:02 uditagarwal97

As I understand Matrix/joint_matrix_opt_kernel_feature_unsupported_hw.cpp should only be executed on gen12, so it's not affected and can be deleted from this issue.

Regarding Assert/* tests - it looks like FileCheck should check CHECK-ACC prefix, but it checks regular CHECK. For example - sycl/test-e2e/Assert/assert_in_kernels.cpp:

// Shouldn't fail on ACC as fallback assert isn't enqueued there
// RUN: %{run} %t.out &> %t.txt ; FileCheck %s --input-file %t.txt %if acc %{ --check-prefix=CHECK-ACC %}

See the output:

env ONEAPI_DEVICE_SELECTOR=opencl:fpga  /__w/llvm/llvm/build-e2e/Assert/Output/assert_in_kernels.cpp.tmp.out &> /__w/llvm/llvm/build-e2e/Assert/Output/assert_in_kernels.cpp.tmp.txt ; /__w/llvm/llvm/toolchain/bin/FileCheck /__w/llvm/llvm/llvm/sycl/test-e2e/Assert/assert_in_kernels.cpp --input-file /__w/llvm/llvm/build-e2e/Assert/Output/assert_in_kernels.cpp.tmp.txt
# executed command: env ONEAPI_DEVICE_SELECTOR=opencl:fpga /__w/llvm/llvm/build-e2e/Assert/Output/assert_in_kernels.cpp.tmp.out
# note: command had no output on stdout or stderr
# executed command: /__w/llvm/llvm/toolchain/bin/FileCheck /__w/llvm/llvm/llvm/sycl/test-e2e/Assert/assert_in_kernels.cpp --input-file /__w/llvm/llvm/build-e2e/Assert/Output/assert_in_kernels.cpp.tmp.txt
# .---command stderr------------
# | /__w/llvm/llvm/llvm/sycl/test-e2e/Assert/assert_in_kernels.cpp:14:11: error: CHECK: expected string not found in input
# | // CHECK: {{.*}}assert_in_kernels.hpp:25: void kernelFunc2(int *, int): {{.*}} [{{[0,2]}},0,0], {{.*}} [0,0,0]

@aelovikov-intel are we ignoring this - %if acc %{ --check-prefix=CHECK-ACC %}?

BTW. this link Detailed test logs in the description is broken.

KornevNikita avatar Feb 13 '24 10:02 KornevNikita

I think it should be %if accelerator.

aelovikov-intel avatar Feb 13 '24 16:02 aelovikov-intel