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] Avoid overuse of CPU on wait read-write lock loop #2525

Merged
merged 3 commits into from
Sep 24, 2020

Conversation

vladimirlaz
Copy link
Contributor

@vladimirlaz vladimirlaz commented Sep 23, 2020

The while loop in lockSharedTimedMutex causes 100% usage of CPU
if host application generates command groups in multiple threads
That slow downs overall execution.

The while loop in lockSharedTimedMutex causes 100% usage of CPU
if host apptication generates command groups in multiple threads
That slow downs overall execution.

Unify code of cleanupFinishedCommands fucntion with rest of module.
Dead-lock is avoided by use of non-blocking lock operations.
@vladimirlaz vladimirlaz requested a review from a team as a code owner September 23, 2020 13:49
@vladimirlaz
Copy link
Contributor Author

/summary:run

@vladimirlaz
Copy link
Contributor Author

/summary:run

@s-kanaev
Copy link
Contributor

The changes look good.
Though, I think the caption of the patch is to be changed. It's not mutex we're trying to lock in that loop as there is now no mutual exclusion. It's a read-write lock for quite a time now.

@vladimirlaz vladimirlaz changed the title [SYCL] Avoid overuse of CPU on wait mutex loop [SYCL] Avoid overuse of CPU on wait read-write lock loop Sep 24, 2020
@vladimirlaz
Copy link
Contributor Author

The changes look good.
Though, I think the caption of the patch is to be changed. It's not mutex we're trying to lock in that loop as there is now no _mut_ual _ex_clusion. It's a read-write lock for quite a time now.

Fixed PR description. It will be propagated to commit message on PR squash-and-merge.

@bader bader merged commit 3faeb77 into intel:sycl Sep 24, 2020
alexbatashev pushed a commit to alexbatashev/llvm that referenced this pull request Sep 29, 2020
…_wrapper

* upstream/sycl: (1533 commits)
  [SYCL] XFAIL sub_group shuffle tests on GPU
  [SYCL] Add support for L0 loader validation layer (intel#2520)
  [NFC][LIT] Temporary disable function pointers as they hang on L0 (intel#2544)
  [SYCL] use release version of OpenCL ICD loader
  [SYCL] Improve testing of host-task (intel#2540)
  Revert 1291215
  [SYCL] Fix warning caused by [[nodiscard]] attribute (intel#2545)
  [SYCL] Workaround windows build failure
  [SYCL] Remove kernel_signature_start from int header (intel#2537)
  [SYCL] Fix ABI tests in post-commit (intel#2539)
  [SYCL][DOC] Update C-CXX-StandardLibrary doc to align with latest status (intel#2529)
  [SYCL][NFC] Fix static code analysis concerns (intel#2531)
  [SYCL][NFC] Improve testing for accessor_property_list (intel#2532)
  [SYCL] Avoid overuse of CPU on wait read-write lock loop (intel#2525)
  [SYCL] Implement no-decomposition for kernel types that don't need it. (intel#2477)
  [SYCL] Add group algorithm constraints (intel#2462)
  [BuildBot] Uplift Windows GPU RT from 8673 to 8778 (intel#2533)
  [SYCL][LIT][NFC] Extend ABI test suite (intel#2522)
  [SYCL][DebugInfo] Reinstate source locations for some kernel instructions (intel#2527)
  [SYCL][NFC] Replace the deprecated VectorType::getNumElements() (intel#2524)
  ...
kbenzie added a commit to kbenzie/intel-llvm that referenced this pull request Feb 17, 2025
Addition of num_compute_units query for device info
Chenyang-L pushed a commit that referenced this pull request Feb 18, 2025
Addition of num_compute_units query for device info
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.

7 participants