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

[SYCL] Split 'double type' test into two tests, 1) <test>.cpp; 2) <test>_aspect-fp64.cpp for llvm-test-suite #1150

Closed
wants to merge 39 commits into from

Conversation

myler
Copy link

@myler myler commented Aug 16, 2022

'double' type are not native supported in Intel Gen11/12 and next Gens GPUs in the future, to disable particularly big number of important tests is not reasonable, so split 'double' part into two separate test file.

  • split double tests in AtomicRef directory
  • split double tests in Basic directory
  • split double tests in DeprecatedFeatures directory
  • split double tests in DeviceLib directory
  • split double tests in ESIMD directory
  • split double tests in GroupAlgorithm directory
  • split double tests in InlineAsm directory
  • split double tests in KernelParams directory
  • split double tests in Regression directory
  • split double tests in SpecConstants directory
  • split double tests in SubGroup directory
  • split double tests in USM directory
  • add REQUIRES:aspect-fp64 to restrict some 'double' type tests "_double.cpp", "_fp64.cpp", "_fp_extra.cpp", etc.

@myler myler changed the title split double tests Split 'double type' test into two tests, 1) <test>.cpp; 2) <test>_aspect-fp64.cpp for llvm-test-suite Aug 16, 2022
@myler
Copy link
Author

myler commented Aug 17, 2022

Failures are unrelated:

[2022-08-17T07:35:47.081Z] Failed Tests (1):
[2022-08-17T07:35:47.081Z] SYCL :: InvokeSimd/invoke_simd_conv.cpp

[2022-08-17T07:41:39.229Z] Unexpectedly Passed Tests (2):
[2022-08-17T07:41:39.229Z] SYCL :: SubGroup/reduce_spirv13.cpp
[2022-08-17T07:41:39.229Z] SYCL :: SubGroup/reduce_spirv13_fp64.cpp

@myler myler marked this pull request as ready for review August 17, 2022 08:13
@myler myler requested review from a team and Pennycook as code owners August 17, 2022 08:13
@myler myler requested a review from aelovikov-intel August 17, 2022 08:13
v-klochkov
v-klochkov previously approved these changes Aug 19, 2022
…NABLE_FP64` macro to split 'double' type code as following:

```
// test.cpp
// RUN: ... -DENABLE_FP64=false
constexpr bool EnableFP64 = ENABLE_FP64;

void test() {
   // non-fp64-case
   do_smth();

   if constexpr (EnableFP64)
     do_smth64();
}

