Skip to content

Commit 4a9d5bc

Browse files
committed
Genereate sources
1 parent 8ec8a4f commit 4a9d5bc

File tree

10 files changed

+126
-4
lines changed

10 files changed

+126
-4
lines changed

include/ur_api.h

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1705,6 +1705,8 @@ typedef enum ur_device_info_t {
17051705
UR_DEVICE_INFO_ENQUEUE_NATIVE_COMMAND_SUPPORT_EXP = 0x2020, ///< [::ur_bool_t] returns true if the device supports enqueueing of native
17061706
///< work
17071707
UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP = 0x2021, ///< [::ur_bool_t] returns true if the device supports low-power events.
1708+
UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP = 0x2022, ///< [::ur_exp_device_2d_block_array_capability_flags_t] return a bit-field
1709+
///< of Intel GPU 2D block array capabilities
17081710
/// @cond
17091711
UR_DEVICE_INFO_FORCE_UINT32 = 0x7fffffff
17101712
/// @endcond
@@ -1730,7 +1732,7 @@ typedef enum ur_device_info_t {
17301732
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
17311733
/// + `NULL == hDevice`
17321734
/// - ::UR_RESULT_ERROR_INVALID_ENUMERATION
1733-
/// + `::UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP < propName`
1735+
/// + `::UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP < propName`
17341736
/// - ::UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION
17351737
/// + If `propName` is not supported by the adapter.
17361738
/// - ::UR_RESULT_ERROR_INVALID_SIZE
@@ -7428,6 +7430,27 @@ urEnqueueWriteHostPipe(
74287430
///< an element of the phEventWaitList array.
74297431
);
74307432

7433+
#if !defined(__GNUC__)
7434+
#pragma endregion
7435+
#endif
7436+
// Intel 'oneAPI' Unified Runtime Experimental device descriptor for querying Intel device 2D block array capabilities
7437+
#if !defined(__GNUC__)
7438+
#pragma region 2d_block_array_capabilities_(experimental)
7439+
#endif
7440+
///////////////////////////////////////////////////////////////////////////////
7441+
/// @brief Intel GPU 2D block array capabilities
7442+
typedef uint32_t ur_exp_device_2d_block_array_capability_flags_t;
7443+
typedef enum ur_exp_device_2d_block_array_capability_flag_t {
7444+
UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD = UR_BIT(0), ///< Load instructions are supported
7445+
UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE = UR_BIT(1), ///< Store instructions are supported
7446+
/// @cond
7447+
UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_FORCE_UINT32 = 0x7fffffff
7448+
/// @endcond
7449+
7450+
} ur_exp_device_2d_block_array_capability_flag_t;
7451+
/// @brief Bit Mask for validating ur_exp_device_2d_block_array_capability_flags_t
7452+
#define UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAGS_MASK 0xfffffffc
7453+
74317454
#if !defined(__GNUC__)
74327455
#pragma endregion
74337456
#endif

include/ur_print.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -874,6 +874,14 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintMapFlags(enum ur_map_flag_t value, ch
874874
/// - `buff_size < out_size`
875875
UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmMigrationFlags(enum ur_usm_migration_flag_t value, char *buffer, const size_t buff_size, size_t *out_size);
876876

877+
///////////////////////////////////////////////////////////////////////////////
878+
/// @brief Print ur_exp_device_2d_block_array_capability_flag_t enum
879+
/// @returns
880+
/// - ::UR_RESULT_SUCCESS
881+
/// - ::UR_RESULT_ERROR_INVALID_SIZE
882+
/// - `buff_size < out_size`
883+
UR_APIEXPORT ur_result_t UR_APICALL urPrintExpDevice_2dBlockArrayCapabilityFlags(enum ur_exp_device_2d_block_array_capability_flag_t value, char *buffer, const size_t buff_size, size_t *out_size);
884+
877885
///////////////////////////////////////////////////////////////////////////////
878886
/// @brief Print ur_exp_image_copy_flag_t enum
879887
/// @returns

include/ur_print.hpp

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ inline ur_result_t printFlag<ur_map_flag_t>(std::ostream &os, uint32_t flag);
194194
template <>
195195
inline ur_result_t printFlag<ur_usm_migration_flag_t>(std::ostream &os, uint32_t flag);
196196

197+
template <>
198+
inline ur_result_t printFlag<ur_exp_device_2d_block_array_capability_flag_t>(std::ostream &os, uint32_t flag);
199+
197200
template <>
198201
inline ur_result_t printFlag<ur_exp_image_copy_flag_t>(std::ostream &os, uint32_t flag);
199202

@@ -328,6 +331,7 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct
328331
inline std::ostream &operator<<(std::ostream &os, enum ur_execution_info_t value);
329332
inline std::ostream &operator<<(std::ostream &os, enum ur_map_flag_t value);
330333
inline std::ostream &operator<<(std::ostream &os, enum ur_usm_migration_flag_t value);
334+
inline std::ostream &operator<<(std::ostream &os, enum ur_exp_device_2d_block_array_capability_flag_t value);
331335
inline std::ostream &operator<<(std::ostream &os, enum ur_exp_image_copy_flag_t value);
332336
inline std::ostream &operator<<(std::ostream &os, enum ur_exp_sampler_cubemap_filter_mode_t value);
333337
inline std::ostream &operator<<(std::ostream &os, enum ur_exp_external_mem_type_t value);
@@ -2665,6 +2669,9 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_device_info_t value) {
26652669
case UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP:
26662670
os << "UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP";
26672671
break;
2672+
case UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP:
2673+
os << "UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP";
2674+
break;
26682675
default:
26692676
os << "unknown enumerator";
26702677
break;
@@ -4472,6 +4479,19 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_device_info
44724479

44734480
os << ")";
44744481
} break;
4482+
case UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP: {
4483+
const ur_exp_device_2d_block_array_capability_flags_t *tptr = (const ur_exp_device_2d_block_array_capability_flags_t *)ptr;
4484+
if (sizeof(ur_exp_device_2d_block_array_capability_flags_t) > size) {
4485+
os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_exp_device_2d_block_array_capability_flags_t) << ")";
4486+
return UR_RESULT_ERROR_INVALID_SIZE;
4487+
}
4488+
os << (const void *)(tptr) << " (";
4489+
4490+
ur::details::printFlag<ur_exp_device_2d_block_array_capability_flag_t>(os,
4491+
*tptr);
4492+
4493+
os << ")";
4494+
} break;
44754495
default:
44764496
os << "unknown enumerator";
44774497
return UR_RESULT_ERROR_INVALID_ENUMERATION;
@@ -9455,6 +9475,64 @@ inline ur_result_t printFlag<ur_usm_migration_flag_t>(std::ostream &os, uint32_t
94559475
}
94569476
} // namespace ur::details
94579477
///////////////////////////////////////////////////////////////////////////////
9478+
/// @brief Print operator for the ur_exp_device_2d_block_array_capability_flag_t type
9479+
/// @returns
9480+
/// std::ostream &
9481+
inline std::ostream &operator<<(std::ostream &os, enum ur_exp_device_2d_block_array_capability_flag_t value) {
9482+
switch (value) {
9483+
case UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD:
9484+
os << "UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD";
9485+
break;
9486+
case UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE:
9487+
os << "UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE";
9488+
break;
9489+
default:
9490+
os << "unknown enumerator";
9491+
break;
9492+
}
9493+
return os;
9494+
}
9495+
9496+
namespace ur::details {
9497+
///////////////////////////////////////////////////////////////////////////////
9498+
/// @brief Print ur_exp_device_2d_block_array_capability_flag_t flag
9499+
template <>
9500+
inline ur_result_t printFlag<ur_exp_device_2d_block_array_capability_flag_t>(std::ostream &os, uint32_t flag) {
9501+
uint32_t val = flag;
9502+
bool first = true;
9503+
9504+
if ((val & UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD) == (uint32_t)UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD) {
9505+
val ^= (uint32_t)UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD;
9506+
if (!first) {
9507+
os << " | ";
9508+
} else {
9509+
first = false;
9510+
}
9511+
os << UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD;
9512+
}
9513+
9514+
if ((val & UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE) == (uint32_t)UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE) {
9515+
val ^= (uint32_t)UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE;
9516+
if (!first) {
9517+
os << " | ";
9518+
} else {
9519+
first = false;
9520+
}
9521+
os << UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE;
9522+
}
9523+
if (val != 0) {
9524+
std::bitset<32> bits(val);
9525+
if (!first) {
9526+
os << " | ";
9527+
}
9528+
os << "unknown bit flags " << bits;
9529+
} else if (first) {
9530+
os << "0";
9531+
}
9532+
return UR_RESULT_SUCCESS;
9533+
}
9534+
} // namespace ur::details
9535+
///////////////////////////////////////////////////////////////////////////////
94589536
/// @brief Print operator for the ur_exp_image_copy_flag_t type
94599537
/// @returns
94609538
/// std::ostream &

