Skip to content

[SYCL] [Tests] Allocate device binary images in-place, not in cache #4023

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 3 commits into from
Jul 1, 2021

Conversation

s-kanaev
Copy link
Contributor

@s-kanaev s-kanaev commented Jun 29, 2021

Simplified, the motivation behind this change is the following. Employing std::vector to store device binary images makes them be allocated in heap which can't belong to neither any of loaded shared objects nor to the executable itself. Moving allocation to in-place makes the images be allocated in the executable.

Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
@s-kanaev s-kanaev requested a review from a team as a code owner June 29, 2021 14:48
@s-kanaev s-kanaev requested a review from romanovvlad June 29, 2021 14:48
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
@romanovvlad
Copy link
Contributor

Simplified, the motivation behind this change is the following. Employing std::vector to store device binary images makes them be allocated in cache which can't belong to neither any of loaded shared objects nor to the executable itself. Moving allocation to in-place makes the images be allocated in the executable.

Could you please clarify which cache is meant here? And what allocation in the executable means?

@s-kanaev
Copy link
Contributor Author

Could you please clarify which cache is meant here? And what allocation in the executable means?

  1. cache is typo here, it should be heap. Fixed.
  2. allocation in executable is allocation in such address region which matches with address region of executable. Match is detected when iterating over loaded shared objects and checking for p_vaddr and p_memsz fields of program header.

romanovvlad
romanovvlad previously approved these changes Jul 1, 2021
@romanovvlad romanovvlad merged commit 14cdb5a into intel:sycl Jul 1, 2021
alexbatashev added a commit to alexbatashev/llvm that referenced this pull request Jul 2, 2021
* upstream/sycl: (649 commits)
  [SYCL][Driver][NFC] Update integration footer test for 32-bit host (intel#4039)
  [SYCL][L0] Initialize descriptor .stype and .pNext (intel#4032)
  [SYCL] Add sycl::kernel::get_kernel_bundle method (intel#3855)
  [SYCL] Add support for device UUID as a SYCL extension. (intel#3696)
  [SYCL][Matrix] Add spec document for the matrix extension interface and its first implementation for AMX (intel#3551)
  Fix debug build mangler test after PR#3992 (8f38045). (intel#4033)
  [Driver][SYCL] Restrict user -include file in final integration footer step (intel#4036)
  [SYCL] [Tests] Do not copy device binary image mocks (intel#4023)
  [SYCL][Doc] Update docs to reflect new compiler features (intel#4030)
  [SYCL][CUDA] cl_khr_fp16 extension connected to cuda PI. (intel#4029)
  [SYCL][NFC] Refactor RT unit tests (intel#4021)
  [SYCL] Switch to using integration footer by default (intel#3777)
  [SYCL][CUDA] Add the Use Default Stream property (intel#4004)
  Uplift GPU RT version for Linux to 21.24.20098 (intel#4003)
  [SYCL][CUDA] atomic_ref.fetch_add used for fp64 reduction if device.has(atomic64) (intel#3950)
  [Driver][SYCL] Differentiate host dependency link from regular host link (intel#4002)
  [SYCL][ESIMD] Support device half type in intrinsics. (intel#4024)
  [SYCL] Allow fpga_reg only for PODs and Trivially-copyable structs (intel#3643)
  [SYCL][FPGA] Restore legacy debug info version for the hardware (intel#3991)
  [SYCL][PI][L0] Force reset of memcpy command-list. (intel#4001)
  ...
@s-kanaev s-kanaev deleted the fix-tests branch November 1, 2021 09:18
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