Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCL][ESIMD] Fix local accessor scatter test failure on PVC #12745

Merged
merged 3 commits into from
Feb 22, 2024

Conversation

fineg74
Copy link
Contributor

@fineg74 fineg74 commented Feb 17, 2024

No description provided.

@fineg74 fineg74 marked this pull request as ready for review February 17, 2024 01:29
@fineg74 fineg74 requested a review from a team as a code owner February 17, 2024 01:29
Comment on lines 270 to 275
for (int I = 0; I < Threads * N; I += 8) {
simd<T, 8> InVec(Out + GlobalElemOffset + I);
simd<uint32_t, 8> Offsets(I * sizeof(T), sizeof(T));
slm_scatter<T>(Offsets, InVec);
}
barrier();

Copy link
Contributor

Choose a reason for hiding this comment

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

The code "before" looks correct, and the new code is potentially UB, because many threads write to the same memory.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I see now that Threads = 1, which makes this code correct. But it looks very confusing.
If look only to this code (and forget about Threads being set to 1), then this code looks like UB

Copy link
Contributor

Choose a reason for hiding this comment

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

If there is some error in GPU Driver, then let's have Threads = 1 for now and keep this code, but please add a TODO comment here explaining that if Thread > 1, then this code needs an initialization done by only 1 thread and need a barrier between SLM initialization and the usage of SLM by all threads of the work-group.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Restored the previous logic.
Working on a simpler reproducer to nail down GPU issue

Co-authored-by: Vyacheslav Klochkov <vyacheslav.n.klochkov@intel.com>
@fineg74
Copy link
Contributor Author

fineg74 commented Feb 22, 2024

Windows E2E test failures:
SYCL :: Assert/assert_in_kernels_win.cpp
SYCL :: Assert/assert_in_multiple_tus_one_ndebug_win.cpp
SYCL :: Assert/assert_in_multiple_tus_win.cpp
SYCL :: Assert/assert_in_one_kernel_win.cpp
SYCL :: Assert/assert_in_simultaneous_kernels_win.cpp
SYCL :: Assert/assert_in_simultaneously_multiple_tus.cpp
SYCL :: Assert/assert_in_simultaneously_multiple_tus_one_ndebug.cpp
SYCL :: Plugin/sycl-ls-unified-runtime.cpp

are not related to the change

@v-klochkov v-klochkov merged commit a261ac1 into intel:sycl Feb 22, 2024
19 of 21 checks passed
@fineg74 fineg74 deleted the fixscatterlaccTest branch February 22, 2024 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants