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

[ESIMD] Added test to verify automatic conversion to stateless memory… #1104

Merged
merged 2 commits into from
Jul 20, 2022

Conversation

v-klochkov
Copy link

… access

The option -fsycl-esimd-force-stateless-mem automatically converts accessor
based intrinsics to their versions accepting pointers. This test verifies
gather, scatter, gather_rgba, scatter_rgba, scalar_load, scalar_store,
copy_from, copy_to.

Signed-off-by: Vyacheslav N Klochkov [email protected]

@v-klochkov v-klochkov requested a review from a team as a code owner July 16, 2022 04:02
//===----------------------------------------------------------------------===//
// REQUIRES: gpu
// UNSUPPORTED: cuda || hip
// RUN: %clangxx -fsycl -fsycl-esimd-force-stateless-mem %s -o %t.out

Choose a reason for hiding this comment

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

For better coverage, my suggestion would be adding compilation with -fsycl-esimd-force-stateless-mem to all existing accessor-based tests. I.e. all of them would contain:

// RUN: %clangxx -fsycl %s -o %t.out
// RUN: %clangxx -fsycl -fsycl-esimd-force-stateless-mem %s -o %t_stateless.out
...
// RUN: %GPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t_stateless.out

The same could be done for this test.
Does this make sense?

Copy link
Author

@v-klochkov v-klochkov Jul 20, 2022

Choose a reason for hiding this comment

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

@kbobrovs - thank you for the comment. I re-worked the PR. Now it splits existing tests using accessor-based API to pairs of tests: the standard-accessor-based and accessor-based-converted-to-stateless.
That is done to avoid having tests in CI that compile/run for too long.
Please review the tests.

@v-klochkov v-klochkov force-pushed the esimd_stateless_e2e branch from b808e1f to b75c5d8 Compare July 19, 2022 23:39
This option automatically converts accessor-based memory accesses to
stateless accesses.

Signed-off-by: Vyacheslav N Klochkov <[email protected]>
Signed-off-by: Vyacheslav N Klochkov <[email protected]>
Copy link

@kbobrovs kbobrovs left a comment

Choose a reason for hiding this comment

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

Thanks Slava.

@v-klochkov
Copy link
Author

The only failed test is SYCL/Basic/enqueue_barrier.cpp. It is unrelated to this PR and we already have an internal tracker for it.
Merging now.

@v-klochkov v-klochkov merged commit 71c06df into intel:intel Jul 20, 2022
@v-klochkov v-klochkov deleted the esimd_stateless_e2e branch July 20, 2022 14:29
myler pushed a commit to myler/llvm-test-suite that referenced this pull request Mar 22, 2023
* [ESIMD] Add LIT tests for -fsycl-esimd-force-stateless-mem

This option automatically converts accessor-based memory accesses to
stateless accesses.

Signed-off-by: Vyacheslav N Klochkov <[email protected]>
aelovikov-intel pushed a commit to aelovikov-intel/llvm that referenced this pull request Mar 27, 2023
…m-test-suite#1104)

* [ESIMD] Add LIT tests for -fsycl-esimd-force-stateless-mem

This option automatically converts accessor-based memory accesses to
stateless accesses.

Signed-off-by: Vyacheslav N Klochkov <[email protected]>
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.

2 participants