Skip to content

[ESIMD] Introduce atomic_update<native::lsc::fadd>(...) and similar ops. #6629

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

Merged
merged 4 commits into from
Aug 26, 2022

Conversation

kbobrovs
Copy link
Contributor

@kbobrovs kbobrovs commented Aug 23, 2022

  1. Introduce sycl::ext::intel::esimd::native::lsc::atomic_op
  2. When esimd::atomic_update is invoked with esimd::native::lsc::atomic_op (rather than esimd::atomic_op), then implementation is redirected to Xe-specific LSC-based implementation (won't run until Gen12)
  3. Using FP operations from esimd::atomic_op cause warning and are replaced with corresponding LSC operations.
  4. A number of code chunks moved to fit header inclusion order (distribution of auxiliary code in headers needs to be revised some day)

Complementary E2E test: intel/llvm-test-suite#1171

Signed-off-by: Konstantin S Bobrovsky [email protected]

@kbobrovs kbobrovs requested a review from fineg74 August 25, 2022 16:54
Copy link
Contributor

@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.

Looks good.
Most of my comments are minor and could be fixed in a separate change,
but there are 2 comments related to naming of the atomic ops that are created in non-experimental namespace and may need sooner resolution to not pollute non-experimental namespace with something to be changed later/soon.

@kbobrovs kbobrovs requested a review from v-klochkov August 26, 2022 05:01
@@ -357,14 +356,14 @@ std::enable_if_t<is_clang_vector_type_v<To> && is_clang_vector_type_v<From>, To>
template <typename U> constexpr bool is_type() { return false; }
Copy link
Contributor

Choose a reason for hiding this comment

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

BTW, we have type checker with exactly same definition, but a better name:
https://github.com/intel/llvm/blob/sycl/sycl/include/sycl/ext/intel/experimental/esimd/detail/util.hpp#L32

@kbobrovs kbobrovs merged commit 2eb9d4b into intel:sycl Aug 26, 2022
@kbobrovs kbobrovs deleted the lsc_fp_atomics branch August 29, 2022 17:00
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