Skip to content

Commit 1372120

Browse files
authored
[SYCL] Enable discard_events mode for the Level Zero (#6533)
Teach the Level Zero plugin piEnqueue* functions to accept nullptr instead of a pointer to the output event. In this case event is created internally and is not visible externally. Introduce RefCountExternal for pi_event which allows to track external references to an event. It allows to do some optimizations if we know that event is not externally visible. These optimizations are going to be implemented in subsequent PRs. Don't create proxy event for batch if there are no externally visible events in the batch.
1 parent 6cfde8b commit 1372120

File tree

5 files changed

+250
-159
lines changed

5 files changed

+250
-159
lines changed

sycl/include/sycl/detail/pi.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@
4949
// NOTE that this results in a changed API for `piProgramGetBuildInfo`.
5050
// 10.12 Change enum value PI_MEM_ADVICE_UNKNOWN from 0 to 999, and set enum
5151
// PI_MEM_ADVISE_RESET to 0.
52+
// 10.13 Added new PI_EXT_ONEAPI_QUEUE_DISCARD_EVENTS queue property.
5253

5354
#define _PI_H_VERSION_MAJOR 10
54-
#define _PI_H_VERSION_MINOR 12
55+
#define _PI_H_VERSION_MINOR 13
5556

5657
#define _PI_STRING_HELPER(a) #a
5758
#define _PI_CONCAT(a, b) _PI_STRING_HELPER(a.b)
@@ -564,6 +565,7 @@ constexpr pi_queue_properties PI_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE = (1 << 0);
564565
constexpr pi_queue_properties PI_QUEUE_PROFILING_ENABLE = (1 << 1);
565566
constexpr pi_queue_properties PI_QUEUE_ON_DEVICE = (1 << 2);
566567
constexpr pi_queue_properties PI_QUEUE_ON_DEVICE_DEFAULT = (1 << 3);
568+
constexpr pi_queue_properties PI_EXT_ONEAPI_QUEUE_DISCARD_EVENTS = (1 << 4);
567569

568570
using pi_result = _pi_result;
569571
using pi_platform_info = _pi_platform_info;

0 commit comments

Comments
 (0)