Skip to content

Commit b3cc9ae

Browse files
authored
Merge pull request #766 from sarnex/main
Add UR_DEVICE_INFO_ESIMD_SUPPORT
2 parents 342f100 + fe63e49 commit b3cc9ae

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

include/ur.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,7 @@ class ur_device_info_v(IntEnum):
832832
## is implementation-defined, but newer devices should have a higher
833833
## version than older devices.
834834
VIRTUAL_MEMORY_SUPPORT = 114 ## [::ur_bool_t] return true if the device supports virtual memory.
835+
ESIMD_SUPPORT = 115 ## [::ur_bool_t] return true if the device supports ESIMD.
835836
BINDLESS_IMAGES_SUPPORT_EXP = 0x2000 ## [::ur_bool_t] returns true if the device supports the creation of
836837
## bindless images
837838
BINDLESS_IMAGES_SHARED_USM_SUPPORT_EXP = 0x2001 ## [::ur_bool_t] returns true if the device supports the creation of

include/ur_api.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,6 +1461,7 @@ typedef enum ur_device_info_t {
14611461
///< is implementation-defined, but newer devices should have a higher
14621462
///< version than older devices.
14631463
UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT = 114, ///< [::ur_bool_t] return true if the device supports virtual memory.
1464+
UR_DEVICE_INFO_ESIMD_SUPPORT = 115, ///< [::ur_bool_t] return true if the device supports ESIMD.
14641465
UR_DEVICE_INFO_BINDLESS_IMAGES_SUPPORT_EXP = 0x2000, ///< [::ur_bool_t] returns true if the device supports the creation of
14651466
///< bindless images
14661467
UR_DEVICE_INFO_BINDLESS_IMAGES_SHARED_USM_SUPPORT_EXP = 0x2001, ///< [::ur_bool_t] returns true if the device supports the creation of

scripts/core/device.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,8 @@ etors:
390390
desc: "[uint32_t] The device IP version. The meaning of the device IP version is implementation-defined, but newer devices should have a higher version than older devices."
391391
- name: VIRTUAL_MEMORY_SUPPORT
392392
desc: "[$x_bool_t] return true if the device supports virtual memory."
393+
- name: ESIMD_SUPPORT
394+
desc: "[$x_bool_t] return true if the device supports ESIMD."
393395
--- #--------------------------------------------------------------------------
394396
type: function
395397
desc: "Retrieves various information about device"

source/common/ur_params.hpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2854,6 +2854,10 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_device_info_t value) {
28542854
os << "UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT";
28552855
break;
28562856

2857+
case UR_DEVICE_INFO_ESIMD_SUPPORT:
2858+
os << "UR_DEVICE_INFO_ESIMD_SUPPORT";
2859+
break;
2860+
28572861
case UR_DEVICE_INFO_BINDLESS_IMAGES_SUPPORT_EXP:
28582862
os << "UR_DEVICE_INFO_BINDLESS_IMAGES_SUPPORT_EXP";
28592863
break;
@@ -4492,6 +4496,20 @@ inline void serializeTagged(std::ostream &os, const void *ptr,
44924496
os << ")";
44934497
} break;
44944498

4499+
case UR_DEVICE_INFO_ESIMD_SUPPORT: {
4500+
const ur_bool_t *tptr = (const ur_bool_t *)ptr;
4501+
if (sizeof(ur_bool_t) > size) {
4502+
os << "invalid size (is: " << size
4503+
<< ", expected: >=" << sizeof(ur_bool_t) << ")";
4504+
return;
4505+
}
4506+
os << (void *)(tptr) << " (";
4507+
4508+
os << *tptr;
4509+
4510+
os << ")";
4511+
} break;
4512+
44954513
case UR_DEVICE_INFO_BINDLESS_IMAGES_SUPPORT_EXP: {
44964514
const ur_bool_t *tptr = (const ur_bool_t *)ptr;
44974515
if (sizeof(ur_bool_t) > size) {

0 commit comments

Comments
 (0)