Skip to content

Commit b3b72d0

Browse files
feature: experimental api for synchronized dispatch
Related-To: NEO-8171 Signed-off-by: Bartosz Dunajski <[email protected]>
1 parent 85638cd commit b3b72d0

File tree

1 file changed

+44
-1
lines changed

1 file changed

+44
-1
lines changed

level_zero/api/driver_experimental/public/zex_common.h

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2022 Intel Corporation
2+
* Copyright (C) 2022-2024 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -54,6 +54,49 @@ typedef struct _zex_write_to_mem_desc_t {
5454
zex_mem_action_scope_flags_t writeScope;
5555
} zex_write_to_mem_desc_t;
5656

57+
///////////////////////////////////////////////////////////////////////////////
58+
#ifndef ZE_SYNCHRONIZED_DISPATCH_EXP_NAME
59+
/// @brief Synchronized Dispatch extension name
60+
#define ZE_SYNCHRONIZED_DISPATCH_EXP_NAME "ZE_experimental_synchronized_dispatch"
61+
#endif // ZE_SYNCHRONIZED_DISPATCH_EXP_NAME
62+
63+
///////////////////////////////////////////////////////////////////////////////
64+
/// @brief Synchronized Dispatch extension version(s)
65+
typedef enum _ze_synchronized_dispatch_exp_version_t {
66+
ZE_SYNCHRONIZED_DISPATCH_EXP_VERSION_1_0 = ZE_MAKE_VERSION(1, 0), ///< version 1.0
67+
ZE_SYNCHRONIZED_DISPATCH_EXP_VERSION_CURRENT = ZE_MAKE_VERSION(1, 0), ///< latest known version
68+
ZE_SYNCHRONIZED_DISPATCH_EXP_VERSION_FORCE_UINT32 = 0x7fffffff
69+
70+
} ze_synchronized_dispatch_exp_version_t;
71+
72+
///////////////////////////////////////////////////////////////////////////////
73+
/// @brief Supported synchronized dispatch flags
74+
typedef uint32_t ze_synchronized_dispatch_exp_flags_t;
75+
typedef enum _ze_synchronized_dispatch_exp_flag_t {
76+
ZE_SYNCHRONIZED_DISPATCH_DISABLED_EXP_FLAG = ZE_BIT(0), ///< Non-synchronized dispatch. Must synchronize only with other synchronized dispatches
77+
ZE_SYNCHRONIZED_DISPATCH_ENABLED_EXP_FLAG = ZE_BIT(1), ///< Synchronized dispatch. Must synchronize with all synchronized and non-synchronized dispatches
78+
ZE_SYNCHRONIZED_DISPATCH_EXP_FLAG_FORCE_UINT32 = 0x7fffffff
79+
80+
} ze_synchronized_dispatch_exp_flag_t;
81+
82+
///////////////////////////////////////////////////////////////////////////////
83+
/// @brief Forward-declare ze_synchronized_dispatch_exp_desc_t
84+
typedef struct _ze_synchronized_dispatch_exp_desc_t ze_synchronized_dispatch_exp_desc_t;
85+
86+
///////////////////////////////////////////////////////////////////////////////
87+
/// @brief Command queue or command list descriptor for synchronized dispatch. This structure may be
88+
/// passed as pNext member of ::ze_command_queue_desc_t. or ::ze_command_list_desc_t.
89+
typedef struct _ze_synchronized_dispatch_exp_desc_t {
90+
ze_structure_type_t stype; ///< [in] type of this structure
91+
const void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific
92+
///< structure (i.e. contains stype and pNext).
93+
ze_synchronized_dispatch_exp_flags_t flags; ///< [in] mode flags.
94+
///< must be valid value of ::ze_synchronized_dispatch_exp_flag_t
95+
96+
} ze_synchronized_dispatch_exp_desc_t;
97+
98+
#define ZE_STRUCTURE_TYPE_SYNCHRONIZED_DISPATCH_EXP_DESC (ze_structure_type_t)0x00020020
99+
57100
#if defined(__cplusplus)
58101
} // extern "C"
59102
#endif

0 commit comments

Comments
 (0)