Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

[SYCL][ESIMD] Tests on Spec_Const feature for all basic types #135

Merged
merged 41 commits into from
Feb 15, 2021
Merged

[SYCL][ESIMD] Tests on Spec_Const feature for all basic types #135

merged 41 commits into from
Feb 15, 2021

Conversation

fveselov
Copy link

@fveselov fveselov commented Feb 4, 2021

No description provided.

// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
// TODO enable on Windows

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log looks like the case when unhandled exception if thrown from application.

Could you please add SYCL exception handling to the test: see examples in #63
to get extra information about failure.

@fveselov
Copy link
Author

fveselov commented Feb 9, 2021

Adding SYCL exception handling does not change much. Most tests fail on Windows with no specific error:

[2021-02-09T15:11:40.860Z] 1 warning generated.
[2021-02-09T15:11:40.860Z]
[2021-02-09T15:11:40.860Z] $ ":" "RUN: at line 10"
[2021-02-09T15:11:40.860Z] $ "env" "SYCL_DEVICE_FILTER=opencl:gpu" "D:\Jenkins\llvm-test-suite_Jenkins\win_node\workspace\LLVM-Test-Suite-CI\LLVM-Test-Suite-WIN\build\SYCL\ESIMD\spec_const\Output\spec_const_int.cpp.tmp.out"
[2021-02-09T15:11:40.860Z] note: command had no output on stdout or stderr
[2021-02-09T15:11:40.860Z] error: command failed with exit status: 3221226505

Some tests (long and unsigned long) fail with errors:

[2021-02-09T15:23:32.247Z] D:\Jenkins\llvm-test-suite_Jenkins\win_node\workspace\LLVM-Test-Suite-CI\LLVM-Test-Suite-WIN\llvm-test-suite\SYCL\ESIMD\spec_const/Inputs/spec_const_common.hpp(48,38): error: constant expression evaluates to -99776644220011 which cannot be narrowed to type 'long' [-Wc++11-narrowing]
[2021-02-09T15:23:32.248Z] D:\Jenkins\llvm-test-suite_Jenkins\win_node\workspace\LLVM-Test-Suite-CI\LLVM-Test-Suite-WIN\llvm-test-suite\SYCL\ESIMD\spec_const/Inputs/spec_const_common.hpp(48,47): error: constant expression evaluates to 22001144668855 which cannot be narrowed to type 'long' [-Wc++11-narrowing]
[2021-02-09T15:23:32.248Z] D:/Jenkins/llvm-test-suite_Jenkins/win_node/workspace/LLVM-Test-Suite-CI/LLVM-Test-Suite-WIN/llvm.obj/bin..\include\sycl\CL/sycl/INTEL/esimd/esimd_memory.hpp(235,3): error: static_assert failed due to requirement 'Sz >= __esimd::OWORD' "block size must be at least 1 oword"
[2021-02-09T15:23:32.249Z] D:/Jenkins/llvm-test-suite_Jenkins/win_node/workspace/LLVM-Test-Suite-CI/LLVM-Test-Suite-WIN/llvm.obj/bin..\include\sycl\CL/sycl/INTEL/esimd/esimd_memory.hpp(236,3): error: static_assert failed due to requirement 'Sz % __esimd::OWORD == 0' "block size must be whole number of owords"
[2021-02-09T15:23:32.249Z] 3 warnings and 4 errors generated.
[2021-02-09T15:23:32.249Z] error: command failed with exit status: 1

@vladimirlaz
Copy link

@fveselov I would like to ask you to analyze both issues. Are they known product issues or some test problem?
once the issues will be reported the test can be marked as XFAIL with corresponding comment.

//
//===----------------------------------------------------------------------===//
// REQUIRES: gpu
// XFAIL: level_zero || windows
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why level_zero is XFAIL? please file a bug if it does not work on level_zero

//
//===----------------------------------------------------------------------===//
// REQUIRES: gpu
// XFAIL: level_zero || windows
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why level_zero is XFAIL? please file a bug if it does not work on level_zero

@fveselov
Copy link
Author

fveselov commented Feb 9, 2021

@fveselov I would like to ask you to analyze both issues. Are they known product issues or some test problem?
once the issues will be reported the test can be marked as XFAIL with corresponding comment.

After previous changes long and ulong tests no longer fail with specific errors on windows. All tests fail the same way:

[2021-02-09T22:18:47.927Z] error: command failed with exit status: 3221226505

I'll investigate further to identify root of the issue with runs on windows.

@fveselov
Copy link
Author

fveselov commented Feb 10, 2021

Specialization constants are not supported on Windows yet.

On Windows vector compute backend (as a part of IGC) uses llvm-7 and llvm-7 based spirv translator. This translator doesn't have the ability to overwrite the default specialization constant value. That is why the support in Windows driver is disabled at all.
This feature will start working on Windows when the llvm version is switched to 9.

Signed/unsigned char and short tests fail on Linux Level Zero with assertion:

/opt/src/build_igc/VectorCompiler/llvm-spirv-vc/lib/SPIRV/SPIRVReader.cpp:1350: llvm::Value* SPIRV::SPIRVToLLVM::transValueWithoutDecoration(SPIRV::SPIRVValue*, llvm::Function*, llvm::BasicBlock*, bool):
Assertion `(BT->getBitWidth() == 64 || (ConstValue >> BT->getBitWidth()) == 0) && "Size of externally provided specialization constant value doesn't" "fit into the specialization constant type"' failed.

tests have been marked accordingly.

vladimirlaz
vladimirlaz previously approved these changes Feb 11, 2021
@@ -0,0 +1,28 @@
//==--------------- spec_const_long.cpp - DPC++ ESIMD on-device test -----===//

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please change the test name (int64)

@@ -0,0 +1,28 @@
//==--------------- spec_const_ulong.cpp - DPC++ ESIMD on-device test ----===//

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please change the test name (uint64)

@vladimirlaz vladimirlaz merged commit 6912242 into intel:intel Feb 15, 2021
myler pushed a commit to myler/llvm-test-suite that referenced this pull request Apr 12, 2022
Auto pulldown and update tc files for xmain branch on 20210816
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants