diff --git a/include/ur.py b/include/ur.py index bd3736721b..810d8c2cba 100644 --- a/include/ur.py +++ b/include/ur.py @@ -236,10 +236,10 @@ class ur_structure_type_v(IntEnum): SAMPLER_NATIVE_PROPERTIES = 24 ## ::ur_sampler_native_properties_t QUEUE_NATIVE_DESC = 25 ## ::ur_queue_native_desc_t DEVICE_PARTITION_PROPERTIES = 26 ## ::ur_device_partition_properties_t - EXP_COMMAND_BUFFER_DESC = 27 ## ::ur_exp_command_buffer_desc_t - EXP_SAMPLER_MIP_PROPERTIES = 28 ## ::ur_exp_sampler_mip_properties_t - KERNEL_ARG_MEM_OBJ_PROPERTIES = 29 ## ::ur_kernel_arg_mem_obj_properties_t - PHYSICAL_MEM_PROPERTIES = 30 ## ::ur_physical_mem_properties_t + KERNEL_ARG_MEM_OBJ_PROPERTIES = 27 ## ::ur_kernel_arg_mem_obj_properties_t + PHYSICAL_MEM_PROPERTIES = 28 ## ::ur_physical_mem_properties_t + EXP_COMMAND_BUFFER_DESC = 0x1000 ## ::ur_exp_command_buffer_desc_t + EXP_SAMPLER_MIP_PROPERTIES = 0x2000 ## ::ur_exp_sampler_mip_properties_t class ur_structure_type_t(c_int): def __str__(self): @@ -1724,7 +1724,7 @@ class ur_command_v(IntEnum): DEVICE_GLOBAL_VARIABLE_READ = 24 ## Event created by ::urEnqueueDeviceGlobalVariableRead READ_HOST_PIPE = 25 ## Event created by ::urEnqueueReadHostPipe WRITE_HOST_PIPE = 26 ## Event created by ::urEnqueueWriteHostPipe - COMMAND_BUFFER_ENQUEUE_EXP = 27 ## Event created by ::urCommandBufferEnqueueExp + COMMAND_BUFFER_ENQUEUE_EXP = 0x1000 ## Event created by ::urCommandBufferEnqueueExp INTEROP_SEMAPHORE_WAIT_EXP = 0x2000 ## Event created by ::urBindlessImagesWaitExternalSemaphoreExp INTEROP_SEMAPHORE_SIGNAL_EXP = 0x2001 ## Event created by ::urBindlessImagesSignalExternalSemaphoreExp diff --git a/include/ur_api.h b/include/ur_api.h index 5420a95f92..a7a12b108f 100644 --- a/include/ur_api.h +++ b/include/ur_api.h @@ -259,10 +259,10 @@ typedef enum ur_structure_type_t { UR_STRUCTURE_TYPE_SAMPLER_NATIVE_PROPERTIES = 24, ///< ::ur_sampler_native_properties_t UR_STRUCTURE_TYPE_QUEUE_NATIVE_DESC = 25, ///< ::ur_queue_native_desc_t UR_STRUCTURE_TYPE_DEVICE_PARTITION_PROPERTIES = 26, ///< ::ur_device_partition_properties_t - UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC = 27, ///< ::ur_exp_command_buffer_desc_t - UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES = 28, ///< ::ur_exp_sampler_mip_properties_t - UR_STRUCTURE_TYPE_KERNEL_ARG_MEM_OBJ_PROPERTIES = 29, ///< ::ur_kernel_arg_mem_obj_properties_t - UR_STRUCTURE_TYPE_PHYSICAL_MEM_PROPERTIES = 30, ///< ::ur_physical_mem_properties_t + UR_STRUCTURE_TYPE_KERNEL_ARG_MEM_OBJ_PROPERTIES = 27, ///< ::ur_kernel_arg_mem_obj_properties_t + UR_STRUCTURE_TYPE_PHYSICAL_MEM_PROPERTIES = 28, ///< ::ur_physical_mem_properties_t + UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC = 0x1000, ///< ::ur_exp_command_buffer_desc_t + UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES = 0x2000, ///< ::ur_exp_sampler_mip_properties_t /// @cond UR_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff /// @endcond @@ -4689,7 +4689,7 @@ typedef enum ur_command_t { UR_COMMAND_DEVICE_GLOBAL_VARIABLE_READ = 24, ///< Event created by ::urEnqueueDeviceGlobalVariableRead UR_COMMAND_READ_HOST_PIPE = 25, ///< Event created by ::urEnqueueReadHostPipe UR_COMMAND_WRITE_HOST_PIPE = 26, ///< Event created by ::urEnqueueWriteHostPipe - UR_COMMAND_COMMAND_BUFFER_ENQUEUE_EXP = 27, ///< Event created by ::urCommandBufferEnqueueExp + UR_COMMAND_COMMAND_BUFFER_ENQUEUE_EXP = 0x1000, ///< Event created by ::urCommandBufferEnqueueExp UR_COMMAND_INTEROP_SEMAPHORE_WAIT_EXP = 0x2000, ///< Event created by ::urBindlessImagesWaitExternalSemaphoreExp UR_COMMAND_INTEROP_SEMAPHORE_SIGNAL_EXP = 0x2001, ///< Event created by ::urBindlessImagesSignalExternalSemaphoreExp /// @cond diff --git a/scripts/YaML.md b/scripts/YaML.md index 3dddf45443..bbd1e76e0d 100644 --- a/scripts/YaML.md +++ b/scripts/YaML.md @@ -318,11 +318,14 @@ class ur_name_handle_t(c_void_p): - `desc` will be used as the enum's description comment - `name` must be a unique ISO-C standard identifier, start with `$` tag, be snake_case and end with `_t` - `name` that endswith `_flags_t` will be used to create bitfields -* An enum may take the following optional scalar fields: {`class`, `condition`, `ordinal`, `version`, `typed_etors`} +* An enum may take the following optional scalar fields: {`class`, `condition`, `ordinal`, `version`, `typed_etors`, `extend`} - `class` will be used to scope the enum declaration within the specified C++ class - `condition` will be used as a C/C++ preprocessor `#if` conditional expression - `ordinal` will be used to override the default order (in which they appear) the enum appears within its section; `default="1000"` - `version` will be used to define the minimum API version in which the enum will appear; `default="1.0"` This will also affect the order in which the enum appears within its section and class. + - `extend` will be used to extend an existing enum with additional `etors`, + usually used to implement experimental features. `type` *must* refer to an + exiting enum and each `etor` must include a unique `value`. - `typed_etors` boolean value that will be used to determine whether the enum's values have associated types. * An enum requires the following sequence of mappings: {`etors`} - An etor requires the following scalar fields: {`name`, `desc`} diff --git a/scripts/core/CONTRIB.rst b/scripts/core/CONTRIB.rst index 0cf2532855..f40307e34e 100644 --- a/scripts/core/CONTRIB.rst +++ b/scripts/core/CONTRIB.rst @@ -216,6 +216,15 @@ implement your experimental feature. $ python scripts/add_experimental_feature.py +Experimental features *must* not make any changes to the core YaML files and +*must* be described entirely in their own YaML file. Sometimes, however +experimental feature require extending enumerations of the core specification. +If this is necessary, create a new enum with the ``extend`` field set to true +and list the required enumerations to support the experimental feature. These +additional enumerations will updated the specification with the appropriate +values. + + Naming Convention ----------------- diff --git a/scripts/core/common.yml b/scripts/core/common.yml index 191656d475..cbf8cb7a68 100644 --- a/scripts/core/common.yml +++ b/scripts/core/common.yml @@ -261,15 +261,6 @@ etors: - name: ERROR_ADAPTER_SPECIFIC desc: "An adapter specific warning/error has been reported and can be retrieved via the urPlatformGetLastError entry point." - - name: ERROR_INVALID_COMMAND_BUFFER_EXP - value: "0x1000" - desc: "Invalid Command-Buffer" - - name: ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_EXP - value: "0x1001" - desc: "Sync point is not valid for the command-buffer" - - name: ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_WAIT_LIST_EXP - value: "0x1002" - desc: "Sync point wait list is invalid" - name: ERROR_UNKNOWN value: "0x7ffffffe" desc: "Unknown or internal error" @@ -332,10 +323,6 @@ etors: desc: $x_queue_native_desc_t - name: DEVICE_PARTITION_PROPERTIES desc: $x_device_partition_properties_t - - name: EXP_COMMAND_BUFFER_DESC - desc: $x_exp_command_buffer_desc_t - - name: EXP_SAMPLER_MIP_PROPERTIES - desc: $x_exp_sampler_mip_properties_t - name: KERNEL_ARG_MEM_OBJ_PROPERTIES desc: $x_kernel_arg_mem_obj_properties_t - name: PHYSICAL_MEM_PROPERTIES diff --git a/scripts/core/device.yml b/scripts/core/device.yml index c003db0a36..5e8fa6e727 100644 --- a/scripts/core/device.yml +++ b/scripts/core/device.yml @@ -383,54 +383,6 @@ etors: desc: "[uint32_t] The maximum number of registers available per block." - name: IP_VERSION 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: BINDLESS_IMAGES_SUPPORT_EXP - value: "0x2000" - desc: "[$x_bool_t] returns true if the device supports the creation of bindless images" - - name: BINDLESS_IMAGES_1D_USM_SUPPORT_EXP - value: "0x2001" - desc: "[$x_bool_t] returns true if the device supports the creation of 1D bindless images backed by USM" - - name: BINDLESS_IMAGES_2D_USM_SUPPORT_EXP - value: "0x2002" - desc: "[$x_bool_t] returns true if the device supports the creation of 2D bindless images backed by USM" - - name: BINDLESS_IMAGES_3D_USM_SUPPORT_EXP - value: "0x2003" - desc: "[$x_bool_t] returns true if the device supports the creation of 3D bindless images backed by USM" - - name: IMAGE_PITCH_ALIGN_EXP - value: "0x2004" - desc: "[uint32_t] returns the required alignment of the pitch between two rows of an image in bytes" - - name: MAX_IMAGE_LINEAR_WIDTH_EXP - value: "0x2005" - desc: "[size_t] returns the maximum linear width allowed for images allocated using USM" - - name: MAX_IMAGE_LINEAR_HEIGHT_EXP - value: "0x2006" - desc: "[size_t] returns the maximum linear height allowed for images allocated using USM" - - name: MAX_IMAGE_LINEAR_PITCH_EXP - value: "0x2007" - desc: "[size_t] returns the maximum linear pitch allowed for images allocated using USM" - - name: MIPMAP_SUPPORT_EXP - value: "0x2008" - desc: "[$x_bool_t] returns true if the device supports allocating mipmap resources" - - name: MIPMAP_ANISOTROPY_SUPPORT_EXP - value: "0x2009" - desc: "[$x_bool_t] returns true if the device supports sampling mipmap images with anisotropic filtering" - - name: MIPMAP_MAX_ANISOTROPY_EXP - value: "0x200A" - desc: "[uint32_t] returns the maximum anisotropic ratio supported by the device" - - name: MIPMAP_LEVEL_REFERENCE_SUPPORT_EXP - value: "0x200B" - desc: "[$x_bool_t] returns true if the device supports using images created from individual mipmap levels" - - name: INTEROP_MEMORY_IMPORT_SUPPORT_EXP - value: "0x200C" - desc: "[$x_bool_t] returns true if the device supports importing external memory resources" - - name: INTEROP_MEMORY_EXPORT_SUPPORT_EXP - value: "0x200D" - desc: "[$x_bool_t] returns true if the device supports exporting internal memory resources" - - name: INTEROP_SEMAPHORE_IMPORT_SUPPORT_EXP - value: "0x200E" - desc: "[$x_bool_t] returns true if the device supports importing external semaphore resources" - - name: INTEROP_SEMAPHORE_EXPORT_SUPPORT_EXP - value: "0x200F" - desc: "[$x_bool_t] returns true if the device supports exporting internal event resources" --- #-------------------------------------------------------------------------- type: function desc: "Retrieves various information about device" diff --git a/scripts/core/event.yml b/scripts/core/event.yml index 59fb1851fa..f38d68b779 100644 --- a/scripts/core/event.yml +++ b/scripts/core/event.yml @@ -73,14 +73,6 @@ etors: desc: Event created by $xEnqueueReadHostPipe - name: WRITE_HOST_PIPE desc: Event created by $xEnqueueWriteHostPipe - - name: COMMAND_BUFFER_ENQUEUE_EXP - desc: Event created by $xCommandBufferEnqueueExp - - name: INTEROP_SEMAPHORE_WAIT_EXP - value: "0x2000" - desc: Event created by $xBindlessImagesWaitExternalSemaphoreExp - - name: INTEROP_SEMAPHORE_SIGNAL_EXP - value: "0x2001" - desc: Event created by $xBindlessImagesSignalExternalSemaphoreExp --- #-------------------------------------------------------------------------- type: enum desc: "Event Status" diff --git a/scripts/core/exp-bindless-images.yml b/scripts/core/exp-bindless-images.yml index b684f3b80e..1b4d408379 100644 --- a/scripts/core/exp-bindless-images.yml +++ b/scripts/core/exp-bindless-images.yml @@ -24,6 +24,82 @@ class: $xBindlessImages name: "$x_exp_interop_semaphore_handle_t" --- #-------------------------------------------------------------------------- type: enum +extend: true +typed_etors: true +desc: "Extension enums to $x_device_info_t to support bindless images." +name: $x_device_info_t +etors: + - name: BINDLESS_IMAGES_SUPPORT_EXP + value: "0x2000" + desc: "[$x_bool_t] returns true if the device supports the creation of bindless images" + - name: BINDLESS_IMAGES_1D_USM_SUPPORT_EXP + value: "0x2001" + desc: "[$x_bool_t] returns true if the device supports the creation of 1D bindless images backed by USM" + - name: BINDLESS_IMAGES_2D_USM_SUPPORT_EXP + value: "0x2002" + desc: "[$x_bool_t] returns true if the device supports the creation of 2D bindless images backed by USM" + - name: BINDLESS_IMAGES_3D_USM_SUPPORT_EXP + value: "0x2003" + desc: "[$x_bool_t] returns true if the device supports the creation of 3D bindless images backed by USM" + - name: IMAGE_PITCH_ALIGN_EXP + value: "0x2004" + desc: "[uint32_t] returns the required alignment of the pitch between two rows of an image in bytes" + - name: MAX_IMAGE_LINEAR_WIDTH_EXP + value: "0x2005" + desc: "[size_t] returns the maximum linear width allowed for images allocated using USM" + - name: MAX_IMAGE_LINEAR_HEIGHT_EXP + value: "0x2006" + desc: "[size_t] returns the maximum linear height allowed for images allocated using USM" + - name: MAX_IMAGE_LINEAR_PITCH_EXP + value: "0x2007" + desc: "[size_t] returns the maximum linear pitch allowed for images allocated using USM" + - name: MIPMAP_SUPPORT_EXP + value: "0x2008" + desc: "[$x_bool_t] returns true if the device supports allocating mipmap resources" + - name: MIPMAP_ANISOTROPY_SUPPORT_EXP + value: "0x2009" + desc: "[$x_bool_t] returns true if the device supports sampling mipmap images with anisotropic filtering" + - name: MIPMAP_MAX_ANISOTROPY_EXP + value: "0x200A" + desc: "[uint32_t] returns the maximum anisotropic ratio supported by the device" + - name: MIPMAP_LEVEL_REFERENCE_SUPPORT_EXP + value: "0x200B" + desc: "[$x_bool_t] returns true if the device supports using images created from individual mipmap levels" + - name: INTEROP_MEMORY_IMPORT_SUPPORT_EXP + value: "0x200C" + desc: "[$x_bool_t] returns true if the device supports importing external memory resources" + - name: INTEROP_MEMORY_EXPORT_SUPPORT_EXP + value: "0x200D" + desc: "[$x_bool_t] returns true if the device supports exporting internal memory resources" + - name: INTEROP_SEMAPHORE_IMPORT_SUPPORT_EXP + value: "0x200E" + desc: "[$x_bool_t] returns true if the device supports importing external semaphore resources" + - name: INTEROP_SEMAPHORE_EXPORT_SUPPORT_EXP + value: "0x200F" + desc: "[$x_bool_t] returns true if the device supports exporting internal event resources" +--- #-------------------------------------------------------------------------- +type: enum +extend: true +desc: "Structure Type experimental enumerations." +name: $x_structure_type_t +etors: + - name: EXP_SAMPLER_MIP_PROPERTIES + desc: $x_exp_sampler_mip_properties_t + value: "0x2000" +--- #-------------------------------------------------------------------------- +type: enum +extend: true +desc: "Command Type experimental enumerations." +name: $x_command_t +etors: + - name: INTEROP_SEMAPHORE_WAIT_EXP + value: "0x2000" + desc: Event created by $xBindlessImagesWaitExternalSemaphoreExp + - name: INTEROP_SEMAPHORE_SIGNAL_EXP + value: "0x2001" + desc: Event created by $xBindlessImagesSignalExternalSemaphoreExp +--- #-------------------------------------------------------------------------- +type: enum desc: "Dictates the type of memory copy." class: $xBindlessImages name: $x_exp_image_copy_flags_t diff --git a/scripts/core/exp-command-buffer.yml b/scripts/core/exp-command-buffer.yml index d1279d9187..0ad073bfcc 100644 --- a/scripts/core/exp-command-buffer.yml +++ b/scripts/core/exp-command-buffer.yml @@ -12,6 +12,39 @@ type: header desc: "Intel $OneApi Unified Runtime Experimental APIs for Command-Buffers" ordinal: "99" --- #-------------------------------------------------------------------------- +type: enum +extend: true +desc: "Experimental Command Buffer result type enums." +name: $x_result_t +etors: + - name: ERROR_INVALID_COMMAND_BUFFER_EXP + value: "0x1000" + desc: "Invalid Command-Buffer" + - name: ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_EXP + value: "0x1001" + desc: "Sync point is not valid for the command-buffer" + - name: ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_WAIT_LIST_EXP + value: "0x1002" + desc: "Sync point wait list is invalid" +--- #-------------------------------------------------------------------------- +type: enum +extend: true +desc: "Extend enumeration of Command Buffer Structure Type." +name: $x_structure_type_t +etors: + - name: EXP_COMMAND_BUFFER_DESC + desc: $x_exp_command_buffer_desc_t + value: "0x1000" +--- #-------------------------------------------------------------------------- +type: enum +extend: true +desc: "Extend command type enumeration for Command-Buffer experimental feature." +name: $x_command_t +etors: + - name: COMMAND_BUFFER_ENQUEUE_EXP + desc: Event created by $xCommandBufferEnqueueExp + value: "0x1000" +--- #-------------------------------------------------------------------------- type: macro desc: "The extension string which defines support for command-buffers which is returned when querying device extensions." name: $X_COMMAND_BUFFER_EXTENSION_STRING_EXP diff --git a/scripts/parse_specs.py b/scripts/parse_specs.py index 3666288e8a..a217f8d321 100644 --- a/scripts/parse_specs.py +++ b/scripts/parse_specs.py @@ -16,6 +16,7 @@ import copy from templates.helper import param_traits, type_traits, value_traits import ctypes +import itertools default_version = "0.5" all_versions = ["0.5", "1.0", "1.1", "2.0"] @@ -221,6 +222,9 @@ def __validate_etors(d, tags): if ('desc' not in item) or ('name' not in item): raise Exception(prefix+"requires the following scalar fields: {`desc`, `name`}") + if 'extend' in d and d.get('extend') == True and 'value' not in item: + raise Exception(prefix+"must include a value for experimental features: {`value`: `0xabcd`}") + if typed: type = extract_type(item['desc']) if type is None: @@ -558,6 +562,8 @@ def _generate_meta(d, ordinal, meta): for idx, etor in enumerate(d['etors']): meta[type][name]['etors'].append(etor['name']) value = _get_etor_value(etor.get('value'), value) + if not etor.get('value'): + etor['value'] = str(value) if type_traits.is_flags(name): bit_mask |= value if value > max_value: @@ -568,7 +574,7 @@ def _generate_meta(d, ordinal, meta): if bit_mask != 0: meta[type][name]['bit_mask'] = hex(ctypes.c_uint32(~bit_mask).value) else: - meta[type][name]['max'] = d['etors'][idx]['name'] + meta[type][name]['max'] = d['etors'][max_index]['name'] elif 'macro' == type: meta[type][name]['values'] = [] @@ -797,6 +803,47 @@ def _generate_ref(specs, tags, ref): return ref +def _refresh_enum_meta(obj, meta): + ## remove the existing meta records + if obj.get('class'): + meta['class'][obj['class']]['enum'].remove(obj['name']) + + del meta['enum'][obj['name']] + ## re-generate meta + meta = _generate_meta(obj, None, meta) + + +def _validate_ext_enum_range(extension, enum) -> bool: + try: + existing_values = [_get_etor_value(etor.get('value'), None) for etor in enum['etors']] + for ext in extension['etors']: + value = _get_etor_value(ext.get('value'), None) + if value in existing_values: + return False + return True + except: + return False + +def _extend_enums(enum_extensions, specs, meta): + enum_extensions = sorted(enum_extensions, key= lambda x : x['name']) + enum_groups = [(k, list(g)) for k, g in itertools.groupby(enum_extensions, key=lambda x : x['name'])] + + for k, group in enum_groups: + matching_enum = [obj for s in specs for obj in s['objects'] if obj['type'] == 'enum' and k == obj['name'] and not obj.get('extend')][0] + for i, extension in enumerate(group): + if not _validate_ext_enum_range(extension, matching_enum): + raise Exception(f"Invalid enum values.") + matching_enum['etors'].extend(extension['etors']) + + _refresh_enum_meta(matching_enum, meta) + + ## Sort the etors + value = -1 + def sort_etors(x): + nonlocal value + value = _get_etor_value(x.get('value'), value) + return value + matching_enum['etors'] = sorted(matching_enum['etors'], key=sort_etors) """ Entry-point: @@ -811,6 +858,7 @@ def parse(section, version, tags, meta, ref): # make sure registry is last, because it's autogenerated based on the rest of the spec files = sorted(files, key=lambda f: 1 if f.endswith('registry.yml') else 0) + enum_extensions = [] for f in files: if f.endswith('registry.yml'): generate_ids.generate_registry(f, specs) @@ -832,6 +880,11 @@ def parse(section, version, tags, meta, ref): if not d: continue + if d['type'] == "enum" and d.get("extend") == True: + # enum extensions are resolved later + enum_extensions.append(d) + continue + # extract header from objects if re.match(r"header", d['type']): header = d @@ -860,6 +913,7 @@ def parse(section, version, tags, meta, ref): }) specs = sorted(specs, key=lambda s: s['header']['ordinal']) + _extend_enums(enum_extensions, specs, meta) _generate_extra(specs, meta) ref = _generate_ref(specs, tags, ref) diff --git a/source/common/ur_params.hpp b/source/common/ur_params.hpp index 6778c45a5b..a4877f8ac6 100644 --- a/source/common/ur_params.hpp +++ b/source/common/ur_params.hpp @@ -780,14 +780,6 @@ inline std::ostream &operator<<(std::ostream &os, os << "UR_STRUCTURE_TYPE_DEVICE_PARTITION_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC: - os << "UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC"; - break; - - case UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES: - os << "UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES"; - break; - case UR_STRUCTURE_TYPE_KERNEL_ARG_MEM_OBJ_PROPERTIES: os << "UR_STRUCTURE_TYPE_KERNEL_ARG_MEM_OBJ_PROPERTIES"; break; @@ -795,6 +787,14 @@ inline std::ostream &operator<<(std::ostream &os, case UR_STRUCTURE_TYPE_PHYSICAL_MEM_PROPERTIES: os << "UR_STRUCTURE_TYPE_PHYSICAL_MEM_PROPERTIES"; break; + + case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC: + os << "UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC"; + break; + + case UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES: + os << "UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES"; + break; default: os << "unknown enumerator"; break; @@ -965,18 +965,6 @@ inline void serializeStruct(std::ostream &os, const void *ptr) { ur_params::serializePtr(os, pstruct); } break; - case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC: { - const ur_exp_command_buffer_desc_t *pstruct = - (const ur_exp_command_buffer_desc_t *)ptr; - ur_params::serializePtr(os, pstruct); - } break; - - case UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES: { - const ur_exp_sampler_mip_properties_t *pstruct = - (const ur_exp_sampler_mip_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); - } break; - case UR_STRUCTURE_TYPE_KERNEL_ARG_MEM_OBJ_PROPERTIES: { const ur_kernel_arg_mem_obj_properties_t *pstruct = (const ur_kernel_arg_mem_obj_properties_t *)ptr; @@ -988,6 +976,18 @@ inline void serializeStruct(std::ostream &os, const void *ptr) { (const ur_physical_mem_properties_t *)ptr; ur_params::serializePtr(os, pstruct); } break; + + case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC: { + const ur_exp_command_buffer_desc_t *pstruct = + (const ur_exp_command_buffer_desc_t *)ptr; + ur_params::serializePtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES: { + const ur_exp_sampler_mip_properties_t *pstruct = + (const ur_exp_sampler_mip_properties_t *)ptr; + ur_params::serializePtr(os, pstruct); + } break; default: os << "unknown enumerator"; break;