intel / intel/llvm

[SYCL][Graph] Leak in host task in order dependency test on Windows Gen12

Open
#20,696 3 comments 0 reactions 0 assignees View on GitHub
bug sycl-graph
Dominant language
LLVM
Stars
1.5k
Forks
854
Avg merge
3d 17h
Merged PRs (30d)
137

Description

### Describe the bug

First identified in: https://github.com/intel/llvm/actions/runs/19515665783/job/55869141453?pr=20690.

The newly added test [host_task_in_order_dependency.cpp](https://github.com/intel/llvm/pull/20690/files#diff-9fdab9fc208b022659edfd64da445e98e5f8dc01bbf4f6fe96a38f2201fec467) leaks L0 objects. This issue has only shown up on gen12 in testing and the test is being marked as XFAIL.

Note that I reproduced the leak with icx 2025.2.0, so the issue predates the PR which added the test.

### To reproduce

Compile the test `host_task_in_order_dependency.cpp` or run with llvm-lit.

Manual run on Windows Gen12:
```
C:\...>.\in_order_host_task_dependency.exe
Check balance of create/destroy calls
----------------------------------------------------------
zeContextCreate = 1 \---> zeContextDestroy = 0 ---> LEAK = 1
zeCommandQueueCreate = 1 \---> zeCommandQueueDestroy = 1
zeModuleCreate = 1 \---> zeModuleDestroy = 0 ---> LEAK = 1
zeKernelCreate = 1 \---> zeKernelDestroy = 0 ---> LEAK = 1
zeEventPoolCreate = 1 \---> zeEventPoolDestroy = 0 ---> LEAK = 1
zeCommandListCreateImmediate = 1 |
zeCommandListCreate = 1 \---> zeCommandListDestroy = 0 ---> LEAK = 2
zeEventCreate = 1 \---> zeEventDestroy = 1
zeFenceCreate = 1 \---> zeFenceDestroy = 1
zeImageCreate = 0 |
zeImageViewCreateExt = 0 \---> zeImageDestroy = 0
zeSamplerCreate = 0 \---> zeSamplerDestroy = 0
zeMemAllocDevice = 2 |
zeMemAllocHost = 3 |
zeMemAllocShared = 4 \---> zeMemFree = 8 ---> LEAK = 1
```
Passing run linux Gen12:
```
$ UR_L0_LEAKS_DEBUG=1 ./in_order_host_dependency
Check balance of create/destroy calls
----------------------------------------------------------
zeContextCreate = 1 \---> zeContextDestroy = 1
zeCommandQueueCreate = 1 \---> zeCommandQueueDestroy = 1
zeModuleCreate = 1 \---> zeModuleDestroy = 1
zeKernelCreate = 1 \---> zeKernelDestroy = 1
zeEventPoolCreate = 1 \---> zeEventPoolDestroy = 1
zeCommandListCreateImmediate = 1 |
zeCommandListCreate = 1 \---> zeCommandListDestroy = 2
zeEventCreate = 1 \---> zeEventDestroy = 1
zeFenceCreate = 1 \---> zeFenceDestroy = 1
zeImageCreate = 0 |
zeImageViewCreateExt = 0 \---> zeImageDestroy = 0
zeSamplerCreate = 0 \---> zeSamplerDestroy = 0
zeMemAllocDevice = 2 |
zeMemAllocHost = 3 |
zeMemAllocShared = 4 \---> zeMemFree = 9
```

### Environment

- Windows
- Intel GPU Gen 12
- Produced the issue with as early as icpx 2025.2
- Driver version 1.6.35096. Level-zero backend should be used to check for leaks with UR_L0_LEAKS_DEBUG=1

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.