Skip to content

Commit ccd302e

Browse files
committed
Genereate sources
1 parent b919d41 commit ccd302e

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;
@@ -4471,6 +4478,19 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_device_info
44714478

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