Skip to content

[SYCL] Embedded coarse-grained debug aid for finding imbalance in Level-Zero alloc/free. #3334

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
Mar 12, 2021

Conversation

smaslov-intel
Copy link
Contributor

A sample output is this:

ZE_DEBUG=4: check balance of create/destroy calls
----------------------------------------------------------
               zeContextCreate = 1     \--->              zeContextDestroy = 1
          zeCommandQueueCreate = 1     \--->         zeCommandQueueDestroy = 1
                zeModuleCreate = 1     \--->               zeModuleDestroy = 1
                zeKernelCreate = 1     \--->               zeKernelDestroy = 1
             zeEventPoolCreate = 8     \--->            zeEventPoolDestroy = 8
  zeCommandListCreateImmediate = 1     |
           zeCommandListCreate = 2     \--->          zeCommandListDestroy = 3
                 zeEventCreate = 2000  \--->                zeEventDestroy = 2000
                 zeFenceCreate = 2     \--->                zeFenceDestroy = 2
                 zeImageCreate = 0     \--->                zeImageDestroy = 0
               zeSamplerCreate = 0     \--->              zeSamplerDestroy = 0
              zeMemAllocDevice = 0     |
                zeMemAllocHost = 0     |
              zeMemAllocShared = 0     \--->                     zeMemFree = 0

Also fixed a bug in piEnqueueEventsWait where we were allocating a command-list but never closed/released it.

Signed-off-by: Sergey V Maslov [email protected]

…f Level-Zero objects alloc/free. Enabled with ZE_DEBUG=4.

Signed-off-by: Sergey V Maslov <[email protected]>
@smaslov-intel smaslov-intel requested a review from bso-intel March 10, 2021 00:12
@smaslov-intel smaslov-intel changed the title [SYCL] Imbedded coarse-grained debug aid for finding imbalance in Level-Zero alloc/free. [SYCL] Embedded coarse-grained debug aid for finding imbalance in Level-Zero alloc/free. Mar 10, 2021
@smaslov-intel smaslov-intel requested a review from bso-intel March 10, 2021 17:38
Copy link
Contributor

@bso-intel bso-intel left a comment

Choose a reason for hiding this comment

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

Thanks for clarification about zeDeviceGet.
LGTM

@smaslov-intel
Copy link
Contributor Author

@romanovvlad , @v-klochkov , @againull please merge

@romanovvlad romanovvlad merged commit 128ba13 into intel:sycl Mar 12, 2021
alexbatashev pushed a commit to alexbatashev/llvm that referenced this pull request Mar 15, 2021
* upstream/sycl:
  Add ITT stubs and wrappers for SPIR-V devices (intel#3279)
  [SYCL] Add zero argument version of buffer::reinterpret() for SYCL 2020 (intel#3333)
  [SYCL] Restore old behavior of get() method (intel#3356)
  [Driver][SYCL][FPGA] Improve FPGA AOT when using Triple (intel#3330)
  [SYCL] Revert support for pinned_host_memory extension in Level-Zero backend. Make it a NOP (intel#3349)
  [SYCL] Remove redundant build options processing (intel#3342)
  [SYCL][NFC] Factor out GenXIntrinsics git repo tag. (intel#3351)
  [SYCL] Add coarse-grained debug aid for finding imbalance in Level-Zero alloc/free (intel#3334)
  [SYCL] Sub-group load/store for raw pointers (intel#3255)
  [SYCL] Fix more unused variables warnings (intel#3352)
  [BuildBot] Uplift CPU/FPGAEMU RT version for CI Process  (intel#3338)
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