Skip to content

[SYCL] Implement queue flushing #5052

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 8 commits into from
Dec 14, 2021
Merged

Conversation

sergey-semenov
Copy link
Contributor

@sergey-semenov sergey-semenov commented Nov 30, 2021

According to OpenCL spec:
"To use event objects that refer to commands enqueued in a command-queue as
event objects to wait on by commands enqueued in a different command-queue,
the application must call a clFlush or any blocking commands that perform an
implicit flush of the command-queue where the commands that refer to these
event objects are enqueued."

This patch adds a piQueueFlush function that's lowered to clFinish in OpenCL
and called whenever an unsubmitted cross-queue dependency is about to be used.

@sergey-semenov
Copy link
Contributor Author

/summary:run

@sergey-semenov sergey-semenov changed the title [SYCL][WIP] Implement queue flushing [SYCL] Implement queue flushing Dec 7, 2021
@sergey-semenov sergey-semenov marked this pull request as ready for review December 7, 2021 12:26
@sergey-semenov sergey-semenov requested review from smaslov-intel and a team as code owners December 7, 2021 12:26
s-kanaev
s-kanaev previously approved these changes Dec 8, 2021
Copy link
Contributor

@s-kanaev s-kanaev left a comment

Choose a reason for hiding this comment

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

LGTM

@sergey-semenov
Copy link
Contributor Author

@smaslov-intel Could you please take another look?

Copy link
Contributor

@smaslov-intel smaslov-intel left a comment

Choose a reason for hiding this comment

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

LGTM

@romanovvlad romanovvlad merged commit 23e180b into intel:sycl Dec 14, 2021
@sergey-semenov sergey-semenov deleted the flush branch December 14, 2021 13:36
alexbatashev added a commit to alexbatashev/llvm that referenced this pull request Dec 14, 2021
* sycl:
  [CI] Refactor workflow files (intel#5134)
  [CI] Enable HIP and CUDA plugins in GitHub Actions builds (intel#5087)
  [SYCL] Implement queue flushing (intel#5052)
  [SYCL] Allow library mismatch for libdevice host object on Win32 (intel#5048)
  [SYCL] Remove unnecessary template parameter (intel#5127)
  [CI] Use clang-format from nightly builds (intel#5126)
alexbatashev added a commit to alexbatashev/llvm that referenced this pull request Dec 15, 2021
* upstream/sycl: (5961 commits)
  [SYCL] Implement discard_events extension (intel#5026)
  [SYCL][NFC] Fix unused parameter warning in piQueueFlush (intel#5139)
  [SYCL][XPTI] Fix static analysis tool warnings (intel#5040)
  [CI] Switch post-commit jobs to self-hosted runners (intel#5147)
  [SYCL] Fix support for classes implicitly converted from items in parallel_for (intel#5118)
  [SYCL][HIP] Fix platform query in USM alloc info (intel#5140)
  [Docker] Add workarounds for two SYCL issues (intel#5143)
  [CI] Install cm-compiler in drivers image (intel#5128)
  [ESIMD] Add support for an arbitrary number of elements to simd::copy_from/to (intel#5135)
  [SYCL] Add number HW threads per EU query (intel#4901)
  [CI] Refactor workflow files (intel#5134)
  [CI] Enable HIP and CUDA plugins in GitHub Actions builds (intel#5087)
  [SYCL] Implement queue flushing (intel#5052)
  Disable issue labeler in LLVM forks
  Modify translation for disable_loop_pipelining metadata
  Add SPIR-V friendly translation for OpLoad and OpStore
  Fix return type postfix for SPIR-V Friendly IR
  Restrict special handling of sampler OpVariable only to UniformConstant
  Add lowering for llvm.bswap intrinsic
  Fix translation of OpVariable with OpSamplerType
  ...
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.

5 participants