// test-fp64.cpp
; RUN: ... -DENABLE_FP64=true
\#include <test-fp.cpp>
```
v-klochkov
v-klochkov previously approved these changes Aug 30, 2022
Copy link

@v-klochkov v-klochkov left a comment

Choose a reason for hiding this comment

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

Ok for ESIMD. Thank you.

I also have a non-blocking comment regarding the naming.
IMO, it is better to stick to underscores and not mix them with '-'.
E.g. "functions_select_2d_core_aspect_fp64.cpp" looks much better to me than "functions_select_2d_core_aspect-fp64.cpp"

AlexeySachkov
AlexeySachkov previously approved these changes Aug 30, 2022
Copy link

@AlexeySachkov AlexeySachkov left a comment

Choose a reason for hiding this comment

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

LGTM for spec constants

@myler myler changed the title Split 'double type' test into two tests, 1) <test>.cpp; 2) <test>_aspect-fp64.cpp for llvm-test-suite [SYCL] Split 'double type' test into two tests, 1) <test>.cpp; 2) <test>_aspect-fp64.cpp for llvm-test-suite Aug 31, 2022
@myler
Copy link
Author

myler commented Aug 31, 2022

Ok for ESIMD. Thank you.

I also have a non-blocking comment regarding the naming. IMO, it is better to stick to underscores and not mix them with '-'. E.g. "functions_select_2d_core_aspect_fp64.cpp" looks much better to me than "functions_select_2d_core_aspect-fp64.cpp"

Renamed these new added file with only underscores.

@myler
Copy link
Author

myler commented Aug 31, 2022

Hi @Pennycook,
Seems other subdirectories are already approved, but may I ask you to review changes in SubGroup and GroupAlgorithm, seems you are the code owner of them.

@myler
Copy link
Author

myler commented Aug 31, 2022

Related failure:

[2022-08-31T02:01:02.817Z] Failed Tests (1):
[2022-08-31T02:01:02.817Z]   SYCL :: ESIMD/aot_mixed.cpp

This error LLVM ERROR: vc::translateBuild: unsupported platform cannot be reproduced.

Running on Intel(R) Iris(R) Xe Graphics
Running ESIMD kernel...
TEST Passed

Unrelated failures:

[2022-08-31T02:34:16.124Z] Failed Tests (4):
[2022-08-31T02:34:16.124Z]   SYCL :: ESIMD/api/replicate_smoke.cpp
[2022-08-31T02:34:16.124Z]   SYCL :: ESIMD/api/simd_view_select_2d_int.cpp
[2022-08-31T02:34:16.124Z]   SYCL :: ESIMD/ext_math.cpp
[2022-08-31T02:34:16.124Z]   SYCL :: ESIMD/matrix_transpose_glb.cpp

v-klochkov
v-klochkov previously approved these changes Aug 31, 2022
AlexeySachkov
AlexeySachkov previously approved these changes Aug 31, 2022
@romanovvlad
Copy link

A possible alternative solution is here: https://github.com/intel/llvm-test-suite/pull/1190/files

@myler myler dismissed stale reviews from AlexeySachkov and v-klochkov via cbccaf7 September 5, 2022 06:20
@myler
Copy link
Author

myler commented Sep 5, 2022

Failures are known and unrelated.
Hi @v-klochkov
According to the https://github.com/intel/llvm-test-suite/blob/intel/CONTRIBUTING.md#merge, need maintainer to merge the PR. Could you help me on this?

@v-klochkov
Copy link

v-klochkov commented Sep 7, 2022

Failures are known and unrelated. Hi @v-klochkov According to the https://github.com/intel/llvm-test-suite/blob/intel/CONTRIBUTING.md#merge, need maintainer to merge the PR. Could you help me on this?

I did not merge this yet because of the comment from @romanovvlad (#1150 (comment)) and did not have clear understanding if the discussion here #1190 has got some solution/agreement.

That alternative approach used in #1190 has sympathy/votes from at least 3 people.
And I would add my vote to there as well because device.has is specially designed and convenient way to run-or-skip hw specific features.

I gave my approval for this PR, but I'd rather let @romanovvlad to merge this patch if Vlad's comment was non-blocking

@AlexeySachkov
Copy link

Personally, I would vote for device code split approach, because it allows us to avoid duplicating coverage for non-optional types. I can help with creating PRs similar to one that @romanovvlad published (the first one to go is #1241)

@pvchupin
Copy link

pvchupin commented Sep 9, 2022

@v-klochkov, @myler , @romanovvlad , @AlexeySachkov
I assume we decided to proceed with alternative approach partially done at #1241 , #1190?

@aelovikov-intel, can you please take a look at remaining ones on Windows? We currently have ~30 fails and it's really unsafe to merge anything else until these fixed.

@pvchupin
Copy link

pvchupin commented Sep 9, 2022

@myler, should we close this PR in favor of alternatives in progress?

@myler
Copy link
Author

myler commented Sep 13, 2022

@myler, should we close this PR in favor of alternatives in progress?

Hi @pvchupin

This solution tends to change the testing framework REQURIES: aspect-fp64 and macros #ifdef ENABLE_FP64, not depends on SYCL standard aspect::fp64 and feature -fsycl-device-code-split=per_kernel

#1190 tends to use SYCL style solution to handle double type tests.

If the final decision is to use if (device.has(aspect::fp64)) + -fsycl-device-code-split=per_kernel to handle double type tests, I agree to close this one. But #1190 did not fix all tests, we may have at least 26 tests contain double type code.

@gmlueck
Copy link

gmlueck commented Sep 13, 2022

If the final decision is to use if (device.has(aspect::fp64)) + -fsycl-device-code-split=per_kernel to handle double type tests, I agree to close this one. But #1190 did not fix all tests, we may have at least 26 tests contain double type code.

That seems like a better solution to me. Once we implement the OptionalDeviceFeatures design, we can remove the "-fsycl-device-code-split=per_kernel", which should be relatively easy.

Are you saying there are 26 test failures that will not be fixed with this technique? Do we know what the cause of those failures is?

@myler
Copy link
Author

myler commented Oct 10, 2022

Close this PR as we have another alternative.

@myler myler closed this Oct 10, 2022
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.

7 participants