Skip to content

[SYCL][L0] Move command list cache usage under mutex #5874

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 2 commits into from
Mar 30, 2022

Conversation

KseniyaTikhomirova
Copy link
Contributor

@KseniyaTikhomirova KseniyaTikhomirova commented Mar 24, 2022

For the example of usage that may cause issue please refer to assert_in_simulteneous_kernels E2E test. n queues that are working on the same device and on default context will work with the same zeCompute/CopyCommandListCache without protection since mutexes for queues are different while cache is the same.
Operator[] may trigger insertion and rehash so simulteneous access is not thread-safe. In this code cache is not prefilled and insertion is done on the first access for every unique ZeDevice what may end up with simultaneous write access and memory corruption

Signed-off-by: Tikhomirova, Kseniya kseniya.tikhomirova@intel.com

For the example of usage that may cause issue please refer to assert_in_simulteneous_kernels E2E test. n queues that are working on the same device and on default context will work with the same zeCompute/CopyCommandListCache without protection since mutexes for queues are different buwhile cache is the same.
Operator[] may trigger insertion and rehash so simulteneous access is not thread-safe. In this code cache is not prefilled and insertion is done on the first access for every unique ZeDevice what may end up with simulteneous write access and memory corruption

Signed-off-by: Tikhomirova, Kseniya <kseniya.tikhomirova@intel.com>
@KseniyaTikhomirova
Copy link
Contributor Author

/summary:run

@KseniyaTikhomirova KseniyaTikhomirova marked this pull request as ready for review March 29, 2022 08:02
@KseniyaTikhomirova KseniyaTikhomirova requested a review from a team as a code owner March 29, 2022 08:02
@KseniyaTikhomirova
Copy link
Contributor Author

OCL failure - known failure, expecting intel/llvm-test-suite#944
ESIMD failure is also not possible to be related since I did a small change in L0 plugin.

@againull againull merged commit 1f531c0 into intel:sycl Mar 30, 2022
alexbatashev added a commit to alexbatashev/llvm that referenced this pull request Apr 2, 2022
* sycl: (3343 commits)
  [SYCL][L0] Disable round-robin submissions to multiple CCSs (intel#5945)
  [SYCL][CUDA] Don't link pi_cuda against libsycl (intel#5908)
  [CI] Disable -Werror by default (intel#5889)
  [BuildBot] Uplift CPU/FPGAEMU RT version to 2022.13.3.0.16 (intel#5883)
  [SYCL][CUDA][libclc] Add support for atomic fp exchange and compare exchange (intel#5937)
  [SYCL] Fix device code outlining for static local variables (intel#5915)
  [SYCL][NFC] Refactor plugin CMakeLists.txt (intel#5799)
  [SPIR-V][Doc] Add JointMatrixWorkItemLengthINTEL instruction to joint matrix extension (intel#5781)
  [SYCL] Expand device_global map and make initialization order agnostic (intel#5902)
  [SYCL][CUDA] Add IPSCCP pass to O0 by default (intel#5900)
  [ESIMD] Disable ABI changes warnings in host compiler. (intel#5931)
  [SYCL] Make properties constructor constexpr (intel#5928)
  [NFC][SYCL] Fix static analysis warning (intel#5933)
  [CODEOWNERS][NFC] Assign code owners for CI scripts (intel#5873)
  [SYCL] Store the kernel object size in the integration header (intel#5862)
  [SYCL][ESIMD] Change esimd-verifier logic for detecting valid SYCL calls (intel#5914)
  [SYCL][CUDA][DOC] GettingStartedGuide.md to recommend cuda 11.6 (intel#5917)
  [SYCL][L0] Move command list cache usage under mutex (intel#5874)
  [SYCL][FPGA] Prepare future implementation of experimental pipe properties (intel#5886)
  [CI] Roll back intel driver to the latest version (intel#5925)
  ...
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.

3 participants