Skip to content

Commit

Permalink
Merge pull request #766 from sarnex/main
Browse files Browse the repository at this point in the history
Add UR_DEVICE_INFO_ESIMD_SUPPORT
  • Loading branch information
kbenzie committed Aug 21, 2023
2 parents 342f100 + fe63e49 commit b3cc9ae
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/ur.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,7 @@ class ur_device_info_v(IntEnum):
## is implementation-defined, but newer devices should have a higher
## version than older devices.
VIRTUAL_MEMORY_SUPPORT = 114 ## [::ur_bool_t] return true if the device supports virtual memory.
ESIMD_SUPPORT = 115 ## [::ur_bool_t] return true if the device supports ESIMD.
BINDLESS_IMAGES_SUPPORT_EXP = 0x2000 ## [::ur_bool_t] returns true if the device supports the creation of
## bindless images
BINDLESS_IMAGES_SHARED_USM_SUPPORT_EXP = 0x2001 ## [::ur_bool_t] returns true if the device supports the creation of
Expand Down
1 change: 1 addition & 0 deletions include/ur_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -1461,6 +1461,7 @@ typedef enum ur_device_info_t {
///< is implementation-defined, but newer devices should have a higher
///< version than older devices.
UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT = 114, ///< [::ur_bool_t] return true if the device supports virtual memory.
UR_DEVICE_INFO_ESIMD_SUPPORT = 115, ///< [::ur_bool_t] return true if the device supports ESIMD.
UR_DEVICE_INFO_BINDLESS_IMAGES_SUPPORT_EXP = 0x2000, ///< [::ur_bool_t] returns true if the device supports the creation of
///< bindless images
UR_DEVICE_INFO_BINDLESS_IMAGES_SHARED_USM_SUPPORT_EXP = 0x2001, ///< [::ur_bool_t] returns true if the device supports the creation of
Expand Down
2 changes: 2 additions & 0 deletions scripts/core/device.yml
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,8 @@ etors:
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."
- name: VIRTUAL_MEMORY_SUPPORT
desc: "[$x_bool_t] return true if the device supports virtual memory."
- name: ESIMD_SUPPORT
desc: "[$x_bool_t] return true if the device supports ESIMD."
--- #--------------------------------------------------------------------------
type: function
desc: "Retrieves various information about device"
Expand Down
18 changes: 18 additions & 0 deletions source/common/ur_params.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2854,6 +2854,10 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_device_info_t value) {
os << "UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT";
break;

case UR_DEVICE_INFO_ESIMD_SUPPORT:
os << "UR_DEVICE_INFO_ESIMD_SUPPORT";
break;

case UR_DEVICE_INFO_BINDLESS_IMAGES_SUPPORT_EXP:
os << "UR_DEVICE_INFO_BINDLESS_IMAGES_SUPPORT_EXP";
break;
Expand Down Expand Up @@ -4492,6 +4496,20 @@ inline void serializeTagged(std::ostream &os, const void *ptr,
os << ")";
} break;

case UR_DEVICE_INFO_ESIMD_SUPPORT: {
const ur_bool_t *tptr = (const ur_bool_t *)ptr;
if (sizeof(ur_bool_t) > size) {
os << "invalid size (is: " << size
<< ", expected: >=" << sizeof(ur_bool_t) << ")";
return;
}
os << (void *)(tptr) << " (";

os << *tptr;

os << ")";
} break;

case UR_DEVICE_INFO_BINDLESS_IMAGES_SUPPORT_EXP: {
const ur_bool_t *tptr = (const ur_bool_t *)ptr;
if (sizeof(ur_bool_t) > size) {
Expand Down

0 comments on commit b3cc9ae

Please sign in to comment.