source/loader/layers/validation/ur_valddi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ __urdlllocal ur_result_t UR_APICALL urDeviceGetInfo(
518518
return UR_RESULT_ERROR_INVALID_NULL_POINTER;
519519
}
520520

521-
if (UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP < propName) {
521+
if (UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP < propName) {
522522
return UR_RESULT_ERROR_INVALID_ENUMERATION;
523523
}
524524

source/loader/loader.def.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ EXPORTS
312312
urPrintExpCommandBufferUpdateMemobjArgDesc
313313
urPrintExpCommandBufferUpdatePointerArgDesc
314314
urPrintExpCommandBufferUpdateValueArgDesc
315+
urPrintExpDevice_2dBlockArrayCapabilityFlags
315316
urPrintExpEnqueueExtFlags
316317
urPrintExpEnqueueExtProperties
317318
urPrintExpEnqueueNativeCommandFlags

source/loader/loader.map.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@
312312
urPrintExpCommandBufferUpdateMemobjArgDesc;
313313
urPrintExpCommandBufferUpdatePointerArgDesc;
314314
urPrintExpCommandBufferUpdateValueArgDesc;
315+
urPrintExpDevice_2dBlockArrayCapabilityFlags;
315316
urPrintExpEnqueueExtFlags;
316317
urPrintExpEnqueueExtProperties;
317318
urPrintExpEnqueueNativeCommandFlags;

source/loader/ur_libapi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ ur_result_t UR_APICALL urDeviceGetSelected(
870870
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
871871
/// + `NULL == hDevice`
872872
/// - ::UR_RESULT_ERROR_INVALID_ENUMERATION
873-
/// + `::UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP < propName`
873+
/// + `::UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP < propName`
874874
/// - ::UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION
875875
/// + If `propName` is not supported by the adapter.
876876
/// - ::UR_RESULT_ERROR_INVALID_SIZE

source/loader/ur_print.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,14 @@ ur_result_t urPrintUsmMigrationFlags(enum ur_usm_migration_flag_t value,
879879
return str_copy(&ss, buffer, buff_size, out_size);
880880
}
881881

882+
ur_result_t urPrintExpDevice_2dBlockArrayCapabilityFlags(
883+
enum ur_exp_device_2d_block_array_capability_flag_t value, char *buffer,
884+
const size_t buff_size, size_t *out_size) {
885+
std::stringstream ss;
886+
ss << value;
887+
return str_copy(&ss, buffer, buff_size, out_size);
888+
}
889+
882890
ur_result_t urPrintExpImageCopyFlags(enum ur_exp_image_copy_flag_t value,
883891
char *buffer, const size_t buff_size,
884892
size_t *out_size) {

source/ur_api.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ ur_result_t UR_APICALL urDeviceGetSelected(
771771
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
772772
/// + `NULL == hDevice`
773773
/// - ::UR_RESULT_ERROR_INVALID_ENUMERATION
774-
/// + `::UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP < propName`
774+
/// + `::UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP < propName`
775775
/// - ::UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION
776776
/// + If `propName` is not supported by the adapter.
777777
/// - ::UR_RESULT_ERROR_INVALID_SIZE

tools/urinfo/urinfo.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,5 +420,8 @@ inline void printDeviceInfos(ur_device_handle_t hDevice,
420420
hDevice, UR_DEVICE_INFO_ENQUEUE_NATIVE_COMMAND_SUPPORT_EXP);
421421
std::cout << prefix;
422422
printDeviceInfo<ur_bool_t>(hDevice, UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP);
423+
std::cout << prefix;
424+
printDeviceInfo<ur_exp_device_2d_block_array_capability_flags_t>(
425+
hDevice, UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP);
423426
}
424427
} // namespace urinfo

0 commit comments

Comments
 (0)