Skip to content

Commit

Permalink
Rework change to not use experimental infrastructure
Browse files Browse the repository at this point in the history
Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
  • Loading branch information
sarnex committed Aug 17, 2023
1 parent 76a5b09 commit 98ebdf5
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 95 deletions.
2 changes: 2 additions & 0 deletions include/ur.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,8 @@ 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] returns 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
4 changes: 2 additions & 2 deletions include/ur_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -1454,6 +1454,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] returns 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 Expand Up @@ -1486,7 +1487,6 @@ typedef enum ur_device_info_t {
///< semaphore resources
UR_DEVICE_INFO_INTEROP_SEMAPHORE_EXPORT_SUPPORT_EXP = 0x200F, ///< [::ur_bool_t] returns true if the device supports exporting internal
///< event resources
UR_DEVICE_INFO_ESIMD_SUPPORT_EXP = 0x2010, ///< [::ur_bool_t] returns true if the device supports ESIMD
/// @cond
UR_DEVICE_INFO_FORCE_UINT32 = 0x7fffffff
/// @endcond
Expand All @@ -1512,7 +1512,7 @@ typedef enum ur_device_info_t {
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
/// + `NULL == hDevice`
/// - ::UR_RESULT_ERROR_INVALID_ENUMERATION
/// + `::UR_DEVICE_INFO_ESIMD_SUPPORT_EXP < propName`
/// + `::UR_DEVICE_INFO_INTEROP_SEMAPHORE_EXPORT_SUPPORT_EXP < propName`
/// - ::UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION
/// + If `propName` is not supported by the adapter.
/// - ::UR_RESULT_ERROR_INVALID_SIZE
Expand Down
50 changes: 0 additions & 50 deletions scripts/core/EXP-ESIMD.rst

This file was deleted.

2 changes: 2 additions & 0 deletions scripts/core/device.yml
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,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
23 changes: 0 additions & 23 deletions scripts/core/exp-esimd.yml

This file was deleted.

35 changes: 18 additions & 17 deletions source/common/ur_params.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2772,6 +2772,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 @@ -2836,9 +2840,6 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_device_info_t value) {
os << "UR_DEVICE_INFO_INTEROP_SEMAPHORE_EXPORT_SUPPORT_EXP";
break;

case UR_DEVICE_INFO_ESIMD_SUPPORT_EXP:
os << "UR_DEVICE_INFO_ESIMD_SUPPORT_EXP";
break;
default:
os << "unknown enumerator";
break;
Expand Down Expand Up @@ -4414,6 +4415,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 Expand Up @@ -4637,20 +4652,6 @@ inline void serializeTagged(std::ostream &os, const void *ptr,

os << ")";
} break;

case UR_DEVICE_INFO_ESIMD_SUPPORT_EXP: {
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;
default:
os << "unknown enumerator";
break;
Expand Down
2 changes: 1 addition & 1 deletion source/loader/layers/validation/ur_valddi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ __urdlllocal ur_result_t UR_APICALL urDeviceGetInfo(
return UR_RESULT_ERROR_INVALID_NULL_POINTER;
}

if (UR_DEVICE_INFO_ESIMD_SUPPORT_EXP < propName) {
if (UR_DEVICE_INFO_INTEROP_SEMAPHORE_EXPORT_SUPPORT_EXP < propName) {
return UR_RESULT_ERROR_INVALID_ENUMERATION;
}

Expand Down
2 changes: 1 addition & 1 deletion source/loader/ur_libapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ ur_result_t UR_APICALL urDeviceGet(
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
/// + `NULL == hDevice`
/// - ::UR_RESULT_ERROR_INVALID_ENUMERATION
/// + `::UR_DEVICE_INFO_ESIMD_SUPPORT_EXP < propName`
/// + `::UR_DEVICE_INFO_INTEROP_SEMAPHORE_EXPORT_SUPPORT_EXP < propName`
/// - ::UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION
/// + If `propName` is not supported by the adapter.
/// - ::UR_RESULT_ERROR_INVALID_SIZE
Expand Down
2 changes: 1 addition & 1 deletion source/ur_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ ur_result_t UR_APICALL urDeviceGet(
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
/// + `NULL == hDevice`
/// - ::UR_RESULT_ERROR_INVALID_ENUMERATION
/// + `::UR_DEVICE_INFO_ESIMD_SUPPORT_EXP < propName`
/// + `::UR_DEVICE_INFO_INTEROP_SEMAPHORE_EXPORT_SUPPORT_EXP < propName`
/// - ::UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION
/// + If `propName` is not supported by the adapter.
/// - ::UR_RESULT_ERROR_INVALID_SIZE
Expand Down

0 comments on commit 98ebdf5

Please sign in to comment.