From c1da4f8402ff0e85038396df672f22f921418882 Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Fri, 27 Feb 2026 00:29:50 +0000 Subject: [PATCH 01/30] Lets go --- backends/ze/Makefile.am | 16 +- backends/ze/README.md | 55 + backends/ze/extract_ze.rb | 2 +- backends/ze/extract_zel.rb | 2 +- backends/ze/extract_zer.rb | 37 + backends/ze/gen_babeltrace_ze_model.rb | 6 +- backends/ze/gen_ze.rb | 22 +- backends/ze/gen_ze_library_base.rb | 2 +- backends/ze/gen_zer_structs_tracepoints.rb | 17 + backends/ze/gen_zer_tracepoints.rb | 16 + .../include/layers/zel_tracing_register_cb.h | 1608 +++- backends/ze/include/loader/ze_loader.h | 501 +- backends/ze/include/loader/ze_loader_api.h | 81 - .../ze/include/loader/ze_loader_internal.h | 0 backends/ze/include/ze.py | 7745 +++++++++++++++++ backends/ze/include/ze_api.h | 4993 ++++++++++- backends/ze/include/ze_ddi.h | 402 +- backends/ze/include/ze_ddi_common.h | 38 + backends/ze/include/ze_ddi_ver.h | 330 +- backends/ze/include/zer.py | 102 + backends/ze/include/zer_api.h | 162 + backends/ze/include/zer_ddi.h | 96 + backends/ze/include/zer_ddi_ver.h | 38 + backends/ze/include/zes.py | 4423 ++++++++++ backends/ze/include/zes_api.h | 1662 +++- backends/ze/include/zes_ddi.h | 86 +- backends/ze/include/zes_ddi_ver.h | 66 +- backends/ze/include/zet.py | 1973 +++++ backends/ze/include/zet_api.h | 1591 +++- backends/ze/include/zet_ddi.h | 289 +- backends/ze/include/zet_ddi_ver.h | 58 +- backends/ze/ze.h.include | 4 +- backends/ze/ze_model.rb | 28 +- 33 files changed, 25664 insertions(+), 787 deletions(-) create mode 100644 backends/ze/README.md create mode 100644 backends/ze/extract_zer.rb create mode 100644 backends/ze/gen_zer_structs_tracepoints.rb create mode 100644 backends/ze/gen_zer_tracepoints.rb delete mode 100644 backends/ze/include/loader/ze_loader_api.h delete mode 100644 backends/ze/include/loader/ze_loader_internal.h create mode 100644 backends/ze/include/ze.py create mode 100644 backends/ze/include/ze_ddi_common.h create mode 100644 backends/ze/include/zer.py create mode 100644 backends/ze/include/zer_api.h create mode 100644 backends/ze/include/zer_ddi.h create mode 100644 backends/ze/include/zer_ddi_ver.h create mode 100644 backends/ze/include/zes.py create mode 100644 backends/ze/include/zet.py diff --git a/backends/ze/Makefile.am b/backends/ze/Makefile.am index 57b00cf3a..f50b2fb5b 100644 --- a/backends/ze/Makefile.am +++ b/backends/ze/Makefile.am @@ -2,15 +2,20 @@ if STRICT # We disable `nonnull` check due to - # ././ze_tracepoints.h: In function 'lttng_ust__event_get_size__lttng_ust_ze___zeModuleCreate_entry': + # .//ze_tracepoints.h: In function 'lttng_ust__event_get_size__lttng_ust_ze___zeModuleCreate_entry': # [...]/lttng/ust-tracepoint-event.h:578:17: error: argument 1 null where non-null expected [-Werror=nonnull] # 578 | strlen((_src) ? (_src) : LTTNG_UST__NULL_STRING) + 1; - WERROR = -Werror -Wno-error=nonnull + # We disable `extern-c-compat` check due to + # ./layers/zel_tracing_register_cb.h:2729:9: error: empty struct has size 0 in C, size 1 in C++ [-Werror,-Wextern-c-compat] + #2729 | typedef struct _zer_get_default_context_params_t + # | ^ + #1 error generated. + WERROR = -Werror -Wno-error=nonnull -Wno-error=extern-c-compat else WERROR = endif -ZE_NAMESPACES = ze zet zes zel zex +ZE_NAMESPACES = ze zet zes zel zer zex ZE_STRUCTS_NAMESPACES = $(ZE_NAMESPACES:=_structs) ZE_HDR_ROOT = \ @@ -23,8 +28,10 @@ ZE_HDR_ROOT = \ zet_api.h \ zet_ddi.h \ zet_ddi_ver.h \ + zer_api.h \ + zer_ddi.h \ + zer_ddi_ver.h \ zex_api.h \ - loader/ze_loader_api.h \ layers/zel_tracing_api.h \ layers/zel_tracing_ddi.h \ layers/zel_tracing_ddi_ver.h \ @@ -58,7 +65,6 @@ $(MODIFIED_ZE_HDR) &: $(ZE_HDR) $(srcdir)/headers.patch $(RM) -r modified_include/ cp -r $(srcdir)/include/ modified_include/ chmod -R u+w modified_include/ - cat $(srcdir)/headers.patch | patch -i - -d modified_include/ -s -p1 clean-local: $(RM) -r modified_include diff --git a/backends/ze/README.md b/backends/ze/README.md new file mode 100644 index 000000000..958ee1dfc --- /dev/null +++ b/backends/ze/README.md @@ -0,0 +1,55 @@ +# Header Location + +github.com/argonne-lcf/level-zero-spec/tree/ddi_ver + +### Note +Different from https://github.com/oneapi-src/level-zero/tree/v1.28.2/include + +# Step: + +- Sync the fork with reach +- Sync the bran ddi_ver + +``` +git clone -b ddi_ver https://github.com/argonne-lcf/level-zero-spec.git +cd level-zero-spec/scripts/ +uv pip install -r third_party/requirements.txt +cd script +``` +Get version number +``` +version=$(grep -oP "version \d+\.\d+" core/driver.yml | tail -1 | awk '{print $2}') +echo $version +``` + +use It to generate the spec and verify that everything match +``` +python run.py --ver $version --\!debug --\!html +grep "define ZE_API_VERSION_CURRENT_M" ../include/ze_api.h +``` +- Now header have been generated in `level-zero-spec/include`. Copy that in `$THAPI_ROOT/backend/ze/include` +(carefull for removed file) + +- This does contain the layers/loader and zex. + + - We got those from `https://github.com/oneapi-src/level-zero/tree/v1.28.2/include` + +- Try to compile + +## Problem + +``` +tracer_ze.c:197:8: error: use of undeclared identifier 'ZE_STRUCTURE_TYPE_DEVICE_CACHE_LINE_SIZE_EXT'; did you mean 'ZE_STRUCTURE_TYPE_DEVICE_CACHELINE_SIZE_EXT'? + 197 | case ZE_STRUCTURE_TYPE_DEVICE_CACHE_LINE_SIZE_EXT: + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ZE_STRUCTURE_TYPE_DEVICE_CACHELINE_SIZE_EXT +``` + +- Due to intel lack of naming consistancy, maybe need to update `struct_type_conversion_table` n in `ze_model.rb` + +``` +tracer_ze.c:8456:20: error: unused function 'zelTracerResetAllCallbacks_hid' [-Werror,-Wunused-function] + 8456 | static ze_result_t zelTracerResetAllCallbacks_hid(zel_tracer_handle_t hTracer)__attribute__ ((alias ("zelTracerResetAllCallbacks"))); + | ^~~~~~~~~~~~~~~~~ +``` +Need to modify the `$zel_commands.each` who generate `#{c.decl_hidden_alias};` in `gen_ze.rb` diff --git a/backends/ze/extract_ze.rb b/backends/ze/extract_ze.rb index 180d9b185..ef9ee59af 100644 --- a/backends/ze/extract_ze.rb +++ b/backends/ze/extract_ze.rb @@ -4,7 +4,7 @@ #include #include #include - #include + #include EOF if enable_clang_parser? diff --git a/backends/ze/extract_zel.rb b/backends/ze/extract_zel.rb index 792df8872..57bba4dab 100644 --- a/backends/ze/extract_zel.rb +++ b/backends/ze/extract_zel.rb @@ -12,7 +12,7 @@ header = [shared_header, zel_header].join("\n") require 'open3' yaml, status = Open3.capture2( - 'h2yaml --compat-cast-to-yaml -Wc,-xc -Wc,-Imodified_include/ --filter-header "zel|ze_loader" -', stdin_data: header + 'h2yaml --compat-cast-to-yaml -Wc,-xc -Wc,-Imodified_include/ --filter-header "zel" -', stdin_data: header ) exit(1) unless status.success? diff --git a/backends/ze/extract_zer.rb b/backends/ze/extract_zer.rb new file mode 100644 index 000000000..fe51b3e89 --- /dev/null +++ b/backends/ze/extract_zer.rb @@ -0,0 +1,37 @@ +require_relative 'extract_base' + +zel_header = < + #include + #include +EOF + +if enable_clang_parser? + header = [shared_header, zel_header].join("\n") + require 'open3' + yaml, status = Open3.capture2( + 'h2yaml --compat-cast-to-yaml -Wc,-xc -Wc,-Imodified_include/ --filter-header "zer" -', stdin_data: header + ) + exit(1) unless status.success? + +else + require_relative 'extract_base' + preprocessed_sources_ze_api = $cpp.preprocess(<<~EOF).gsub(/^#.*?$/, '') + #include + #include + EOF + + preprocessed_sources_zel_api = $cpp.preprocess(<<~EOF).gsub(/^#.*?$/, '') + #define _ZE_API_H + #{zel_header} + EOF + + $parser.parse(preprocessed_sources_ze_api) + ast = $parser.parse(preprocessed_sources_zel_api) + yaml = ast.extract_declarations.to_yaml + +end + +File.open('zer_api.yaml', 'w') do |f| + f.puts yaml +end diff --git a/backends/ze/gen_babeltrace_ze_model.rb b/backends/ze/gen_babeltrace_ze_model.rb index 9c314971d..1447b0523 100644 --- a/backends/ze/gen_babeltrace_ze_model.rb +++ b/backends/ze/gen_babeltrace_ze_model.rb @@ -7,6 +7,7 @@ [:lttng_ust_zet, $zet_commands], [:lttng_ust_zes, $zes_commands], [:lttng_ust_zel, $zel_commands], + [:lttng_ust_zer, $zer_commands], [:lttng_ust_zex, $zex_commands]].collect do |provider, commands| commands.collect do |c| [gen_event_bt_model(provider, c, :start), @@ -76,8 +77,9 @@ def gen_struct_event_bt_model(provider, struct) [:lttng_ust_zet_structs, get_structs_types(:zet, $zet_api['typedefs'], $zet_api['structs'])], [:lttng_ust_zes_structs, get_structs_types(:zes, $zes_api['typedefs'], $zes_api['structs'])], [:lttng_ust_zel_structs, get_structs_types(:zel, $zel_api['typedefs'], $zel_api['structs'])], - [:lttng_ust_zex_structs, - get_structs_types(:zex, $zes_api['typedefs'], $zes_api['structs'])]].collect do |provider, structs| + [:lttng_ust_zer_structs, get_structs_types(:zer, $zer_api['typedefs'], $zer_api['structs'])], + [:lttng_ust_zex_structs, get_structs_types(:zex, $zex_api['typedefs'], $zex_api['structs'])] + ].collect do |provider, structs| structs.collect do |struct| gen_struct_event_bt_model(provider, struct) end diff --git a/backends/ze/gen_ze.rb b/backends/ze/gen_ze.rb index 77265bca4..a89595a05 100644 --- a/backends/ze/gen_ze.rb +++ b/backends/ze/gen_ze.rb @@ -20,11 +20,13 @@ #include "zet_tracepoints.h" #include "zes_tracepoints.h" #include "zel_tracepoints.h" + #include "zer_tracepoints.h" #include "zex_tracepoints.h" #include "ze_structs_tracepoints.h" #include "zet_structs_tracepoints.h" #include "zes_structs_tracepoints.h" #include "zel_structs_tracepoints.h" + #include "zer_structs_tracepoints.h" #include "zex_structs_tracepoints.h" #include "ze_sampling.h" #include "ze_profiling.h" @@ -94,15 +96,17 @@ def gen_struct_printer(namespace, types) zet_struct_types = get_structs_types(:zet, $zet_api['typedefs'], $zet_api['structs']) zes_struct_types = get_structs_types(:zes, $zes_api['typedefs'], $zes_api['structs']) zel_struct_types = get_structs_types(:zel, $zel_api['typedefs'], $zel_api['structs']) +zer_struct_types = get_structs_types(:zer, $zer_api['typedefs'], $zer_api['structs']) zex_struct_types = get_structs_types(:zex, $zex_api['typedefs'], $zex_api['structs']) gen_struct_printer(:ze, ze_struct_types) gen_struct_printer(:zet, zet_struct_types) gen_struct_printer(:zes, zes_struct_types) gen_struct_printer(:zel, zel_struct_types) +# gen_struct_printer(:zer, zel_struct_types) # gen_struct_printer(:zex, zex_struct_types) -all_commands = $ze_commands + $zet_commands + $zes_commands + $zel_commands +all_commands = $ze_commands + $zet_commands + $zes_commands + $zel_commands + $zer_commands all_commands.each do |c| puts "#define #{ZE_POINTER_NAMES[c]} #{c.pointer_name}" end @@ -183,7 +187,7 @@ def gen_struct_printer(namespace, types) end if c.has_return_type? - puts < LTTNG_USABLE_PARAMS + + $tracepoint_lambda.call(provider, c, :start) + $tracepoint_lambda.call(provider, c, :stop) +end diff --git a/backends/ze/include/layers/zel_tracing_register_cb.h b/backends/ze/include/layers/zel_tracing_register_cb.h index f54dbed88..d76d77fd6 100644 --- a/backends/ze/include/layers/zel_tracing_register_cb.h +++ b/backends/ze/include/layers/zel_tracing_register_cb.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -27,6 +27,181 @@ typedef struct _zel_tracer_handle_t *zel_tracer_handle_t; /// Callback definitions for all API released in LevelZero spec 1.1 or newer /// Callbacks for APIs included in spec 1.0 are contained in ze_api.helper +#if !defined(__GNUC__) +#pragma region callbacks +#endif + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeInitDrivers +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_init_drivers_params_t +{ + uint32_t** ppCount; + ze_driver_handle_t** pphDrivers; + ze_init_driver_type_desc_t** pdesc; +} ze_init_drivers_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeInitDrivers +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnInitDriversCb_t)( + ze_init_drivers_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeRTASBuilderCreateExt +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_rtas_builder_create_ext_params_t +{ + ze_driver_handle_t* phDriver; + const ze_rtas_builder_ext_desc_t** ppDescriptor; + ze_rtas_builder_ext_handle_t** pphBuilder; +} ze_rtas_builder_create_ext_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeRTASBuilderCreateExt +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnRTASBuilderCreateExtCb_t)( + ze_rtas_builder_create_ext_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeRTASBuilderGetBuildPropertiesExt +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_rtas_builder_get_build_properties_ext_params_t +{ + ze_rtas_builder_ext_handle_t* phBuilder; + const ze_rtas_builder_build_op_ext_desc_t** ppBuildOpDescriptor; + ze_rtas_builder_ext_properties_t** ppProperties; +} ze_rtas_builder_get_build_properties_ext_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeRTASBuilderGetBuildPropertiesExt +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnRTASBuilderGetBuildPropertiesExtCb_t)( + ze_rtas_builder_get_build_properties_ext_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeRTASBuilderBuildExt +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_rtas_builder_build_ext_params_t +{ + ze_rtas_builder_ext_handle_t* phBuilder; + const ze_rtas_builder_build_op_ext_desc_t** ppBuildOpDescriptor; + void** ppScratchBuffer; + size_t* pscratchBufferSizeBytes; + void** ppRtasBuffer; + size_t* prtasBufferSizeBytes; + ze_rtas_parallel_operation_ext_handle_t* phParallelOperation; + void** ppBuildUserPtr; + ze_rtas_aabb_ext_t** ppBounds; + size_t** ppRtasBufferSizeBytes; +} ze_rtas_builder_build_ext_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeRTASBuilderBuildExt +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnRTASBuilderBuildExtCb_t)( + ze_rtas_builder_build_ext_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeRTASBuilderCommandListAppendCopyExt +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_rtas_builder_command_list_append_copy_ext_params_t +{ + ze_command_list_handle_t* phCommandList; + void** pdstptr; + const void** psrcptr; + size_t* psize; + ze_event_handle_t* phSignalEvent; + uint32_t* pnumWaitEvents; + ze_event_handle_t** pphWaitEvents; +} ze_rtas_builder_command_list_append_copy_ext_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeRTASBuilderCommandListAppendCopyExt +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnRTASBuilderCommandListAppendCopyExtCb_t)( + ze_rtas_builder_command_list_append_copy_ext_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeRTASBuilderDestroyExt +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_rtas_builder_destroy_ext_params_t +{ + ze_rtas_builder_ext_handle_t* phBuilder; +} ze_rtas_builder_destroy_ext_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeRTASBuilderDestroyExt +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnRTASBuilderDestroyExtCb_t)( + ze_rtas_builder_destroy_ext_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Callback function parameters for zeRTASBuilderCreateExp /// @details Each entry is a pointer to the parameter passed to the function; @@ -140,6 +315,108 @@ typedef void (ZE_APICALL *ze_pfnRTASBuilderDestroyExpCb_t)( void** ppTracerInstanceUserData ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeRTASParallelOperationCreateExt +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_rtas_parallel_operation_create_ext_params_t +{ + ze_driver_handle_t* phDriver; + ze_rtas_parallel_operation_ext_handle_t** pphParallelOperation; +} ze_rtas_parallel_operation_create_ext_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeRTASParallelOperationCreateExt +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnRTASParallelOperationCreateExtCb_t)( + ze_rtas_parallel_operation_create_ext_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeRTASParallelOperationGetPropertiesExt +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_rtas_parallel_operation_get_properties_ext_params_t +{ + ze_rtas_parallel_operation_ext_handle_t* phParallelOperation; + ze_rtas_parallel_operation_ext_properties_t** ppProperties; +} ze_rtas_parallel_operation_get_properties_ext_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeRTASParallelOperationGetPropertiesExt +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnRTASParallelOperationGetPropertiesExtCb_t)( + ze_rtas_parallel_operation_get_properties_ext_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeRTASParallelOperationJoinExt +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_rtas_parallel_operation_join_ext_params_t +{ + ze_rtas_parallel_operation_ext_handle_t* phParallelOperation; +} ze_rtas_parallel_operation_join_ext_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeRTASParallelOperationJoinExt +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnRTASParallelOperationJoinExtCb_t)( + ze_rtas_parallel_operation_join_ext_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeRTASParallelOperationDestroyExt +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_rtas_parallel_operation_destroy_ext_params_t +{ + ze_rtas_parallel_operation_ext_handle_t* phParallelOperation; +} ze_rtas_parallel_operation_destroy_ext_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeRTASParallelOperationDestroyExt +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnRTASParallelOperationDestroyExtCb_t)( + ze_rtas_parallel_operation_destroy_ext_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Callback function parameters for zeRTASParallelOperationCreateExp /// @details Each entry is a pointer to the parameter passed to the function; @@ -269,6 +546,58 @@ typedef void (ZE_APICALL *ze_pfnDriverGetExtensionFunctionAddressCb_t)( void** ppTracerInstanceUserData ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeDriverRTASFormatCompatibilityCheckExt +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_driver_rtas_format_compatibility_check_ext_params_t +{ + ze_driver_handle_t* phDriver; + ze_rtas_format_ext_t* prtasFormatA; + ze_rtas_format_ext_t* prtasFormatB; +} ze_driver_rtas_format_compatibility_check_ext_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeDriverRTASFormatCompatibilityCheckExt +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnDriverRTASFormatCompatibilityCheckExtCb_t)( + ze_driver_rtas_format_compatibility_check_ext_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeDriverGetDefaultContext +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_driver_get_default_context_params_t +{ + ze_driver_handle_t* phDriver; +} ze_driver_get_default_context_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeDriverGetDefaultContext +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnDriverGetDefaultContextCb_t)( + ze_driver_get_default_context_params_t* params, + ze_context_handle_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Callback function parameters for zeDriverGetLastErrorDescription /// @details Each entry is a pointer to the parameter passed to the function; @@ -336,228 +665,541 @@ typedef struct _ze_device_get_global_timestamps_params_t /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeDeviceGetGlobalTimestamps +/// @brief Callback function-pointer for zeDeviceGetGlobalTimestamps +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnDeviceGetGlobalTimestampsCb_t)( + ze_device_get_global_timestamps_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeDeviceImportExternalSemaphoreExt +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_device_import_external_semaphore_ext_params_t +{ + ze_device_handle_t* phDevice; + const ze_external_semaphore_ext_desc_t** pdesc; + ze_external_semaphore_ext_handle_t** pphSemaphore; +} ze_device_import_external_semaphore_ext_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeDeviceImportExternalSemaphoreExt +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnDeviceImportExternalSemaphoreExtCb_t)( + ze_device_import_external_semaphore_ext_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeDeviceReleaseExternalSemaphoreExt +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_device_release_external_semaphore_ext_params_t +{ + ze_external_semaphore_ext_handle_t* phSemaphore; +} ze_device_release_external_semaphore_ext_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeDeviceReleaseExternalSemaphoreExt +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnDeviceReleaseExternalSemaphoreExtCb_t)( + ze_device_release_external_semaphore_ext_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeDeviceGetVectorWidthPropertiesExt +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_device_get_vector_width_properties_ext_params_t +{ + ze_device_handle_t* phDevice; + uint32_t** ppCount; + ze_device_vector_width_properties_ext_t** ppVectorWidthProperties; +} ze_device_get_vector_width_properties_ext_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeDeviceGetVectorWidthPropertiesExt +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnDeviceGetVectorWidthPropertiesExtCb_t)( + ze_device_get_vector_width_properties_ext_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeDeviceSynchronize +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_device_synchronize_params_t +{ + ze_device_handle_t* phDevice; +} ze_device_synchronize_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeDeviceSynchronize +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnDeviceSynchronizeCb_t)( + ze_device_synchronize_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeDeviceGetAggregatedCopyOffloadIncrementValue +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_device_get_aggregated_copy_offload_increment_value_params_t +{ + ze_device_handle_t* phDevice; + uint32_t** pincrementValue; +} ze_device_get_aggregated_copy_offload_increment_value_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeDeviceGetAggregatedCopyOffloadIncrementValue +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnDeviceGetAggregatedCopyOffloadIncrementValueCb_t)( + ze_device_get_aggregated_copy_offload_increment_value_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeDeviceReserveCacheExt +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_device_reserve_cache_ext_params_t +{ + ze_device_handle_t* phDevice; + size_t* pcacheLevel; + size_t* pcacheReservationSize; +} ze_device_reserve_cache_ext_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeDeviceReserveCacheExt +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnDeviceReserveCacheExtCb_t)( + ze_device_reserve_cache_ext_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeDeviceSetCacheAdviceExt +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_device_set_cache_advice_ext_params_t +{ + ze_device_handle_t* phDevice; + void** pptr; + size_t* pregionSize; + ze_cache_ext_region_t* pcacheRegion; +} ze_device_set_cache_advice_ext_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeDeviceSetCacheAdviceExt +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnDeviceSetCacheAdviceExtCb_t)( + ze_device_set_cache_advice_ext_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeDevicePciGetPropertiesExt +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_device_pci_get_properties_ext_params_t +{ + ze_device_handle_t* phDevice; + ze_pci_ext_properties_t** ppPciProperties; +} ze_device_pci_get_properties_ext_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeDevicePciGetPropertiesExt +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnDevicePciGetPropertiesExtCb_t)( + ze_device_pci_get_properties_ext_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeDeviceGetFabricVertexExp +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_device_get_fabric_vertex_exp_params_t +{ + ze_device_handle_t* phDevice; + ze_fabric_vertex_handle_t** pphVertex; +} ze_device_get_fabric_vertex_exp_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeDeviceGetFabricVertexExp +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnDeviceGetFabricVertexExpCb_t)( + ze_device_get_fabric_vertex_exp_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeDeviceGetRootDevice +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_device_get_root_device_params_t +{ + ze_device_handle_t* phDevice; + ze_device_handle_t** pphRootDevice; +} ze_device_get_root_device_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeDeviceGetRootDevice +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnDeviceGetRootDeviceCb_t)( + ze_device_get_root_device_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeContextCreateEx +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_context_create_ex_params_t +{ + ze_driver_handle_t* phDriver; + const ze_context_desc_t** pdesc; + uint32_t* pnumDevices; + ze_device_handle_t** pphDevices; + ze_context_handle_t** pphContext; +} ze_context_create_ex_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeContextCreateEx /// @param[in] params Parameters passed to this instance /// @param[in] result Return value /// @param[in] pTracerUserData Per-Tracer user data /// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data -typedef void (ZE_APICALL *ze_pfnDeviceGetGlobalTimestampsCb_t)( - ze_device_get_global_timestamps_params_t* params, +typedef void (ZE_APICALL *ze_pfnContextCreateExCb_t)( + ze_context_create_ex_params_t* params, ze_result_t result, void* pTracerUserData, void** ppTracerInstanceUserData ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeDeviceReserveCacheExt +/// @brief Callback function parameters for zeCommandQueueGetOrdinal /// @details Each entry is a pointer to the parameter passed to the function; /// allowing the callback the ability to modify the parameter's value -typedef struct _ze_device_reserve_cache_ext_params_t +typedef struct _ze_command_queue_get_ordinal_params_t { - ze_device_handle_t* phDevice; - size_t* pcacheLevel; - size_t* pcacheReservationSize; -} ze_device_reserve_cache_ext_params_t; + ze_command_queue_handle_t* phCommandQueue; + uint32_t** ppOrdinal; +} ze_command_queue_get_ordinal_params_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeDeviceReserveCacheExt +/// @brief Callback function-pointer for zeCommandQueueGetOrdinal /// @param[in] params Parameters passed to this instance /// @param[in] result Return value /// @param[in] pTracerUserData Per-Tracer user data /// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data -typedef void (ZE_APICALL *ze_pfnDeviceReserveCacheExtCb_t)( - ze_device_reserve_cache_ext_params_t* params, +typedef void (ZE_APICALL *ze_pfnCommandQueueGetOrdinalCb_t)( + ze_command_queue_get_ordinal_params_t* params, ze_result_t result, void* pTracerUserData, void** ppTracerInstanceUserData ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeDeviceSetCacheAdviceExt +/// @brief Callback function parameters for zeCommandQueueGetIndex /// @details Each entry is a pointer to the parameter passed to the function; /// allowing the callback the ability to modify the parameter's value -typedef struct _ze_device_set_cache_advice_ext_params_t +typedef struct _ze_command_queue_get_index_params_t { - ze_device_handle_t* phDevice; - void** pptr; - size_t* pregionSize; - ze_cache_ext_region_t* pcacheRegion; -} ze_device_set_cache_advice_ext_params_t; + ze_command_queue_handle_t* phCommandQueue; + uint32_t** ppIndex; +} ze_command_queue_get_index_params_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeDeviceSetCacheAdviceExt +/// @brief Callback function-pointer for zeCommandQueueGetIndex /// @param[in] params Parameters passed to this instance /// @param[in] result Return value /// @param[in] pTracerUserData Per-Tracer user data /// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data -typedef void (ZE_APICALL *ze_pfnDeviceSetCacheAdviceExtCb_t)( - ze_device_set_cache_advice_ext_params_t* params, +typedef void (ZE_APICALL *ze_pfnCommandQueueGetIndexCb_t)( + ze_command_queue_get_index_params_t* params, ze_result_t result, void* pTracerUserData, void** ppTracerInstanceUserData ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeDevicePciGetPropertiesExt +/// @brief Callback function parameters for zeCommandListGetNextCommandIdWithKernelsExp /// @details Each entry is a pointer to the parameter passed to the function; /// allowing the callback the ability to modify the parameter's value -typedef struct _ze_device_pci_get_properties_ext_params_t +typedef struct _ze_command_list_get_next_command_id_with_kernels_exp_params_t { - ze_device_handle_t* phDevice; - ze_pci_ext_properties_t** ppPciProperties; -} ze_device_pci_get_properties_ext_params_t; + ze_command_list_handle_t* phCommandList; + const ze_mutable_command_id_exp_desc_t** pdesc; + uint32_t* pnumKernels; + ze_kernel_handle_t** pphKernels; + uint64_t** ppCommandId; +} ze_command_list_get_next_command_id_with_kernels_exp_params_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeDevicePciGetPropertiesExt +/// @brief Callback function-pointer for zeCommandListGetNextCommandIdWithKernelsExp /// @param[in] params Parameters passed to this instance /// @param[in] result Return value /// @param[in] pTracerUserData Per-Tracer user data /// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data -typedef void (ZE_APICALL *ze_pfnDevicePciGetPropertiesExtCb_t)( - ze_device_pci_get_properties_ext_params_t* params, +typedef void (ZE_APICALL *ze_pfnCommandListGetNextCommandIdWithKernelsExpCb_t)( + ze_command_list_get_next_command_id_with_kernels_exp_params_t* params, ze_result_t result, void* pTracerUserData, void** ppTracerInstanceUserData ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeDeviceGetFabricVertexExp +/// @brief Callback function parameters for zeCommandListUpdateMutableCommandKernelsExp /// @details Each entry is a pointer to the parameter passed to the function; /// allowing the callback the ability to modify the parameter's value -typedef struct _ze_device_get_fabric_vertex_exp_params_t +typedef struct _ze_command_list_update_mutable_command_kernels_exp_params_t { - ze_device_handle_t* phDevice; - ze_fabric_vertex_handle_t** pphVertex; -} ze_device_get_fabric_vertex_exp_params_t; + ze_command_list_handle_t* phCommandList; + uint32_t* pnumKernels; + uint64_t** ppCommandId; + ze_kernel_handle_t** pphKernels; +} ze_command_list_update_mutable_command_kernels_exp_params_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeDeviceGetFabricVertexExp +/// @brief Callback function-pointer for zeCommandListUpdateMutableCommandKernelsExp /// @param[in] params Parameters passed to this instance /// @param[in] result Return value /// @param[in] pTracerUserData Per-Tracer user data /// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data -typedef void (ZE_APICALL *ze_pfnDeviceGetFabricVertexExpCb_t)( - ze_device_get_fabric_vertex_exp_params_t* params, +typedef void (ZE_APICALL *ze_pfnCommandListUpdateMutableCommandKernelsExpCb_t)( + ze_command_list_update_mutable_command_kernels_exp_params_t* params, ze_result_t result, void* pTracerUserData, void** ppTracerInstanceUserData ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeDeviceGetRootDevice +/// @brief Callback function parameters for zeCommandListAppendSignalExternalSemaphoreExt /// @details Each entry is a pointer to the parameter passed to the function; /// allowing the callback the ability to modify the parameter's value -typedef struct _ze_device_get_root_device_params_t +typedef struct _ze_command_list_append_signal_external_semaphore_ext_params_t { - ze_device_handle_t* phDevice; - ze_device_handle_t** pphRootDevice; -} ze_device_get_root_device_params_t; + ze_command_list_handle_t* phCommandList; + uint32_t* pnumSemaphores; + ze_external_semaphore_ext_handle_t** pphSemaphores; + ze_external_semaphore_signal_params_ext_t** psignalParams; + ze_event_handle_t* phSignalEvent; + uint32_t* pnumWaitEvents; + ze_event_handle_t** pphWaitEvents; +} ze_command_list_append_signal_external_semaphore_ext_params_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeDeviceGetRootDevice +/// @brief Callback function-pointer for zeCommandListAppendSignalExternalSemaphoreExt /// @param[in] params Parameters passed to this instance /// @param[in] result Return value /// @param[in] pTracerUserData Per-Tracer user data /// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data -typedef void (ZE_APICALL *ze_pfnDeviceGetRootDeviceCb_t)( - ze_device_get_root_device_params_t* params, +typedef void (ZE_APICALL *ze_pfnCommandListAppendSignalExternalSemaphoreExtCb_t)( + ze_command_list_append_signal_external_semaphore_ext_params_t* params, ze_result_t result, void* pTracerUserData, void** ppTracerInstanceUserData ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeContextCreateEx +/// @brief Callback function parameters for zeCommandListAppendWaitExternalSemaphoreExt /// @details Each entry is a pointer to the parameter passed to the function; /// allowing the callback the ability to modify the parameter's value -typedef struct _ze_context_create_ex_params_t +typedef struct _ze_command_list_append_wait_external_semaphore_ext_params_t { - ze_driver_handle_t* phDriver; - const ze_context_desc_t** pdesc; - uint32_t* pnumDevices; - ze_device_handle_t** pphDevices; - ze_context_handle_t** pphContext; -} ze_context_create_ex_params_t; + ze_command_list_handle_t* phCommandList; + uint32_t* pnumSemaphores; + ze_external_semaphore_ext_handle_t** pphSemaphores; + ze_external_semaphore_wait_params_ext_t** pwaitParams; + ze_event_handle_t* phSignalEvent; + uint32_t* pnumWaitEvents; + ze_event_handle_t** pphWaitEvents; +} ze_command_list_append_wait_external_semaphore_ext_params_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeContextCreateEx +/// @brief Callback function-pointer for zeCommandListAppendWaitExternalSemaphoreExt /// @param[in] params Parameters passed to this instance /// @param[in] result Return value /// @param[in] pTracerUserData Per-Tracer user data /// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data -typedef void (ZE_APICALL *ze_pfnContextCreateExCb_t)( - ze_context_create_ex_params_t* params, +typedef void (ZE_APICALL *ze_pfnCommandListAppendWaitExternalSemaphoreExtCb_t)( + ze_command_list_append_wait_external_semaphore_ext_params_t* params, ze_result_t result, void* pTracerUserData, void** ppTracerInstanceUserData ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeCommandQueueGetOrdinal +/// @brief Callback function parameters for zeCommandListAppendLaunchKernelWithParameters /// @details Each entry is a pointer to the parameter passed to the function; /// allowing the callback the ability to modify the parameter's value -typedef struct _ze_command_queue_get_ordinal_params_t +typedef struct _ze_command_list_append_launch_kernel_with_parameters_params_t { - ze_command_queue_handle_t* phCommandQueue; - uint32_t** ppOrdinal; -} ze_command_queue_get_ordinal_params_t; + ze_command_list_handle_t* phCommandList; + ze_kernel_handle_t* phKernel; + const ze_group_count_t** ppGroupCounts; + const void ** ppNext; + ze_event_handle_t* phSignalEvent; + uint32_t* pnumWaitEvents; + ze_event_handle_t** pphWaitEvents; +} ze_command_list_append_launch_kernel_with_parameters_params_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeCommandQueueGetOrdinal +/// @brief Callback function-pointer for zeCommandListAppendLaunchKernelWithParameters /// @param[in] params Parameters passed to this instance /// @param[in] result Return value /// @param[in] pTracerUserData Per-Tracer user data /// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data -typedef void (ZE_APICALL *ze_pfnCommandQueueGetOrdinalCb_t)( - ze_command_queue_get_ordinal_params_t* params, +typedef void (ZE_APICALL *ze_pfnCommandListAppendLaunchKernelWithParametersCb_t)( + ze_command_list_append_launch_kernel_with_parameters_params_t* params, ze_result_t result, void* pTracerUserData, void** ppTracerInstanceUserData ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeCommandQueueGetIndex +/// @brief Callback function parameters for zeCommandListAppendLaunchKernelWithArguments /// @details Each entry is a pointer to the parameter passed to the function; /// allowing the callback the ability to modify the parameter's value -typedef struct _ze_command_queue_get_index_params_t +typedef struct _ze_command_list_append_launch_kernel_with_arguments_params_t { - ze_command_queue_handle_t* phCommandQueue; - uint32_t** ppIndex; -} ze_command_queue_get_index_params_t; + ze_command_list_handle_t* phCommandList; + ze_kernel_handle_t* phKernel; + const ze_group_count_t* pgroupCounts; + const ze_group_size_t* pgroupSizes; + void *** ppArguments; + const void ** ppNext; + ze_event_handle_t* phSignalEvent; + uint32_t* pnumWaitEvents; + ze_event_handle_t** pphWaitEvents; +} ze_command_list_append_launch_kernel_with_arguments_params_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeCommandQueueGetIndex +/// @brief Callback function-pointer for zeCommandListAppendLaunchKernelWithArguments /// @param[in] params Parameters passed to this instance /// @param[in] result Return value /// @param[in] pTracerUserData Per-Tracer user data /// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data -typedef void (ZE_APICALL *ze_pfnCommandQueueGetIndexCb_t)( - ze_command_queue_get_index_params_t* params, +typedef void (ZE_APICALL *ze_pfnCommandListAppendLaunchKernelWithArgumentsCb_t)( + ze_command_list_append_launch_kernel_with_arguments_params_t* params, ze_result_t result, void* pTracerUserData, void** ppTracerInstanceUserData @@ -786,164 +1428,297 @@ typedef void (ZE_APICALL *ze_pfnCommandListImmediateGetIndexCb_t)( ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeCommandListIsImmediate +/// @brief Callback function parameters for zeCommandListIsImmediate +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_command_list_is_immediate_params_t +{ + ze_command_list_handle_t* phCommandList; + ze_bool_t** ppIsImmediate; +} ze_command_list_is_immediate_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeCommandListIsImmediate +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnCommandListIsImmediateCb_t)( + ze_command_list_is_immediate_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeCommandListImmediateAppendCommandListsExp +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_command_list_immediate_append_command_lists_exp_params_t +{ + ze_command_list_handle_t* phCommandListImmediate; + uint32_t* pnumCommandLists; + ze_command_list_handle_t** pphCommandLists; + ze_event_handle_t* phSignalEvent; + uint32_t* pnumWaitEvents; + ze_event_handle_t** pphWaitEvents; +} ze_command_list_immediate_append_command_lists_exp_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeCommandListImmediateAppendCommandListsExp +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnCommandListImmediateAppendCommandListsExpCb_t)( + ze_command_list_immediate_append_command_lists_exp_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeCommandListGetNextCommandIdExp +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_command_list_get_next_command_id_exp_params_t +{ + ze_command_list_handle_t* phCommandList; + const ze_mutable_command_id_exp_desc_t** pdesc; + uint64_t** ppCommandId; +} ze_command_list_get_next_command_id_exp_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeCommandListGetNextCommandIdExp +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnCommandListGetNextCommandIdExpCb_t)( + ze_command_list_get_next_command_id_exp_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeCommandListUpdateMutableCommandsExp +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_command_list_update_mutable_commands_exp_params_t +{ + ze_command_list_handle_t* phCommandList; + const ze_mutable_commands_exp_desc_t** pdesc; +} ze_command_list_update_mutable_commands_exp_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeCommandListUpdateMutableCommandsExp +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnCommandListUpdateMutableCommandsExpCb_t)( + ze_command_list_update_mutable_commands_exp_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeCommandListUpdateMutableCommandSignalEventExp +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_command_list_update_mutable_command_signal_event_exp_params_t +{ + ze_command_list_handle_t* phCommandList; + uint64_t* pcommandId; + ze_event_handle_t* phSignalEvent; +} ze_command_list_update_mutable_command_signal_event_exp_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeCommandListUpdateMutableCommandSignalEventExp +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnCommandListUpdateMutableCommandSignalEventExpCb_t)( + ze_command_list_update_mutable_command_signal_event_exp_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeCommandListUpdateMutableCommandWaitEventsExp /// @details Each entry is a pointer to the parameter passed to the function; /// allowing the callback the ability to modify the parameter's value -typedef struct _ze_command_list_is_immediate_params_t +typedef struct _ze_command_list_update_mutable_command_wait_events_exp_params_t { ze_command_list_handle_t* phCommandList; - ze_bool_t** ppIsImmediate; -} ze_command_list_is_immediate_params_t; + uint64_t* pcommandId; + uint32_t* pnumWaitEvents; + ze_event_handle_t** pphWaitEvents; +} ze_command_list_update_mutable_command_wait_events_exp_params_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeCommandListIsImmediate +/// @brief Callback function-pointer for zeCommandListUpdateMutableCommandWaitEventsExp /// @param[in] params Parameters passed to this instance /// @param[in] result Return value /// @param[in] pTracerUserData Per-Tracer user data /// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data -typedef void (ZE_APICALL *ze_pfnCommandListIsImmediateCb_t)( - ze_command_list_is_immediate_params_t* params, +typedef void (ZE_APICALL *ze_pfnCommandListUpdateMutableCommandWaitEventsExpCb_t)( + ze_command_list_update_mutable_command_wait_events_exp_params_t* params, ze_result_t result, void* pTracerUserData, void** ppTracerInstanceUserData ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeCommandListImmediateAppendCommandListsExp +/// @brief Callback function parameters for zeEventCounterBasedCreate /// @details Each entry is a pointer to the parameter passed to the function; /// allowing the callback the ability to modify the parameter's value -typedef struct _ze_command_list_immediate_append_command_lists_exp_params_t +typedef struct _ze_event_counter_based_create_params_t { - ze_command_list_handle_t* phCommandListImmediate; - uint32_t* pnumCommandLists; - ze_command_list_handle_t** pphCommandLists; - ze_event_handle_t* phSignalEvent; - uint32_t* pnumWaitEvents; - ze_event_handle_t** pphWaitEvents; -} ze_command_list_immediate_append_command_lists_exp_params_t; + ze_context_handle_t* phContext; + ze_device_handle_t* phDevice; + const ze_event_counter_based_desc_t** pdesc; + ze_event_handle_t** pphEvent; +} ze_event_counter_based_create_params_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeCommandListImmediateAppendCommandListsExp +/// @brief Callback function-pointer for zeEventCounterBasedCreate /// @param[in] params Parameters passed to this instance /// @param[in] result Return value /// @param[in] pTracerUserData Per-Tracer user data /// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data -typedef void (ZE_APICALL *ze_pfnCommandListImmediateAppendCommandListsExpCb_t)( - ze_command_list_immediate_append_command_lists_exp_params_t* params, +typedef void (ZE_APICALL *ze_pfnEventCounterBasedCreateCb_t)( + ze_event_counter_based_create_params_t* params, ze_result_t result, void* pTracerUserData, void** ppTracerInstanceUserData ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeCommandListGetNextCommandIdExp +/// @brief Callback function parameters for zeEventCounterBasedGetIpcHandle /// @details Each entry is a pointer to the parameter passed to the function; /// allowing the callback the ability to modify the parameter's value -typedef struct _ze_command_list_get_next_command_id_exp_params_t +typedef struct _ze_event_counter_based_get_ipc_handle_params_t { - ze_command_list_handle_t* phCommandList; - const ze_mutable_command_id_exp_desc_t** pdesc; - uint64_t** ppCommandId; -} ze_command_list_get_next_command_id_exp_params_t; + ze_event_handle_t* phEvent; + ze_ipc_event_counter_based_handle_t** pphIpc; +} ze_event_counter_based_get_ipc_handle_params_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeCommandListGetNextCommandIdExp +/// @brief Callback function-pointer for zeEventCounterBasedGetIpcHandle /// @param[in] params Parameters passed to this instance /// @param[in] result Return value /// @param[in] pTracerUserData Per-Tracer user data /// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data -typedef void (ZE_APICALL *ze_pfnCommandListGetNextCommandIdExpCb_t)( - ze_command_list_get_next_command_id_exp_params_t* params, +typedef void (ZE_APICALL *ze_pfnEventCounterBasedGetIpcHandleCb_t)( + ze_event_counter_based_get_ipc_handle_params_t* params, ze_result_t result, void* pTracerUserData, void** ppTracerInstanceUserData ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeCommandListUpdateMutableCommandsExp +/// @brief Callback function parameters for zeEventCounterBasedOpenIpcHandle /// @details Each entry is a pointer to the parameter passed to the function; /// allowing the callback the ability to modify the parameter's value -typedef struct _ze_command_list_update_mutable_commands_exp_params_t +typedef struct _ze_event_counter_based_open_ipc_handle_params_t { - ze_command_list_handle_t* phCommandList; - const ze_mutable_commands_exp_desc_t** pdesc; -} ze_command_list_update_mutable_commands_exp_params_t; + ze_context_handle_t* phContext; + ze_ipc_event_counter_based_handle_t* phIpc; + ze_event_handle_t** pphEvent; +} ze_event_counter_based_open_ipc_handle_params_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeCommandListUpdateMutableCommandsExp +/// @brief Callback function-pointer for zeEventCounterBasedOpenIpcHandle /// @param[in] params Parameters passed to this instance /// @param[in] result Return value /// @param[in] pTracerUserData Per-Tracer user data /// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data -typedef void (ZE_APICALL *ze_pfnCommandListUpdateMutableCommandsExpCb_t)( - ze_command_list_update_mutable_commands_exp_params_t* params, +typedef void (ZE_APICALL *ze_pfnEventCounterBasedOpenIpcHandleCb_t)( + ze_event_counter_based_open_ipc_handle_params_t* params, ze_result_t result, void* pTracerUserData, void** ppTracerInstanceUserData ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeCommandListUpdateMutableCommandSignalEventExp +/// @brief Callback function parameters for zeEventCounterBasedCloseIpcHandle /// @details Each entry is a pointer to the parameter passed to the function; /// allowing the callback the ability to modify the parameter's value -typedef struct _ze_command_list_update_mutable_command_signal_event_exp_params_t +typedef struct _ze_event_counter_based_close_ipc_handle_params_t { - ze_command_list_handle_t* phCommandList; - uint64_t* pcommandId; - ze_event_handle_t* phSignalEvent; -} ze_command_list_update_mutable_command_signal_event_exp_params_t; + ze_event_handle_t* phEvent; +} ze_event_counter_based_close_ipc_handle_params_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeCommandListUpdateMutableCommandSignalEventExp +/// @brief Callback function-pointer for zeEventCounterBasedCloseIpcHandle /// @param[in] params Parameters passed to this instance /// @param[in] result Return value /// @param[in] pTracerUserData Per-Tracer user data /// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data -typedef void (ZE_APICALL *ze_pfnCommandListUpdateMutableCommandSignalEventExpCb_t)( - ze_command_list_update_mutable_command_signal_event_exp_params_t* params, +typedef void (ZE_APICALL *ze_pfnEventCounterBasedCloseIpcHandleCb_t)( + ze_event_counter_based_close_ipc_handle_params_t* params, ze_result_t result, void* pTracerUserData, void** ppTracerInstanceUserData ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeCommandListUpdateMutableCommandWaitEventsExp +/// @brief Callback function parameters for zeEventCounterBasedGetDeviceAddress /// @details Each entry is a pointer to the parameter passed to the function; /// allowing the callback the ability to modify the parameter's value -typedef struct _ze_command_list_update_mutable_command_wait_events_exp_params_t +typedef struct _ze_event_counter_based_get_device_address_params_t { - ze_command_list_handle_t* phCommandList; - uint64_t* pcommandId; - uint32_t* pnumWaitEvents; - ze_event_handle_t** pphWaitEvents; -} ze_command_list_update_mutable_command_wait_events_exp_params_t; + ze_event_handle_t* phEvent; + uint64_t** pcompletionValue; + uint64_t** pdeviceAddress; +} ze_event_counter_based_get_device_address_params_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeCommandListUpdateMutableCommandWaitEventsExp +/// @brief Callback function-pointer for zeEventCounterBasedGetDeviceAddress /// @param[in] params Parameters passed to this instance /// @param[in] result Return value /// @param[in] pTracerUserData Per-Tracer user data /// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data -typedef void (ZE_APICALL *ze_pfnCommandListUpdateMutableCommandWaitEventsExpCb_t)( - ze_command_list_update_mutable_command_wait_events_exp_params_t* params, +typedef void (ZE_APICALL *ze_pfnEventCounterBasedGetDeviceAddressCb_t)( + ze_event_counter_based_get_device_address_params_t* params, ze_result_t result, void* pTracerUserData, void** ppTracerInstanceUserData @@ -1326,6 +2101,60 @@ typedef void (ZE_APICALL *ze_pfnKernelSetGlobalOffsetExpCb_t)( void** ppTracerInstanceUserData ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeKernelGetBinaryExp +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_kernel_get_binary_exp_params_t +{ + ze_kernel_handle_t* phKernel; + size_t** ppSize; + uint8_t** ppKernelBinary; +} ze_kernel_get_binary_exp_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeKernelGetBinaryExp +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnKernelGetBinaryExpCb_t)( + ze_kernel_get_binary_exp_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeKernelGetAllocationPropertiesExp +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_kernel_get_allocation_properties_exp_params_t +{ + ze_kernel_handle_t* phKernel; + uint32_t** ppCount; + ze_kernel_allocation_exp_properties_t** ppAllocationProperties; +} ze_kernel_get_allocation_properties_exp_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeKernelGetAllocationPropertiesExp +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnKernelGetAllocationPropertiesExpCb_t)( + ze_kernel_get_allocation_properties_exp_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Callback function parameters for zeKernelSchedulingHintExp /// @details Each entry is a pointer to the parameter passed to the function; @@ -1352,6 +2181,34 @@ typedef void (ZE_APICALL *ze_pfnKernelSchedulingHintExpCb_t)( void** ppTracerInstanceUserData ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeMemGetIpcHandleWithProperties +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_mem_get_ipc_handle_with_properties_params_t +{ + ze_context_handle_t* phContext; + const void** pptr; + void** ppNext; + ze_ipc_mem_handle_t** ppIpcHandle; +} ze_mem_get_ipc_handle_with_properties_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeMemGetIpcHandleWithProperties +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnMemGetIpcHandleWithPropertiesCb_t)( + ze_mem_get_ipc_handle_with_properties_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Callback function parameters for zeMemFreeExt /// @details Each entry is a pointer to the parameter passed to the function; @@ -1575,6 +2432,33 @@ typedef void (ZE_APICALL *ze_pfnModuleInspectLinkageExtCb_t)( void** ppTracerInstanceUserData ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zePhysicalMemGetProperties +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_physical_mem_get_properties_params_t +{ + ze_context_handle_t* phContext; + ze_physical_mem_handle_t* phPhysicalMem; + ze_physical_mem_properties_t** ppMemProperties; +} ze_physical_mem_get_properties_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zePhysicalMemGetProperties +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnPhysicalMemGetPropertiesCb_t)( + ze_physical_mem_get_properties_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Callback function parameters for zeFabricEdgeGetExp /// @details Each entry is a pointer to the parameter passed to the function; @@ -1663,105 +2547,207 @@ typedef void (ZE_APICALL *ze_pfnFabricEdgeGetPropertiesExpCb_t)( typedef struct _ze_fabric_vertex_get_exp_params_t { - ze_driver_handle_t* phDriver; - uint32_t** ppCount; - ze_fabric_vertex_handle_t** pphVertices; -} ze_fabric_vertex_get_exp_params_t; + ze_driver_handle_t* phDriver; + uint32_t** ppCount; + ze_fabric_vertex_handle_t** pphVertices; +} ze_fabric_vertex_get_exp_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeFabricVertexGetExp +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnFabricVertexGetExpCb_t)( + ze_fabric_vertex_get_exp_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeFabricVertexGetSubVerticesExp +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_fabric_vertex_get_sub_vertices_exp_params_t +{ + ze_fabric_vertex_handle_t* phVertex; + uint32_t** ppCount; + ze_fabric_vertex_handle_t** pphSubvertices; +} ze_fabric_vertex_get_sub_vertices_exp_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeFabricVertexGetSubVerticesExp +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnFabricVertexGetSubVerticesExpCb_t)( + ze_fabric_vertex_get_sub_vertices_exp_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeFabricVertexGetPropertiesExp +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_fabric_vertex_get_properties_exp_params_t +{ + ze_fabric_vertex_handle_t* phVertex; + ze_fabric_vertex_exp_properties_t** ppVertexProperties; +} ze_fabric_vertex_get_properties_exp_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeFabricVertexGetPropertiesExp +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnFabricVertexGetPropertiesExpCb_t)( + ze_fabric_vertex_get_properties_exp_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zeFabricVertexGetDeviceExp +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _ze_fabric_vertex_get_device_exp_params_t +{ + ze_fabric_vertex_handle_t* phVertex; + ze_device_handle_t** pphDevice; +} ze_fabric_vertex_get_device_exp_params_t; + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function-pointer for zeFabricVertexGetDeviceExp +/// @param[in] params Parameters passed to this instance +/// @param[in] result Return value +/// @param[in] pTracerUserData Per-Tracer user data +/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data + +typedef void (ZE_APICALL *ze_pfnFabricVertexGetDeviceExpCb_t)( + ze_fabric_vertex_get_device_exp_params_t* params, + ze_result_t result, + void* pTracerUserData, + void** ppTracerInstanceUserData + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function parameters for zerGetLastErrorDescription +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value + +typedef struct _zer_get_last_error_description_params_t +{ + const char*** pppString; +} zer_get_last_error_description_params_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeFabricVertexGetExp +/// @brief Callback function-pointer for zerGetLastErrorDescription /// @param[in] params Parameters passed to this instance /// @param[in] result Return value /// @param[in] pTracerUserData Per-Tracer user data /// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data -typedef void (ZE_APICALL *ze_pfnFabricVertexGetExpCb_t)( - ze_fabric_vertex_get_exp_params_t* params, +typedef void (ZE_APICALL *zer_pfnGetLastErrorDescriptionCb_t)( + zer_get_last_error_description_params_t* params, ze_result_t result, void* pTracerUserData, void** ppTracerInstanceUserData ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeFabricVertexGetSubVerticesExp +/// @brief Callback function parameters for zerTranslateDeviceHandleToIdentifier /// @details Each entry is a pointer to the parameter passed to the function; /// allowing the callback the ability to modify the parameter's value -typedef struct _ze_fabric_vertex_get_sub_vertices_exp_params_t +typedef struct _zer_translate_device_handle_to_identifier_params_t { - ze_fabric_vertex_handle_t* phVertex; - uint32_t** ppCount; - ze_fabric_vertex_handle_t** pphSubvertices; -} ze_fabric_vertex_get_sub_vertices_exp_params_t; + ze_device_handle_t* phDevice; +} zer_translate_device_handle_to_identifier_params_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeFabricVertexGetSubVerticesExp +/// @brief Callback function-pointer for zerTranslateDeviceHandleToIdentifier /// @param[in] params Parameters passed to this instance /// @param[in] result Return value /// @param[in] pTracerUserData Per-Tracer user data /// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data -typedef void (ZE_APICALL *ze_pfnFabricVertexGetSubVerticesExpCb_t)( - ze_fabric_vertex_get_sub_vertices_exp_params_t* params, - ze_result_t result, +typedef void (ZE_APICALL *zer_pfnTranslateDeviceHandleToIdentifierCb_t)( + zer_translate_device_handle_to_identifier_params_t* params, + uint32_t result, void* pTracerUserData, void** ppTracerInstanceUserData ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeFabricVertexGetPropertiesExp +/// @brief Callback function parameters for zerTranslateIdentifierToDeviceHandle /// @details Each entry is a pointer to the parameter passed to the function; /// allowing the callback the ability to modify the parameter's value -typedef struct _ze_fabric_vertex_get_properties_exp_params_t +typedef struct _zer_translate_identifier_to_device_handle_params_t { - ze_fabric_vertex_handle_t* phVertex; - ze_fabric_vertex_exp_properties_t** ppVertexProperties; -} ze_fabric_vertex_get_properties_exp_params_t; + uint32_t* pidentifier; +} zer_translate_identifier_to_device_handle_params_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeFabricVertexGetPropertiesExp +/// @brief Callback function-pointer for zerTranslateIdentifierToDeviceHandle /// @param[in] params Parameters passed to this instance /// @param[in] result Return value /// @param[in] pTracerUserData Per-Tracer user data /// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data -typedef void (ZE_APICALL *ze_pfnFabricVertexGetPropertiesExpCb_t)( - ze_fabric_vertex_get_properties_exp_params_t* params, - ze_result_t result, +typedef void (ZE_APICALL *zer_pfnTranslateIdentifierToDeviceHandleCb_t)( + zer_translate_identifier_to_device_handle_params_t* params, + ze_device_handle_t result, void* pTracerUserData, void** ppTracerInstanceUserData ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeFabricVertexGetDeviceExp +/// @brief Callback function parameters for zerGetDefaultContext /// @details Each entry is a pointer to the parameter passed to the function; /// allowing the callback the ability to modify the parameter's value -typedef struct _ze_fabric_vertex_get_device_exp_params_t +typedef struct _zer_get_default_context_params_t { - ze_fabric_vertex_handle_t* phVertex; - ze_device_handle_t** pphDevice; -} ze_fabric_vertex_get_device_exp_params_t; +} zer_get_default_context_params_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeFabricVertexGetDeviceExp +/// @brief Callback function-pointer for zerGetDefaultContext /// @param[in] params Parameters passed to this instance /// @param[in] result Return value /// @param[in] pTracerUserData Per-Tracer user data /// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data -typedef void (ZE_APICALL *ze_pfnFabricVertexGetDeviceExpCb_t)( - ze_fabric_vertex_get_device_exp_params_t* params, - ze_result_t result, +typedef void (ZE_APICALL *zer_pfnGetDefaultContextCb_t)( + zer_get_default_context_params_t* params, + ze_context_handle_t result, void* pTracerUserData, void** ppTracerInstanceUserData ); +#if !defined(__GNUC__) +#pragma endregion +#endif typedef enum _zel_tracer_reg_t { @@ -1771,6 +2757,10 @@ typedef enum _zel_tracer_reg_t /// APIs to register callbacks for each core API +#if !defined(__GNUC__) +#pragma region register_callbacks +#endif + ZE_APIEXPORT ze_result_t ZE_APICALL zelTracerInitRegisterCallback( zel_tracer_handle_t hTracer, @@ -1787,6 +2777,14 @@ zelTracerDriverGetRegisterCallback( ); +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerInitDriversRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnInitDriversCb_t pfnInitDriversCb + ); + + ZE_APIEXPORT ze_result_t ZE_APICALL zelTracerDriverGetApiVersionRegisterCallback( zel_tracer_handle_t hTracer, @@ -1835,6 +2833,14 @@ zelTracerDriverGetLastErrorDescriptionRegisterCallback( ); +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerDriverGetDefaultContextRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnDriverGetDefaultContextCb_t pfnGetDefaultContextCb + ); + + ZE_APIEXPORT ze_result_t ZE_APICALL zelTracerDeviceGetRegisterCallback( zel_tracer_handle_t hTracer, @@ -1963,6 +2969,22 @@ zelTracerDeviceGetGlobalTimestampsRegisterCallback( ); +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerDeviceSynchronizeRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnDeviceSynchronizeCb_t pfnSynchronizeCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerDeviceGetAggregatedCopyOffloadIncrementValueRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnDeviceGetAggregatedCopyOffloadIncrementValueCb_t pfnGetAggregatedCopyOffloadIncrementValueCb + ); + + ZE_APIEXPORT ze_result_t ZE_APICALL zelTracerContextCreateRegisterCallback( zel_tracer_handle_t hTracer, @@ -2267,6 +3289,14 @@ zelTracerEventCreateRegisterCallback( ); +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerEventCounterBasedCreateRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnEventCounterBasedCreateCb_t pfnCounterBasedCreateCb + ); + + ZE_APIEXPORT ze_result_t ZE_APICALL zelTracerEventDestroyRegisterCallback( zel_tracer_handle_t hTracer, @@ -2307,6 +3337,38 @@ zelTracerEventPoolCloseIpcHandleRegisterCallback( ); +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerEventCounterBasedGetIpcHandleRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnEventCounterBasedGetIpcHandleCb_t pfnCounterBasedGetIpcHandleCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerEventCounterBasedOpenIpcHandleRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnEventCounterBasedOpenIpcHandleCb_t pfnCounterBasedOpenIpcHandleCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerEventCounterBasedCloseIpcHandleRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnEventCounterBasedCloseIpcHandleCb_t pfnCounterBasedCloseIpcHandleCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerEventCounterBasedGetDeviceAddressRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnEventCounterBasedGetDeviceAddressCb_t pfnCounterBasedGetDeviceAddressCb + ); + + ZE_APIEXPORT ze_result_t ZE_APICALL zelTracerCommandListAppendSignalEventRegisterCallback( zel_tracer_handle_t hTracer, @@ -2779,6 +3841,22 @@ zelTracerCommandListAppendLaunchKernelRegisterCallback( ); +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerCommandListAppendLaunchKernelWithParametersRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnCommandListAppendLaunchKernelWithParametersCb_t pfnAppendLaunchKernelWithParametersCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerCommandListAppendLaunchKernelWithArgumentsRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnCommandListAppendLaunchKernelWithArgumentsCb_t pfnAppendLaunchKernelWithArgumentsCb + ); + + ZE_APIEXPORT ze_result_t ZE_APICALL zelTracerCommandListAppendLaunchCooperativeKernelRegisterCallback( zel_tracer_handle_t hTracer, @@ -2875,6 +3953,14 @@ zelTracerVirtualMemQueryPageSizeRegisterCallback( ); +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerPhysicalMemGetPropertiesRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnPhysicalMemGetPropertiesCb_t pfnGetPropertiesCb + ); + + ZE_APIEXPORT ze_result_t ZE_APICALL zelTracerPhysicalMemCreateRegisterCallback( zel_tracer_handle_t hTracer, @@ -2931,6 +4017,150 @@ zelTracerKernelSetGlobalOffsetExpRegisterCallback( ); +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerKernelGetBinaryExpRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnKernelGetBinaryExpCb_t pfnGetBinaryExpCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerDeviceImportExternalSemaphoreExtRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnDeviceImportExternalSemaphoreExtCb_t pfnImportExternalSemaphoreExtCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerDeviceReleaseExternalSemaphoreExtRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnDeviceReleaseExternalSemaphoreExtCb_t pfnReleaseExternalSemaphoreExtCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerCommandListAppendSignalExternalSemaphoreExtRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnCommandListAppendSignalExternalSemaphoreExtCb_t pfnAppendSignalExternalSemaphoreExtCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerCommandListAppendWaitExternalSemaphoreExtRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnCommandListAppendWaitExternalSemaphoreExtCb_t pfnAppendWaitExternalSemaphoreExtCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerRTASBuilderCreateExtRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnRTASBuilderCreateExtCb_t pfnCreateExtCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerRTASBuilderGetBuildPropertiesExtRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnRTASBuilderGetBuildPropertiesExtCb_t pfnGetBuildPropertiesExtCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerDriverRTASFormatCompatibilityCheckExtRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnDriverRTASFormatCompatibilityCheckExtCb_t pfnRTASFormatCompatibilityCheckExtCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerRTASBuilderBuildExtRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnRTASBuilderBuildExtCb_t pfnBuildExtCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerRTASBuilderCommandListAppendCopyExtRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnRTASBuilderCommandListAppendCopyExtCb_t pfnCommandListAppendCopyExtCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerRTASBuilderDestroyExtRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnRTASBuilderDestroyExtCb_t pfnDestroyExtCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerRTASParallelOperationCreateExtRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnRTASParallelOperationCreateExtCb_t pfnCreateExtCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerRTASParallelOperationGetPropertiesExtRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnRTASParallelOperationGetPropertiesExtCb_t pfnGetPropertiesExtCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerRTASParallelOperationJoinExtRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnRTASParallelOperationJoinExtCb_t pfnJoinExtCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerRTASParallelOperationDestroyExtRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnRTASParallelOperationDestroyExtCb_t pfnDestroyExtCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerDeviceGetVectorWidthPropertiesExtRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnDeviceGetVectorWidthPropertiesExtCb_t pfnGetVectorWidthPropertiesExtCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerKernelGetAllocationPropertiesExpRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnKernelGetAllocationPropertiesExpCb_t pfnGetAllocationPropertiesExpCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerMemGetIpcHandleWithPropertiesRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnMemGetIpcHandleWithPropertiesCb_t pfnGetIpcHandleWithPropertiesCb + ); + + ZE_APIEXPORT ze_result_t ZE_APICALL zelTracerDeviceReserveCacheExtRegisterCallback( zel_tracer_handle_t hTracer, @@ -3219,6 +4449,14 @@ zelTracerCommandListGetNextCommandIdExpRegisterCallback( ); +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerCommandListGetNextCommandIdWithKernelsExpRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnCommandListGetNextCommandIdWithKernelsExpCb_t pfnGetNextCommandIdWithKernelsExpCb + ); + + ZE_APIEXPORT ze_result_t ZE_APICALL zelTracerCommandListUpdateMutableCommandsExpRegisterCallback( zel_tracer_handle_t hTracer, @@ -3243,6 +4481,48 @@ zelTracerCommandListUpdateMutableCommandWaitEventsExpRegisterCallback( ); +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerCommandListUpdateMutableCommandKernelsExpRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + ze_pfnCommandListUpdateMutableCommandKernelsExpCb_t pfnUpdateMutableCommandKernelsExpCb + ); + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerGetLastErrorDescriptionRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + zer_pfnGetLastErrorDescriptionCb_t pfnGetLastErrorDescriptionCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerTranslateDeviceHandleToIdentifierRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + zer_pfnTranslateDeviceHandleToIdentifierCb_t pfnTranslateDeviceHandleToIdentifierCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerTranslateIdentifierToDeviceHandleRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + zer_pfnTranslateIdentifierToDeviceHandleCb_t pfnTranslateIdentifierToDeviceHandleCb + ); + + +ZE_APIEXPORT ze_result_t ZE_APICALL +zelTracerGetDefaultContextRegisterCallback( + zel_tracer_handle_t hTracer, + zel_tracer_reg_t callback_type, + zer_pfnGetDefaultContextCb_t pfnGetDefaultContextCb + ); + +#if !defined(__GNUC__) +#pragma endregion +#endif + ZE_APIEXPORT ze_result_t ZE_APICALL zelTracerResetAllCallbacks(zel_tracer_handle_t hTracer); diff --git a/backends/ze/include/loader/ze_loader.h b/backends/ze/include/loader/ze_loader.h index 2d5b75d2e..6d3b64600 100644 --- a/backends/ze/include/loader/ze_loader.h +++ b/backends/ze/include/loader/ze_loader.h @@ -34,11 +34,75 @@ extern "C" { } zel_component_version_t; +/** + * @brief Retrieves version information for all components of the Level Zero loader. + * + * This function returns the versions of all loader components. It requires that + * the driver initialization routine has been called prior to use. + * + * Preconditions: + * - `zeInitDrivers()` must be successfully invoked before calling this function. + * + * Usage: + * - If `versions` is `NULL`, the function writes the number of available component + * versions to `*num_elems` and returns. + * - If `versions` is non-NULL, provide an array large enough to hold `*num_elems` + * entries; the function fills the array with the versions of all loader components. + * + * @param[out] num_elems + * Pointer to a size_t that receives the number of available component version entries. + * When `versions` is non-NULL, on success it may be updated to reflect the number + * of entries written. + * + * @param[out] versions + * Pointer to an array of `zel_component_version_t` to be filled with version data. + * If set to `NULL`, no version data is returned and only `*num_elems` is populated. + * + * @return ze_result_t + * - `ZE_RESULT_SUCCESS` on successful retrieval. + * - `ZE_RESULT_ERROR_UNINITIALIZED` if `zeInitDrivers()` was not called. + * - `ZE_RESULT_ERROR_INVALID_NULL_POINTER` if required pointers are `NULL`. + * - `ZE_RESULT_ERROR_INVALID_SIZE` if the provided array is too small. + * - Other `ze_result_t` error codes as appropriate. + */ ZE_APIEXPORT ze_result_t ZE_APICALL zelLoaderGetVersions( size_t *num_elems, //Pointer to num versions to get. zel_component_version_t *versions); //Pointer to array of versions. If set to NULL, num_elems is returned + +/** + * @brief Retrieves the Level Zero loader's version information. + * + * Populates the provided zel_component_version_t structure with the loader's + * version details (e.g., major, minor, patch), allowing applications to + * query and validate the loader's compatibility at runtime. + * + * Does not require zeInit() or zeInitDrivers() to be called prior to invocation. + * Works with both static and dynamic loader builds without initialization. + * + * Thread-safety: This function is safe to call from multiple threads. + * The implementation does not modify global state other than filling the + * supplied version structure. + * + * @param[out] version + * Pointer to a zel_component_version_t structure that will be filled with + * the loader's version information. Must be a valid, non-null pointer. + * + * @return + * - ZE_RESULT_SUCCESS on successful retrieval of the loader version. + * - ZE_RESULT_ERROR_INVALID_NULL_POINTER if version is nullptr. + * - ZE_RESULT_ERROR_UNINITIALIZED if the loader library cannot be found or loaded + * (only possible in static builds with misconfigured library paths). + * - Other ze_result_t error codes on failure conditions as defined by the API. + * + * @note The caller owns the memory for the version structure and must ensure + * it remains valid for the duration of the call. + */ +ZE_DLLEXPORT ze_result_t ZE_APICALL +zelGetLoaderVersion(zel_component_version_t *version +); + typedef enum _zel_handle_type_t { ZEL_HANDLE_DRIVER, ZEL_HANDLE_DEVICE, @@ -56,32 +120,447 @@ typedef enum _zel_handle_type_t { ZEL_HANDLE_PHYSICAL_MEM } zel_handle_type_t; -//Translates Loader Handles to Driver Handles if loader handle intercept is enabled. -//If handle intercept is not enabled handleOut is set to handleIn +/** + * @brief Translates loader handles to driver handles when handle interception is enabled. + * + * This function provides handle translation for scenarios where the loader intercepts + * and wraps driver handles. When handle interception is enabled, the loader maintains + * a mapping between loader-visible handles and underlying driver handles. This function + * performs the translation from loader handles to their corresponding driver handles. + * + * Handle interception is typically used by validation layers, tracing layers, or other + * middleware that needs to track handle lifecycles and API usage patterns. + * + * Behavior: + * - If handle interception is enabled: Translates handleIn to the corresponding driver handle + * and stores the result in *handleOut. + * - If handle interception is disabled: Sets *handleOut equal to handleIn (pass-through). + * + * Thread-safety: This function is thread-safe and can be called concurrently from multiple + * threads with different handle values. + * + * @param[in] handleType + * The type of handle being translated, specified using zel_handle_type_t enumeration. + * This indicates whether the handle is a driver, device, context, command queue, etc. + * + * @param[in] handleIn + * The loader handle to translate. This is the handle visible to the application or layer. + * Must be a valid handle of the type specified by handleType, or NULL. + * + * @param[out] handleOut + * Pointer to a void* that will receive the driver handle. If handle interception is enabled, + * this will be set to the underlying driver handle. If disabled, it will be set to handleIn. + * Must be a valid, non-null pointer. + * + * @return + * - ZE_RESULT_SUCCESS if the translation was successful. + * - ZE_RESULT_ERROR_INVALID_NULL_POINTER if handleOut is null. + * - ZE_RESULT_ERROR_INVALID_ARGUMENT if handleType is invalid or handleIn is invalid. + * - Other ze_result_t error codes as appropriate. + * + * @note If handleIn is NULL, *handleOut will be set to NULL regardless of interception state. + */ ZE_APIEXPORT ze_result_t ZE_APICALL zelLoaderTranslateHandle( - zel_handle_type_t handleType, //Handle Type - void *handleIn, //Input: handle to translate from loader handle to driver handle - void **handleOut); //Output: Pointer to handleOut is set to driver handle if successful + zel_handle_type_t handleType, + void *handleIn, + void **handleOut); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Exported function for handling calls to released drivers in teardown. -/// +/** + * @brief Notifies the loader that a driver has been removed and forces prevention of subsequent API calls. + * + * This function is intended to be called ONLY by Level Zero drivers, not by applications. + * It signals to the loader that at least one driver has been removed from the application + * environment, forcing the loader into a protective state that will prevent subsequent calls + * to Level Zero APIs to avoid crashes or undefined behavior when accessing freed driver resources. + * + * When a driver calls this function, the loader will: + * - Enter a special teardown state that blocks new API calls + * - Track that at least one driver has been removed from the environment + * - Return appropriate error codes (typically ZE_RESULT_ERROR_UNINITIALIZED) for subsequent API calls + * - Prevent crashes from accessing freed driver resources during teardown + * + * Use Case: + * This function exists to handle scenarios where drivers are dynamically unloaded or released + * (e.g., during process teardown, driver updates, or hot-plugging) while the application may + * still attempt to make Level Zero API calls. By forcing the loader into this protective state, + * drivers can ensure safe shutdown even when application threads are not fully synchronized. + * + * This function should be called by the driver after zeInit() or zeInitDrivers() has been + * successfully invoked, typically during the driver's own teardown or cleanup sequence. + * + * Typical usage (by driver implementation): + * // In driver teardown code: + * zelSetDriverTeardown(); // Signal loader that driver is being removed + * // Continue with driver cleanup... + * + * Thread-safety: This function is thread-safe and can be called from any thread. Once called, + * the loader state change is global and affects all subsequent API calls across all threads. + * + * @return + * - ZE_RESULT_SUCCESS if the loader was successfully placed into teardown prevention mode. + * - ZE_RESULT_ERROR_UNINITIALIZED if zeInit() or zeInitDrivers() was not called. + * - ZE_RESULT_ERROR_UNSUPPORTED if the current loader configuration does not support this feature. + * - Other ze_result_t error codes as appropriate. + * + * @warning This function is for DRIVER USE ONLY. Applications should NOT call this function. + * Calling this from application code will cause all subsequent Level Zero API calls + * to fail, effectively disabling Level Zero functionality for the remainder of the + * process lifetime. + * + * @note Once this function is called, the loader enters an irreversible state where API calls + * are prevented. The loader cannot be re-initialized after this function has been invoked. + * + * @note This function only affects the loader's handling of API calls. It does not directly + * manage driver resources or perform driver cleanup. + */ ZE_DLLEXPORT ze_result_t ZE_APICALL zelSetDriverTeardown(); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Exported function for Enabling the Tracing Layer During Runtime. -/// +/** + * @brief Delays automatic loader context teardown until explicitly requested. + * + * This function instructs the loader to postpone its automatic context teardown sequence, + * allowing the application to continue using Level Zero APIs during the application's + * own teardown process. The loader context will remain active until explicitly torn down + * via a call to zelLoaderContextTeardown(). + * + * Applicability: + * - This function ONLY applies to static loader builds. + * - In dynamic loader builds, this function has no effect. + * + * Use Cases: + * This is a workaround for legacy software stacks that: + * - Use Level Zero APIs during application teardown (e.g., in global destructors) + * - Have complex teardown sequences where L0 resources need to outlive other components + * - Cannot easily be refactored to complete all L0 API calls before teardown + * + * Without this function, the static loader's context may be automatically destroyed during + * process teardown (e.g., via atexit handlers or destructor ordering), potentially before + * the application has finished using Level Zero APIs. This can lead to crashes or undefined + * behavior if L0 APIs are called after the context is destroyed. + * + * Call Sequence: + * zelSetDelayLoaderContextTeardown(); // Delay automatic teardown + * // Application uses L0 APIs during teardown... + * zelLoaderContextTeardown(); // Explicitly tear down when done + * + * Thread-safety: This function should be called from the main thread before any teardown + * begins. It is not thread-safe to call this concurrently with other loader operations. + * + * @warning This function is a workaround for legacy code and should NOT be used in new + * applications. The recommended practice is to ensure all Level Zero API calls + * complete before application teardown begins. Delaying loader teardown can + * complicate resource cleanup and may mask underlying architectural issues. + * + * @note This function does not return a result. Once called, the loader context will + * remain active until zelLoaderContextTeardown() is explicitly invoked. + */ +ZE_DLLEXPORT void ZE_APICALL +zelSetDelayLoaderContextTeardown(); + +/** + * @brief Explicitly tears down the loader's context and releases all associated resources. + * + * This function performs a complete teardown of the loader's internal context, including: + * - Releasing all driver handles and associated resources + * - Unloading driver libraries + * - Freeing internal data structures and caches + * - Invoking registered teardown callbacks + * - Cleaning up inter-process communication resources (if applicable) + * + * Applicability: + * - This function ONLY applies to static loader builds. + * - In dynamic loader builds, teardown occurs automatically when the loader library is unloaded. + * + * Preconditions: + * - This function should only be called after zelSetDelayLoaderContextTeardown() has been invoked. + * - All Level Zero API calls must be completed before calling this function. + * - All application threads using Level Zero APIs must have finished execution. + * + * Post-conditions: + * - After this function returns, no Level Zero APIs can be called. + * - Attempting to use L0 APIs after teardown results in undefined behavior (typically crashes). + * - The loader context cannot be re-initialized after teardown. + * + * Typical Usage Pattern: + * // During application initialization: + * zelSetDelayLoaderContextTeardown(); + * + * // Use Level Zero APIs throughout application lifetime... + * + * // During application teardown: + * // Ensure all L0 operations complete + * // Wait for all threads using L0 to finish + * zelLoaderContextTeardown(); // Explicit teardown + * + * Thread-safety: This function is NOT thread-safe and must be called from a single thread + * when no other threads are executing Level Zero APIs. Calling this function concurrently + * with L0 API usage will result in undefined behavior. + * + * @warning This function is a workaround for legacy code patterns and should NOT be used + * in new applications. Modern applications should rely on automatic teardown by + * ensuring all L0 API usage completes before process termination. Using explicit + * teardown requires careful coordination of application shutdown sequences. + * + * @note This function does not return a result. Errors during teardown are logged but + * do not prevent the teardown from completing. Once called, the loader context + * is considered invalid regardless of any internal errors encountered. + */ +ZE_DLLEXPORT void ZE_APICALL +zelLoaderContextTeardown(); + +/** + * @brief Enables the Level Zero tracing layer at runtime. + * + * This function activates the tracing layer, which intercepts and logs Level Zero API calls. + * The tracing layer is useful for debugging, performance analysis, and understanding the + * sequence and parameters of API calls made by an application. + * + * When enabled, the tracing layer: + * - Intercepts all Level Zero API calls (ze*, zes*, zet*, zer* functions) + * - Logs function entry and exit points + * - Records function parameters and return values + * - Measures API call timing and performance metrics + * - Provides hooks for custom tracing callbacks (if registered) + * + * The tracing layer can be enabled at any point during application execution, but is most + * commonly enabled during initialization or before a specific code region of interest. + * + * Runtime vs Build-time Configuration: + * - This function enables tracing at runtime, overriding build-time or environment settings. + * - Tracing can also be enabled via environment variables (e.g., ZE_ENABLE_TRACING_LAYER). + * - Runtime enabling via this function takes precedence over environment configuration. + * + * Preconditions: + * - The tracing layer library must be available and loadable by the loader. + * - For best results, call this function after zeInit() or zeInitDrivers() and around the specific code region of interest. + * - Can be called after initialization, but will only affect subsequent API calls. + * + * Performance Considerations: + * - Enabling tracing adds overhead to every API call (typically 1-10 microseconds per call). + * - Applications should disable tracing in performance-critical production code. + * - Tracing overhead varies based on logging verbosity and callback complexity. + * + * Thread-safety: This function is thread-safe and can be called from any thread. However, + * enabling tracing while other threads are actively making API calls may result in some + * calls not being traced if they were already in progress. + * + * @return + * - ZE_RESULT_SUCCESS if the tracing layer was successfully enabled. + * - ZE_RESULT_ERROR_UNINITIALIZED if the loader has not been properly initialized. + * - ZE_RESULT_ERROR_UNSUPPORTED if the tracing layer is not available (missing library). + * - ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE if tracing dependencies cannot be loaded. + * - ZE_RESULT_SUCCESS if tracing is already enabled (idempotent operation). + * - Other ze_result_t error codes as appropriate. + * + * @see zelDisableTracingLayer() to disable tracing + * @see zelGetTracingLayerState() to query current tracing state + */ ZE_DLLEXPORT ze_result_t ZE_APICALL zelEnableTracingLayer(); +/** + * @brief Checks whether the loader is currently in teardown state. + * + * This function provides a way for applications, layers, and drivers to query whether + * the loader is currently executing its teardown sequence. This information is useful + * for making decisions about resource cleanup, avoiding operations that may fail during + * teardown, and implementing safe shutdown logic in complex multi-threaded applications. + * + * Teardown State: + * The loader enters teardown state when: + * - The process is terminating (exit() called or main() returns) + * - zelLoaderContextTeardown() has been explicitly called + * - atexit handlers or global destructors are executing + * - Dynamic loader library is being unloaded (dlclose() or FreeLibrary()) + * + * Use Cases: + * - Preventing new API calls during shutdown to avoid crashes + * - Implementing conditional cleanup logic in global destructors + * - Deciding whether to log errors or silently fail during teardown + * - Coordinating shutdown sequences across multiple components + * - Avoiding deadlocks by skipping synchronization during teardown + * + * Typical Usage: + * if (zelCheckIsLoaderInTearDown()) { + * // Loader is shutting down - skip operation or use simplified cleanup + * return; + * } + * // Normal operation - proceed with API calls + * zeDeviceGet(...); + * + * Thread-safety: This function is thread-safe and can be called from any thread at any + * time. It provides a snapshot of the loader's teardown state at the moment of the call. + * The state may change immediately after the function returns if teardown begins on + * another thread. + * + * Performance: This is a lightweight query operation with minimal overhead, suitable for + * frequent checking in performance-sensitive code paths. + * + * @return + * - true if the loader is currently in teardown state or has completed teardown. + * - false if the loader is in normal operational state. + * + * @note Race conditions: In multi-threaded scenarios, teardown may begin immediately + * after this function returns false. Callers should be prepared to handle errors + * from subsequent API calls even if this function returns false. + * + * @note During teardown, most Level Zero API calls will return error codes or exhibit + * undefined behavior. Applications should avoid making API calls when this function + * returns true. + */ +ZE_DLLEXPORT bool ZE_APICALL +zelCheckIsLoaderInTearDown(); + +/** + * @brief Function pointer type for application-provided teardown callbacks. + * + * This typedef defines the signature for callback functions that applications can register + * to be notified when the loader begins its teardown sequence. The loader invokes these + * callbacks to give applications an opportunity to perform cleanup, save state, or prepare + * for shutdown before the loader's internal resources are released. + * + * Callback Requirements: + * - Must not take any parameters + * - Must not return any value (void return type) + * - Must be thread-safe (may be called from any thread) + * - Must not block or take locks that could deadlock the teardown sequence + * - Should complete quickly (ideally < 100 microseconds) + * - Must not call Level Zero APIs (may result in undefined behavior or deadlock) + * + * Implementation Guidelines: + * The callback should perform minimal work, typically limited to: + * - Setting flags or updating state variables + * - Signaling condition variables or event objects + * - Initiating asynchronous cleanup on other threads + * - Logging or diagnostic output + * + * What NOT to do in callbacks: + * - DO NOT call Level Zero APIs (ze*, zes*, zet*, zer* functions) + * - DO NOT allocate or free memory (may deadlock during process teardown) + * - DO NOT acquire locks (risk of deadlock with loader's internal locks) + * - DO NOT perform I/O operations (may block or fail during shutdown) + * - DO NOT start new threads or wait for thread completion + * + * Example Implementation: + * static volatile bool loader_teardown_started = false; + * + * void myTeardownCallback() { + * loader_teardown_started = true; // Simple flag update + * } + * + * @see zelRegisterTeardownCallback() for registering callbacks + */ +typedef void (*zel_loader_teardown_callback_t)(); + +/** + * @brief Function pointer type for loader-provided callbacks to notify application of teardown. + * + * This typedef defines the signature for callbacks that the loader provides to applications + * during teardown callback registration. The loader uses this callback mechanism to notify + * the application when teardown is complete or to coordinate multi-stage shutdown sequences. + * + * Unlike zel_loader_teardown_callback_t (which applications provide to the loader), this + * callback type is implemented by the loader and given to the application. The application + * stores this callback and may invoke it at appropriate points during its own shutdown. + * + * Parameter: + * @param index + * The index value assigned to the registered callback during zelRegisterTeardownCallback(). + * This allows the loader to identify which callback invocation is being acknowledged or + * to coordinate multiple registered callbacks in a specific order. + * + * Usage Pattern: + * zel_application_teardown_callback_t loader_callback; + * uint32_t callback_index; + * + * zelRegisterTeardownCallback(my_callback, &loader_callback, &callback_index); + * + * // Later, during application teardown: + * if (loader_callback != nullptr) { + * loader_callback(callback_index); // Notify loader of application teardown progress + * } + * + * Thread-safety: The implementation of this callback (provided by the loader) is thread-safe + * and can be called from any thread. However, applications should typically call it from + * the same thread that is coordinating shutdown. + * + * Callback Requirements: + * - Must be safe to call during application teardown + * - Must not block indefinitely + * - May be called multiple times with the same index (idempotent) + * - May be nullptr if the loader does not require application notification + * + * @note This callback is part of the bidirectional communication mechanism between the + * application and loader during teardown. The loader calls the application's callback + * (zel_loader_teardown_callback_t) to signal loader teardown, and the application + * calls the loader's callback (this type) to acknowledge or coordinate its own teardown. + * + * @see zelRegisterTeardownCallback() for the complete callback registration mechanism + */ +typedef void (*zel_application_teardown_callback_t)(uint32_t index); + +/** + * @brief Registers a teardown callback to be invoked during loader teardown. + * + * This function allows the application to register a callback function that will be called + * when the loader is being torn down. The loader will also provide its own callback function + * and assign an index to the registered callback. + * + * The application_callback is required to be a function that takes no arguments and returns void. + * In addition, the application_callback should be thread-safe and not block to prevent deadlocking the + * loader teardown process. + * + * For example, the application_callback used by the static loader is: + * void staticLoaderTeardownCallback() { + * loaderTeardownCallbackReceived = true; + * } + * The application_callback should provide a simple notification to the application that the loader is being torn down. + * + * @param[in] application_callback Application's callback function to be called during loader teardown. + * @param[out] loader_callback Pointer to the loader's callback function. + * @param[out] index Index assigned to the registered callback. + * + * @return + * - ZE_RESULT_SUCCESS if the callback was successfully registered. + * - Appropriate error code otherwise. + */ +ZE_DLLEXPORT ze_result_t ZE_APICALL +zelRegisterTeardownCallback( + zel_loader_teardown_callback_t application_callback, // [in] Application's callback function to be called during loader teardown + zel_application_teardown_callback_t *loader_callback, // [out] Pointer to the loader's callback function + uint32_t *index // [out] Index assigned to the registered callback +); + /////////////////////////////////////////////////////////////////////////////// /// @brief Exported function for Disabling the Tracing Layer During Runtime. /// ZE_DLLEXPORT ze_result_t ZE_APICALL zelDisableTracingLayer(); +/** + * @brief Retrieves the current enabled state of the Level Zero tracing layer. + * + * This function queries whether the tracing layer is active and writes the result + * to the provided boolean pointer. + * + * @param enabled + * Pointer to a boolean that will be set to true if the tracing layer is + * currently enabled, or false if it is disabled. Must be a valid, non-null + * pointer. + * + * @return + * ZE_RESULT_SUCCESS on success. + * ZE_RESULT_ERROR_INVALID_NULL_POINTER if `enabled` is null. + * Other ze_result_t error codes may be returned for implementation-specific failures. + * + * @note The tracing layer state is global to the process. The function is read-only + * and thread-safe; multiple callers can query the state concurrently. + */ +ZE_DLLEXPORT ze_result_t ZE_APICALL +zelGetTracingLayerState(bool* enabled); // Pointer to bool to receive tracing layer state + #if defined(__cplusplus) } // extern "C" #endif diff --git a/backends/ze/include/loader/ze_loader_api.h b/backends/ze/include/loader/ze_loader_api.h deleted file mode 100644 index d0d48608c..000000000 --- a/backends/ze/include/loader/ze_loader_api.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * - * Copyright (C) 2020-2021 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - * @file ze_loader_api.cpp - * - */ - -#include "ze_loader_internal.h" -#include "loader/ze_loader.h" - -#define TRACING_COMP_NAME "loader" - -#if defined(__cplusplus) -extern "C" { -#endif - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Exported function for initializing loader -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -ZE_DLLEXPORT ze_result_t ZE_APICALL -zeLoaderInit(); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Exported function for verifying usable L0 Drivers for Loader to report -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -ZE_DLLEXPORT ze_result_t ZE_APICALL -//zelLoaderDriverCheck(ze_init_flags_t flags); -zelLoaderDriverCheck(ze_init_flags_t flags, void *globalInitStored, void *sysmanGlobalInitStored, bool *requireDdiReinit, bool sysmanOnly); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Internal function for Setting the ddi tables for the Tracing Layer. -/// -ZE_DLLEXPORT ze_result_t ZE_APICALL -//zelLoaderTracingLayerInit(std::atomic &zeDdiTable, std::atomic &zetDdiTable, std::atomic &zesDdiTable); -zelLoaderTracingLayerInit(void *zeDdiTable, void *zetDdiTable, void *zesDdiTable); - - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Exported function for getting tracing lib handle -/// -/// @returns -/// - ::handle to tracing library -ZE_DLLEXPORT HMODULE ZE_APICALL -zeLoaderGetTracingHandle(); - - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Exported function for getting version -/// -ZE_DLLEXPORT ze_result_t ZE_APICALL -zelLoaderGetVersion(zel_component_version_t *version); - - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Exported function for getting versions of all components -/// -ZE_DLLEXPORT ze_result_t ZE_APICALL -zelLoaderGetVersionsInternal( - size_t *num_elems, //Pointer to num versions to get. - zel_component_version_t *versions); //Pointer to array of versions. If set to NULL, num_elems is returned - - -ZE_DLLEXPORT ze_result_t ZE_APICALL -zelLoaderTranslateHandleInternal( - zel_handle_type_t handleType, //Handle type - void *handleIn, //Input: handle to translate from loader handle to driver handle - void **handleOut); //Output: Pointer to handleOut is set to driver handle if successful - - -#if defined(__cplusplus) -} -#endif diff --git a/backends/ze/include/loader/ze_loader_internal.h b/backends/ze/include/loader/ze_loader_internal.h deleted file mode 100644 index e69de29bb..000000000 diff --git a/backends/ze/include/ze.py b/backends/ze/include/ze.py new file mode 100644 index 000000000..33092a932 --- /dev/null +++ b/backends/ze/include/ze.py @@ -0,0 +1,7745 @@ +""" + Copyright (C) 2019-2025 Intel Corporation + + SPDX-License-Identifier: MIT + + @file ze.py + @version v1.15-r1.13.73 + + """ +import platform +from ctypes import * +from enum import * + +############################################################################### +__version__ = "1.0" + +############################################################################### +## @brief Generates generic 'oneAPI' API versions +def ZE_MAKE_VERSION( _major, _minor ): + return (( _major << 16 )|( _minor & 0x0000ffff)) + +############################################################################### +## @brief Extracts 'oneAPI' API major version +def ZE_MAJOR_VERSION( _ver ): + return ( _ver >> 16 ) + +############################################################################### +## @brief Extracts 'oneAPI' API minor version +def ZE_MINOR_VERSION( _ver ): + return ( _ver & 0x0000ffff ) + +############################################################################### +## @brief Calling convention for all API functions +# ZE_APICALL not required for python + +############################################################################### +## @brief Microsoft-specific dllexport storage-class attribute +# ZE_APIEXPORT not required for python + +############################################################################### +## @brief GCC-specific dllexport storage-class attribute +# ZE_APIEXPORT not required for python + +############################################################################### +## @brief Microsoft-specific dllexport storage-class attribute +# ZE_DLLEXPORT not required for python + +############################################################################### +## @brief GCC-specific dllexport storage-class attribute +# ZE_DLLEXPORT not required for python + +############################################################################### +## @brief compiler-independent type +class ze_bool_t(c_ubyte): + pass + +############################################################################### +## @brief Handle of a driver instance +class ze_driver_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of driver's device object +class ze_device_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of driver's context object +class ze_context_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of driver's command queue object +class ze_command_queue_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of driver's command list object +class ze_command_list_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of driver's fence object +class ze_fence_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of driver's event pool object +class ze_event_pool_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of driver's event object +class ze_event_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of driver's image object +class ze_image_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of driver's module object +class ze_module_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of module's build log object +class ze_module_build_log_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of driver's kernel object +class ze_kernel_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of driver's sampler object +class ze_sampler_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of physical memory object +class ze_physical_mem_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of driver's fabric vertex object +class ze_fabric_vertex_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of driver's fabric edge object +class ze_fabric_edge_handle_t(c_void_p): + pass + +############################################################################### +## @brief Maximum IPC handle size +ZE_MAX_IPC_HANDLE_SIZE = 64 + +############################################################################### +## @brief IPC handle to a memory allocation +class ze_ipc_mem_handle_t(Structure): + _fields_ = [ + ("data", c_char * ZE_MAX_IPC_HANDLE_SIZE) ## [out] Opaque data representing an IPC handle + ] + +############################################################################### +## @brief IPC handle to a event pool allocation +class ze_ipc_event_pool_handle_t(Structure): + _fields_ = [ + ("data", c_char * ZE_MAX_IPC_HANDLE_SIZE) ## [out] Opaque data representing an IPC handle + ] + +############################################################################### +## @brief Generic macro for enumerator bit masks +def ZE_BIT( _i ): + return ( 1 << _i ) + +############################################################################### +## @brief Defines Return/Error codes +class ze_result_v(IntEnum): + SUCCESS = 0 ## [Core] success + NOT_READY = 1 ## [Core] synchronization primitive not signaled + ERROR_DEVICE_LOST = 0x70000001 ## [Core] device hung, reset, was removed, or driver update occurred + ERROR_OUT_OF_HOST_MEMORY = 0x70000002 ## [Core] insufficient host memory to satisfy call + ERROR_OUT_OF_DEVICE_MEMORY = 0x70000003 ## [Core] insufficient device memory to satisfy call + ERROR_MODULE_BUILD_FAILURE = 0x70000004 ## [Core] error occurred when building module, see build log for details + ERROR_MODULE_LINK_FAILURE = 0x70000005 ## [Core] error occurred when linking modules, see build log for details + ERROR_DEVICE_REQUIRES_RESET = 0x70000006 ## [Core] device requires a reset + ERROR_DEVICE_IN_LOW_POWER_STATE = 0x70000007 ## [Core] device currently in low power state + EXP_ERROR_DEVICE_IS_NOT_VERTEX = 0x7ff00001 ## [Core, Experimental] device is not represented by a fabric vertex + EXP_ERROR_VERTEX_IS_NOT_DEVICE = 0x7ff00002 ## [Core, Experimental] fabric vertex does not represent a device + EXP_ERROR_REMOTE_DEVICE = 0x7ff00003 ## [Core, Experimental] fabric vertex represents a remote device or + ## subdevice + EXP_ERROR_OPERANDS_INCOMPATIBLE = 0x7ff00004 ## [Core, Experimental] operands of comparison are not compatible + EXP_RTAS_BUILD_RETRY = 0x7ff00005 ## [Core, Experimental] ray tracing acceleration structure build + ## operation failed due to insufficient resources, retry with a larger + ## acceleration structure buffer allocation + EXP_RTAS_BUILD_DEFERRED = 0x7ff00006 ## [Core, Experimental] ray tracing acceleration structure build + ## operation deferred to parallel operation join + ERROR_INSUFFICIENT_PERMISSIONS = 0x70010000 ## [Sysman] access denied due to permission level + ERROR_NOT_AVAILABLE = 0x70010001 ## [Sysman] resource already in use and simultaneous access not allowed + ## or resource was removed + ERROR_DEPENDENCY_UNAVAILABLE = 0x70020000 ## [Common] external required dependency is unavailable or missing + WARNING_DROPPED_DATA = 0x70020001 ## [Tools] data may have been dropped + ERROR_UNINITIALIZED = 0x78000001 ## [Validation] driver is not initialized + ERROR_UNSUPPORTED_VERSION = 0x78000002 ## [Validation] generic error code for unsupported versions + ERROR_UNSUPPORTED_FEATURE = 0x78000003 ## [Validation] generic error code for unsupported features + ERROR_INVALID_ARGUMENT = 0x78000004 ## [Validation] generic error code for invalid arguments + ERROR_INVALID_NULL_HANDLE = 0x78000005 ## [Validation] handle argument is not valid + ERROR_HANDLE_OBJECT_IN_USE = 0x78000006 ## [Validation] object pointed to by handle still in-use by device + ERROR_INVALID_NULL_POINTER = 0x78000007 ## [Validation] pointer argument may not be nullptr + ERROR_INVALID_SIZE = 0x78000008 ## [Validation] size argument is invalid (e.g., must not be zero) + ERROR_UNSUPPORTED_SIZE = 0x78000009 ## [Validation] size argument is not supported by the device (e.g., too + ## large) + ERROR_UNSUPPORTED_ALIGNMENT = 0x7800000a ## [Validation] alignment argument is not supported by the device (e.g., + ## too small) + ERROR_INVALID_SYNCHRONIZATION_OBJECT = 0x7800000b ## [Validation] synchronization object in invalid state + ERROR_INVALID_ENUMERATION = 0x7800000c ## [Validation] enumerator argument is not valid + ERROR_UNSUPPORTED_ENUMERATION = 0x7800000d ## [Validation] enumerator argument is not supported by the device + ERROR_UNSUPPORTED_IMAGE_FORMAT = 0x7800000e ## [Validation] image format is not supported by the device + ERROR_INVALID_NATIVE_BINARY = 0x7800000f ## [Validation] native binary is not supported by the device + ERROR_INVALID_GLOBAL_NAME = 0x78000010 ## [Validation] global variable is not found in the module + ERROR_INVALID_KERNEL_NAME = 0x78000011 ## [Validation] kernel name is not found in the module + ERROR_INVALID_FUNCTION_NAME = 0x78000012 ## [Validation] function name is not found in the module + ERROR_INVALID_GROUP_SIZE_DIMENSION = 0x78000013 ## [Validation] group size dimension is not valid for the kernel or + ## device + ERROR_INVALID_GLOBAL_WIDTH_DIMENSION = 0x78000014 ## [Validation] global width dimension is not valid for the kernel or + ## device + ERROR_INVALID_KERNEL_ARGUMENT_INDEX = 0x78000015 ## [Validation] kernel argument index is not valid for kernel + ERROR_INVALID_KERNEL_ARGUMENT_SIZE = 0x78000016 ## [Validation] kernel argument size does not match kernel + ERROR_INVALID_KERNEL_ATTRIBUTE_VALUE = 0x78000017 ## [Validation] value of kernel attribute is not valid for the kernel or + ## device + ERROR_INVALID_MODULE_UNLINKED = 0x78000018 ## [Validation] module with imports needs to be linked before kernels can + ## be created from it. + ERROR_INVALID_COMMAND_LIST_TYPE = 0x78000019 ## [Validation] command list type does not match command queue type + ERROR_OVERLAPPING_REGIONS = 0x7800001a ## [Validation] copy operations do not support overlapping regions of + ## memory + WARNING_ACTION_REQUIRED = 0x7800001b ## [Sysman] an action is required to complete the desired operation + ERROR_INVALID_KERNEL_HANDLE = 0x7800001c ## [Core, Validation] kernel handle is invalid for the operation + EXT_RTAS_BUILD_RETRY = 0x7800001d ## [Core, Extension] ray tracing acceleration structure build operation + ## failed due to insufficient resources, retry with a larger acceleration + ## structure buffer allocation + EXT_RTAS_BUILD_DEFERRED = 0x7800001e ## [Core, Extension] ray tracing acceleration structure build operation + ## deferred to parallel operation join + EXT_ERROR_OPERANDS_INCOMPATIBLE = 0x7800001f ## [Core, Extension] operands of comparison are not compatible + ERROR_SURVIVABILITY_MODE_DETECTED = 0x78000020 ## [Sysman] device is in survivability mode, firmware update needed + ERROR_ADDRESS_NOT_FOUND = 0x78000021 ## [Core] address not found within specified or current context + ERROR_UNKNOWN = 0x7ffffffe ## [Core] unknown or internal error + +class ze_result_t(c_int): + def __str__(self): + return str(ze_result_v(self.value)) + + +############################################################################### +## @brief Defines structure types +class ze_structure_type_v(IntEnum): + DRIVER_PROPERTIES = 0x1 ## ::ze_driver_properties_t + DRIVER_IPC_PROPERTIES = 0x2 ## ::ze_driver_ipc_properties_t + DEVICE_PROPERTIES = 0x3 ## ::ze_device_properties_t + DEVICE_COMPUTE_PROPERTIES = 0x4 ## ::ze_device_compute_properties_t + DEVICE_MODULE_PROPERTIES = 0x5 ## ::ze_device_module_properties_t + COMMAND_QUEUE_GROUP_PROPERTIES = 0x6 ## ::ze_command_queue_group_properties_t + DEVICE_MEMORY_PROPERTIES = 0x7 ## ::ze_device_memory_properties_t + DEVICE_MEMORY_ACCESS_PROPERTIES = 0x8 ## ::ze_device_memory_access_properties_t + DEVICE_CACHE_PROPERTIES = 0x9 ## ::ze_device_cache_properties_t + DEVICE_IMAGE_PROPERTIES = 0xa ## ::ze_device_image_properties_t + DEVICE_P2P_PROPERTIES = 0xb ## ::ze_device_p2p_properties_t + DEVICE_EXTERNAL_MEMORY_PROPERTIES = 0xc ## ::ze_device_external_memory_properties_t + CONTEXT_DESC = 0xd ## ::ze_context_desc_t + COMMAND_QUEUE_DESC = 0xe ## ::ze_command_queue_desc_t + COMMAND_LIST_DESC = 0xf ## ::ze_command_list_desc_t + EVENT_POOL_DESC = 0x10 ## ::ze_event_pool_desc_t + EVENT_DESC = 0x11 ## ::ze_event_desc_t + FENCE_DESC = 0x12 ## ::ze_fence_desc_t + IMAGE_DESC = 0x13 ## ::ze_image_desc_t + IMAGE_PROPERTIES = 0x14 ## ::ze_image_properties_t + DEVICE_MEM_ALLOC_DESC = 0x15 ## ::ze_device_mem_alloc_desc_t + HOST_MEM_ALLOC_DESC = 0x16 ## ::ze_host_mem_alloc_desc_t + MEMORY_ALLOCATION_PROPERTIES = 0x17 ## ::ze_memory_allocation_properties_t + EXTERNAL_MEMORY_EXPORT_DESC = 0x18 ## ::ze_external_memory_export_desc_t + EXTERNAL_MEMORY_IMPORT_FD = 0x19 ## ::ze_external_memory_import_fd_t + EXTERNAL_MEMORY_EXPORT_FD = 0x1a ## ::ze_external_memory_export_fd_t + MODULE_DESC = 0x1b ## ::ze_module_desc_t + MODULE_PROPERTIES = 0x1c ## ::ze_module_properties_t + KERNEL_DESC = 0x1d ## ::ze_kernel_desc_t + KERNEL_PROPERTIES = 0x1e ## ::ze_kernel_properties_t + SAMPLER_DESC = 0x1f ## ::ze_sampler_desc_t + PHYSICAL_MEM_DESC = 0x20 ## ::ze_physical_mem_desc_t + KERNEL_PREFERRED_GROUP_SIZE_PROPERTIES = 0x21 ## ::ze_kernel_preferred_group_size_properties_t + EXTERNAL_MEMORY_IMPORT_WIN32 = 0x22 ## ::ze_external_memory_import_win32_handle_t + EXTERNAL_MEMORY_EXPORT_WIN32 = 0x23 ## ::ze_external_memory_export_win32_handle_t + DEVICE_RAYTRACING_EXT_PROPERTIES = 0x00010001 ## ::ze_device_raytracing_ext_properties_t + RAYTRACING_MEM_ALLOC_EXT_DESC = 0x10002 ## ::ze_raytracing_mem_alloc_ext_desc_t + FLOAT_ATOMIC_EXT_PROPERTIES = 0x10003 ## ::ze_float_atomic_ext_properties_t + CACHE_RESERVATION_EXT_DESC = 0x10004 ## ::ze_cache_reservation_ext_desc_t + EU_COUNT_EXT = 0x10005 ## ::ze_eu_count_ext_t + SRGB_EXT_DESC = 0x10006 ## ::ze_srgb_ext_desc_t + LINKAGE_INSPECTION_EXT_DESC = 0x10007 ## ::ze_linkage_inspection_ext_desc_t + PCI_EXT_PROPERTIES = 0x10008 ## ::ze_pci_ext_properties_t + DRIVER_MEMORY_FREE_EXT_PROPERTIES = 0x10009 ## ::ze_driver_memory_free_ext_properties_t + MEMORY_FREE_EXT_DESC = 0x1000a ## ::ze_memory_free_ext_desc_t + MEMORY_COMPRESSION_HINTS_EXT_DESC = 0x1000b ## ::ze_memory_compression_hints_ext_desc_t + IMAGE_ALLOCATION_EXT_PROPERTIES = 0x1000c ## ::ze_image_allocation_ext_properties_t + DEVICE_LUID_EXT_PROPERTIES = 0x1000d ## ::ze_device_luid_ext_properties_t + DEVICE_MEMORY_EXT_PROPERTIES = 0x1000e ## ::ze_device_memory_ext_properties_t + DEVICE_IP_VERSION_EXT = 0x1000f ## ::ze_device_ip_version_ext_t + IMAGE_VIEW_PLANAR_EXT_DESC = 0x10010 ## ::ze_image_view_planar_ext_desc_t + EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_PROPERTIES = 0x10011 ## ::ze_event_query_kernel_timestamps_ext_properties_t + EVENT_QUERY_KERNEL_TIMESTAMPS_RESULTS_EXT_PROPERTIES = 0x10012 ## ::ze_event_query_kernel_timestamps_results_ext_properties_t + KERNEL_MAX_GROUP_SIZE_EXT_PROPERTIES = 0x10013 ## ::ze_kernel_max_group_size_ext_properties_t + IMAGE_FORMAT_SUPPORT_EXT_PROPERTIES = 0x10014 ## ::ze_image_format_support_ext_properties_t + RELAXED_ALLOCATION_LIMITS_EXP_DESC = 0x00020001 ## ::ze_relaxed_allocation_limits_exp_desc_t + MODULE_PROGRAM_EXP_DESC = 0x00020002 ## ::ze_module_program_exp_desc_t + SCHEDULING_HINT_EXP_PROPERTIES = 0x00020003 ## ::ze_scheduling_hint_exp_properties_t + SCHEDULING_HINT_EXP_DESC = 0x00020004 ## ::ze_scheduling_hint_exp_desc_t + IMAGE_VIEW_PLANAR_EXP_DESC = 0x00020005 ## ::ze_image_view_planar_exp_desc_t + DEVICE_PROPERTIES_1_2 = 0x00020006 ## ::ze_device_properties_t + IMAGE_MEMORY_EXP_PROPERTIES = 0x00020007 ## ::ze_image_memory_properties_exp_t + POWER_SAVING_HINT_EXP_DESC = 0x00020008 ## ::ze_context_power_saving_hint_exp_desc_t + COPY_BANDWIDTH_EXP_PROPERTIES = 0x00020009 ## ::ze_copy_bandwidth_exp_properties_t + DEVICE_P2P_BANDWIDTH_EXP_PROPERTIES = 0x0002000A ## ::ze_device_p2p_bandwidth_exp_properties_t + FABRIC_VERTEX_EXP_PROPERTIES = 0x0002000B ## ::ze_fabric_vertex_exp_properties_t + FABRIC_EDGE_EXP_PROPERTIES = 0x0002000C ## ::ze_fabric_edge_exp_properties_t + MEMORY_SUB_ALLOCATIONS_EXP_PROPERTIES = 0x0002000D ## ::ze_memory_sub_allocations_exp_properties_t + RTAS_BUILDER_EXP_DESC = 0x0002000E ## ::ze_rtas_builder_exp_desc_t + RTAS_BUILDER_BUILD_OP_EXP_DESC = 0x0002000F ## ::ze_rtas_builder_build_op_exp_desc_t + RTAS_BUILDER_EXP_PROPERTIES = 0x00020010 ## ::ze_rtas_builder_exp_properties_t + RTAS_PARALLEL_OPERATION_EXP_PROPERTIES = 0x00020011 ## ::ze_rtas_parallel_operation_exp_properties_t + RTAS_DEVICE_EXP_PROPERTIES = 0x00020012 ## ::ze_rtas_device_exp_properties_t + RTAS_GEOMETRY_AABBS_EXP_CB_PARAMS = 0x00020013 ## ::ze_rtas_geometry_aabbs_exp_cb_params_t + COUNTER_BASED_EVENT_POOL_EXP_DESC = 0x00020014 ## ::ze_event_pool_counter_based_exp_desc_t + MUTABLE_COMMAND_LIST_EXP_PROPERTIES = 0x00020015 ## ::ze_mutable_command_list_exp_properties_t + MUTABLE_COMMAND_LIST_EXP_DESC = 0x00020016 ## ::ze_mutable_command_list_exp_desc_t + MUTABLE_COMMAND_ID_EXP_DESC = 0x00020017 ## ::ze_mutable_command_id_exp_desc_t + MUTABLE_COMMANDS_EXP_DESC = 0x00020018 ## ::ze_mutable_commands_exp_desc_t + MUTABLE_KERNEL_ARGUMENT_EXP_DESC = 0x00020019 ## ::ze_mutable_kernel_argument_exp_desc_t + MUTABLE_GROUP_COUNT_EXP_DESC = 0x0002001A ## ::ze_mutable_group_count_exp_desc_t + MUTABLE_GROUP_SIZE_EXP_DESC = 0x0002001B ## ::ze_mutable_group_size_exp_desc_t + MUTABLE_GLOBAL_OFFSET_EXP_DESC = 0x0002001C ## ::ze_mutable_global_offset_exp_desc_t + PITCHED_ALLOC_DEVICE_EXP_PROPERTIES = 0x0002001D ## ::ze_device_pitched_alloc_exp_properties_t + BINDLESS_IMAGE_EXP_DESC = 0x0002001E ## ::ze_image_bindless_exp_desc_t + PITCHED_IMAGE_EXP_DESC = 0x0002001F ## ::ze_image_pitched_exp_desc_t + MUTABLE_GRAPH_ARGUMENT_EXP_DESC = 0x00020020 ## ::ze_mutable_graph_argument_exp_desc_t + INIT_DRIVER_TYPE_DESC = 0x00020021 ## ::ze_init_driver_type_desc_t + EXTERNAL_SEMAPHORE_EXT_DESC = 0x00020022 ## ::ze_external_semaphore_ext_desc_t + EXTERNAL_SEMAPHORE_WIN32_EXT_DESC = 0x00020023 ## ::ze_external_semaphore_win32_ext_desc_t + EXTERNAL_SEMAPHORE_FD_EXT_DESC = 0x00020024 ## ::ze_external_semaphore_fd_ext_desc_t + EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_EXT = 0x00020025 ## ::ze_external_semaphore_signal_params_ext_t + EXTERNAL_SEMAPHORE_WAIT_PARAMS_EXT = 0x00020026 ## ::ze_external_semaphore_wait_params_ext_t + DRIVER_DDI_HANDLES_EXT_PROPERTIES = 0x00020027 ## ::ze_driver_ddi_handles_ext_properties_t + DEVICE_CACHELINE_SIZE_EXT = 0x00020028 ## ::ze_device_cache_line_size_ext_t + DEVICE_VECTOR_WIDTH_PROPERTIES_EXT = 0x00020029 ## ::ze_device_vector_width_properties_ext_t + RTAS_BUILDER_EXT_DESC = 0x00020030 ## ::ze_rtas_builder_ext_desc_t + RTAS_BUILDER_BUILD_OP_EXT_DESC = 0x00020031 ## ::ze_rtas_builder_build_op_ext_desc_t + RTAS_BUILDER_EXT_PROPERTIES = 0x00020032 ## ::ze_rtas_builder_ext_properties_t + RTAS_PARALLEL_OPERATION_EXT_PROPERTIES = 0x00020033 ## ::ze_rtas_parallel_operation_ext_properties_t + RTAS_DEVICE_EXT_PROPERTIES = 0x00020034 ## ::ze_rtas_device_ext_properties_t + RTAS_GEOMETRY_AABBS_EXT_CB_PARAMS = 0x00020035 ## ::ze_rtas_geometry_aabbs_ext_cb_params_t + COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC = 0x00020036 ## ::ze_command_list_append_launch_kernel_param_cooperative_desc_t + EXTERNAL_MEMMAP_SYSMEM_EXT_DESC = 0x00020037 ## ::ze_external_memmap_sysmem_ext_desc_t + PITCHED_ALLOC_2DIMAGE_LINEAR_PITCH_EXP_INFO = 0x00020038 ## ::ze_pitched_alloc_2dimage_linear_pitch_exp_info_t + KERNEL_ALLOCATION_PROPERTIES = 0x00020039 ## ::ze_kernel_allocation_exp_properties_t + EVENT_COUNTER_BASED_DESC = 0x0002003A ## ::ze_event_counter_based_desc_t + EVENT_COUNTER_BASED_EXTERNAL_SYNC_ALLOCATION_DESC = 0x0002003B ## ::ze_event_counter_based_external_sync_allocation_desc_t + EVENT_SYNC_MODE_DESC = 0x0002003C ## ::ze_event_sync_mode_desc_t + IPC_MEM_HANDLE_TYPE_EXT_DESC = 0x0002003D ## ::ze_ipc_mem_handle_type_ext_desc_t + DEVICE_EVENT_PROPERTIES = 0x0002003E ## ::ze_device_event_properties_t + EVENT_COUNTER_BASED_EXTERNAL_AGGREGATE_STORAGE_DESC = 0x0002003F ## ::ze_event_counter_based_external_aggregate_storage_desc_t + PHYSICAL_MEM_PROPERTIES = 0x00020040 ## ::ze_physical_mem_properties_t + DEVICE_USABLEMEM_SIZE_EXT_PROPERTIES = 0x00020041 ## ::ze_device_usablemem_size_ext_properties_t + CUSTOM_PITCH_EXP_DESC = 0x00020042 ## ::ze_custom_pitch_exp_desc_t + +class ze_structure_type_t(c_int): + def __str__(self): + return str(ze_structure_type_v(self.value)) + + +############################################################################### +## @brief External memory type flags +class ze_external_memory_type_flags_v(IntEnum): + OPAQUE_FD = ZE_BIT(0) ## an opaque POSIX file descriptor handle + DMA_BUF = ZE_BIT(1) ## a file descriptor handle for a Linux dma_buf + OPAQUE_WIN32 = ZE_BIT(2) ## an NT handle + OPAQUE_WIN32_KMT = ZE_BIT(3) ## a global share (KMT) handle + D3D11_TEXTURE = ZE_BIT(4) ## an NT handle referring to a Direct3D 10 or 11 texture resource + D3D11_TEXTURE_KMT = ZE_BIT(5) ## a global share (KMT) handle referring to a Direct3D 10 or 11 texture + ## resource + D3D12_HEAP = ZE_BIT(6) ## an NT handle referring to a Direct3D 12 heap resource + D3D12_RESOURCE = ZE_BIT(7) ## an NT handle referring to a Direct3D 12 committed resource + +class ze_external_memory_type_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Bandwidth unit +class ze_bandwidth_unit_v(IntEnum): + UNKNOWN = 0 ## The unit used for bandwidth is unknown + BYTES_PER_NANOSEC = 1 ## Bandwidth is provided in bytes/nanosec + BYTES_PER_CLOCK = 2 ## Bandwidth is provided in bytes/clock + +class ze_bandwidth_unit_t(c_int): + def __str__(self): + return str(ze_bandwidth_unit_v(self.value)) + + +############################################################################### +## @brief Latency unit +class ze_latency_unit_v(IntEnum): + UNKNOWN = 0 ## The unit used for latency is unknown + NANOSEC = 1 ## Latency is provided in nanosecs + CLOCK = 2 ## Latency is provided in clocks + HOP = 3 ## Latency is provided in hops (normalized so that the lowest latency + ## link has a latency of 1 hop) + +class ze_latency_unit_t(c_int): + def __str__(self): + return str(ze_latency_unit_v(self.value)) + + +############################################################################### +## @brief Maximum universal unique id (UUID) size in bytes +ZE_MAX_UUID_SIZE = 16 + +############################################################################### +## @brief Universal unique id (UUID) +class ze_uuid_t(Structure): + _fields_ = [ + ("id", c_ubyte * ZE_MAX_UUID_SIZE) ## [out] opaque data representing a UUID + ] + +############################################################################### +## @brief Base for all callback function parameter types +class ze_base_cb_params_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p) ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ] + +############################################################################### +## @brief Base for all properties types +class ze_base_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p) ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ] + +############################################################################### +## @brief Base for all descriptor types +class ze_base_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p) ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ] + +############################################################################### +## @brief IPC handle to counter based event +class ze_ipc_event_counter_based_handle_t(Structure): + _fields_ = [ + ("data", c_char * ZE_MAX_IPC_HANDLE_SIZE) ## [out] Opaque data representing an IPC handle + ] + +############################################################################### +## @brief Forces driver to only report devices (and sub-devices) as specified by +## values + +############################################################################### +## @brief Forces driver to report devices from lowest to highest PCI bus ID + +############################################################################### +## @brief Forces all shared allocations into device memory + +############################################################################### +## @brief Defines the device hierarchy model exposed by Level Zero driver +## implementation + +############################################################################### +## @brief Defines/Refines ordering of drivers reported to user + +############################################################################### +## @brief Supported initialization flags +class ze_init_flags_v(IntEnum): + GPU_ONLY = ZE_BIT(0) ## only initialize GPU drivers + VPU_ONLY = ZE_BIT(1) ## only initialize VPU drivers + +class ze_init_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Supported driver initialization type flags +## +## @details +## - Bit Field which details the driver types to be initialized and +## returned to the user. +## - Value Definition: +## - 0, do not init or retrieve any drivers. +## - ZE_INIT_DRIVER_TYPE_FLAG_GPU, GPU Drivers are Init and driver handles +## retrieved. +## - ZE_INIT_DRIVER_TYPE_FLAG_NPU, NPU Drivers are Init and driver handles +## retrieved. +## - ZE_INIT_DRIVER_TYPE_FLAG_GPU | ZE_INIT_DRIVER_TYPE_FLAG_NPU, NPU & GPU +## Drivers are Init and driver handles retrieved. +## - UINT32_MAX All Drivers of any type are Init and driver handles +## retrieved. +class ze_init_driver_type_flags_v(IntEnum): + GPU = ZE_BIT(0) ## initialize and retrieve GPU drivers + NPU = ZE_BIT(1) ## initialize and retrieve NPU drivers + +class ze_init_driver_type_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Init Driver Type descriptor +class ze_init_driver_type_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_init_driver_type_flags_t) ## [in] driver type init flags. + ## must be a valid combination of ::ze_init_driver_type_flag_t or UINT32_MAX; + ## driver types are init and retrieved based on these init flags in zeInitDrivers(). + ] + +############################################################################### +## @brief Supported API versions +## +## @details +## - API versions contain major and minor attributes, use +## ::ZE_MAJOR_VERSION and ::ZE_MINOR_VERSION +class ze_api_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + _1_1 = ZE_MAKE_VERSION( 1, 1 ) ## version 1.1 + _1_2 = ZE_MAKE_VERSION( 1, 2 ) ## version 1.2 + _1_3 = ZE_MAKE_VERSION( 1, 3 ) ## version 1.3 + _1_4 = ZE_MAKE_VERSION( 1, 4 ) ## version 1.4 + _1_5 = ZE_MAKE_VERSION( 1, 5 ) ## version 1.5 + _1_6 = ZE_MAKE_VERSION( 1, 6 ) ## version 1.6 + _1_7 = ZE_MAKE_VERSION( 1, 7 ) ## version 1.7 + _1_8 = ZE_MAKE_VERSION( 1, 8 ) ## version 1.8 + _1_9 = ZE_MAKE_VERSION( 1, 9 ) ## version 1.9 + _1_10 = ZE_MAKE_VERSION( 1, 10 ) ## version 1.10 + _1_11 = ZE_MAKE_VERSION( 1, 11 ) ## version 1.11 + _1_12 = ZE_MAKE_VERSION( 1, 12 ) ## version 1.12 + _1_13 = ZE_MAKE_VERSION( 1, 13 ) ## version 1.13 + _1_14 = ZE_MAKE_VERSION( 1, 14 ) ## version 1.14 + _1_15 = ZE_MAKE_VERSION( 1, 15 ) ## version 1.15 + CURRENT = ZE_MAKE_VERSION( 1, 15 ) ## latest known version + +class ze_api_version_t(c_int): + def __str__(self): + return str(ze_api_version_v(self.value)) + + +############################################################################### +## @brief Current API version as a macro +ZE_API_VERSION_CURRENT_M = ZE_MAKE_VERSION( 1, 15 ) + +############################################################################### +## @brief Maximum driver universal unique id (UUID) size in bytes +ZE_MAX_DRIVER_UUID_SIZE = 16 + +############################################################################### +## @brief Driver universal unique id (UUID) +class ze_driver_uuid_t(Structure): + _fields_ = [ + ("id", c_ubyte * ZE_MAX_DRIVER_UUID_SIZE) ## [out] opaque data representing a driver UUID + ] + +############################################################################### +## @brief Driver properties queried using ::zeDriverGetProperties +class ze_driver_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("uuid", ze_driver_uuid_t), ## [out] universal unique identifier. + ("driverVersion", c_ulong) ## [out] driver version + ## The driver version is a non-zero, monotonically increasing value where + ## higher values always indicate a more recent version. + ] + +############################################################################### +## @brief Supported IPC property flags +class ze_ipc_property_flags_v(IntEnum): + MEMORY = ZE_BIT(0) ## Supports passing memory allocations between processes. See + ## ::zeMemGetIpcHandle. + EVENT_POOL = ZE_BIT(1) ## Supports passing event pools between processes. See + ## ::zeEventPoolGetIpcHandle. + +class ze_ipc_property_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief IPC properties queried using ::zeDriverGetIpcProperties +class ze_driver_ipc_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_ipc_property_flags_t) ## [out] 0 (none) or a valid combination of ::ze_ipc_property_flag_t + ] + +############################################################################### +## @brief Maximum extension name string size +ZE_MAX_EXTENSION_NAME = 256 + +############################################################################### +## @brief Extension properties queried using ::zeDriverGetExtensionProperties +class ze_driver_extension_properties_t(Structure): + _fields_ = [ + ("name", c_char * ZE_MAX_EXTENSION_NAME), ## [out] extension name + ("version", c_ulong) ## [out] extension version using ::ZE_MAKE_VERSION + ] + +############################################################################### +## @brief Supported device types +class ze_device_type_v(IntEnum): + GPU = 1 ## Graphics Processing Unit + CPU = 2 ## Central Processing Unit + FPGA = 3 ## Field Programmable Gate Array + MCA = 4 ## Memory Copy Accelerator + VPU = 5 ## Vision Processing Unit + +class ze_device_type_t(c_int): + def __str__(self): + return str(ze_device_type_v(self.value)) + + +############################################################################### +## @brief Maximum device universal unique id (UUID) size in bytes +ZE_MAX_DEVICE_UUID_SIZE = 16 + +############################################################################### +## @brief Device universal unique id (UUID) +class ze_device_uuid_t(Structure): + _fields_ = [ + ("id", c_ubyte * ZE_MAX_DEVICE_UUID_SIZE) ## [out] opaque data representing a device UUID + ] + +############################################################################### +## @brief Maximum device name string size +ZE_MAX_DEVICE_NAME = 256 + +############################################################################### +## @brief Supported device property flags +class ze_device_property_flags_v(IntEnum): + INTEGRATED = ZE_BIT(0) ## Device is integrated with the Host. + SUBDEVICE = ZE_BIT(1) ## Device handle used for query represents a sub-device. + ECC = ZE_BIT(2) ## Device supports error correction memory access. + ONDEMANDPAGING = ZE_BIT(3) ## Device supports on-demand page-faulting. + +class ze_device_property_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Device properties queried using ::zeDeviceGetProperties +class ze_device_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("type", ze_device_type_t), ## [out] generic device type + ("vendorId", c_ulong), ## [out] vendor id from PCI configuration + ("deviceId", c_ulong), ## [out] device id from PCI configuration. + ## Note, the device id uses little-endian format. + ("flags", ze_device_property_flags_t), ## [out] 0 (none) or a valid combination of ::ze_device_property_flag_t + ("subdeviceId", c_ulong), ## [out] sub-device id. Only valid if ::ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE + ## is set. + ("coreClockRate", c_ulong), ## [out] Clock rate for device core. + ("maxMemAllocSize", c_ulonglong), ## [out] Maximum memory allocation size. + ("maxHardwareContexts", c_ulong), ## [out] Maximum number of logical hardware contexts. + ("maxCommandQueuePriority", c_ulong), ## [out] Maximum priority for command queues. Higher value is higher + ## priority. + ("numThreadsPerEU", c_ulong), ## [out] Maximum number of threads per EU. + ("physicalEUSimdWidth", c_ulong), ## [out] The physical EU simd width. + ("numEUsPerSubslice", c_ulong), ## [out] Maximum number of EUs per sub-slice. + ("numSubslicesPerSlice", c_ulong), ## [out] Maximum number of sub-slices per slice. + ("numSlices", c_ulong), ## [out] Maximum number of slices. + ("timerResolution", c_ulonglong), ## [out] Returns the resolution of device timer used for profiling, + ## timestamps, etc. When stype==::ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES the + ## units are in nanoseconds. When + ## stype==::ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES_1_2 units are in + ## cycles/sec + ("timestampValidBits", c_ulong), ## [out] Returns the number of valid bits in the timestamp value. + ("kernelTimestampValidBits", c_ulong), ## [out] Returns the number of valid bits in the kernel timestamp values + ("uuid", ze_device_uuid_t), ## [out] universal unique identifier. Note: Subdevices will have their + ## own uuid. + ("name", c_char * ZE_MAX_DEVICE_NAME) ## [out] Device name + ] + +############################################################################### +## @brief Device thread identifier. +class ze_device_thread_t(Structure): + _fields_ = [ + ("slice", c_ulong), ## [in,out] the slice number. + ## Must be `UINT32_MAX` (all) or less than the `numSlices` member of ::ze_device_properties_t. + ("subslice", c_ulong), ## [in,out] the sub-slice number within its slice. + ## Must be `UINT32_MAX` (all) or less than the `numSubslicesPerSlice` + ## member of ::ze_device_properties_t. + ("eu", c_ulong), ## [in,out] the EU number within its sub-slice. + ## Must be `UINT32_MAX` (all) or less than the `numEUsPerSubslice` member + ## of ::ze_device_properties_t. + ("thread", c_ulong) ## [in,out] the thread number within its EU. + ## Must be `UINT32_MAX` (all) or less than the `numThreadsPerEU` member + ## of ::ze_device_properties_t. + ] + +############################################################################### +## @brief Maximum number of subgroup sizes supported. +ZE_SUBGROUPSIZE_COUNT = 8 + +############################################################################### +## @brief Device compute properties queried using ::zeDeviceGetComputeProperties +class ze_device_compute_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("maxTotalGroupSize", c_ulong), ## [out] Maximum items per compute group. (groupSizeX * groupSizeY * + ## groupSizeZ) <= maxTotalGroupSize + ("maxGroupSizeX", c_ulong), ## [out] Maximum items for X dimension in group + ("maxGroupSizeY", c_ulong), ## [out] Maximum items for Y dimension in group + ("maxGroupSizeZ", c_ulong), ## [out] Maximum items for Z dimension in group + ("maxGroupCountX", c_ulong), ## [out] Maximum groups that can be launched for x dimension + ("maxGroupCountY", c_ulong), ## [out] Maximum groups that can be launched for y dimension + ("maxGroupCountZ", c_ulong), ## [out] Maximum groups that can be launched for z dimension + ("maxSharedLocalMemory", c_ulong), ## [out] Maximum shared local memory per group. + ("numSubGroupSizes", c_ulong), ## [out] Number of subgroup sizes supported. This indicates number of + ## entries in subGroupSizes. + ("subGroupSizes", c_ulong * ZE_SUBGROUPSIZE_COUNT) ## [out] Size group sizes supported. + ] + +############################################################################### +## @brief Maximum native kernel universal unique id (UUID) size in bytes +ZE_MAX_NATIVE_KERNEL_UUID_SIZE = 16 + +############################################################################### +## @brief Native kernel universal unique id (UUID) +class ze_native_kernel_uuid_t(Structure): + _fields_ = [ + ("id", c_ubyte * ZE_MAX_NATIVE_KERNEL_UUID_SIZE) ## [out] opaque data representing a native kernel UUID + ] + +############################################################################### +## @brief Supported device module flags +class ze_device_module_flags_v(IntEnum): + FP16 = ZE_BIT(0) ## Device supports 16-bit floating-point operations + FP64 = ZE_BIT(1) ## Device supports 64-bit floating-point operations + INT64_ATOMICS = ZE_BIT(2) ## Device supports 64-bit atomic operations + DP4A = ZE_BIT(3) ## Device supports four component dot product and accumulate operations + +class ze_device_module_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Supported floating-Point capability flags +class ze_device_fp_flags_v(IntEnum): + DENORM = ZE_BIT(0) ## Supports denorms + INF_NAN = ZE_BIT(1) ## Supports INF and quiet NaNs + ROUND_TO_NEAREST = ZE_BIT(2) ## Supports rounding to nearest even rounding mode + ROUND_TO_ZERO = ZE_BIT(3) ## Supports rounding to zero. + ROUND_TO_INF = ZE_BIT(4) ## Supports rounding to both positive and negative INF. + FMA = ZE_BIT(5) ## Supports IEEE754-2008 fused multiply-add. + ROUNDED_DIVIDE_SQRT = ZE_BIT(6) ## Supports rounding as defined by IEEE754 for divide and sqrt + ## operations. + SOFT_FLOAT = ZE_BIT(7) ## Uses software implementation for basic floating-point operations. + +class ze_device_fp_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Device module properties queried using ::zeDeviceGetModuleProperties +class ze_device_module_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("spirvVersionSupported", c_ulong), ## [out] Maximum supported SPIR-V version. + ## Returns zero if SPIR-V is not supported. + ## Contains major and minor attributes, use ::ZE_MAJOR_VERSION and ::ZE_MINOR_VERSION. + ("flags", ze_device_module_flags_t), ## [out] 0 or a valid combination of ::ze_device_module_flag_t + ("fp16flags", ze_device_fp_flags_t), ## [out] Capabilities for half-precision floating-point operations. + ## returns 0 (if ::ZE_DEVICE_MODULE_FLAG_FP16 is not set) or a + ## combination of ::ze_device_fp_flag_t. + ("fp32flags", ze_device_fp_flags_t), ## [out] Capabilities for single-precision floating-point operations. + ## returns a combination of ::ze_device_fp_flag_t. + ("fp64flags", ze_device_fp_flags_t), ## [out] Capabilities for double-precision floating-point operations. + ## returns 0 (if ::ZE_DEVICE_MODULE_FLAG_FP64 is not set) or a + ## combination of ::ze_device_fp_flag_t. + ("maxArgumentsSize", c_ulong), ## [out] Maximum kernel argument size that is supported. + ("printfBufferSize", c_ulong), ## [out] Maximum size of internal buffer that holds output of printf + ## calls from kernel. + ("nativeKernelSupported", ze_native_kernel_uuid_t) ## [out] Compatibility UUID of supported native kernel. + ## UUID may or may not be the same across driver release, devices, or + ## operating systems. + ## Application is responsible for ensuring UUID matches before creating + ## module using + ## previously created native kernel. + ] + +############################################################################### +## @brief Supported command queue group property flags +class ze_command_queue_group_property_flags_v(IntEnum): + COMPUTE = ZE_BIT(0) ## Command queue group supports enqueing compute commands. + COPY = ZE_BIT(1) ## Command queue group supports enqueing copy commands. + COOPERATIVE_KERNELS = ZE_BIT(2) ## Command queue group supports cooperative kernels. + ## See ::zeCommandListAppendLaunchCooperativeKernel for more details. + METRICS = ZE_BIT(3) ## Command queue groups supports metric queries. + +class ze_command_queue_group_property_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Command queue group properties queried using +## ::zeDeviceGetCommandQueueGroupProperties +class ze_command_queue_group_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_command_queue_group_property_flags_t), ## [out] 0 (none) or a valid combination of + ## ::ze_command_queue_group_property_flag_t + ("maxMemoryFillPatternSize", c_size_t), ## [out] maximum `pattern_size` supported by command queue group. + ## See ::zeCommandListAppendMemoryFill for more details. + ("numQueues", c_ulong) ## [out] the number of physical engines within the group. + ] + +############################################################################### +## @brief Supported device memory property flags +class ze_device_memory_property_flags_v(IntEnum): + TBD = ZE_BIT(0) ## reserved for future use + +class ze_device_memory_property_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Device local memory properties queried using +## ::zeDeviceGetMemoryProperties +class ze_device_memory_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_device_memory_property_flags_t), ## [out] 0 (none) or a valid combination of + ## ::ze_device_memory_property_flag_t + ("maxClockRate", c_ulong), ## [out] Maximum clock rate for device memory. + ("maxBusWidth", c_ulong), ## [out] Maximum bus width between device and memory. + ("totalSize", c_ulonglong), ## [out] Total memory size in bytes that is available to the device. + ("name", c_char * ZE_MAX_DEVICE_NAME) ## [out] Memory name + ] + +############################################################################### +## @brief Memory access capability flags +## +## @details +## - Supported access capabilities for different types of memory +## allocations +class ze_memory_access_cap_flags_v(IntEnum): + RW = ZE_BIT(0) ## Supports load/store access + ATOMIC = ZE_BIT(1) ## Supports atomic access + CONCURRENT = ZE_BIT(2) ## Supports concurrent access + CONCURRENT_ATOMIC = ZE_BIT(3) ## Supports concurrent atomic access + +class ze_memory_access_cap_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Device memory access properties queried using +## ::zeDeviceGetMemoryAccessProperties +class ze_device_memory_access_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("hostAllocCapabilities", ze_memory_access_cap_flags_t), ## [out] host memory capabilities. + ## returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t. + ("deviceAllocCapabilities", ze_memory_access_cap_flags_t), ## [out] device memory capabilities. + ## returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t. + ("sharedSingleDeviceAllocCapabilities", ze_memory_access_cap_flags_t), ## [out] shared, single-device memory capabilities. + ## returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t. + ("sharedCrossDeviceAllocCapabilities", ze_memory_access_cap_flags_t), ## [out] shared, cross-device memory capabilities. + ## returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t. + ("sharedSystemAllocCapabilities", ze_memory_access_cap_flags_t) ## [out] shared, system memory capabilities. + ## returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t. + ] + +############################################################################### +## @brief Supported cache control property flags +class ze_device_cache_property_flags_v(IntEnum): + USER_CONTROL = ZE_BIT(0) ## Device support User Cache Control (i.e. SLM section vs Generic Cache) + +class ze_device_cache_property_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Device cache properties queried using ::zeDeviceGetCacheProperties +class ze_device_cache_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_device_cache_property_flags_t), ## [out] 0 (none) or a valid combination of + ## ::ze_device_cache_property_flag_t + ("cacheSize", c_size_t) ## [out] Per-cache size, in bytes + ] + +############################################################################### +## @brief Device image properties queried using ::zeDeviceGetImageProperties +class ze_device_image_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("maxImageDims1D", c_ulong), ## [out] Maximum image dimensions for 1D resources. if 0, then 1D images + ## are unsupported. + ("maxImageDims2D", c_ulong), ## [out] Maximum image dimensions for 2D resources. if 0, then 2D images + ## are unsupported. + ("maxImageDims3D", c_ulong), ## [out] Maximum image dimensions for 3D resources. if 0, then 3D images + ## are unsupported. + ("maxImageBufferSize", c_ulonglong), ## [out] Maximum image buffer size in bytes. if 0, then buffer images are + ## unsupported. + ("maxImageArraySlices", c_ulong), ## [out] Maximum image array slices. if 0, then image arrays are + ## unsupported. + ("maxSamplers", c_ulong), ## [out] Max samplers that can be used in kernel. if 0, then sampling is + ## unsupported. + ("maxReadImageArgs", c_ulong), ## [out] Returns the maximum number of simultaneous image objects that + ## can be read from by a kernel. if 0, then reading images is + ## unsupported. + ("maxWriteImageArgs", c_ulong) ## [out] Returns the maximum number of simultaneous image objects that + ## can be written to by a kernel. if 0, then writing images is + ## unsupported. + ] + +############################################################################### +## @brief Device external memory import and export properties +class ze_device_external_memory_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("memoryAllocationImportTypes", ze_external_memory_type_flags_t), ## [out] Supported external memory import types for memory allocations. + ("memoryAllocationExportTypes", ze_external_memory_type_flags_t), ## [out] Supported external memory export types for memory allocations. + ("imageImportTypes", ze_external_memory_type_flags_t), ## [out] Supported external memory import types for images. + ("imageExportTypes", ze_external_memory_type_flags_t) ## [out] Supported external memory export types for images. + ] + +############################################################################### +## @brief Supported device peer-to-peer property flags +class ze_device_p2p_property_flags_v(IntEnum): + ACCESS = ZE_BIT(0) ## Device supports access between peer devices. + ATOMICS = ZE_BIT(1) ## Device supports atomics between peer devices. + +class ze_device_p2p_property_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Device peer-to-peer properties queried using +## ::zeDeviceGetP2PProperties +class ze_device_p2p_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_device_p2p_property_flags_t) ## [out] 0 (none) or a valid combination of + ## ::ze_device_p2p_property_flag_t + ] + +############################################################################### +## @brief Supported Event properties flags +class ze_device_event_properties_flags_v(IntEnum): + COUNTER_BASED_EXTERNAL_AGGREGATE_STORAGE = ZE_BIT(0) ## Counter-based Event with external aggregate storage supported + COUNTER_BASED_IPC = ZE_BIT(1) ## Counter-based Event IPC sharing supported + COUNTER_BASED_EXTERNAL_SYNC_ALLOCATION = ZE_BIT(2) ## Counter-based Event with external sync allocation supported + COUNTER_BASED_EXTERNAL_INTERRUPT_WAIT = ZE_BIT(3) ## Counter-based Event waiting for external interrupt id supported + +class ze_device_event_properties_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Device Event properties struct. Can be passed as pNext to +## ::ze_device_properties_t to obtain properties +class ze_device_event_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_device_event_properties_flags_t) ## [out] Supported Event properties. Valid combination of + ## ::ze_device_event_properties_flag_t. + ] + +############################################################################### +## @brief Supported context creation flags +class ze_context_flags_v(IntEnum): + TBD = ZE_BIT(0) ## reserved for future use + +class ze_context_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Context descriptor +class ze_context_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_context_flags_t) ## [in] creation flags. + ## must be 0 (default) or a valid combination of ::ze_context_flag_t; + ## default behavior may use implicit driver-based heuristics. + ] + +############################################################################### +## @brief Supported command queue flags +class ze_command_queue_flags_v(IntEnum): + EXPLICIT_ONLY = ZE_BIT(0) ## command queue should be optimized for submission to a single device engine. + ## driver **must** disable any implicit optimizations for distributing + ## work across multiple engines. + ## this flag should be used when applications want full control over + ## multi-engine submission and scheduling. + ## This flag is **DEPRECATED** as flag + ## ${X}_COMMAND_LIST_FLAG_EXPLICIT_ONLY is **DEPRECATED**. + IN_ORDER = ZE_BIT(1) ## To be used only when creating immediate command lists. Commands + ## appended to the immediate command + ## list are executed in-order, with driver implementation enforcing + ## dependencies between them. + ## Application is not required to have the signal event of a given + ## command being the wait event of + ## the next to define an in-order list, and application is allowed to + ## pass signal and wait events + ## to each appended command to implement more complex dependency graphs. + COPY_OFFLOAD_HINT = ZE_BIT(2) ## To be used only when creating immediate command lists and only for + ## compute queues. + ## Try to offload copy operations to different engines. This is only a hint. + ## Driver may ignore it per append call, based on platform capabilities + ## or internal heuristics. + +class ze_command_queue_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Supported command queue modes +class ze_command_queue_mode_v(IntEnum): + DEFAULT = 0 ## implicit default behavior; uses driver-based heuristics + SYNCHRONOUS = 1 ## Device execution always completes immediately on execute; + ## Host thread is blocked using wait on implicit synchronization object + ASYNCHRONOUS = 2 ## Device execution is scheduled and will complete in future; + ## explicit synchronization object must be used to determine completeness + +class ze_command_queue_mode_t(c_int): + def __str__(self): + return str(ze_command_queue_mode_v(self.value)) + + +############################################################################### +## @brief Supported command queue priorities +class ze_command_queue_priority_v(IntEnum): + NORMAL = 0 ## [default] normal priority + PRIORITY_LOW = 1 ## lower priority than normal + PRIORITY_HIGH = 2 ## higher priority than normal + +class ze_command_queue_priority_t(c_int): + def __str__(self): + return str(ze_command_queue_priority_v(self.value)) + + +############################################################################### +## @brief Command Queue descriptor +class ze_command_queue_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("ordinal", c_ulong), ## [in] command queue group ordinal + ("index", c_ulong), ## [in] command queue index within the group; + ## must be zero. + ("flags", ze_command_queue_flags_t), ## [in] usage flags. + ## must be 0 (default) or a valid combination of ::ze_command_queue_flag_t; + ## default behavior may use implicit driver-based heuristics to balance + ## latency and throughput. + ("mode", ze_command_queue_mode_t), ## [in] operation mode + ("priority", ze_command_queue_priority_t) ## [in] priority + ] + +############################################################################### +## @brief Supported command list creation flags +class ze_command_list_flags_v(IntEnum): + RELAXED_ORDERING = ZE_BIT(0) ## driver may reorder commands (e.g., kernels, copies) between barriers + ## and synchronization primitives. + ## using this flag may increase Host overhead of ::zeCommandListClose. + ## therefore, this flag should **not** be set for low-latency usage-models. + MAXIMIZE_THROUGHPUT = ZE_BIT(1) ## driver may perform additional optimizations that increase execution + ## throughput. + ## using this flag may increase Host overhead of ::zeCommandListClose and ::zeCommandQueueExecuteCommandLists. + ## therefore, this flag should **not** be set for low-latency usage-models. + EXPLICIT_ONLY = ZE_BIT(2) ## command list should be optimized for submission to a single command + ## queue and device engine. + ## driver **must** disable any implicit optimizations for distributing + ## work across multiple engines. + ## this flag should be used when applications want full control over + ## multi-engine submission and scheduling. + ## This flag is **DEPRECATED** and implementations are not expected to + ## support this feature. + IN_ORDER = ZE_BIT(3) ## commands appended to this command list are executed in-order, with + ## driver implementation + ## enforcing dependencies between them. Application is not required to + ## have the signal event + ## of a given command being the wait event of the next to define an + ## in-order list, and + ## application is allowed to pass signal and wait events to each appended + ## command to implement + ## more complex dependency graphs. Cannot be combined with ::ZE_COMMAND_LIST_FLAG_RELAXED_ORDERING. + EXP_CLONEABLE = ZE_BIT(4) ## this command list may be cloned using ::zeCommandListCreateCloneExp + ## after ::zeCommandListClose. + COPY_OFFLOAD_HINT = ZE_BIT(5) ## Try to offload copy operations to different engines. Applicable only + ## for compute queues. + ## This is only a hint. Driver may ignore it per append call, based on + ## platform capabilities or internal heuristics. + +class ze_command_list_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Command List descriptor +class ze_command_list_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("commandQueueGroupOrdinal", c_ulong), ## [in] command queue group ordinal to which this command list will be + ## submitted + ("flags", ze_command_list_flags_t) ## [in] usage flags. + ## must be 0 (default) or a valid combination of ::ze_command_list_flag_t; + ## default behavior may use implicit driver-based heuristics to balance + ## latency and throughput. + ] + +############################################################################### +## @brief Copy region descriptor +class ze_copy_region_t(Structure): + _fields_ = [ + ("originX", c_ulong), ## [in] The origin x offset for region in bytes + ("originY", c_ulong), ## [in] The origin y offset for region in rows + ("originZ", c_ulong), ## [in] The origin z offset for region in slices + ("width", c_ulong), ## [in] The region width relative to origin in bytes + ("height", c_ulong), ## [in] The region height relative to origin in rows + ("depth", c_ulong) ## [in] The region depth relative to origin in slices. Set this to 0 for + ## 2D copy. + ] + +############################################################################### +## @brief Region descriptor +class ze_image_region_t(Structure): + _fields_ = [ + ("originX", c_ulong), ## [in] The origin x offset for region in pixels + ("originY", c_ulong), ## [in] The origin y offset for region in pixels + ("originZ", c_ulong), ## [in] The origin z offset for region in pixels + ("width", c_ulong), ## [in] The region width relative to origin in pixels + ("height", c_ulong), ## [in] The region height relative to origin in pixels + ("depth", c_ulong) ## [in] The region depth relative to origin. For 1D or 2D images, set + ## this to 1. + ] + +############################################################################### +## @brief Supported memory advice hints +class ze_memory_advice_v(IntEnum): + SET_READ_MOSTLY = 0 ## hint that memory will be read from frequently and written to rarely + CLEAR_READ_MOSTLY = 1 ## removes the effect of ::ZE_MEMORY_ADVICE_SET_READ_MOSTLY + SET_PREFERRED_LOCATION = 2 ## hint that the preferred memory location is the specified device + CLEAR_PREFERRED_LOCATION = 3 ## removes the effect of ::ZE_MEMORY_ADVICE_SET_PREFERRED_LOCATION + SET_NON_ATOMIC_MOSTLY = 4 ## hints that memory will mostly be accessed non-atomically + CLEAR_NON_ATOMIC_MOSTLY = 5 ## removes the effect of ::ZE_MEMORY_ADVICE_SET_NON_ATOMIC_MOSTLY + BIAS_CACHED = 6 ## hints that memory should be cached + BIAS_UNCACHED = 7 ## hints that memory should be not be cached + SET_SYSTEM_MEMORY_PREFERRED_LOCATION = 8 ## hint that the preferred memory location is host memory + CLEAR_SYSTEM_MEMORY_PREFERRED_LOCATION = 9 ## removes the effect of + ## ::ZE_MEMORY_ADVICE_SET_SYSTEM_MEMORY_PREFERRED_LOCATION + +class ze_memory_advice_t(c_int): + def __str__(self): + return str(ze_memory_advice_v(self.value)) + + +############################################################################### +## @brief Supported event pool creation flags +class ze_event_pool_flags_v(IntEnum): + HOST_VISIBLE = ZE_BIT(0) ## signals and waits are also visible to host + IPC = ZE_BIT(1) ## signals and waits may be shared across processes + KERNEL_TIMESTAMP = ZE_BIT(2) ## Indicates all events in pool will contain kernel timestamps + KERNEL_MAPPED_TIMESTAMP = ZE_BIT(3) ## Indicates all events in pool will contain kernel timestamps + ## synchronized to host time domain; cannot be combined with + ## ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP + +class ze_event_pool_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Event pool descriptor +class ze_event_pool_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_event_pool_flags_t), ## [in] creation flags. + ## must be 0 (default) or a valid combination of ::ze_event_pool_flag_t; + ## default behavior is signals and waits are visible to the entire device + ## and peer devices. + ("count", c_ulong) ## [in] number of events within the pool; must be greater than 0 + ] + +############################################################################### +## @brief Supported event scope flags +class ze_event_scope_flags_v(IntEnum): + SUBDEVICE = ZE_BIT(0) ## cache hierarchies are flushed or invalidated sufficient for local + ## sub-device access + DEVICE = ZE_BIT(1) ## cache hierarchies are flushed or invalidated sufficient for global + ## device access and peer device access + HOST = ZE_BIT(2) ## cache hierarchies are flushed or invalidated sufficient for device and + ## host access + +class ze_event_scope_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Supported flags for defining counter based event +class ze_event_counter_based_flags_v(IntEnum): + IMMEDIATE = ZE_BIT(0) ## Counter-based event is used for immediate command lists (default) + NON_IMMEDIATE = ZE_BIT(1) ## Counter-based event is used for non-immediate command lists + HOST_VISIBLE = ZE_BIT(2) ## Signals and waits are also visible to host + IPC = ZE_BIT(3) ## Event can be shared across processes for waiting + DEVICE_TIMESTAMP = ZE_BIT(4) ## Event contains timestamps populated in the device time domain. + ## Implementation of this can be vendor specific, but typically pulled + ## from timers on the offload device and not the host. + ## Cannot be combined with ::ZE_EVENT_COUNTER_BASED_FLAG_HOST_TIMESTAMP + HOST_TIMESTAMP = ZE_BIT(5) ## Indicates that event will contain timestamps converted to the host + ## time domain + ## Cannot be combined with ::ZE_EVENT_COUNTER_BASED_FLAG_DEVICE_TIMESTAMP + ## It is recommended to use this flag for most users that want to + ## correlate timestamps from the host and device into a single timeline. + ## For host timestamps see ::zeDeviceGetGlobalTimestamps. + +class ze_event_counter_based_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Supported event sync mode flags +class ze_event_sync_mode_flags_v(IntEnum): + LOW_POWER_WAIT = ZE_BIT(0) ## Low power host synchronization mode, for better CPU utilization + SIGNAL_INTERRUPT = ZE_BIT(1) ## Generate interrupt when Event is signalled on Device. It may be used + ## to optimize low power CPU synchronization + EXTERNAL_INTERRUPT_WAIT = ZE_BIT(2) ## Host synchronization APIs wait for external interrupt id. Can be used + ## only for Counter Based Events + +class ze_event_sync_mode_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Event sync mode descriptor +class ze_event_sync_mode_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("syncModeFlags", ze_event_sync_mode_flags_t), ## [in] valid combination of ::ze_event_sync_mode_flag_t + ("externalInterruptId", c_ulong) ## [in] External interrupt id. Used only when + ## ::ZE_EVENT_SYNC_MODE_FLAG_EXTERNAL_INTERRUPT_WAIT flag is set + ] + +############################################################################### +## @brief Event descriptor +class ze_event_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("index", c_ulong), ## [in] index of the event within the pool; must be less than the count + ## specified during pool creation + ("signal", ze_event_scope_flags_t), ## [in] defines the scope of relevant cache hierarchies to flush on a + ## signal action before the event is triggered. + ## must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; + ## default behavior is synchronization within the command list only, no + ## additional cache hierarchies are flushed. + ("wait", ze_event_scope_flags_t) ## [in] defines the scope of relevant cache hierarchies to invalidate on + ## a wait action after the event is complete. + ## must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; + ## default behavior is synchronization within the command list only, no + ## additional cache hierarchies are invalidated. + ] + +############################################################################### +## @brief Counter Based Event descriptor +class ze_event_counter_based_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_event_counter_based_flags_t), ## [in] counter based event flags. + ## Must be 0 (default) or a valid combination of ::ze_event_counter_based_flag_t + ("signal", ze_event_scope_flags_t), ## [in] defines the scope of relevant cache hierarchies to flush on a + ## signal action before the event is triggered. + ## must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; + ## default behavior is synchronization within the command list only, no + ## additional cache hierarchies are flushed. + ("wait", ze_event_scope_flags_t) ## [in] defines the scope of relevant cache hierarchies to invalidate on + ## a wait action after the event is complete. + ## must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; + ## default behavior is synchronization within the command list only, no + ## additional cache hierarchies are invalidated. + ] + +############################################################################### +## @brief Counter Based Event external sync allocation descriptor. Passed as +## pNext to ::ze_event_counter_based_desc_t +class ze_event_counter_based_external_sync_allocation_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("deviceAddress", POINTER(c_ulonglong)), ## [in] device address for external synchronization allocation + ("hostAddress", POINTER(c_ulonglong)), ## [in] host address for external synchronization allocation + ("completionValue", c_ulonglong) ## [in] completion value for external synchronization allocation + ] + +############################################################################### +## @brief Counter Based Event external aggregate storage. Passed as pNext to +## ::ze_event_counter_based_desc_t +class ze_event_counter_based_external_aggregate_storage_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("deviceAddress", POINTER(c_ulonglong)), ## [in] device address that would be updated with atomic_add upon + ## signaling of this event, must be device USM memory + ("incrementValue", c_ulonglong), ## [in] value which would by atomically added upon each completion + ("completionValue", c_ulonglong) ## [in] final completion value, when value under deviceAddress is equal + ## or greater then this value then event is considered as completed + ] + +############################################################################### +## @brief Kernel timestamp clock data +## +## @details +## - The timestamp frequency can be queried from the `timerResolution` +## member of ::ze_device_properties_t. +## - The number of valid bits in the timestamp value can be queried from +## the `kernelTimestampValidBits` member of ::ze_device_properties_t. +class ze_kernel_timestamp_data_t(Structure): + _fields_ = [ + ("kernelStart", c_ulonglong), ## [out] device clock at start of kernel execution + ("kernelEnd", c_ulonglong) ## [out] device clock at end of kernel execution + ] + +############################################################################### +## @brief Kernel timestamp result +class ze_kernel_timestamp_result_t(Structure): + _fields_ = [ + ("global", ze_kernel_timestamp_data_t), ## [out] wall-clock data + ("context", ze_kernel_timestamp_data_t) ## [out] context-active data; only includes clocks while device context + ## was actively executing. + ] + +############################################################################### +## @brief Supported fence creation flags +class ze_fence_flags_v(IntEnum): + SIGNALED = ZE_BIT(0) ## fence is created in the signaled state, otherwise not signaled. + +class ze_fence_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Fence descriptor +class ze_fence_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_fence_flags_t) ## [in] creation flags. + ## must be 0 (default) or a valid combination of ::ze_fence_flag_t. + ] + +############################################################################### +## @brief Supported image creation flags +class ze_image_flags_v(IntEnum): + KERNEL_WRITE = ZE_BIT(0) ## kernels will write contents + BIAS_UNCACHED = ZE_BIT(1) ## device should not cache contents + +class ze_image_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Supported image types +class ze_image_type_v(IntEnum): + _1D = 0 ## 1D + _1DARRAY = 1 ## 1D array + _2D = 2 ## 2D + _2DARRAY = 3 ## 2D array + _3D = 4 ## 3D + BUFFER = 5 ## Buffer + +class ze_image_type_t(c_int): + def __str__(self): + return str(ze_image_type_v(self.value)) + + +############################################################################### +## @brief Supported image format layouts +class ze_image_format_layout_v(IntEnum): + _8 = 0 ## 8-bit single component layout + _16 = 1 ## 16-bit single component layout + _32 = 2 ## 32-bit single component layout + _8_8 = 3 ## 2-component 8-bit layout + _8_8_8_8 = 4 ## 4-component 8-bit layout + _16_16 = 5 ## 2-component 16-bit layout + _16_16_16_16 = 6 ## 4-component 16-bit layout + _32_32 = 7 ## 2-component 32-bit layout + _32_32_32_32 = 8 ## 4-component 32-bit layout + _10_10_10_2 = 9 ## 4-component 10_10_10_2 layout + _11_11_10 = 10 ## 3-component 11_11_10 layout + _5_6_5 = 11 ## 3-component 5_6_5 layout + _5_5_5_1 = 12 ## 4-component 5_5_5_1 layout + _4_4_4_4 = 13 ## 4-component 4_4_4_4 layout + Y8 = 14 ## Media Format: Y8. Format type and swizzle is ignored for this. + NV12 = 15 ## Media Format: NV12. Format type and swizzle is ignored for this. + YUYV = 16 ## Media Format: YUYV. Format type and swizzle is ignored for this. + VYUY = 17 ## Media Format: VYUY. Format type and swizzle is ignored for this. + YVYU = 18 ## Media Format: YVYU. Format type and swizzle is ignored for this. + UYVY = 19 ## Media Format: UYVY. Format type and swizzle is ignored for this. + AYUV = 20 ## Media Format: AYUV. Format type and swizzle is ignored for this. + P010 = 21 ## Media Format: P010. Format type and swizzle is ignored for this. + Y410 = 22 ## Media Format: Y410. Format type and swizzle is ignored for this. + P012 = 23 ## Media Format: P012. Format type and swizzle is ignored for this. + Y16 = 24 ## Media Format: Y16. Format type and swizzle is ignored for this. + P016 = 25 ## Media Format: P016. Format type and swizzle is ignored for this. + Y216 = 26 ## Media Format: Y216. Format type and swizzle is ignored for this. + P216 = 27 ## Media Format: P216. Format type and swizzle is ignored for this. + P8 = 28 ## Media Format: P8. Format type and swizzle is ignored for this. + YUY2 = 29 ## Media Format: YUY2. Format type and swizzle is ignored for this. + A8P8 = 30 ## Media Format: A8P8. Format type and swizzle is ignored for this. + IA44 = 31 ## Media Format: IA44. Format type and swizzle is ignored for this. + AI44 = 32 ## Media Format: AI44. Format type and swizzle is ignored for this. + Y416 = 33 ## Media Format: Y416. Format type and swizzle is ignored for this. + Y210 = 34 ## Media Format: Y210. Format type and swizzle is ignored for this. + I420 = 35 ## Media Format: I420. Format type and swizzle is ignored for this. + YV12 = 36 ## Media Format: YV12. Format type and swizzle is ignored for this. + _400P = 37 ## Media Format: 400P. Format type and swizzle is ignored for this. + _422H = 38 ## Media Format: 422H. Format type and swizzle is ignored for this. + _422V = 39 ## Media Format: 422V. Format type and swizzle is ignored for this. + _444P = 40 ## Media Format: 444P. Format type and swizzle is ignored for this. + RGBP = 41 ## Media Format: RGBP. Format type and swizzle is ignored for this. + BRGP = 42 ## Media Format: BRGP. Format type and swizzle is ignored for this. + _8_8_8 = 43 ## 3-component 8-bit layout + _16_16_16 = 44 ## 3-component 16-bit layout + _32_32_32 = 45 ## 3-component 32-bit layout + +class ze_image_format_layout_t(c_int): + def __str__(self): + return str(ze_image_format_layout_v(self.value)) + + +############################################################################### +## @brief Supported image format types +class ze_image_format_type_v(IntEnum): + UINT = 0 ## Unsigned integer + SINT = 1 ## Signed integer + UNORM = 2 ## Unsigned normalized integer + SNORM = 3 ## Signed normalized integer + FLOAT = 4 ## Float + +class ze_image_format_type_t(c_int): + def __str__(self): + return str(ze_image_format_type_v(self.value)) + + +############################################################################### +## @brief Supported image format component swizzle into channel +class ze_image_format_swizzle_v(IntEnum): + R = 0 ## Red component + G = 1 ## Green component + B = 2 ## Blue component + A = 3 ## Alpha component + _0 = 4 ## Zero + _1 = 5 ## One + X = 6 ## Don't care + D = 7 ## Depth Component + +class ze_image_format_swizzle_t(c_int): + def __str__(self): + return str(ze_image_format_swizzle_v(self.value)) + + +############################################################################### +## @brief Image format +class ze_image_format_t(Structure): + _fields_ = [ + ("layout", ze_image_format_layout_t), ## [in] image format component layout (e.g. N-component layouts and media + ## formats) + ("type", ze_image_format_type_t), ## [in] image format type + ("x", ze_image_format_swizzle_t), ## [in] image component swizzle into channel x + ("y", ze_image_format_swizzle_t), ## [in] image component swizzle into channel y + ("z", ze_image_format_swizzle_t), ## [in] image component swizzle into channel z + ("w", ze_image_format_swizzle_t) ## [in] image component swizzle into channel w + ] + +############################################################################### +## @brief Image descriptor +class ze_image_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_image_flags_t), ## [in] creation flags. + ## must be 0 (default) or a valid combination of ::ze_image_flag_t; + ## default is read-only, cached access. + ("type", ze_image_type_t), ## [in] image type. Media format layouts are unsupported for + ## ::ZE_IMAGE_TYPE_BUFFER + ("format", ze_image_format_t), ## [in] image format + ("width", c_ulonglong), ## [in] width dimension. + ## ::ZE_IMAGE_TYPE_BUFFER: size in bytes; see the `maxImageBufferSize` + ## member of ::ze_device_image_properties_t for limits. + ## ::ZE_IMAGE_TYPE_1D, ::ZE_IMAGE_TYPE_1DARRAY: width in pixels; see the + ## `maxImageDims1D` member of ::ze_device_image_properties_t for limits. + ## ::ZE_IMAGE_TYPE_2D, ::ZE_IMAGE_TYPE_2DARRAY: width in pixels; see the + ## `maxImageDims2D` member of ::ze_device_image_properties_t for limits. + ## ::ZE_IMAGE_TYPE_3D: width in pixels; see the `maxImageDims3D` member + ## of ::ze_device_image_properties_t for limits. + ("height", c_ulong), ## [in] height dimension. + ## ::ZE_IMAGE_TYPE_2D, ::ZE_IMAGE_TYPE_2DARRAY: height in pixels; see the + ## `maxImageDims2D` member of ::ze_device_image_properties_t for limits. + ## ::ZE_IMAGE_TYPE_3D: height in pixels; see the `maxImageDims3D` member + ## of ::ze_device_image_properties_t for limits. + ## other: ignored. + ("depth", c_ulong), ## [in] depth dimension. + ## ::ZE_IMAGE_TYPE_3D: depth in pixels; see the `maxImageDims3D` member + ## of ::ze_device_image_properties_t for limits. + ## other: ignored. + ("arraylevels", c_ulong), ## [in] array levels. + ## ::ZE_IMAGE_TYPE_1DARRAY, ::ZE_IMAGE_TYPE_2DARRAY: see the + ## `maxImageArraySlices` member of ::ze_device_image_properties_t for limits. + ## other: ignored. + ("miplevels", c_ulong) ## [in] mipmap levels (must be 0) + ] + +############################################################################### +## @brief Supported sampler filtering flags +class ze_image_sampler_filter_flags_v(IntEnum): + POINT = ZE_BIT(0) ## device supports point filtering + LINEAR = ZE_BIT(1) ## device supports linear filtering + +class ze_image_sampler_filter_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Image properties +class ze_image_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("samplerFilterFlags", ze_image_sampler_filter_flags_t) ## [out] supported sampler filtering. + ## returns 0 (unsupported) or a combination of ::ze_image_sampler_filter_flag_t. + ] + +############################################################################### +## @brief Supported memory allocation flags +class ze_device_mem_alloc_flags_v(IntEnum): + BIAS_CACHED = ZE_BIT(0) ## device should cache allocation + BIAS_UNCACHED = ZE_BIT(1) ## device should not cache allocation (UC) + BIAS_INITIAL_PLACEMENT = ZE_BIT(2) ## optimize shared allocation for first access on the device + +class ze_device_mem_alloc_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Device memory allocation descriptor +class ze_device_mem_alloc_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_device_mem_alloc_flags_t), ## [in] flags specifying additional allocation controls. + ## must be 0 (default) or a valid combination of ::ze_device_mem_alloc_flag_t; + ## default behavior may use implicit driver-based heuristics. + ("ordinal", c_ulong) ## [in] ordinal of the device's local memory to allocate from. + ## must be less than the count returned from ::zeDeviceGetMemoryProperties. + ] + +############################################################################### +## @brief Supported host memory allocation flags +class ze_host_mem_alloc_flags_v(IntEnum): + BIAS_CACHED = ZE_BIT(0) ## host should cache allocation + BIAS_UNCACHED = ZE_BIT(1) ## host should not cache allocation (UC) + BIAS_WRITE_COMBINED = ZE_BIT(2) ## host memory should be allocated write-combined (WC) + BIAS_INITIAL_PLACEMENT = ZE_BIT(3) ## optimize shared allocation for first access on the host + +class ze_host_mem_alloc_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Host memory allocation descriptor +class ze_host_mem_alloc_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_host_mem_alloc_flags_t) ## [in] flags specifying additional allocation controls. + ## must be 0 (default) or a valid combination of ::ze_host_mem_alloc_flag_t; + ## default behavior may use implicit driver-based heuristics. + ] + +############################################################################### +## @brief Memory allocation type +class ze_memory_type_v(IntEnum): + UNKNOWN = 0 ## the memory pointed to is of unknown type + HOST = 1 ## the memory pointed to is a host allocation + DEVICE = 2 ## the memory pointed to is a device allocation + SHARED = 3 ## the memory pointed to is a shared ownership allocation + HOST_IMPORTED = 4 ## the memory pointed to is a host allocation created from external + ## system memory + +class ze_memory_type_t(c_int): + def __str__(self): + return str(ze_memory_type_v(self.value)) + + +############################################################################### +## @brief Memory allocation properties queried using ::zeMemGetAllocProperties +class ze_memory_allocation_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("type", ze_memory_type_t), ## [out] type of allocated memory + ("id", c_ulonglong), ## [out] identifier for this allocation + ("pageSize", c_ulonglong) ## [out] page size used for allocation + ] + +############################################################################### +## @brief Supported IPC memory flags +class ze_ipc_memory_flags_v(IntEnum): + BIAS_CACHED = ZE_BIT(0) ## device should cache allocation + BIAS_UNCACHED = ZE_BIT(1) ## device should not cache allocation (UC) + +class ze_ipc_memory_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Additional allocation descriptor for exporting external memory +## +## @details +## - This structure may be passed to ::zeMemAllocDevice, ::zeMemAllocHost, +## or ::zePhysicalMemCreate, via the `pNext` member of +## ::ze_device_mem_alloc_desc_t or ::ze_host_mem_alloc_desc_t, or +## ::ze_physical_mem_desc_t, respectively, to indicate an exportable +## memory allocation. +## - This structure may be passed to ::zeImageCreate, via the `pNext` +## member of ::ze_image_desc_t, to indicate an exportable image. +class ze_external_memory_export_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_external_memory_type_flags_t) ## [in] flags specifying memory export types for this allocation. + ## must be 0 (default) or a valid combination of ::ze_external_memory_type_flags_t + ] + +############################################################################### +## @brief Additional allocation descriptor for importing external memory as a +## file descriptor +## +## @details +## - This structure may be passed to ::zeMemAllocDevice, ::zeMemAllocHost, +## or ::zePhysicalMemCreate, via the `pNext` member of +## ::ze_device_mem_alloc_desc_t or ::ze_host_mem_alloc_desc_t, or +## ::ze_physical_mem_desc_t, respectively, to import memory from a file +## descriptor. +## - This structure may be passed to ::zeImageCreate, via the `pNext` +## member of ::ze_image_desc_t, to import memory from a file descriptor. +class ze_external_memory_import_fd_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_external_memory_type_flags_t), ## [in] flags specifying the memory import type for the file descriptor. + ## must be 0 (default) or a valid combination of ::ze_external_memory_type_flags_t + ("fd", c_int) ## [in] the file descriptor handle to import + ] + +############################################################################### +## @brief Exports an allocation as a file descriptor +## +## @details +## - This structure may be passed to ::zeMemGetAllocProperties, via the +## `pNext` member of ::ze_memory_allocation_properties_t, to export a +## memory allocation as a file descriptor. +## - This structure may be passed to ::zeImageGetAllocPropertiesExt, via +## the `pNext` member of ::ze_image_allocation_ext_properties_t, to +## export an image as a file descriptor. +## - This structure may be passed to ::zePhysicalMemGetProperties, via the +## `pNext` member of ::ze_physical_mem_properties_t, to export physical +## memory as a file descriptor. +## - The requested memory export type must have been specified when the +## allocation was made. +class ze_external_memory_export_fd_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_external_memory_type_flags_t), ## [in] flags specifying the memory export type for the file descriptor. + ## must be 0 (default) or a valid combination of ::ze_external_memory_type_flags_t + ("fd", c_int) ## [out] the exported file descriptor handle representing the allocation. + ] + +############################################################################### +## @brief Additional allocation descriptor for importing external memory as a +## Win32 handle +## +## @details +## - When `handle` is `nullptr`, `name` must not be `nullptr`. +## - When `name` is `nullptr`, `handle` must not be `nullptr`. +## - When `flags` is ::ZE_EXTERNAL_MEMORY_TYPE_FLAG_OPAQUE_WIN32_KMT, +## `name` must be `nullptr`. +## - This structure may be passed to ::zeMemAllocDevice, ::zeMemAllocHost, +## or ::zePhysicalMemCreate, via the `pNext` member of +## ::ze_device_mem_alloc_desc_t or ::ze_host_mem_alloc_desc_t, or +## ::ze_physical_mem_desc_t, respectively, to import memory from a Win32 +## handle. +## - This structure may be passed to ::zeImageCreate, via the `pNext` +## member of ::ze_image_desc_t, to import memory from a Win32 handle. +class ze_external_memory_import_win32_handle_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_external_memory_type_flags_t), ## [in] flags specifying the memory import type for the Win32 handle. + ## must be 0 (default) or a valid combination of ::ze_external_memory_type_flags_t + ("handle", c_void_p), ## [in][optional] the Win32 handle to import + ("name", c_void_p) ## [in][optional] name of a memory object to import + ] + +############################################################################### +## @brief Exports an allocation as a Win32 handle +## +## @details +## - This structure may be passed to ::zeMemGetAllocProperties, via the +## `pNext` member of ::ze_memory_allocation_properties_t, to export a +## memory allocation as a Win32 handle. +## - This structure may be passed to ::zeImageGetAllocPropertiesExt, via +## the `pNext` member of ::ze_image_allocation_ext_properties_t, to +## export an image as a Win32 handle. +## - This structure may be passed to ::zePhysicalMemGetProperties, via the +## `pNext` member of ::ze_physical_mem_properties_t, to export physical +## memory as a Win32 handle. +## - The requested memory export type must have been specified when the +## allocation was made. +class ze_external_memory_export_win32_handle_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_external_memory_type_flags_t), ## [in] flags specifying the memory export type for the Win32 handle. + ## must be 0 (default) or a valid combination of ::ze_external_memory_type_flags_t + ("handle", c_void_p) ## [out] the exported Win32 handle representing the allocation. + ] + +############################################################################### +## @brief atomic access attribute flags +class ze_memory_atomic_attr_exp_flags_v(IntEnum): + NO_ATOMICS = ZE_BIT(0) ## Atomics on the pointer are not allowed + NO_HOST_ATOMICS = ZE_BIT(1) ## Host atomics on the pointer are not allowed + HOST_ATOMICS = ZE_BIT(2) ## Host atomics on the pointer are allowed. Requires + ## ::ZE_MEMORY_ACCESS_CAP_FLAG_ATOMIC returned by + ## ::zeDeviceGetMemoryAccessProperties. + NO_DEVICE_ATOMICS = ZE_BIT(3) ## Device atomics on the pointer are not allowed + DEVICE_ATOMICS = ZE_BIT(4) ## Device atomics on the pointer are allowed. Requires + ## ::ZE_MEMORY_ACCESS_CAP_FLAG_ATOMIC returned by + ## ::zeDeviceGetMemoryAccessProperties. + NO_SYSTEM_ATOMICS = ZE_BIT(5) ## Concurrent atomics on the pointer from both host and device are not + ## allowed + SYSTEM_ATOMICS = ZE_BIT(6) ## Concurrent atomics on the pointer from both host and device are + ## allowed. Requires ::ZE_MEMORY_ACCESS_CAP_FLAG_CONCURRENT_ATOMIC + ## returned by ::zeDeviceGetMemoryAccessProperties. + +class ze_memory_atomic_attr_exp_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Supported module creation input formats +class ze_module_format_v(IntEnum): + IL_SPIRV = 0 ## Format is SPIRV IL format + NATIVE = 1 ## Format is device native format + +class ze_module_format_t(c_int): + def __str__(self): + return str(ze_module_format_v(self.value)) + + +############################################################################### +## @brief Specialization constants - User defined constants +class ze_module_constants_t(Structure): + _fields_ = [ + ("numConstants", c_ulong), ## [in] Number of specialization constants. + ("pConstantIds", POINTER(c_ulong)), ## [in][range(0, numConstants)] Array of IDs that is sized to + ## numConstants. + ("pConstantValues", POINTER(c_void_p)) ## [in][range(0, numConstants)] Array of pointers to values that is sized + ## to numConstants. + ] + +############################################################################### +## @brief Module descriptor +class ze_module_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("format", ze_module_format_t), ## [in] Module format passed in with pInputModule + ("inputSize", c_size_t), ## [in] size of input IL or ISA from pInputModule. + ("pInputModule", POINTER(c_ubyte)), ## [in] pointer to IL or ISA + ("pBuildFlags", c_char_p), ## [in][optional] string containing one or more (comma-separated) + ## compiler flags. If unsupported, flag is ignored with a warning. + ## - "-ze-opt-disable" + ## - Disable optimizations + ## - "-ze-opt-level" + ## - Specifies optimization level for compiler. Levels are + ## implementation specific. + ## - 0 is no optimizations (equivalent to -ze-opt-disable) + ## - 1 is optimize minimally (may be the same as 2) + ## - 2 is optimize more (default) + ## - "-ze-opt-greater-than-4GB-buffer-required" + ## - Use 64-bit offset calculations for buffers. + ## - "-ze-opt-large-register-file" + ## - Increase number of registers available to threads. + ## - "-ze-opt-has-buffer-offset-arg" + ## - Extend stateless to stateful optimization to more + ## cases with the use of additional offset (e.g. 64-bit + ## pointer to binding table with 32-bit offset). + ## - "-g" + ## - Include debugging information. + ("pConstants", POINTER(ze_module_constants_t)) ## [in][optional] pointer to specialization constants. Valid only for + ## SPIR-V input. This must be set to nullptr if no specialization + ## constants are provided. + ] + +############################################################################### +## @brief Append launch kernel with parameters cooperative descriptor +class ze_command_list_append_launch_kernel_param_cooperative_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("isCooperative", ze_bool_t) ## [in] When true, kernel is treated as cooperative. + ] + +############################################################################### +## @brief Supported module property flags +class ze_module_property_flags_v(IntEnum): + IMPORTS = ZE_BIT(0) ## Module has imports (i.e. imported global variables and/or kernels). + ## See ::zeModuleDynamicLink. + +class ze_module_property_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Module properties +class ze_module_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_module_property_flags_t) ## [out] 0 (none) or a valid combination of ::ze_module_property_flag_t + ] + +############################################################################### +## @brief Supported kernel creation flags +class ze_kernel_flags_v(IntEnum): + FORCE_RESIDENCY = ZE_BIT(0) ## force all device allocations to be resident during execution + EXPLICIT_RESIDENCY = ZE_BIT(1) ## application is responsible for all residency of device allocations. + ## driver may disable implicit residency management. + +class ze_kernel_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Kernel descriptor +class ze_kernel_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_kernel_flags_t), ## [in] creation flags. + ## must be 0 (default) or a valid combination of ::ze_kernel_flag_t; + ## default behavior may use driver-based residency. + ("pKernelName", c_char_p) ## [in] null-terminated name of kernel in module + ] + +############################################################################### +## @brief Kernel indirect access flags +class ze_kernel_indirect_access_flags_v(IntEnum): + HOST = ZE_BIT(0) ## Indicates that the kernel accesses host allocations indirectly. + DEVICE = ZE_BIT(1) ## Indicates that the kernel accesses device allocations indirectly. + SHARED = ZE_BIT(2) ## Indicates that the kernel accesses shared allocations indirectly. + +class ze_kernel_indirect_access_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Supported Cache Config flags +class ze_cache_config_flags_v(IntEnum): + LARGE_SLM = ZE_BIT(0) ## Large SLM size + LARGE_DATA = ZE_BIT(1) ## Large General Data size + +class ze_cache_config_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Maximum kernel universal unique id (UUID) size in bytes +ZE_MAX_KERNEL_UUID_SIZE = 16 + +############################################################################### +## @brief Maximum module universal unique id (UUID) size in bytes +ZE_MAX_MODULE_UUID_SIZE = 16 + +############################################################################### +## @brief Kernel universal unique id (UUID) +class ze_kernel_uuid_t(Structure): + _fields_ = [ + ("kid", c_ubyte * ZE_MAX_KERNEL_UUID_SIZE), ## [out] opaque data representing a kernel UUID + ("mid", c_ubyte * ZE_MAX_MODULE_UUID_SIZE) ## [out] opaque data representing the kernel's module UUID + ] + +############################################################################### +## @brief Kernel properties +class ze_kernel_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("numKernelArgs", c_ulong), ## [out] number of kernel arguments. + ("requiredGroupSizeX", c_ulong), ## [out] required group size in the X dimension, + ## or zero if there is no required group size + ("requiredGroupSizeY", c_ulong), ## [out] required group size in the Y dimension, + ## or zero if there is no required group size + ("requiredGroupSizeZ", c_ulong), ## [out] required group size in the Z dimension, + ## or zero if there is no required group size + ("requiredNumSubGroups", c_ulong), ## [out] required number of subgroups per thread group, + ## or zero if there is no required number of subgroups + ("requiredSubgroupSize", c_ulong), ## [out] required subgroup size, + ## or zero if there is no required subgroup size + ("maxSubgroupSize", c_ulong), ## [out] maximum subgroup size + ("maxNumSubgroups", c_ulong), ## [out] maximum number of subgroups per thread group + ("localMemSize", c_ulong), ## [out] local memory size used by each thread group + ("privateMemSize", c_ulong), ## [out] private memory size allocated by compiler used by each thread + ("spillMemSize", c_ulong), ## [out] spill memory size allocated by compiler + ("uuid", ze_kernel_uuid_t) ## [out] universal unique identifier. + ] + +############################################################################### +## @brief Additional kernel preferred group size properties +## +## @details +## - This structure may be passed to ::zeKernelGetProperties, via the +## `pNext` member of ::ze_kernel_properties_t, to query additional kernel +## preferred group size properties. +class ze_kernel_preferred_group_size_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("preferredMultiple", c_ulong) ## [out] preferred group size multiple + ] + +############################################################################### +## @brief Kernel dispatch group count. +class ze_group_count_t(Structure): + _fields_ = [ + ("groupCountX", c_ulong), ## [in] number of thread groups in X dimension + ("groupCountY", c_ulong), ## [in] number of thread groups in Y dimension + ("groupCountZ", c_ulong) ## [in] number of thread groups in Z dimension + ] + +############################################################################### +## @brief Kernel dispatch group sizes. +class ze_group_size_t(Structure): + _fields_ = [ + ("groupSizeX", c_ulong), ## [in] size of thread group in X dimension + ("groupSizeY", c_ulong), ## [in] size of thread group in Y dimension + ("groupSizeZ", c_ulong) ## [in] size of thread group in Z dimension + ] + +############################################################################### +## @brief Module Program Extension Name +ZE_MODULE_PROGRAM_EXP_NAME = "ZE_experimental_module_program" + +############################################################################### +## @brief Module Program Extension Version(s) +class ze_module_program_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_module_program_exp_version_t(c_int): + def __str__(self): + return str(ze_module_program_exp_version_v(self.value)) + + +############################################################################### +## @brief Module extended descriptor to support multiple input modules. +## +## @details +## - Implementation must support ::ZE_MODULE_PROGRAM_EXP_NAME extension +## - Modules support import and export linkage for functions and global +## variables. +## - pInputModules, pBuildFlags, and pConstants from ::ze_module_desc_t is +## ignored. +## - Format in ::ze_module_desc_t needs to be set to +## ::ZE_MODULE_FORMAT_IL_SPIRV or ::ZE_MODULE_FORMAT_NATIVE. +## - All modules in the list must be of the same format and match the +## format specified in ::ze_module_desc_t. +class ze_module_program_exp_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("count", c_ulong), ## [in] Count of input modules + ("inputSizes", POINTER(c_size_t)), ## [in][range(0, count)] sizes of each input module in pInputModules. + ("pInputModules", POINTER(c_ubyte*)), ## [in][range(0, count)] pointer to an array of binary modules in format + ## specified as part of ::ze_module_desc_t. + ("pBuildFlags", POINTER(c_char_p)), ## [in][optional][range(0, count)] array of strings containing build + ## flags. See pBuildFlags in ::ze_module_desc_t. + ("pConstants", POINTER(ze_module_constants_t*)) ## [in][optional][range(0, count)] pointer to array of specialization + ## constant strings. Valid only for SPIR-V input. This must be set to + ## nullptr if no specialization constants are provided. + ] + +############################################################################### +## @brief Raytracing Extension Name +ZE_RAYTRACING_EXT_NAME = "ZE_extension_raytracing" + +############################################################################### +## @brief Raytracing Extension Version(s) +class ze_raytracing_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_raytracing_ext_version_t(c_int): + def __str__(self): + return str(ze_raytracing_ext_version_v(self.value)) + + +############################################################################### +## @brief Supported raytracing capability flags +class ze_device_raytracing_ext_flags_v(IntEnum): + RAYQUERY = ZE_BIT(0) ## Supports rayquery + +class ze_device_raytracing_ext_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Raytracing properties queried using ::zeDeviceGetModuleProperties +## +## @details +## - This structure may be returned from ::zeDeviceGetModuleProperties, via +## the `pNext` member of ::ze_device_module_properties_t. +class ze_device_raytracing_ext_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_device_raytracing_ext_flags_t), ## [out] 0 or a valid combination of ::ze_device_raytracing_ext_flags_t + ("maxBVHLevels", c_ulong) ## [out] Maximum number of BVH levels supported + ] + +############################################################################### +## @brief Supported raytracing memory allocation flags +class ze_raytracing_mem_alloc_ext_flags_v(IntEnum): + TBD = ZE_BIT(0) ## reserved for future use + +class ze_raytracing_mem_alloc_ext_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Raytracing memory allocation descriptor +## +## @details +## - This structure must be passed to ::zeMemAllocShared or +## ::zeMemAllocDevice, via the `pNext` member of +## ::ze_device_mem_alloc_desc_t, for any memory allocation that is to be +## accessed by raytracing fixed-function of the device. +class ze_raytracing_mem_alloc_ext_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_raytracing_mem_alloc_ext_flags_t) ## [in] flags specifying additional allocation controls. + ## must be 0 (default) or a valid combination of ::ze_raytracing_mem_alloc_ext_flag_t; + ## default behavior may use implicit driver-based heuristics. + ] + +############################################################################### +## @brief Sampler addressing modes +class ze_sampler_address_mode_v(IntEnum): + NONE = 0 ## No coordinate modifications for out-of-bounds image access. + REPEAT = 1 ## Out-of-bounds coordinates are wrapped back around. + CLAMP = 2 ## Out-of-bounds coordinates are clamped to edge. + CLAMP_TO_BORDER = 3 ## Out-of-bounds coordinates are clamped to border color which is (0.0f, + ## 0.0f, 0.0f, 0.0f) if image format swizzle contains alpha, otherwise + ## (0.0f, 0.0f, 0.0f, 1.0f). + MIRROR = 4 ## Out-of-bounds coordinates are mirrored starting from edge. + +class ze_sampler_address_mode_t(c_int): + def __str__(self): + return str(ze_sampler_address_mode_v(self.value)) + + +############################################################################### +## @brief Sampler filtering modes +class ze_sampler_filter_mode_v(IntEnum): + NEAREST = 0 ## No coordinate modifications for out of bounds image access. + LINEAR = 1 ## Out-of-bounds coordinates are wrapped back around. + +class ze_sampler_filter_mode_t(c_int): + def __str__(self): + return str(ze_sampler_filter_mode_v(self.value)) + + +############################################################################### +## @brief Sampler descriptor +class ze_sampler_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("addressMode", ze_sampler_address_mode_t), ## [in] Sampler addressing mode to determine how out-of-bounds + ## coordinates are handled. + ("filterMode", ze_sampler_filter_mode_t), ## [in] Sampler filter mode to determine how samples are filtered. + ("isNormalized", ze_bool_t) ## [in] Are coordinates normalized [0, 1] or not. + ] + +############################################################################### +## @brief Virtual memory page access attributes +class ze_memory_access_attribute_v(IntEnum): + NONE = 0 ## Indicates the memory page is inaccessible. + READWRITE = 1 ## Indicates the memory page supports read write access. + READONLY = 2 ## Indicates the memory page supports read-only access. + +class ze_memory_access_attribute_t(c_int): + def __str__(self): + return str(ze_memory_access_attribute_v(self.value)) + + +############################################################################### +## @brief Supported physical memory creation flags +class ze_physical_mem_flags_v(IntEnum): + ALLOCATE_ON_DEVICE = ZE_BIT(0) ## [default] allocate physical device memory. + ALLOCATE_ON_HOST = ZE_BIT(1) ## Allocate physical host memory instead. + +class ze_physical_mem_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Physical memory descriptor +class ze_physical_mem_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_physical_mem_flags_t), ## [in] creation flags. + ## must be 0 (default) or a valid combination of + ## ::ze_physical_mem_flag_t; default is to create physical device memory. + ("size", c_size_t) ## [in] size in bytes to reserve; must be page aligned. + ] + +############################################################################### +## @brief Physical memory properties queried using ::zePhysicalMemGetProperties +class ze_physical_mem_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("id", c_ulonglong), ## [out] unique identifier for the physical memory object + ("size", c_ulonglong) ## [out] size of the physical memory object in bytes + ] + +############################################################################### +## @brief Floating-Point Atomics Extension Name +ZE_FLOAT_ATOMICS_EXT_NAME = "ZE_extension_float_atomics" + +############################################################################### +## @brief Floating-Point Atomics Extension Version(s) +class ze_float_atomics_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_float_atomics_ext_version_t(c_int): + def __str__(self): + return str(ze_float_atomics_ext_version_v(self.value)) + + +############################################################################### +## @brief Supported floating-point atomic capability flags +class ze_device_fp_atomic_ext_flags_v(IntEnum): + GLOBAL_LOAD_STORE = ZE_BIT(0) ## Supports atomic load, store, and exchange + GLOBAL_ADD = ZE_BIT(1) ## Supports atomic add and subtract + GLOBAL_MIN_MAX = ZE_BIT(2) ## Supports atomic min and max + LOCAL_LOAD_STORE = ZE_BIT(16) ## Supports atomic load, store, and exchange + LOCAL_ADD = ZE_BIT(17) ## Supports atomic add and subtract + LOCAL_MIN_MAX = ZE_BIT(18) ## Supports atomic min and max + +class ze_device_fp_atomic_ext_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Device floating-point atomic properties queried using +## ::zeDeviceGetModuleProperties +## +## @details +## - This structure may be returned from ::zeDeviceGetModuleProperties, via +## the `pNext` member of ::ze_device_module_properties_t. +class ze_float_atomic_ext_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("fp16Flags", ze_device_fp_atomic_ext_flags_t), ## [out] Capabilities for half-precision floating-point atomic operations + ("fp32Flags", ze_device_fp_atomic_ext_flags_t), ## [out] Capabilities for single-precision floating-point atomic + ## operations + ("fp64Flags", ze_device_fp_atomic_ext_flags_t) ## [out] Capabilities for double-precision floating-point atomic + ## operations + ] + +############################################################################### +## @brief Global Offset Extension Name +ZE_GLOBAL_OFFSET_EXP_NAME = "ZE_experimental_global_offset" + +############################################################################### +## @brief Global Offset Extension Version(s) +class ze_global_offset_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_global_offset_exp_version_t(c_int): + def __str__(self): + return str(ze_global_offset_exp_version_v(self.value)) + + +############################################################################### +## @brief Relaxed Allocation Limits Extension Name +ZE_RELAXED_ALLOCATION_LIMITS_EXP_NAME = "ZE_experimental_relaxed_allocation_limits" + +############################################################################### +## @brief Relaxed Allocation Limits Extension Version(s) +class ze_relaxed_allocation_limits_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_relaxed_allocation_limits_exp_version_t(c_int): + def __str__(self): + return str(ze_relaxed_allocation_limits_exp_version_v(self.value)) + + +############################################################################### +## @brief Supported relaxed memory allocation flags +class ze_relaxed_allocation_limits_exp_flags_v(IntEnum): + MAX_SIZE = ZE_BIT(0) ## Allocation size may exceed the `maxMemAllocSize` member of + ## ::ze_device_properties_t. + +class ze_relaxed_allocation_limits_exp_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Relaxed limits memory allocation descriptor +## +## @details +## - This structure may be passed to ::zeMemAllocShared or +## ::zeMemAllocDevice, via the `pNext` member of +## ::ze_device_mem_alloc_desc_t. +## - This structure may also be passed to ::zeMemAllocHost, via the `pNext` +## member of ::ze_host_mem_alloc_desc_t. +class ze_relaxed_allocation_limits_exp_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_relaxed_allocation_limits_exp_flags_t) ## [in] flags specifying allocation limits to relax. + ## must be 0 (default) or a valid combination of ::ze_relaxed_allocation_limits_exp_flag_t; + ] + +############################################################################### +## @brief Get Kernel Binary Extension Name +ZE_GET_KERNEL_BINARY_EXP_NAME = "ZE_extension_kernel_binary_exp" + +############################################################################### +## @brief Get Kernel Binary Extension Version(s) +class ze_kernel_get_binary_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_kernel_get_binary_exp_version_t(c_int): + def __str__(self): + return str(ze_kernel_get_binary_exp_version_v(self.value)) + + +############################################################################### +## @brief Driver Direct Device Interface (DDI) Handles Extension Name +ZE_DRIVER_DDI_HANDLES_EXT_NAME = "ZE_extension_driver_ddi_handles" + +############################################################################### +## @brief Driver Direct Device Interface (DDI) Handles Extension Version(s) +class ze_driver_ddi_handles_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + _1_1 = ZE_MAKE_VERSION( 1, 1 ) ## version 1.1 + CURRENT = ZE_MAKE_VERSION( 1, 1 ) ## latest known version + +class ze_driver_ddi_handles_ext_version_t(c_int): + def __str__(self): + return str(ze_driver_ddi_handles_ext_version_v(self.value)) + + +############################################################################### +## @brief Driver Direct Device Interface (DDI) Handle Extension Flags +class ze_driver_ddi_handle_ext_flags_v(IntEnum): + DDI_HANDLE_EXT_SUPPORTED = ZE_BIT(0) ## Driver Supports DDI Handles Extension + +class ze_driver_ddi_handle_ext_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Driver DDI Handles properties queried using ::zeDriverGetProperties +## +## @details +## - This structure may be returned from ::zeDriverGetProperties, via the +## `pNext` member of ::ze_driver_properties_t. +class ze_driver_ddi_handles_ext_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_driver_ddi_handle_ext_flags_t) ## [out] 0 (none) or a valid combination of ::ze_driver_ddi_handle_ext_flags_t + ] + +############################################################################### +## @brief External Semaphores Extension Name +ZE_EXTERNAL_SEMAPHORES_EXTENSION_NAME = "ZE_extension_external_semaphores" + +############################################################################### +## @brief External Semaphores Extension Version +class ze_external_semaphore_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_external_semaphore_ext_version_t(c_int): + def __str__(self): + return str(ze_external_semaphore_ext_version_v(self.value)) + + +############################################################################### +## @brief Handle of external semaphore object +class ze_external_semaphore_ext_handle_t(c_void_p): + pass + +############################################################################### +## @brief External Semaphores Type Flags +class ze_external_semaphore_ext_flags_v(IntEnum): + OPAQUE_FD = ZE_BIT(0) ## Semaphore is an Linux opaque file descriptor + OPAQUE_WIN32 = ZE_BIT(1) ## Semaphore is an opaque Win32 handle for monitored fence + OPAQUE_WIN32_KMT = ZE_BIT(2) ## Semaphore is an opaque Win32 KMT handle for monitored fence + D3D12_FENCE = ZE_BIT(3) ## Semaphore is a D3D12 fence + D3D11_FENCE = ZE_BIT(4) ## Semaphore is a D3D11 fence + KEYED_MUTEX = ZE_BIT(5) ## Semaphore is a keyed mutex for Win32 + KEYED_MUTEX_KMT = ZE_BIT(6) ## Semaphore is a keyed mutex for Win32 KMT + VK_TIMELINE_SEMAPHORE_FD = ZE_BIT(7) ## Semaphore is a Vulkan Timeline semaphore for Linux + VK_TIMELINE_SEMAPHORE_WIN32 = ZE_BIT(8) ## Semaphore is a Vulkan Timeline semaphore for Win32 + +class ze_external_semaphore_ext_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief External Semaphore Descriptor +class ze_external_semaphore_ext_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_external_semaphore_ext_flags_t) ## [in] The flags describing the type of the semaphore. + ## must be 0 (default) or a valid combination of ::ze_external_semaphore_ext_flag_t. + ## When importing a semaphore, pNext should be pointing to one of the + ## following structures: ::ze_external_semaphore_win32_ext_desc_t or ::ze_external_semaphore_fd_ext_desc_t. + ] + +############################################################################### +## @brief External Semaphore Win32 Descriptor +class ze_external_semaphore_win32_ext_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("handle", c_void_p), ## [in] Win32 handle of the semaphore. + ## Must be a valid Win32 handle. + ("name", c_char_p) ## [in] Name of the semaphore. + ## Must be a valid null-terminated string. + ] + +############################################################################### +## @brief External Semaphore FD Descriptor +class ze_external_semaphore_fd_ext_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("fd", c_int) ## [in] File descriptor of the semaphore. + ## Must be a valid file descriptor. + ] + +############################################################################### +## @brief External Semaphore Signal parameters +class ze_external_semaphore_signal_params_ext_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("value", c_ulonglong) ## [in] [optional] Value to signal. + ## Specified by user as an expected value with some of semaphore types, + ## such as ::ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_D3D12_FENCE. + ] + +############################################################################### +## @brief External Semaphore Wait parameters +class ze_external_semaphore_wait_params_ext_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("value", c_ulonglong) ## [in] [optional] Value to wait for. + ## Specified by user as an expected value with some of semaphore types, + ## such as ::ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_D3D12_FENCE. + ] + +############################################################################### +## @brief CacheLine Size Extension Name +ZE_CACHELINE_SIZE_EXT_NAME = "ZE_extension_device_cache_line_size" + +############################################################################### +## @brief CacheLine Size Extension Version(s) +class ze_device_cache_line_size_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_device_cache_line_size_ext_version_t(c_int): + def __str__(self): + return str(ze_device_cache_line_size_ext_version_v(self.value)) + + +############################################################################### +## @brief CacheLine Size queried using ::zeDeviceGetCacheProperties +## +## @details +## - This structure may be returned from ::zeDeviceGetCacheProperties via +## the `pNext` member of ::ze_device_cache_properties_t. +## - Used for determining the cache line size supported on a device. +class ze_device_cache_line_size_ext_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("cacheLineSize", c_size_t) ## [out] The cache line size in bytes. + ] + +############################################################################### +## @brief Ray Tracing Acceleration Structure Extension Name +ZE_RTAS_EXT_NAME = "ZE_extension_rtas" + +############################################################################### +## @brief Ray Tracing Acceleration Structure Builder Extension Version(s) +class ze_rtas_builder_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_rtas_builder_ext_version_t(c_int): + def __str__(self): + return str(ze_rtas_builder_ext_version_v(self.value)) + + +############################################################################### +## @brief Ray tracing acceleration structure device flags +class ze_rtas_device_ext_flags_v(IntEnum): + RESERVED = ZE_BIT(0) ## reserved for future use + +class ze_rtas_device_ext_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Ray tracing acceleration structure format +## +## @details +## - This is an opaque ray tracing acceleration structure format +## identifier. +class ze_rtas_format_ext_v(IntEnum): + INVALID = 0x0 ## Invalid acceleration structure format code + MAX = 0x7ffffffe ## Maximum acceleration structure format code + +class ze_rtas_format_ext_t(c_int): + def __str__(self): + return str(ze_rtas_format_ext_v(self.value)) + + +############################################################################### +## @brief Ray tracing acceleration structure builder flags +class ze_rtas_builder_ext_flags_v(IntEnum): + RESERVED = ZE_BIT(0) ## Reserved for future use + +class ze_rtas_builder_ext_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Ray tracing acceleration structure builder parallel operation flags +class ze_rtas_parallel_operation_ext_flags_v(IntEnum): + RESERVED = ZE_BIT(0) ## Reserved for future use + +class ze_rtas_parallel_operation_ext_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Ray tracing acceleration structure builder geometry flags +class ze_rtas_builder_geometry_ext_flags_v(IntEnum): + NON_OPAQUE = ZE_BIT(0) ## non-opaque geometries invoke an any-hit shader + +class ze_rtas_builder_geometry_ext_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Packed ray tracing acceleration structure builder geometry flags (see +## ::ze_rtas_builder_geometry_ext_flags_t) +class ze_rtas_builder_packed_geometry_ext_flags_t(c_ubyte): + pass + +############################################################################### +## @brief Ray tracing acceleration structure builder instance flags +class ze_rtas_builder_instance_ext_flags_v(IntEnum): + TRIANGLE_CULL_DISABLE = ZE_BIT(0) ## disables culling of front-facing and back-facing triangles + TRIANGLE_FRONT_COUNTERCLOCKWISE = ZE_BIT(1) ## reverses front and back face of triangles + TRIANGLE_FORCE_OPAQUE = ZE_BIT(2) ## forces instanced geometry to be opaque, unless ray flag forces it to + ## be non-opaque + TRIANGLE_FORCE_NON_OPAQUE = ZE_BIT(3) ## forces instanced geometry to be non-opaque, unless ray flag forces it + ## to be opaque + +class ze_rtas_builder_instance_ext_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Packed ray tracing acceleration structure builder instance flags (see +## ::ze_rtas_builder_instance_ext_flags_t) +class ze_rtas_builder_packed_instance_ext_flags_t(c_ubyte): + pass + +############################################################################### +## @brief Ray tracing acceleration structure builder build operation flags +## +## @details +## - These flags allow the application to tune the acceleration structure +## build operation. +## - The acceleration structure builder implementation might choose to use +## spatial splitting to split large or long primitives into smaller +## pieces. This may result in any-hit shaders being invoked multiple +## times for non-opaque primitives, unless +## ::ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION is specified. +## - Usage of any of these flags may reduce ray tracing performance. +class ze_rtas_builder_build_op_ext_flags_v(IntEnum): + COMPACT = ZE_BIT(0) ## build more compact acceleration structure + NO_DUPLICATE_ANYHIT_INVOCATION = ZE_BIT(1) ## guarantees single any-hit shader invocation per primitive + +class ze_rtas_builder_build_op_ext_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Ray tracing acceleration structure builder build quality hint +## +## @details +## - Depending on use case different quality modes for acceleration +## structure build are supported. +## - A low-quality build builds an acceleration structure fast, but at the +## cost of some reduction in ray tracing performance. This mode is +## recommended for dynamic content, such as animated characters. +## - A medium-quality build uses a compromise between build quality and ray +## tracing performance. This mode should be used by default. +## - Higher ray tracing performance can be achieved by using a high-quality +## build, but acceleration structure build performance might be +## significantly reduced. +class ze_rtas_builder_build_quality_hint_ext_v(IntEnum): + LOW = 0 ## build low-quality acceleration structure (fast) + MEDIUM = 1 ## build medium-quality acceleration structure (slower) + HIGH = 2 ## build high-quality acceleration structure (slow) + +class ze_rtas_builder_build_quality_hint_ext_t(c_int): + def __str__(self): + return str(ze_rtas_builder_build_quality_hint_ext_v(self.value)) + + +############################################################################### +## @brief Ray tracing acceleration structure builder geometry type +class ze_rtas_builder_geometry_type_ext_v(IntEnum): + TRIANGLES = 0 ## triangle mesh geometry type + QUADS = 1 ## quad mesh geometry type + PROCEDURAL = 2 ## procedural geometry type + INSTANCE = 3 ## instance geometry type + +class ze_rtas_builder_geometry_type_ext_t(c_int): + def __str__(self): + return str(ze_rtas_builder_geometry_type_ext_v(self.value)) + + +############################################################################### +## @brief Packed ray tracing acceleration structure builder geometry type (see +## ::ze_rtas_builder_geometry_type_ext_t) +class ze_rtas_builder_packed_geometry_type_ext_t(c_ubyte): + pass + +############################################################################### +## @brief Ray tracing acceleration structure data buffer element format +## +## @details +## - Specifies the format of data buffer elements. +## - Data buffers may contain instancing transform matrices, triangle/quad +## vertex indices, etc... +class ze_rtas_builder_input_data_format_ext_v(IntEnum): + FLOAT3 = 0 ## 3-component float vector (see ::ze_rtas_float3_ext_t) + FLOAT3X4_COLUMN_MAJOR = 1 ## 3x4 affine transformation in column-major format (see + ## ::ze_rtas_transform_float3x4_column_major_ext_t) + FLOAT3X4_ALIGNED_COLUMN_MAJOR = 2 ## 3x4 affine transformation in column-major format (see + ## ::ze_rtas_transform_float3x4_aligned_column_major_ext_t) + FLOAT3X4_ROW_MAJOR = 3 ## 3x4 affine transformation in row-major format (see + ## ::ze_rtas_transform_float3x4_row_major_ext_t) + AABB = 4 ## 3-dimensional axis-aligned bounding-box (see ::ze_rtas_aabb_ext_t) + TRIANGLE_INDICES_UINT32 = 5 ## Unsigned 32-bit triangle indices (see + ## ::ze_rtas_triangle_indices_uint32_ext_t) + QUAD_INDICES_UINT32 = 6 ## Unsigned 32-bit quad indices (see ::ze_rtas_quad_indices_uint32_ext_t) + +class ze_rtas_builder_input_data_format_ext_t(c_int): + def __str__(self): + return str(ze_rtas_builder_input_data_format_ext_v(self.value)) + + +############################################################################### +## @brief Packed ray tracing acceleration structure data buffer element format +## (see ::ze_rtas_builder_input_data_format_ext_t) +class ze_rtas_builder_packed_input_data_format_ext_t(c_ubyte): + pass + +############################################################################### +## @brief Handle of ray tracing acceleration structure builder object +class ze_rtas_builder_ext_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of ray tracing acceleration structure builder parallel +## operation object +class ze_rtas_parallel_operation_ext_handle_t(c_void_p): + pass + +############################################################################### +## @brief Ray tracing acceleration structure builder descriptor +class ze_rtas_builder_ext_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("builderVersion", ze_rtas_builder_ext_version_t) ## [in] ray tracing acceleration structure builder version + ] + +############################################################################### +## @brief Ray tracing acceleration structure builder properties +class ze_rtas_builder_ext_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_rtas_builder_ext_flags_t), ## [out] ray tracing acceleration structure builder flags + ("rtasBufferSizeBytesExpected", c_size_t), ## [out] expected size (in bytes) required for acceleration structure buffer + ## - When using an acceleration structure buffer of this size, the + ## build is expected to succeed; however, it is possible that the build + ## may fail with ::ZE_RESULT_EXT_RTAS_BUILD_RETRY + ("rtasBufferSizeBytesMaxRequired", c_size_t), ## [out] worst-case size (in bytes) required for acceleration structure buffer + ## - When using an acceleration structure buffer of this size, the + ## build is guaranteed to not run out of memory. + ("scratchBufferSizeBytes", c_size_t) ## [out] scratch buffer size (in bytes) required for acceleration + ## structure build. + ] + +############################################################################### +## @brief Ray tracing acceleration structure builder parallel operation +## properties +class ze_rtas_parallel_operation_ext_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_rtas_parallel_operation_ext_flags_t), ## [out] ray tracing acceleration structure builder parallel operation + ## flags + ("maxConcurrency", c_ulong) ## [out] maximum number of threads that may join the parallel operation + ] + +############################################################################### +## @brief Ray tracing acceleration structure device properties +## +## @details +## - This structure may be passed to ::zeDeviceGetProperties, via `pNext` +## member of ::ze_device_properties_t. +## - The implementation shall populate `format` with a value other than +## ::ZE_RTAS_FORMAT_EXT_INVALID when the device supports ray tracing. +class ze_rtas_device_ext_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_rtas_device_ext_flags_t), ## [out] ray tracing acceleration structure device flags + ("rtasFormat", ze_rtas_format_ext_t), ## [out] ray tracing acceleration structure format + ("rtasBufferAlignment", c_ulong) ## [out] required alignment of acceleration structure buffer + ] + +############################################################################### +## @brief A 3-component vector type +class ze_rtas_float3_ext_t(Structure): + _fields_ = [ + ("x", c_float), ## [in] x-coordinate of float3 vector + ("y", c_float), ## [in] y-coordinate of float3 vector + ("z", c_float) ## [in] z-coordinate of float3 vector + ] + +############################################################################### +## @brief 3x4 affine transformation in column-major layout +## +## @details +## - A 3x4 affine transformation in column major layout, consisting of vectors +## - vx=(vx_x, vx_y, vx_z), +## - vy=(vy_x, vy_y, vy_z), +## - vz=(vz_x, vz_y, vz_z), and +## - p=(p_x, p_y, p_z) +## - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + +## z*vz + p`. +class ze_rtas_transform_float3x4_column_major_ext_t(Structure): + _fields_ = [ + ("vx_x", c_float), ## [in] element 0 of column 0 of 3x4 matrix + ("vx_y", c_float), ## [in] element 1 of column 0 of 3x4 matrix + ("vx_z", c_float), ## [in] element 2 of column 0 of 3x4 matrix + ("vy_x", c_float), ## [in] element 0 of column 1 of 3x4 matrix + ("vy_y", c_float), ## [in] element 1 of column 1 of 3x4 matrix + ("vy_z", c_float), ## [in] element 2 of column 1 of 3x4 matrix + ("vz_x", c_float), ## [in] element 0 of column 2 of 3x4 matrix + ("vz_y", c_float), ## [in] element 1 of column 2 of 3x4 matrix + ("vz_z", c_float), ## [in] element 2 of column 2 of 3x4 matrix + ("p_x", c_float), ## [in] element 0 of column 3 of 3x4 matrix + ("p_y", c_float), ## [in] element 1 of column 3 of 3x4 matrix + ("p_z", c_float) ## [in] element 2 of column 3 of 3x4 matrix + ] + +############################################################################### +## @brief 3x4 affine transformation in column-major layout with aligned column +## vectors +## +## @details +## - A 3x4 affine transformation in column major layout, consisting of vectors +## - vx=(vx_x, vx_y, vx_z), +## - vy=(vy_x, vy_y, vy_z), +## - vz=(vz_x, vz_y, vz_z), and +## - p=(p_x, p_y, p_z) +## - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + +## z*vz + p`. +## - The column vectors are aligned to 16-bytes and pad members are +## ignored. +class ze_rtas_transform_float3x4_aligned_column_major_ext_t(Structure): + _fields_ = [ + ("vx_x", c_float), ## [in] element 0 of column 0 of 3x4 matrix + ("vx_y", c_float), ## [in] element 1 of column 0 of 3x4 matrix + ("vx_z", c_float), ## [in] element 2 of column 0 of 3x4 matrix + ("pad0", c_float), ## [in] ignored padding + ("vy_x", c_float), ## [in] element 0 of column 1 of 3x4 matrix + ("vy_y", c_float), ## [in] element 1 of column 1 of 3x4 matrix + ("vy_z", c_float), ## [in] element 2 of column 1 of 3x4 matrix + ("pad1", c_float), ## [in] ignored padding + ("vz_x", c_float), ## [in] element 0 of column 2 of 3x4 matrix + ("vz_y", c_float), ## [in] element 1 of column 2 of 3x4 matrix + ("vz_z", c_float), ## [in] element 2 of column 2 of 3x4 matrix + ("pad2", c_float), ## [in] ignored padding + ("p_x", c_float), ## [in] element 0 of column 3 of 3x4 matrix + ("p_y", c_float), ## [in] element 1 of column 3 of 3x4 matrix + ("p_z", c_float), ## [in] element 2 of column 3 of 3x4 matrix + ("pad3", c_float) ## [in] ignored padding + ] + +############################################################################### +## @brief 3x4 affine transformation in row-major layout +## +## @details +## - A 3x4 affine transformation in row-major layout, consisting of vectors +## - vx=(vx_x, vx_y, vx_z), +## - vy=(vy_x, vy_y, vy_z), +## - vz=(vz_x, vz_y, vz_z), and +## - p=(p_x, p_y, p_z) +## - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + +## z*vz + p`. +class ze_rtas_transform_float3x4_row_major_ext_t(Structure): + _fields_ = [ + ("vx_x", c_float), ## [in] element 0 of row 0 of 3x4 matrix + ("vy_x", c_float), ## [in] element 1 of row 0 of 3x4 matrix + ("vz_x", c_float), ## [in] element 2 of row 0 of 3x4 matrix + ("p_x", c_float), ## [in] element 3 of row 0 of 3x4 matrix + ("vx_y", c_float), ## [in] element 0 of row 1 of 3x4 matrix + ("vy_y", c_float), ## [in] element 1 of row 1 of 3x4 matrix + ("vz_y", c_float), ## [in] element 2 of row 1 of 3x4 matrix + ("p_y", c_float), ## [in] element 3 of row 1 of 3x4 matrix + ("vx_z", c_float), ## [in] element 0 of row 2 of 3x4 matrix + ("vy_z", c_float), ## [in] element 1 of row 2 of 3x4 matrix + ("vz_z", c_float), ## [in] element 2 of row 2 of 3x4 matrix + ("p_z", c_float) ## [in] element 3 of row 2 of 3x4 matrix + ] + +############################################################################### +## @brief A 3-dimensional axis-aligned bounding-box with lower and upper bounds +## in each dimension +class ze_rtas_aabb_ext_t(Structure): + _fields_ = [ + ("lower", ze_rtas_c_float3_ext_t), ## [in] lower bounds of AABB + ("upper", ze_rtas_c_float3_ext_t) ## [in] upper bounds of AABB + ] + +############################################################################### +## @brief Triangle represented using 3 vertex indices +## +## @details +## - Represents a triangle using 3 vertex indices that index into a vertex +## array that needs to be provided together with the index array. +## - The linear barycentric u/v parametrization of the triangle is defined as: +## - (u=0, v=0) at v0, +## - (u=1, v=0) at v1, and +## - (u=0, v=1) at v2 +class ze_rtas_triangle_indices_uint32_ext_t(Structure): + _fields_ = [ + ("v0", c_ulong), ## [in] first index pointing to the first triangle vertex in vertex array + ("v1", c_ulong), ## [in] second index pointing to the second triangle vertex in vertex + ## array + ("v2", c_ulong) ## [in] third index pointing to the third triangle vertex in vertex array + ] + +############################################################################### +## @brief Quad represented using 4 vertex indices +## +## @details +## - Represents a quad composed of 4 indices that index into a vertex array +## that needs to be provided together with the index array. +## - A quad is a triangle pair represented using 4 vertex indices v0, v1, +## v2, v3. +## The first triangle is made out of indices v0, v1, v3 and the second triangle +## from indices v2, v3, v1. The piecewise linear barycentric u/v parametrization +## of the quad is defined as: +## - (u=0, v=0) at v0, +## - (u=1, v=0) at v1, +## - (u=0, v=1) at v3, and +## - (u=1, v=1) at v2 +## This is achieved by correcting the u'/v' coordinates of the second +## triangle by +## *u = 1-u'* and *v = 1-v'*, yielding a piecewise linear parametrization. +class ze_rtas_quad_indices_uint32_ext_t(Structure): + _fields_ = [ + ("v0", c_ulong), ## [in] first index pointing to the first quad vertex in vertex array + ("v1", c_ulong), ## [in] second index pointing to the second quad vertex in vertex array + ("v2", c_ulong), ## [in] third index pointing to the third quad vertex in vertex array + ("v3", c_ulong) ## [in] fourth index pointing to the fourth quad vertex in vertex array + ] + +############################################################################### +## @brief Ray tracing acceleration structure builder geometry info +class ze_rtas_builder_geometry_info_ext_t(Structure): + _fields_ = [ + ("geometryType", ze_rtas_builder_packed_geometry_type_ext_t) ## [in] geometry type + ] + +############################################################################### +## @brief Ray tracing acceleration structure builder triangle mesh geometry info +## +## @details +## - The linear barycentric u/v parametrization of the triangle is defined as: +## - (u=0, v=0) at v0, +## - (u=1, v=0) at v1, and +## - (u=0, v=1) at v2 +class ze_rtas_builder_triangles_geometry_info_ext_t(Structure): + _fields_ = [ + ("geometryType", ze_rtas_builder_packed_geometry_type_ext_t), ## [in] geometry type, must be + ## ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_TRIANGLES + ("geometryFlags", ze_rtas_builder_packed_geometry_ext_flags_t), ## [in] 0 or some combination of ::ze_rtas_builder_geometry_ext_flag_t + ## bits representing the geometry flags for all primitives of this + ## geometry + ("geometryMask", c_ubyte), ## [in] 8-bit geometry mask for ray masking + ("triangleFormat", ze_rtas_builder_packed_input_data_format_ext_t), ## [in] format of triangle buffer data, must be + ## ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_TRIANGLE_INDICES_UINT32 + ("vertexFormat", ze_rtas_builder_packed_input_data_format_ext_t), ## [in] format of vertex buffer data, must be + ## ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3 + ("triangleCount", c_ulong), ## [in] number of triangles in triangle buffer + ("vertexCount", c_ulong), ## [in] number of vertices in vertex buffer + ("triangleStride", c_ulong), ## [in] stride (in bytes) of triangles in triangle buffer + ("vertexStride", c_ulong), ## [in] stride (in bytes) of vertices in vertex buffer + ("pTriangleBuffer", c_void_p), ## [in] pointer to array of triangle indices in specified format + ("pVertexBuffer", c_void_p) ## [in] pointer to array of triangle vertices in specified format + ] + +############################################################################### +## @brief Ray tracing acceleration structure builder quad mesh geometry info +## +## @details +## - A quad is a triangle pair represented using 4 vertex indices v0, v1, +## v2, v3. +## The first triangle is made out of indices v0, v1, v3 and the second triangle +## from indices v2, v3, v1. The piecewise linear barycentric u/v parametrization +## of the quad is defined as: +## - (u=0, v=0) at v0, +## - (u=1, v=0) at v1, +## - (u=0, v=1) at v3, and +## - (u=1, v=1) at v2 +## This is achieved by correcting the u'/v' coordinates of the second +## triangle by +## *u = 1-u'* and *v = 1-v'*, yielding a piecewise linear parametrization. +class ze_rtas_builder_quads_geometry_info_ext_t(Structure): + _fields_ = [ + ("geometryType", ze_rtas_builder_packed_geometry_type_ext_t), ## [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_QUADS + ("geometryFlags", ze_rtas_builder_packed_geometry_ext_flags_t), ## [in] 0 or some combination of ::ze_rtas_builder_geometry_ext_flag_t + ## bits representing the geometry flags for all primitives of this + ## geometry + ("geometryMask", c_ubyte), ## [in] 8-bit geometry mask for ray masking + ("quadFormat", ze_rtas_builder_packed_input_data_format_ext_t), ## [in] format of quad buffer data, must be + ## ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_QUAD_INDICES_UINT32 + ("vertexFormat", ze_rtas_builder_packed_input_data_format_ext_t), ## [in] format of vertex buffer data, must be + ## ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3 + ("quadCount", c_ulong), ## [in] number of quads in quad buffer + ("vertexCount", c_ulong), ## [in] number of vertices in vertex buffer + ("quadStride", c_ulong), ## [in] stride (in bytes) of quads in quad buffer + ("vertexStride", c_ulong), ## [in] stride (in bytes) of vertices in vertex buffer + ("pQuadBuffer", c_void_p), ## [in] pointer to array of quad indices in specified format + ("pVertexBuffer", c_void_p) ## [in] pointer to array of quad vertices in specified format + ] + +############################################################################### +## @brief AABB callback function parameters +class ze_rtas_geometry_aabbs_ext_cb_params_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("primID", c_ulong), ## [in] first primitive to return bounds for + ("primIDCount", c_ulong), ## [in] number of primitives to return bounds for + ("pGeomUserPtr", c_void_p), ## [in] pointer provided through geometry descriptor + ("pBuildUserPtr", c_void_p), ## [in] pointer provided through ::zeRTASBuilderBuildExt function + ("pBoundsOut", POINTER(ze_rtas_aabb_ext_t)) ## [out] destination buffer to write AABB bounds to + ] + +############################################################################### +## @brief Callback function pointer type to return AABBs for a range of +## procedural primitives + +############################################################################### +## @brief Ray tracing acceleration structure builder procedural primitives +## geometry info +## +## @details +## - A host-side bounds callback function is invoked by the acceleration +## structure builder to query the bounds of procedural primitives on +## demand. The callback is passed some `pGeomUserPtr` that can point to +## an application-side representation of the procedural primitives. +## Further, a second `pBuildUserPtr`, which is set by a parameter to +## ::zeRTASBuilderBuildExt, is passed to the callback. This allows the +## build to change the bounds of the procedural geometry, for example, to +## build a BVH only over a short time range to implement multi-segment +## motion blur. +class ze_rtas_builder_procedural_geometry_info_ext_t(Structure): + _fields_ = [ + ("geometryType", ze_rtas_builder_packed_geometry_type_ext_t), ## [in] geometry type, must be + ## ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_PROCEDURAL + ("geometryFlags", ze_rtas_builder_packed_geometry_ext_flags_t), ## [in] 0 or some combination of ::ze_rtas_builder_geometry_ext_flag_t + ## bits representing the geometry flags for all primitives of this + ## geometry + ("geometryMask", c_ubyte), ## [in] 8-bit geometry mask for ray masking + ("reserved", c_ubyte), ## [in] reserved for future use + ("primCount", c_ulong), ## [in] number of primitives in geometry + ("pfnGetBoundsCb", ze_rtas_geometry_aabbs_cb_ext_t), ## [in] pointer to callback function to get the axis-aligned bounding-box + ## for a range of primitives + ("pGeomUserPtr", c_void_p) ## [in] user data pointer passed to callback + ] + +############################################################################### +## @brief Ray tracing acceleration structure builder instance geometry info +class ze_rtas_builder_instance_geometry_info_ext_t(Structure): + _fields_ = [ + ("geometryType", ze_rtas_builder_packed_geometry_type_ext_t), ## [in] geometry type, must be + ## ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_INSTANCE + ("instanceFlags", ze_rtas_builder_packed_instance_ext_flags_t), ## [in] 0 or some combination of ::ze_rtas_builder_geometry_ext_flag_t + ## bits representing the geometry flags for all primitives of this + ## geometry + ("geometryMask", c_ubyte), ## [in] 8-bit geometry mask for ray masking + ("transformFormat", ze_rtas_builder_packed_input_data_format_ext_t),## [in] format of the specified transformation + ("instanceUserID", c_ulong), ## [in] user-specified identifier for the instance + ("pTransform", c_void_p), ## [in] object-to-world instance transformation in specified format + ("pBounds", POINTER(ze_rtas_aabb_ext_t)), ## [in] object-space axis-aligned bounding-box of the instanced + ## acceleration structure + ("pAccelerationStructure", c_void_p) ## [in] device pointer to acceleration structure to instantiate + ] + +############################################################################### +## @brief +class ze_rtas_builder_build_op_ext_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("rtasFormat", ze_rtas_format_ext_t), ## [in] ray tracing acceleration structure format + ("buildQuality", ze_rtas_builder_build_quality_hint_ext_t), ## [in] acceleration structure build quality hint + ("buildFlags", ze_rtas_builder_build_op_ext_flags_t), ## [in] 0 or some combination of ::ze_rtas_builder_build_op_ext_flag_t + ## flags + ("ppGeometries", POINTER(ze_rtas_builder_geometry_info_ext_t*)),## [in][optional][range(0, `numGeometries`)] NULL or a valid array of + ## pointers to geometry infos + ("numGeometries", c_ulong) ## [in] number of geometries in geometry infos array, can be zero when + ## `ppGeometries` is NULL + ] + +############################################################################### +## @brief Device Vector Sizes Query Extension Name +ZE_DEVICE_VECTOR_SIZES_EXT_NAME = "ZE_extension_device_vector_sizes" + +############################################################################### +## @brief Device Vector Sizes Query Extension Version(s) +class ze_device_vector_sizes_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_device_vector_sizes_ext_version_t(c_int): + def __str__(self): + return str(ze_device_vector_sizes_ext_version_v(self.value)) + + +############################################################################### +## @brief Device Vector Width Properties queried using +## $DeviceGetVectorWidthPropertiesExt +class ze_device_vector_width_properties_ext_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("vector_width_size", c_ulong), ## [out] The associated vector width size supported by the device. + ("preferred_vector_width_char", c_ulong), ## [out] The preferred vector width size for char type supported by the device. + ("preferred_vector_width_short", c_ulong), ## [out] The preferred vector width size for short type supported by the device. + ("preferred_vector_width_int", c_ulong), ## [out] The preferred vector width size for int type supported by the device. + ("preferred_vector_width_long", c_ulong), ## [out] The preferred vector width size for long type supported by the device. + ("preferred_vector_width_float", c_ulong), ## [out] The preferred vector width size for float type supported by the device. + ("preferred_vector_width_double", c_ulong), ## [out] The preferred vector width size for double type supported by the device. + ("preferred_vector_width_half", c_ulong), ## [out] The preferred vector width size for half type supported by the device. + ("native_vector_width_char", c_ulong), ## [out] The native vector width size for char type supported by the device. + ("native_vector_width_short", c_ulong), ## [out] The native vector width size for short type supported by the device. + ("native_vector_width_int", c_ulong), ## [out] The native vector width size for int type supported by the device. + ("native_vector_width_long", c_ulong), ## [out] The native vector width size for long type supported by the device. + ("native_vector_width_float", c_ulong), ## [out] The native vector width size for float type supported by the device. + ("native_vector_width_double", c_ulong), ## [out] The native vector width size for double type supported by the device. + ("native_vector_width_half", c_ulong) ## [out] The native vector width size for half type supported by the device. + ] + +############################################################################### +## @brief External Memory Mapping Extension Name +ZE_EXTERNAL_MEMORY_MAPPING_EXT_NAME = "ZE_extension_external_memmap_sysmem" + +############################################################################### +## @brief External Memory Mapping Extension Version(s) +class ze_external_memmap_sysmem_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_external_memmap_sysmem_ext_version_t(c_int): + def __str__(self): + return str(ze_external_memmap_sysmem_ext_version_v(self.value)) + + +############################################################################### +## @brief Maps external system memory for an allocation +## +## @details +## - This structure may be passed to ::zeMemAllocHost, via the `pNext` +## member of ::ze_host_mem_alloc_desc_t to map system memory for a host +## allocation. +## - The system memory pointer and size being mapped must be page aligned +## based on the supported page sizes on the device. +class ze_external_memmap_sysmem_ext_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("pSystemMemory", c_void_p), ## [in] system memory pointer to map; must be page-aligned. + ("size", c_ulonglong) ## [in] size of the system memory to map; must be page-aligned. + ] + +############################################################################### +## @brief Get Kernel Allocation Properties Extension Name +ZE_GET_KERNEL_ALLOCATION_PROPERTIES_EXP_NAME = "ZE_experimental_kernel_allocation_properties" + +############################################################################### +## @brief Get Kernel Allocation Properties Extension Version(s) +class ze_kernel_get_allocation_properties_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_kernel_get_allocation_properties_exp_version_t(c_int): + def __str__(self): + return str(ze_kernel_get_allocation_properties_exp_version_v(self.value)) + + +############################################################################### +## @brief Kernel allocation properties +class ze_kernel_allocation_exp_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("base", c_ulonglong), ## [out] base address of the allocation + ("size", c_size_t), ## [out] size of allocation + ("type", ze_memory_type_t), ## [out] type of allocation + ("argIndex", c_ulong) ## [out] kernel argument index for current allocation, -1 for driver + ## internal (not kernel argument) allocations + ] + +############################################################################### +## @brief Device Usable Memory Size Properties Extension Name +ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_NAME = "ZE_extension_device_usablemem_size_properties" + +############################################################################### +## @brief Device Usable Mem Size Extension Version(s) +class ze_device_usablemem_size_properties_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_device_usablemem_size_properties_ext_version_t(c_int): + def __str__(self): + return str(ze_device_usablemem_size_properties_ext_version_v(self.value)) + + +############################################################################### +## @brief Memory access property to discover current status of usable memory +## +## @details +## - This structure may be returned from ::zeDeviceGetProperties via the +## `pNext` member of ::ze_device_properties_t +class ze_device_usablemem_size_ext_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("currUsableMemSize", c_ulonglong) ## [out] Returns the available usable memory at the device level. This is + ## typically less than or equal to the available physical memory on the + ## device. It important to note that usable memory size reported is + ## transient in nature and cannot be used to reliably guarentee success + ## of future allocations. The usable memory includes all the memory that + ## the clients can allocate for their use and by L0 Core for its internal + ## allocations. + ] + +############################################################################### +## @brief Image Format Support Extension Name +ZE_IMAGE_FORMAT_SUPPORT_EXT_NAME = "ZE_extension_image_format_support" + +############################################################################### +## @brief Image Format Support Extension Version(s) +class ze_image_format_support_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_image_format_support_ext_version_t(c_int): + def __str__(self): + return str(ze_image_format_support_ext_version_v(self.value)) + + +############################################################################### +## @brief Image format support query properties +## +## @details +## - This structure may be passed to ::zeImageGetProperties via the pNext +## member of ::ze_image_properties_t. +## - The implementation shall populate the supported field based on the +## ::ze_image_desc_t and ::ze_device_handle_t passed to +## ::zeImageGetProperties. +## - This provides a mechanism to query format support without requiring +## image creation. +class ze_image_format_support_ext_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("supported", ze_bool_t) ## [out] boolean flag indicating whether the image format is supported on + ## the queried device + ] + +############################################################################### +## @brief IPC Memory Handle Type Extension Name +ZE_IPC_MEM_HANDLE_TYPE_EXT_NAME = "ZE_extension_ipc_mem_handle_type" + +############################################################################### +## @brief IPC Memory Handle Type Extension Version(s) +class ze_ipc_mem_handle_type_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_ipc_mem_handle_type_ext_version_t(c_int): + def __str__(self): + return str(ze_ipc_mem_handle_type_ext_version_v(self.value)) + + +############################################################################### +## @brief Supported IPC memory handle type flags +class ze_ipc_mem_handle_type_flags_v(IntEnum): + DEFAULT = ZE_BIT(0) ## Local IPC memory handle type for use within the same machine. + FABRIC_ACCESSIBLE = ZE_BIT(1) ## Fabric accessible IPC memory handle type for use across machines via a + ## supported fabric. + +class ze_ipc_mem_handle_type_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief ['IPC Memory Handle Type Extension Descriptor', 'Used in +## ::zeMemGetIpcHandleWithProperties, ::zeMemAllocDevice, and +## ::zeMemAllocHost, ::zePhysicalMemCreate to specify the IPC memory +## handle type to create for this allocation.'] +class ze_ipc_mem_handle_type_ext_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("typeFlags", ze_ipc_mem_handle_type_flags_t) ## [in] valid combination of ::ze_ipc_mem_handle_type_flag_t + ] + +############################################################################### +## @brief Cache_Reservation Extension Name +ZE_CACHE_RESERVATION_EXT_NAME = "ZE_extension_cache_reservation" + +############################################################################### +## @brief Cache_Reservation Extension Version(s) +class ze_cache_reservation_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_cache_reservation_ext_version_t(c_int): + def __str__(self): + return str(ze_cache_reservation_ext_version_v(self.value)) + + +############################################################################### +## @brief Cache Reservation Region +class ze_cache_ext_region_v(IntEnum): + ZE_CACHE_REGION_DEFAULT = 0 ## [DEPRECATED] utilize driver default scheme. Use + ## ::ZE_CACHE_EXT_REGION_DEFAULT. + ZE_CACHE_RESERVE_REGION = 1 ## [DEPRECATED] utilize reserved region. Use + ## ::ZE_CACHE_EXT_REGION_RESERVED. + ZE_CACHE_NON_RESERVED_REGION = 2 ## [DEPRECATED] utilize non-reserverd region. Use + ## ::ZE_CACHE_EXT_REGION_NON_RESERVED. + DEFAULT = 0 ## utilize driver default scheme + RESERVED = 1 ## utilize reserved region + NON_RESERVED = 2 ## utilize non-reserverd region + +class ze_cache_ext_region_t(c_int): + def __str__(self): + return str(ze_cache_ext_region_v(self.value)) + + +############################################################################### +## @brief CacheReservation structure +## +## @details +## - This structure must be passed to ::zeDeviceGetCacheProperties via the +## `pNext` member of ::ze_device_cache_properties_t +## - Used for determining the max cache reservation allowed on device. Size +## of zero means no reservation available. +class ze_cache_reservation_ext_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("maxCacheReservationSize", c_size_t) ## [out] max cache reservation size + ] + +############################################################################### +## @brief Event Query Timestamps Extension Name +ZE_EVENT_QUERY_TIMESTAMPS_EXP_NAME = "ZE_experimental_event_query_timestamps" + +############################################################################### +## @brief Event Query Timestamps Extension Version(s) +class ze_event_query_timestamps_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_event_query_timestamps_exp_version_t(c_int): + def __str__(self): + return str(ze_event_query_timestamps_exp_version_v(self.value)) + + +############################################################################### +## @brief Image Memory Properties Extension Name +ZE_IMAGE_MEMORY_PROPERTIES_EXP_NAME = "ZE_experimental_image_memory_properties" + +############################################################################### +## @brief Image Memory Properties Extension Version(s) +class ze_image_memory_properties_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_image_memory_properties_exp_version_t(c_int): + def __str__(self): + return str(ze_image_memory_properties_exp_version_v(self.value)) + + +############################################################################### +## @brief Image memory properties +class ze_image_memory_properties_exp_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("size", c_ulonglong), ## [out] size of image allocation in bytes. + ("rowPitch", c_ulonglong), ## [out] size of image row in bytes. + ("slicePitch", c_ulonglong) ## [out] size of image slice in bytes. + ] + +############################################################################### +## @brief Image View Extension Name +ZE_IMAGE_VIEW_EXT_NAME = "ZE_extension_image_view" + +############################################################################### +## @brief Image View Extension Version(s) +class ze_image_view_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_image_view_ext_version_t(c_int): + def __str__(self): + return str(ze_image_view_ext_version_v(self.value)) + + +############################################################################### +## @brief Image View Extension Name +ZE_IMAGE_VIEW_EXP_NAME = "ZE_experimental_image_view" + +############################################################################### +## @brief Image View Extension Version(s) +class ze_image_view_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_image_view_exp_version_t(c_int): + def __str__(self): + return str(ze_image_view_exp_version_v(self.value)) + + +############################################################################### +## @brief Image View Planar Extension Name +ZE_IMAGE_VIEW_PLANAR_EXT_NAME = "ZE_extension_image_view_planar" + +############################################################################### +## @brief Image View Planar Extension Version(s) +class ze_image_view_planar_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_image_view_planar_ext_version_t(c_int): + def __str__(self): + return str(ze_image_view_planar_ext_version_v(self.value)) + + +############################################################################### +## @brief Image view planar descriptor +class ze_image_view_planar_ext_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("planeIndex", c_ulong) ## [in] the 0-based plane index (e.g. NV12 is 0 = Y plane, 1 UV plane) + ] + +############################################################################### +## @brief Image View Planar Extension Name +ZE_IMAGE_VIEW_PLANAR_EXP_NAME = "ZE_experimental_image_view_planar" + +############################################################################### +## @brief Image View Planar Extension Version(s) +class ze_image_view_planar_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_image_view_planar_exp_version_t(c_int): + def __str__(self): + return str(ze_image_view_planar_exp_version_v(self.value)) + + +############################################################################### +## @brief Image view planar descriptor +class ze_image_view_planar_exp_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("planeIndex", c_ulong) ## [DEPRECATED] no longer supported, use + ## ::ze_image_view_planar_ext_desc_t instead + ] + +############################################################################### +## @brief Kernel Scheduling Hints Extension Name +ZE_KERNEL_SCHEDULING_HINTS_EXP_NAME = "ZE_experimental_scheduling_hints" + +############################################################################### +## @brief Kernel Scheduling Hints Extension Version(s) +class ze_scheduling_hints_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_scheduling_hints_exp_version_t(c_int): + def __str__(self): + return str(ze_scheduling_hints_exp_version_v(self.value)) + + +############################################################################### +## @brief Supported kernel scheduling hint flags +class ze_scheduling_hint_exp_flags_v(IntEnum): + OLDEST_FIRST = ZE_BIT(0) ## Hint that the kernel prefers oldest-first scheduling + ROUND_ROBIN = ZE_BIT(1) ## Hint that the kernel prefers round-robin scheduling + STALL_BASED_ROUND_ROBIN = ZE_BIT(2) ## Hint that the kernel prefers stall-based round-robin scheduling + +class ze_scheduling_hint_exp_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Device kernel scheduling hint properties queried using +## ::zeDeviceGetModuleProperties +## +## @details +## - This structure may be returned from ::zeDeviceGetModuleProperties, via +## the `pNext` member of ::ze_device_module_properties_t. +class ze_scheduling_hint_exp_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("schedulingHintFlags", ze_scheduling_hint_exp_flags_t) ## [out] Supported kernel scheduling hints. + ## May be 0 (none) or a valid combination of ::ze_scheduling_hint_exp_flag_t. + ] + +############################################################################### +## @brief Kernel scheduling hint descriptor +## +## @details +## - This structure may be passed to ::zeKernelSchedulingHintExp. +class ze_scheduling_hint_exp_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_scheduling_hint_exp_flags_t) ## [in] flags specifying kernel scheduling hints. + ## must be 0 (default) or a valid combination of ::ze_scheduling_hint_exp_flag_t. + ] + +############################################################################### +## @brief Linkonce ODR Extension Name +ZE_LINKONCE_ODR_EXT_NAME = "ZE_extension_linkonce_odr" + +############################################################################### +## @brief Linkonce ODR Extension Version(s) +class ze_linkonce_odr_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_linkonce_odr_ext_version_t(c_int): + def __str__(self): + return str(ze_linkonce_odr_ext_version_v(self.value)) + + +############################################################################### +## @brief Power Saving Hint Extension Name +ZE_CONTEXT_POWER_SAVING_HINT_EXP_NAME = "ZE_experimental_power_saving_hint" + +############################################################################### +## @brief Power Saving Hint Extension Version(s) +class ze_power_saving_hint_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_power_saving_hint_exp_version_t(c_int): + def __str__(self): + return str(ze_power_saving_hint_exp_version_v(self.value)) + + +############################################################################### +## @brief Supported device types +class ze_power_saving_hint_type_v(IntEnum): + MIN = 0 ## Minumum power savings. The device will make no attempt to save power + ## while executing work submitted to this context. + MAX = 100 ## Maximum power savings. The device will do everything to bring power to + ## a minimum while executing work submitted to this context. + +class ze_power_saving_hint_type_t(c_int): + def __str__(self): + return str(ze_power_saving_hint_type_v(self.value)) + + +############################################################################### +## @brief Extended context descriptor containing power saving hint. +class ze_context_power_saving_hint_exp_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("hint", c_ulong) ## [in] power saving hint (default value = 0). This is value from [0,100] + ## and can use pre-defined settings from ::ze_power_saving_hint_type_t. + ] + +############################################################################### +## @brief Subgroups Extension Name +ZE_SUBGROUPS_EXT_NAME = "ZE_extension_subgroups" + +############################################################################### +## @brief Subgroups Extension Version(s) +class ze_subgroup_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_subgroup_ext_version_t(c_int): + def __str__(self): + return str(ze_subgroup_ext_version_v(self.value)) + + +############################################################################### +## @brief EU Count Extension Name +ZE_EU_COUNT_EXT_NAME = "ZE_extension_eu_count" + +############################################################################### +## @brief EU Count Extension Version(s) +class ze_eu_count_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_eu_count_ext_version_t(c_int): + def __str__(self): + return str(ze_eu_count_ext_version_v(self.value)) + + +############################################################################### +## @brief EU count queried using ::zeDeviceGetProperties +## +## @details +## - This structure may be returned from ::zeDeviceGetProperties via the +## `pNext` member of ::ze_device_properties_t. +## - Used for determining the total number of EUs available on device. +class ze_eu_count_ext_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("numTotalEUs", c_ulong) ## [out] Total number of EUs available + ] + +############################################################################### +## @brief PCI Properties Extension Name +ZE_PCI_PROPERTIES_EXT_NAME = "ZE_extension_pci_properties" + +############################################################################### +## @brief PCI Properties Extension Version(s) +class ze_pci_properties_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_pci_properties_ext_version_t(c_int): + def __str__(self): + return str(ze_pci_properties_ext_version_v(self.value)) + + +############################################################################### +## @brief Device PCI address +## +## @details +## - This structure may be passed to ::zeDevicePciGetPropertiesExt as an +## attribute of ::ze_pci_ext_properties_t. +## - A PCI BDF address is the bus:device:function address of the device and +## is useful for locating the device in the PCI switch fabric. +class ze_pci_address_ext_t(Structure): + _fields_ = [ + ("domain", c_ulong), ## [out] PCI domain number + ("bus", c_ulong), ## [out] PCI BDF bus number + ("device", c_ulong), ## [out] PCI BDF device number + ("function", c_ulong) ## [out] PCI BDF function number + ] + +############################################################################### +## @brief Device PCI speed +class ze_pci_speed_ext_t(Structure): + _fields_ = [ + ("genVersion", c_int32_t), ## [out] The link generation. A value of -1 means that this property is + ## unknown. + ("width", c_int32_t), ## [out] The number of lanes. A value of -1 means that this property is + ## unknown. + ("maxBandwidth", c_int64_t) ## [out] The theoretical maximum bandwidth in bytes/sec (sum of all + ## lanes). A value of -1 means that this property is unknown. + ] + +############################################################################### +## @brief Static PCI properties +class ze_pci_ext_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("address", ze_pci_address_ext_t), ## [out] The BDF address + ("maxSpeed", ze_pci_speed_ext_t) ## [out] Fastest port configuration supported by the device (sum of all + ## lanes) + ] + +############################################################################### +## @brief sRGB Extension Name +ZE_SRGB_EXT_NAME = "ZE_extension_srgb" + +############################################################################### +## @brief sRGB Extension Version(s) +class ze_srgb_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_srgb_ext_version_t(c_int): + def __str__(self): + return str(ze_srgb_ext_version_v(self.value)) + + +############################################################################### +## @brief sRGB image descriptor +## +## @details +## - This structure may be passed to ::zeImageCreate via the `pNext` member +## of ::ze_image_desc_t +## - Used for specifying that the image is in sRGB format. +class ze_srgb_ext_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("sRGB", ze_bool_t) ## [in] Is sRGB. + ] + +############################################################################### +## @brief Image Copy Extension Name +ZE_IMAGE_COPY_EXT_NAME = "ZE_extension_image_copy" + +############################################################################### +## @brief Image Copy Extension Version(s) +class ze_image_copy_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_image_copy_ext_version_t(c_int): + def __str__(self): + return str(ze_image_copy_ext_version_v(self.value)) + + +############################################################################### +## @brief Image Query Allocation Properties Extension Name +ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_NAME = "ZE_extension_image_query_alloc_properties" + +############################################################################### +## @brief Image Query Allocation Properties Extension Version(s) +class ze_image_query_alloc_properties_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_image_query_alloc_properties_ext_version_t(c_int): + def __str__(self): + return str(ze_image_query_alloc_properties_ext_version_v(self.value)) + + +############################################################################### +## @brief Image allocation properties queried using +## ::zeImageGetAllocPropertiesExt +class ze_image_allocation_ext_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("id", c_ulonglong) ## [out] identifier for this allocation + ] + +############################################################################### +## @brief Linkage Inspection Extension Name +ZE_LINKAGE_INSPECTION_EXT_NAME = "ZE_extension_linkage_inspection" + +############################################################################### +## @brief Linkage Inspection Extension Version(s) +class ze_linkage_inspection_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_linkage_inspection_ext_version_t(c_int): + def __str__(self): + return str(ze_linkage_inspection_ext_version_v(self.value)) + + +############################################################################### +## @brief Supported module linkage inspection flags +class ze_linkage_inspection_ext_flags_v(IntEnum): + IMPORTS = ZE_BIT(0) ## List all imports of modules + UNRESOLVABLE_IMPORTS = ZE_BIT(1) ## List all imports of modules that do not have a corresponding export + EXPORTS = ZE_BIT(2) ## List all exports of modules + +class ze_linkage_inspection_ext_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Module linkage inspection descriptor +## +## @details +## - This structure may be passed to ::zeModuleInspectLinkageExt. +class ze_linkage_inspection_ext_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_linkage_inspection_ext_flags_t) ## [in] flags specifying module linkage inspection. + ## must be 0 (default) or a valid combination of ::ze_linkage_inspection_ext_flag_t. + ] + +############################################################################### +## @brief Memory Compression Hints Extension Name +ZE_MEMORY_COMPRESSION_HINTS_EXT_NAME = "ZE_extension_memory_compression_hints" + +############################################################################### +## @brief Memory Compression Hints Extension Version(s) +class ze_memory_compression_hints_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_memory_compression_hints_ext_version_t(c_int): + def __str__(self): + return str(ze_memory_compression_hints_ext_version_v(self.value)) + + +############################################################################### +## @brief Supported memory compression hints flags +class ze_memory_compression_hints_ext_flags_v(IntEnum): + COMPRESSED = ZE_BIT(0) ## Hint Driver implementation to make allocation compressible + UNCOMPRESSED = ZE_BIT(1) ## Hint Driver implementation to make allocation not compressible + +class ze_memory_compression_hints_ext_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Compression hints memory allocation descriptor +## +## @details +## - This structure may be passed to ::zeMemAllocShared or +## ::zeMemAllocDevice, via the `pNext` member of +## ::ze_device_mem_alloc_desc_t. +## - This structure may be passed to ::zeMemAllocHost, via the `pNext` +## member of ::ze_host_mem_alloc_desc_t. +## - This structure may be passed to ::zeImageCreate, via the `pNext` +## member of ::ze_image_desc_t. +class ze_memory_compression_hints_ext_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_memory_compression_hints_ext_flags_t) ## [in] flags specifying if allocation should be compressible or not. + ## Must be set to one of the ::ze_memory_compression_hints_ext_flag_t; + ] + +############################################################################### +## @brief Memory Free Policies Extension Name +ZE_MEMORY_FREE_POLICIES_EXT_NAME = "ZE_extension_memory_free_policies" + +############################################################################### +## @brief Memory Free Policies Extension Version(s) +class ze_memory_free_policies_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_memory_free_policies_ext_version_t(c_int): + def __str__(self): + return str(ze_memory_free_policies_ext_version_v(self.value)) + + +############################################################################### +## @brief Supported memory free policy capability flags +class ze_driver_memory_free_policy_ext_flags_v(IntEnum): + BLOCKING_FREE = ZE_BIT(0) ## Blocks until all commands using the memory are complete before + ## scheduling memory to be freed. Does not guarantee memory is freed upon + ## return, only that it is safe and is scheduled to be freed. Actual + ## freeing of memory is specific to user mode driver and kernel mode + ## driver implementation and may be done asynchronously. + DEFER_FREE = ZE_BIT(1) ## Immediately schedules the memory to be freed and returns without + ## blocking. Memory may be freed after all commands using the memory are + ## complete. Actual freeing of memory is specific to user mode driver and + ## kernel mode driver implementation and may be done asynchronously. + +class ze_driver_memory_free_policy_ext_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Driver memory free properties queried using ::zeDriverGetProperties +## +## @details +## - All drivers must support an immediate free policy, which is the +## default free policy. +## - This structure may be returned from ::zeDriverGetProperties, via the +## `pNext` member of ::ze_driver_properties_t. +class ze_driver_memory_free_ext_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("freePolicies", ze_driver_memory_free_policy_ext_flags_t) ## [out] Supported memory free policies. + ## must be 0 or a combination of ::ze_driver_memory_free_policy_ext_flag_t. + ] + +############################################################################### +## @brief Memory free descriptor with free policy +class ze_memory_free_ext_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("freePolicy", ze_driver_memory_free_policy_ext_flags_t) ## [in] flags specifying the memory free policy. + ## must be 0 (default) or a supported ::ze_driver_memory_free_policy_ext_flag_t; + ## default behavior is to free immediately. + ] + +############################################################################### +## @brief Bandwidth Extension Name +ZE_BANDWIDTH_PROPERTIES_EXP_NAME = "ZE_experimental_bandwidth_properties" + +############################################################################### +## @brief Bandwidth Extension Version(s) +class ze_bandwidth_properties_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_bandwidth_properties_exp_version_t(c_int): + def __str__(self): + return str(ze_bandwidth_properties_exp_version_v(self.value)) + + +############################################################################### +## @brief P2P Bandwidth Properties +## +## @details +## - This structure may be passed to ::zeDeviceGetP2PProperties by having +## the pNext member of ::ze_device_p2p_properties_t point at this struct. +class ze_device_p2p_bandwidth_exp_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("logicalBandwidth", c_ulong), ## [out] total logical design bandwidth for all links connecting the two + ## devices + ("physicalBandwidth", c_ulong), ## [out] total physical design bandwidth for all links connecting the two + ## devices + ("bandwidthUnit", ze_bandwidth_unit_t), ## [out] bandwidth unit + ("logicalLatency", c_ulong), ## [out] average logical design latency for all links connecting the two + ## devices + ("physicalLatency", c_ulong), ## [out] average physical design latency for all links connecting the two + ## devices + ("latencyUnit", ze_latency_unit_t) ## [out] latency unit + ] + +############################################################################### +## @brief Copy Bandwidth Properties +## +## @details +## - This structure may be passed to +## ::zeDeviceGetCommandQueueGroupProperties by having the pNext member of +## ::ze_command_queue_group_properties_t point at this struct. +## - [DEPRECATED] +class ze_copy_bandwidth_exp_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("copyBandwidth", c_ulong), ## [out] design bandwidth supported by this engine type for copy + ## operations + ("copyBandwidthUnit", ze_bandwidth_unit_t) ## [out] copy bandwidth unit + ] + +############################################################################### +## @brief Device Local Identifier (LUID) Extension Name +ZE_DEVICE_LUID_EXT_NAME = "ZE_extension_device_luid" + +############################################################################### +## @brief Device Local Identifier (LUID) Extension Version(s) +class ze_device_luid_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_device_luid_ext_version_t(c_int): + def __str__(self): + return str(ze_device_luid_ext_version_v(self.value)) + + +############################################################################### +## @brief Maximum device local identifier (LUID) size in bytes +ZE_MAX_DEVICE_LUID_SIZE_EXT = 8 + +############################################################################### +## @brief Device local identifier (LUID) +class ze_device_luid_ext_t(Structure): + _fields_ = [ + ("id", c_ubyte * ZE_MAX_DEVICE_LUID_SIZE_EXT) ## [out] opaque data representing a device LUID + ] + +############################################################################### +## @brief Device LUID properties queried using ::zeDeviceGetProperties +## +## @details +## - This structure may be returned from ::zeDeviceGetProperties, via the +## `pNext` member of ::ze_device_properties_t. +class ze_device_luid_ext_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("luid", ze_device_luid_ext_t), ## [out] locally unique identifier (LUID). + ## The returned LUID can be cast to a LUID object and must be equal to + ## the locally + ## unique identifier of an IDXGIAdapter1 object that corresponds to the device. + ("nodeMask", c_ulong) ## [out] node mask. + ## The returned node mask must contain exactly one bit. + ## If the device is running on an operating system that supports the + ## Direct3D 12 API + ## and the device corresponds to an individual device in a linked device + ## adapter, the + ## returned node mask identifies the Direct3D 12 node corresponding to + ## the device. + ## Otherwise, the returned node mask must be 1. + ] + +############################################################################### +## @brief Fabric Topology Discovery Extension Name +ZE_FABRIC_EXP_NAME = "ZE_experimental_fabric" + +############################################################################### +## @brief Fabric Topology Discovery Extension Version(s) +class ze_fabric_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_fabric_exp_version_t(c_int): + def __str__(self): + return str(ze_fabric_exp_version_v(self.value)) + + +############################################################################### +## @brief Maximum fabric edge model string size +ZE_MAX_FABRIC_EDGE_MODEL_EXP_SIZE = 256 + +############################################################################### +## @brief Fabric Vertex types +class ze_fabric_vertex_exp_type_v(IntEnum): + UNKNOWN = 0 ## Fabric vertex type is unknown + DEVICE = 1 ## Fabric vertex represents a device + SUBDEVICE = 2 ## Fabric vertex represents a subdevice + SWITCH = 3 ## Fabric vertex represents a switch + +class ze_fabric_vertex_exp_type_t(c_int): + def __str__(self): + return str(ze_fabric_vertex_exp_type_v(self.value)) + + +############################################################################### +## @brief Fabric edge duplexity +class ze_fabric_edge_exp_duplexity_v(IntEnum): + UNKNOWN = 0 ## Fabric edge duplexity is unknown + HALF_DUPLEX = 1 ## Fabric edge is half duplex, i.e. stated bandwidth is obtained in only + ## one direction at time + FULL_DUPLEX = 2 ## Fabric edge is full duplex, i.e. stated bandwidth is supported in both + ## directions simultaneously + +class ze_fabric_edge_exp_duplexity_t(c_int): + def __str__(self): + return str(ze_fabric_edge_exp_duplexity_v(self.value)) + + +############################################################################### +## @brief PCI address +## +## @details +## - A PCI BDF address is the bus:device:function address of the device and +## is useful for locating the device in the PCI switch fabric. +class ze_fabric_vertex_pci_exp_address_t(Structure): + _fields_ = [ + ("domain", c_ulong), ## [out] PCI domain number + ("bus", c_ulong), ## [out] PCI BDF bus number + ("device", c_ulong), ## [out] PCI BDF device number + ("function", c_ulong) ## [out] PCI BDF function number + ] + +############################################################################### +## @brief Fabric Vertex properties +class ze_fabric_vertex_exp_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("uuid", ze_uuid_t), ## [out] universal unique identifier. If the vertex is co-located with a + ## device/subdevice, then this uuid will match that of the corresponding + ## device/subdevice + ("type", ze_fabric_vertex_exp_type_t), ## [out] does the fabric vertex represent a device, subdevice, or switch? + ("remote", ze_bool_t), ## [out] does the fabric vertex live on the local node or on a remote + ## node? + ("address", ze_fabric_vertex_pci_exp_address_t) ## [out] B/D/F address of fabric vertex & associated device/subdevice if + ## available + ] + +############################################################################### +## @brief Fabric Edge properties +class ze_fabric_edge_exp_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("uuid", ze_uuid_t), ## [out] universal unique identifier. + ("model", c_char * ZE_MAX_FABRIC_EDGE_MODEL_EXP_SIZE), ## [out] Description of fabric edge technology. Will be set to the string + ## "unkown" if this cannot be determined for this edge + ("bandwidth", c_ulong), ## [out] design bandwidth + ("bandwidthUnit", ze_bandwidth_unit_t), ## [out] bandwidth unit + ("latency", c_ulong), ## [out] design latency + ("latencyUnit", ze_latency_unit_t), ## [out] latency unit + ("duplexity", ze_fabric_edge_exp_duplexity_t) ## [out] Duplexity of the fabric edge + ] + +############################################################################### +## @brief Device Memory Properties Extension Name +ZE_DEVICE_MEMORY_PROPERTIES_EXT_NAME = "ZE_extension_device_memory_properties" + +############################################################################### +## @brief Device Memory Properties Extension Version(s) +class ze_device_memory_properties_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_device_memory_properties_ext_version_t(c_int): + def __str__(self): + return str(ze_device_memory_properties_ext_version_v(self.value)) + + +############################################################################### +## @brief Memory module types +class ze_device_memory_ext_type_v(IntEnum): + HBM = 0 ## HBM memory + HBM2 = 1 ## HBM2 memory + DDR = 2 ## DDR memory + DDR2 = 3 ## DDR2 memory + DDR3 = 4 ## DDR3 memory + DDR4 = 5 ## DDR4 memory + DDR5 = 6 ## DDR5 memory + LPDDR = 7 ## LPDDR memory + LPDDR3 = 8 ## LPDDR3 memory + LPDDR4 = 9 ## LPDDR4 memory + LPDDR5 = 10 ## LPDDR5 memory + SRAM = 11 ## SRAM memory + L1 = 12 ## L1 cache + L3 = 13 ## L3 cache + GRF = 14 ## Execution unit register file + SLM = 15 ## Execution unit shared local memory + GDDR4 = 16 ## GDDR4 memory + GDDR5 = 17 ## GDDR5 memory + GDDR5X = 18 ## GDDR5X memory + GDDR6 = 19 ## GDDR6 memory + GDDR6X = 20 ## GDDR6X memory + GDDR7 = 21 ## GDDR7 memory + HBM2E = 22 ## HBM2E memory + HBM3 = 23 ## HBM3 memory + HBM3E = 24 ## HBM3E memory + HBM4 = 25 ## HBM4 memory + +class ze_device_memory_ext_type_t(c_int): + def __str__(self): + return str(ze_device_memory_ext_type_v(self.value)) + + +############################################################################### +## @brief Memory properties +## +## @details +## - This structure may be returned from ::zeDeviceGetMemoryProperties via +## the `pNext` member of ::ze_device_memory_properties_t +class ze_device_memory_ext_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("type", ze_device_memory_ext_type_t), ## [out] The memory type + ("physicalSize", c_ulonglong), ## [out] Physical memory size in bytes. A value of 0 indicates that this + ## property is not known. However, a call to ::zesMemoryGetState() will + ## correctly return the total size of usable memory. + ("readBandwidth", c_ulong), ## [out] Design bandwidth for reads + ("writeBandwidth", c_ulong), ## [out] Design bandwidth for writes + ("bandwidthUnit", ze_bandwidth_unit_t) ## [out] bandwidth unit + ] + +############################################################################### +## @brief Bfloat16 Conversions Extension Name +ZE_BFLOAT16_CONVERSIONS_EXT_NAME = "ZE_extension_bfloat16_conversions" + +############################################################################### +## @brief Bfloat16 Conversions Extension Version(s) +class ze_bfloat16_conversions_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_bfloat16_conversions_ext_version_t(c_int): + def __str__(self): + return str(ze_bfloat16_conversions_ext_version_v(self.value)) + + +############################################################################### +## @brief Device IP Version Extension Name +ZE_DEVICE_IP_VERSION_EXT_NAME = "ZE_extension_device_ip_version" + +############################################################################### +## @brief Device IP Version Extension Version(s) +class ze_device_ip_version_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_device_ip_version_version_t(c_int): + def __str__(self): + return str(ze_device_ip_version_version_v(self.value)) + + +############################################################################### +## @brief Device IP version queried using ::zeDeviceGetProperties +## +## @details +## - This structure may be returned from ::zeDeviceGetProperties via the +## `pNext` member of ::ze_device_properties_t +class ze_device_ip_version_ext_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("ipVersion", c_ulong) ## [out] Device IP version. The meaning of the device IP version is + ## implementation-defined, but newer devices should have a higher + ## version than older devices. + ] + +############################################################################### +## @brief Kernel Max Group Size Properties Extension Name +ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_NAME = "ZE_extension_kernel_max_group_size_properties" + +############################################################################### +## @brief Kernel Max Group Size Properties Extension Version(s) +class ze_kernel_max_group_size_properties_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_kernel_max_group_size_properties_ext_version_t(c_int): + def __str__(self): + return str(ze_kernel_max_group_size_properties_ext_version_v(self.value)) + + +############################################################################### +## @brief Additional kernel max group size properties +## +## @details +## - This structure may be passed to ::zeKernelGetProperties, via the +## `pNext` member of ::ze_kernel_properties_t, to query additional kernel +## max group size properties. +class ze_kernel_max_group_size_properties_ext_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("maxGroupSize", c_ulong) ## [out] maximum group size that can be used to execute the kernel. This + ## value may be less than or equal to the `maxTotalGroupSize` member of + ## ::ze_device_compute_properties_t. + ] + +############################################################################### +## @brief compiler-independent type +class ze_kernel_max_group_size_ext_properties_t(ze_kernel_max_group_size_properties_ext_t): + pass + +############################################################################### +## @brief Sub-Allocations Properties Extension Name +ZE_SUB_ALLOCATIONS_EXP_NAME = "ZE_experimental_sub_allocations" + +############################################################################### +## @brief Sub-Allocations Properties Extension Version(s) +class ze_sub_allocations_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_sub_allocations_exp_version_t(c_int): + def __str__(self): + return str(ze_sub_allocations_exp_version_v(self.value)) + + +############################################################################### +## @brief Properties returned for a sub-allocation +class ze_sub_allocation_t(Structure): + _fields_ = [ + ("base", c_void_p), ## [in,out][optional] base address of the sub-allocation + ("size", c_size_t) ## [in,out][optional] size of the allocation + ] + +############################################################################### +## @brief Sub-Allocations Properties +## +## @details +## - This structure may be passed to ::zeMemGetAllocProperties, via the +## `pNext` member of ::ze_memory_allocation_properties_t. +class ze_memory_sub_allocations_exp_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("pCount", POINTER(c_ulong)), ## [in,out] pointer to the number of sub-allocations. + ## if count is zero, then the driver shall update the value with the + ## total number of sub-allocations on which the allocation has been divided. + ## if count is greater than the number of sub-allocations, then the + ## driver shall update the value with the correct number of sub-allocations. + ("pSubAllocations", POINTER(ze_sub_allocation_t)) ## [in,out][optional][range(0, *pCount)] array of properties for sub-allocations. + ## if count is less than the number of sub-allocations available, then + ## driver shall only retrieve properties for that number of sub-allocations. + ] + +############################################################################### +## @brief Event Query Kernel Timestamps Extension Name +ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_NAME = "ZE_extension_event_query_kernel_timestamps" + +############################################################################### +## @brief Event Query Kernel Timestamps Extension Version(s) +class ze_event_query_kernel_timestamps_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_event_query_kernel_timestamps_ext_version_t(c_int): + def __str__(self): + return str(ze_event_query_kernel_timestamps_ext_version_v(self.value)) + + +############################################################################### +## @brief Event query kernel timestamps flags +class ze_event_query_kernel_timestamps_ext_flags_v(IntEnum): + KERNEL = ZE_BIT(0) ## Kernel timestamp results + SYNCHRONIZED = ZE_BIT(1) ## Device event timestamps synchronized to the host time domain + +class ze_event_query_kernel_timestamps_ext_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Event query kernel timestamps properties +## +## @details +## - This structure may be returned from ::zeDeviceGetProperties, via the +## `pNext` member of ::ze_device_properties_t. +class ze_event_query_kernel_timestamps_ext_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_event_query_kernel_timestamps_ext_flags_t) ## [out] 0 or some combination of + ## ::ze_event_query_kernel_timestamps_ext_flag_t flags + ] + +############################################################################### +## @brief Kernel timestamp clock data synchronized to the host time domain +class ze_synchronized_timestamp_data_ext_t(Structure): + _fields_ = [ + ("kernelStart", c_ulonglong), ## [out] synchronized clock at start of kernel execution + ("kernelEnd", c_ulonglong) ## [out] synchronized clock at end of kernel execution + ] + +############################################################################### +## @brief Synchronized kernel timestamp result +class ze_synchronized_timestamp_result_ext_t(Structure): + _fields_ = [ + ("global", ze_synchronized_timestamp_data_ext_t), ## [out] wall-clock data + ("context", ze_synchronized_timestamp_data_ext_t) ## [out] context-active data; only includes clocks while device context + ## was actively executing. + ] + +############################################################################### +## @brief Event query kernel timestamps results properties +class ze_event_query_kernel_timestamps_results_ext_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("pKernelTimestampsBuffer", POINTER(ze_kernel_timestamp_result_t)), ## [in,out][optional][range(0, *pCount)] pointer to destination buffer of + ## kernel timestamp results + ("pSynchronizedTimestampsBuffer", POINTER(ze_synchronized_timestamp_result_ext_t)) ## [in,out][optional][range(0, *pCount)] pointer to destination buffer of + ## synchronized timestamp results + ] + +############################################################################### +## @brief Ray Tracing Acceleration Structure Builder Extension Name +ZE_RTAS_BUILDER_EXP_NAME = "ZE_experimental_rtas_builder" + +############################################################################### +## @brief Ray Tracing Acceleration Structure Builder Extension Version(s) +class ze_rtas_builder_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_rtas_builder_exp_version_t(c_int): + def __str__(self): + return str(ze_rtas_builder_exp_version_v(self.value)) + + +############################################################################### +## @brief Ray tracing acceleration structure device flags +class ze_rtas_device_exp_flags_v(IntEnum): + RESERVED = ZE_BIT(0) ## reserved for future use + +class ze_rtas_device_exp_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Ray tracing acceleration structure format +## +## @details +## - This is an opaque ray tracing acceleration structure format +## identifier. +class ze_rtas_format_exp_v(IntEnum): + INVALID = 0 ## Invalid acceleration structure format + MAX = 0x7ffffffe ## Maximum acceleration structure format code + +class ze_rtas_format_exp_t(c_int): + def __str__(self): + return str(ze_rtas_format_exp_v(self.value)) + + +############################################################################### +## @brief Ray tracing acceleration structure builder flags +class ze_rtas_builder_exp_flags_v(IntEnum): + RESERVED = ZE_BIT(0) ## Reserved for future use + +class ze_rtas_builder_exp_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Ray tracing acceleration structure builder parallel operation flags +class ze_rtas_parallel_operation_exp_flags_v(IntEnum): + RESERVED = ZE_BIT(0) ## Reserved for future use + +class ze_rtas_parallel_operation_exp_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Ray tracing acceleration structure builder geometry flags +class ze_rtas_builder_geometry_exp_flags_v(IntEnum): + NON_OPAQUE = ZE_BIT(0) ## non-opaque geometries invoke an any-hit shader + +class ze_rtas_builder_geometry_exp_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Packed ray tracing acceleration structure builder geometry flags (see +## ::ze_rtas_builder_geometry_exp_flags_t) +class ze_rtas_builder_packed_geometry_exp_flags_t(c_ubyte): + pass + +############################################################################### +## @brief Ray tracing acceleration structure builder instance flags +class ze_rtas_builder_instance_exp_flags_v(IntEnum): + TRIANGLE_CULL_DISABLE = ZE_BIT(0) ## disables culling of front-facing and back-facing triangles + TRIANGLE_FRONT_COUNTERCLOCKWISE = ZE_BIT(1) ## reverses front and back face of triangles + TRIANGLE_FORCE_OPAQUE = ZE_BIT(2) ## forces instanced geometry to be opaque, unless ray flag forces it to + ## be non-opaque + TRIANGLE_FORCE_NON_OPAQUE = ZE_BIT(3) ## forces instanced geometry to be non-opaque, unless ray flag forces it + ## to be opaque + +class ze_rtas_builder_instance_exp_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Packed ray tracing acceleration structure builder instance flags (see +## ::ze_rtas_builder_instance_exp_flags_t) +class ze_rtas_builder_packed_instance_exp_flags_t(c_ubyte): + pass + +############################################################################### +## @brief Ray tracing acceleration structure builder build operation flags +## +## @details +## - These flags allow the application to tune the acceleration structure +## build operation. +## - The acceleration structure builder implementation might choose to use +## spatial splitting to split large or long primitives into smaller +## pieces. This may result in any-hit shaders being invoked multiple +## times for non-opaque primitives, unless +## ::ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION is specified. +## - Usage of any of these flags may reduce ray tracing performance. +class ze_rtas_builder_build_op_exp_flags_v(IntEnum): + COMPACT = ZE_BIT(0) ## build more compact acceleration structure + NO_DUPLICATE_ANYHIT_INVOCATION = ZE_BIT(1) ## guarantees single any-hit shader invocation per primitive + +class ze_rtas_builder_build_op_exp_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Ray tracing acceleration structure builder build quality hint +## +## @details +## - Depending on use case different quality modes for acceleration +## structure build are supported. +## - A low-quality build builds an acceleration structure fast, but at the +## cost of some reduction in ray tracing performance. This mode is +## recommended for dynamic content, such as animated characters. +## - A medium-quality build uses a compromise between build quality and ray +## tracing performance. This mode should be used by default. +## - Higher ray tracing performance can be achieved by using a high-quality +## build, but acceleration structure build performance might be +## significantly reduced. +class ze_rtas_builder_build_quality_hint_exp_v(IntEnum): + LOW = 0 ## build low-quality acceleration structure (fast) + MEDIUM = 1 ## build medium-quality acceleration structure (slower) + HIGH = 2 ## build high-quality acceleration structure (slow) + +class ze_rtas_builder_build_quality_hint_exp_t(c_int): + def __str__(self): + return str(ze_rtas_builder_build_quality_hint_exp_v(self.value)) + + +############################################################################### +## @brief Ray tracing acceleration structure builder geometry type +class ze_rtas_builder_geometry_type_exp_v(IntEnum): + TRIANGLES = 0 ## triangle mesh geometry type + QUADS = 1 ## quad mesh geometry type + PROCEDURAL = 2 ## procedural geometry type + INSTANCE = 3 ## instance geometry type + +class ze_rtas_builder_geometry_type_exp_t(c_int): + def __str__(self): + return str(ze_rtas_builder_geometry_type_exp_v(self.value)) + + +############################################################################### +## @brief Packed ray tracing acceleration structure builder geometry type (see +## ::ze_rtas_builder_geometry_type_exp_t) +class ze_rtas_builder_packed_geometry_type_exp_t(c_ubyte): + pass + +############################################################################### +## @brief Ray tracing acceleration structure data buffer element format +## +## @details +## - Specifies the format of data buffer elements. +## - Data buffers may contain instancing transform matrices, triangle/quad +## vertex indices, etc... +class ze_rtas_builder_input_data_format_exp_v(IntEnum): + FLOAT3 = 0 ## 3-component float vector (see ::ze_rtas_float3_exp_t) + FLOAT3X4_COLUMN_MAJOR = 1 ## 3x4 affine transformation in column-major format (see + ## ::ze_rtas_transform_float3x4_column_major_exp_t) + FLOAT3X4_ALIGNED_COLUMN_MAJOR = 2 ## 3x4 affine transformation in column-major format (see + ## ::ze_rtas_transform_float3x4_aligned_column_major_exp_t) + FLOAT3X4_ROW_MAJOR = 3 ## 3x4 affine transformation in row-major format (see + ## ::ze_rtas_transform_float3x4_row_major_exp_t) + AABB = 4 ## 3-dimensional axis-aligned bounding-box (see ::ze_rtas_aabb_exp_t) + TRIANGLE_INDICES_UINT32 = 5 ## Unsigned 32-bit triangle indices (see + ## ::ze_rtas_triangle_indices_uint32_exp_t) + QUAD_INDICES_UINT32 = 6 ## Unsigned 32-bit quad indices (see ::ze_rtas_quad_indices_uint32_exp_t) + +class ze_rtas_builder_input_data_format_exp_t(c_int): + def __str__(self): + return str(ze_rtas_builder_input_data_format_exp_v(self.value)) + + +############################################################################### +## @brief Packed ray tracing acceleration structure data buffer element format +## (see ::ze_rtas_builder_input_data_format_exp_t) +class ze_rtas_builder_packed_input_data_format_exp_t(c_ubyte): + pass + +############################################################################### +## @brief Handle of ray tracing acceleration structure builder object +class ze_rtas_builder_exp_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of ray tracing acceleration structure builder parallel +## operation object +class ze_rtas_parallel_operation_exp_handle_t(c_void_p): + pass + +############################################################################### +## @brief Ray tracing acceleration structure builder descriptor +class ze_rtas_builder_exp_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("builderVersion", ze_rtas_builder_exp_version_t) ## [in] ray tracing acceleration structure builder version + ] + +############################################################################### +## @brief Ray tracing acceleration structure builder properties +class ze_rtas_builder_exp_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_rtas_builder_exp_flags_t), ## [out] ray tracing acceleration structure builder flags + ("rtasBufferSizeBytesExpected", c_size_t), ## [out] expected size (in bytes) required for acceleration structure buffer + ## - When using an acceleration structure buffer of this size, the + ## build is expected to succeed; however, it is possible that the build + ## may fail with ::ZE_RESULT_EXP_RTAS_BUILD_RETRY + ("rtasBufferSizeBytesMaxRequired", c_size_t), ## [out] worst-case size (in bytes) required for acceleration structure buffer + ## - When using an acceleration structure buffer of this size, the + ## build is guaranteed to not run out of memory. + ("scratchBufferSizeBytes", c_size_t) ## [out] scratch buffer size (in bytes) required for acceleration + ## structure build. + ] + +############################################################################### +## @brief Ray tracing acceleration structure builder parallel operation +## properties +class ze_rtas_parallel_operation_exp_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_rtas_parallel_operation_exp_flags_t), ## [out] ray tracing acceleration structure builder parallel operation + ## flags + ("maxConcurrency", c_ulong) ## [out] maximum number of threads that may join the parallel operation + ] + +############################################################################### +## @brief Ray tracing acceleration structure device properties +## +## @details +## - This structure may be passed to ::zeDeviceGetProperties, via `pNext` +## member of ::ze_device_properties_t. +## - The implementation shall populate `format` with a value other than +## ::ZE_RTAS_FORMAT_EXP_INVALID when the device supports ray tracing. +class ze_rtas_device_exp_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_rtas_device_exp_flags_t), ## [out] ray tracing acceleration structure device flags + ("rtasFormat", ze_rtas_format_exp_t), ## [out] ray tracing acceleration structure format + ("rtasBufferAlignment", c_ulong) ## [out] required alignment of acceleration structure buffer + ] + +############################################################################### +## @brief A 3-component vector type +class ze_rtas_float3_exp_t(Structure): + _fields_ = [ + ("x", c_float), ## [in] x-coordinate of float3 vector + ("y", c_float), ## [in] y-coordinate of float3 vector + ("z", c_float) ## [in] z-coordinate of float3 vector + ] + +############################################################################### +## @brief 3x4 affine transformation in column-major layout +## +## @details +## - A 3x4 affine transformation in column major layout, consisting of vectors +## - vx=(vx_x, vx_y, vx_z), +## - vy=(vy_x, vy_y, vy_z), +## - vz=(vz_x, vz_y, vz_z), and +## - p=(p_x, p_y, p_z) +## - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + +## z*vz + p`. +class ze_rtas_transform_float3x4_column_major_exp_t(Structure): + _fields_ = [ + ("vx_x", c_float), ## [in] element 0 of column 0 of 3x4 matrix + ("vx_y", c_float), ## [in] element 1 of column 0 of 3x4 matrix + ("vx_z", c_float), ## [in] element 2 of column 0 of 3x4 matrix + ("vy_x", c_float), ## [in] element 0 of column 1 of 3x4 matrix + ("vy_y", c_float), ## [in] element 1 of column 1 of 3x4 matrix + ("vy_z", c_float), ## [in] element 2 of column 1 of 3x4 matrix + ("vz_x", c_float), ## [in] element 0 of column 2 of 3x4 matrix + ("vz_y", c_float), ## [in] element 1 of column 2 of 3x4 matrix + ("vz_z", c_float), ## [in] element 2 of column 2 of 3x4 matrix + ("p_x", c_float), ## [in] element 0 of column 3 of 3x4 matrix + ("p_y", c_float), ## [in] element 1 of column 3 of 3x4 matrix + ("p_z", c_float) ## [in] element 2 of column 3 of 3x4 matrix + ] + +############################################################################### +## @brief 3x4 affine transformation in column-major layout with aligned column +## vectors +## +## @details +## - A 3x4 affine transformation in column major layout, consisting of vectors +## - vx=(vx_x, vx_y, vx_z), +## - vy=(vy_x, vy_y, vy_z), +## - vz=(vz_x, vz_y, vz_z), and +## - p=(p_x, p_y, p_z) +## - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + +## z*vz + p`. +## - The column vectors are aligned to 16-bytes and pad members are +## ignored. +class ze_rtas_transform_float3x4_aligned_column_major_exp_t(Structure): + _fields_ = [ + ("vx_x", c_float), ## [in] element 0 of column 0 of 3x4 matrix + ("vx_y", c_float), ## [in] element 1 of column 0 of 3x4 matrix + ("vx_z", c_float), ## [in] element 2 of column 0 of 3x4 matrix + ("pad0", c_float), ## [in] ignored padding + ("vy_x", c_float), ## [in] element 0 of column 1 of 3x4 matrix + ("vy_y", c_float), ## [in] element 1 of column 1 of 3x4 matrix + ("vy_z", c_float), ## [in] element 2 of column 1 of 3x4 matrix + ("pad1", c_float), ## [in] ignored padding + ("vz_x", c_float), ## [in] element 0 of column 2 of 3x4 matrix + ("vz_y", c_float), ## [in] element 1 of column 2 of 3x4 matrix + ("vz_z", c_float), ## [in] element 2 of column 2 of 3x4 matrix + ("pad2", c_float), ## [in] ignored padding + ("p_x", c_float), ## [in] element 0 of column 3 of 3x4 matrix + ("p_y", c_float), ## [in] element 1 of column 3 of 3x4 matrix + ("p_z", c_float), ## [in] element 2 of column 3 of 3x4 matrix + ("pad3", c_float) ## [in] ignored padding + ] + +############################################################################### +## @brief 3x4 affine transformation in row-major layout +## +## @details +## - A 3x4 affine transformation in row-major layout, consisting of vectors +## - vx=(vx_x, vx_y, vx_z), +## - vy=(vy_x, vy_y, vy_z), +## - vz=(vz_x, vz_y, vz_z), and +## - p=(p_x, p_y, p_z) +## - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + +## z*vz + p`. +class ze_rtas_transform_float3x4_row_major_exp_t(Structure): + _fields_ = [ + ("vx_x", c_float), ## [in] element 0 of row 0 of 3x4 matrix + ("vy_x", c_float), ## [in] element 1 of row 0 of 3x4 matrix + ("vz_x", c_float), ## [in] element 2 of row 0 of 3x4 matrix + ("p_x", c_float), ## [in] element 3 of row 0 of 3x4 matrix + ("vx_y", c_float), ## [in] element 0 of row 1 of 3x4 matrix + ("vy_y", c_float), ## [in] element 1 of row 1 of 3x4 matrix + ("vz_y", c_float), ## [in] element 2 of row 1 of 3x4 matrix + ("p_y", c_float), ## [in] element 3 of row 1 of 3x4 matrix + ("vx_z", c_float), ## [in] element 0 of row 2 of 3x4 matrix + ("vy_z", c_float), ## [in] element 1 of row 2 of 3x4 matrix + ("vz_z", c_float), ## [in] element 2 of row 2 of 3x4 matrix + ("p_z", c_float) ## [in] element 3 of row 2 of 3x4 matrix + ] + +############################################################################### +## @brief A 3-dimensional axis-aligned bounding-box with lower and upper bounds +## in each dimension +class ze_rtas_aabb_exp_t(Structure): + _fields_ = [ + ("lower", ze_rtas_c_float3_exp_t), ## [in] lower bounds of AABB + ("upper", ze_rtas_c_float3_exp_t) ## [in] upper bounds of AABB + ] + +############################################################################### +## @brief Triangle represented using 3 vertex indices +## +## @details +## - Represents a triangle using 3 vertex indices that index into a vertex +## array that needs to be provided together with the index array. +## - The linear barycentric u/v parametrization of the triangle is defined as: +## - (u=0, v=0) at v0, +## - (u=1, v=0) at v1, and +## - (u=0, v=1) at v2 +class ze_rtas_triangle_indices_uint32_exp_t(Structure): + _fields_ = [ + ("v0", c_ulong), ## [in] first index pointing to the first triangle vertex in vertex array + ("v1", c_ulong), ## [in] second index pointing to the second triangle vertex in vertex + ## array + ("v2", c_ulong) ## [in] third index pointing to the third triangle vertex in vertex array + ] + +############################################################################### +## @brief Quad represented using 4 vertex indices +## +## @details +## - Represents a quad composed of 4 indices that index into a vertex array +## that needs to be provided together with the index array. +## - A quad is a triangle pair represented using 4 vertex indices v0, v1, +## v2, v3. +## The first triangle is made out of indices v0, v1, v3 and the second triangle +## from indices v2, v3, v1. The piecewise linear barycentric u/v parametrization +## of the quad is defined as: +## - (u=0, v=0) at v0, +## - (u=1, v=0) at v1, +## - (u=0, v=1) at v3, and +## - (u=1, v=1) at v2 +## This is achieved by correcting the u'/v' coordinates of the second +## triangle by +## *u = 1-u'* and *v = 1-v'*, yielding a piecewise linear parametrization. +class ze_rtas_quad_indices_uint32_exp_t(Structure): + _fields_ = [ + ("v0", c_ulong), ## [in] first index pointing to the first quad vertex in vertex array + ("v1", c_ulong), ## [in] second index pointing to the second quad vertex in vertex array + ("v2", c_ulong), ## [in] third index pointing to the third quad vertex in vertex array + ("v3", c_ulong) ## [in] fourth index pointing to the fourth quad vertex in vertex array + ] + +############################################################################### +## @brief Ray tracing acceleration structure builder geometry info +class ze_rtas_builder_geometry_info_exp_t(Structure): + _fields_ = [ + ("geometryType", ze_rtas_builder_packed_geometry_type_exp_t) ## [in] geometry type + ] + +############################################################################### +## @brief Ray tracing acceleration structure builder triangle mesh geometry info +## +## @details +## - The linear barycentric u/v parametrization of the triangle is defined as: +## - (u=0, v=0) at v0, +## - (u=1, v=0) at v1, and +## - (u=0, v=1) at v2 +class ze_rtas_builder_triangles_geometry_info_exp_t(Structure): + _fields_ = [ + ("geometryType", ze_rtas_builder_packed_geometry_type_exp_t), ## [in] geometry type, must be + ## ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_TRIANGLES + ("geometryFlags", ze_rtas_builder_packed_geometry_exp_flags_t), ## [in] 0 or some combination of ::ze_rtas_builder_geometry_exp_flag_t + ## bits representing the geometry flags for all primitives of this + ## geometry + ("geometryMask", c_ubyte), ## [in] 8-bit geometry mask for ray masking + ("triangleFormat", ze_rtas_builder_packed_input_data_format_exp_t), ## [in] format of triangle buffer data, must be + ## ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_TRIANGLE_INDICES_UINT32 + ("vertexFormat", ze_rtas_builder_packed_input_data_format_exp_t), ## [in] format of vertex buffer data, must be + ## ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3 + ("triangleCount", c_ulong), ## [in] number of triangles in triangle buffer + ("vertexCount", c_ulong), ## [in] number of vertices in vertex buffer + ("triangleStride", c_ulong), ## [in] stride (in bytes) of triangles in triangle buffer + ("vertexStride", c_ulong), ## [in] stride (in bytes) of vertices in vertex buffer + ("pTriangleBuffer", c_void_p), ## [in] pointer to array of triangle indices in specified format + ("pVertexBuffer", c_void_p) ## [in] pointer to array of triangle vertices in specified format + ] + +############################################################################### +## @brief Ray tracing acceleration structure builder quad mesh geometry info +## +## @details +## - A quad is a triangle pair represented using 4 vertex indices v0, v1, +## v2, v3. +## The first triangle is made out of indices v0, v1, v3 and the second triangle +## from indices v2, v3, v1. The piecewise linear barycentric u/v parametrization +## of the quad is defined as: +## - (u=0, v=0) at v0, +## - (u=1, v=0) at v1, +## - (u=0, v=1) at v3, and +## - (u=1, v=1) at v2 +## This is achieved by correcting the u'/v' coordinates of the second +## triangle by +## *u = 1-u'* and *v = 1-v'*, yielding a piecewise linear parametrization. +class ze_rtas_builder_quads_geometry_info_exp_t(Structure): + _fields_ = [ + ("geometryType", ze_rtas_builder_packed_geometry_type_exp_t), ## [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_QUADS + ("geometryFlags", ze_rtas_builder_packed_geometry_exp_flags_t), ## [in] 0 or some combination of ::ze_rtas_builder_geometry_exp_flag_t + ## bits representing the geometry flags for all primitives of this + ## geometry + ("geometryMask", c_ubyte), ## [in] 8-bit geometry mask for ray masking + ("quadFormat", ze_rtas_builder_packed_input_data_format_exp_t), ## [in] format of quad buffer data, must be + ## ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_QUAD_INDICES_UINT32 + ("vertexFormat", ze_rtas_builder_packed_input_data_format_exp_t), ## [in] format of vertex buffer data, must be + ## ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3 + ("quadCount", c_ulong), ## [in] number of quads in quad buffer + ("vertexCount", c_ulong), ## [in] number of vertices in vertex buffer + ("quadStride", c_ulong), ## [in] stride (in bytes) of quads in quad buffer + ("vertexStride", c_ulong), ## [in] stride (in bytes) of vertices in vertex buffer + ("pQuadBuffer", c_void_p), ## [in] pointer to array of quad indices in specified format + ("pVertexBuffer", c_void_p) ## [in] pointer to array of quad vertices in specified format + ] + +############################################################################### +## @brief AABB callback function parameters +class ze_rtas_geometry_aabbs_exp_cb_params_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("primID", c_ulong), ## [in] first primitive to return bounds for + ("primIDCount", c_ulong), ## [in] number of primitives to return bounds for + ("pGeomUserPtr", c_void_p), ## [in] pointer provided through geometry descriptor + ("pBuildUserPtr", c_void_p), ## [in] pointer provided through ::zeRTASBuilderBuildExp function + ("pBoundsOut", POINTER(ze_rtas_aabb_exp_t)) ## [out] destination buffer to write AABB bounds to + ] + +############################################################################### +## @brief Callback function pointer type to return AABBs for a range of +## procedural primitives + +############################################################################### +## @brief Ray tracing acceleration structure builder procedural primitives +## geometry info +## +## @details +## - A host-side bounds callback function is invoked by the acceleration +## structure builder to query the bounds of procedural primitives on +## demand. The callback is passed some `pGeomUserPtr` that can point to +## an application-side representation of the procedural primitives. +## Further, a second `pBuildUserPtr`, which is set by a parameter to +## ::zeRTASBuilderBuildExp, is passed to the callback. This allows the +## build to change the bounds of the procedural geometry, for example, to +## build a BVH only over a short time range to implement multi-segment +## motion blur. +class ze_rtas_builder_procedural_geometry_info_exp_t(Structure): + _fields_ = [ + ("geometryType", ze_rtas_builder_packed_geometry_type_exp_t), ## [in] geometry type, must be + ## ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_PROCEDURAL + ("geometryFlags", ze_rtas_builder_packed_geometry_exp_flags_t), ## [in] 0 or some combination of ::ze_rtas_builder_geometry_exp_flag_t + ## bits representing the geometry flags for all primitives of this + ## geometry + ("geometryMask", c_ubyte), ## [in] 8-bit geometry mask for ray masking + ("reserved", c_ubyte), ## [in] reserved for future use + ("primCount", c_ulong), ## [in] number of primitives in geometry + ("pfnGetBoundsCb", ze_rtas_geometry_aabbs_cb_exp_t), ## [in] pointer to callback function to get the axis-aligned bounding-box + ## for a range of primitives + ("pGeomUserPtr", c_void_p) ## [in] user data pointer passed to callback + ] + +############################################################################### +## @brief Ray tracing acceleration structure builder instance geometry info +class ze_rtas_builder_instance_geometry_info_exp_t(Structure): + _fields_ = [ + ("geometryType", ze_rtas_builder_packed_geometry_type_exp_t), ## [in] geometry type, must be + ## ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_INSTANCE + ("instanceFlags", ze_rtas_builder_packed_instance_exp_flags_t), ## [in] 0 or some combination of ::ze_rtas_builder_geometry_exp_flag_t + ## bits representing the geometry flags for all primitives of this + ## geometry + ("geometryMask", c_ubyte), ## [in] 8-bit geometry mask for ray masking + ("transformFormat", ze_rtas_builder_packed_input_data_format_exp_t),## [in] format of the specified transformation + ("instanceUserID", c_ulong), ## [in] user-specified identifier for the instance + ("pTransform", c_void_p), ## [in] object-to-world instance transformation in specified format + ("pBounds", POINTER(ze_rtas_aabb_exp_t)), ## [in] object-space axis-aligned bounding-box of the instanced + ## acceleration structure + ("pAccelerationStructure", c_void_p) ## [in] pointer to acceleration structure to instantiate + ] + +############################################################################### +## @brief +class ze_rtas_builder_build_op_exp_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("rtasFormat", ze_rtas_format_exp_t), ## [in] ray tracing acceleration structure format + ("buildQuality", ze_rtas_builder_build_quality_hint_exp_t), ## [in] acceleration structure build quality hint + ("buildFlags", ze_rtas_builder_build_op_exp_flags_t), ## [in] 0 or some combination of ::ze_rtas_builder_build_op_exp_flag_t + ## flags + ("ppGeometries", POINTER(ze_rtas_builder_geometry_info_exp_t*)),## [in][optional][range(0, `numGeometries`)] NULL or a valid array of + ## pointers to geometry infos + ("numGeometries", c_ulong) ## [in] number of geometries in geometry infos array, can be zero when + ## `ppGeometries` is NULL + ] + +############################################################################### +## @brief Counter-based Event Pools Extension Name +ZE_EVENT_POOL_COUNTER_BASED_EXP_NAME = "ZE_experimental_event_pool_counter_based" + +############################################################################### +## @brief Counter-based Event Pools Extension Version(s) +class ze_event_pool_counter_based_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_event_pool_counter_based_exp_version_t(c_int): + def __str__(self): + return str(ze_event_pool_counter_based_exp_version_v(self.value)) + + +############################################################################### +## @brief Supported event flags for defining counter-based event pools. +class ze_event_pool_counter_based_exp_flags_v(IntEnum): + IMMEDIATE = ZE_BIT(0) ## Counter-based event pool is used for immediate command lists (default) + NON_IMMEDIATE = ZE_BIT(1) ## Counter-based event pool is for non-immediate command lists + +class ze_event_pool_counter_based_exp_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Event pool descriptor for counter-based events. This structure may be +## passed to ::zeEventPoolCreate as pNext member of +## ::ze_event_pool_desc_t. @deprecated since 1.15 +class ze_event_pool_counter_based_exp_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_event_pool_counter_based_exp_flags_t) ## [in] mode flags. + ## must be 0 (default) or a valid value of ::ze_event_pool_counter_based_exp_flag_t + ## default behavior is counter-based event pool is only used for + ## immediate command lists. + ] + +############################################################################### +## @brief Image Memory Properties Extension Name +ZE_BINDLESS_IMAGE_EXP_NAME = "ZE_experimental_bindless_image" + +############################################################################### +## @brief Bindless Image Extension Version(s) +class ze_bindless_image_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_bindless_image_exp_version_t(c_int): + def __str__(self): + return str(ze_bindless_image_exp_version_v(self.value)) + + +############################################################################### +## @brief Image flags for Bindless images +class ze_image_bindless_exp_flags_v(IntEnum): + BINDLESS = ZE_BIT(0) ## Bindless images are created with ::zeImageCreate. The image handle + ## created with this flag is valid on both host and device. + SAMPLED_IMAGE = ZE_BIT(1) ## Bindless sampled images are created with ::zeImageCreate by combining + ## BINDLESS and SAMPLED_IMAGE. + ## Create sampled image view from bindless unsampled image using SAMPLED_IMAGE. + +class ze_image_bindless_exp_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Image descriptor for bindless images. This structure may be passed to +## ::zeImageCreate via pNext member of ::ze_image_desc_t. +class ze_image_bindless_exp_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_image_bindless_exp_flags_t) ## [in] image flags. + ## must be 0 (default) or a valid value of ::ze_image_bindless_exp_flag_t + ## default behavior is bindless images are not used when creating handles + ## via ::zeImageCreate. + ## When the flag is passed to ::zeImageCreate, then only the memory for + ## the image is allocated. + ## Additional image handles can be created with ::zeImageViewCreateExt. + ## When ::ZE_IMAGE_BINDLESS_EXP_FLAG_SAMPLED_IMAGE flag is passed, + ## ::ze_sampler_desc_t must be attached via pNext member of ::ze_image_bindless_exp_desc_t. + ] + +############################################################################### +## @brief Image descriptor for bindless images created from pitched allocations. +## This structure may be passed to ::zeImageCreate via pNext member of +## ::ze_image_desc_t. +class ze_image_pitched_exp_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("ptr", c_void_p) ## [in] pointer to pitched device allocation allocated using ::zeMemAllocDevice + ] + +############################################################################### +## @brief Device specific properties for pitched allocations +## +## @details +## - This structure may be passed to ::zeDeviceGetImageProperties via the +## pNext member of ::ze_device_image_properties_t. +class ze_device_pitched_alloc_exp_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("maxImageLinearWidth", c_size_t), ## [out] Maximum image linear width. + ("maxImageLinearHeight", c_size_t) ## [out] Maximum image linear height. + ] + +############################################################################### +## @brief Pitch information for 2-dimensional linear pitched allocations +## +## @details +## - This structure may be passed to ::zeDeviceGetImageProperties in +## conjunction with the ::ze_device_pitched_alloc_exp_properties_t via +## its pNext member +class ze_pitched_alloc_2dimage_linear_pitch_exp_info_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("pitchAlign", c_size_t), ## [out] Required pitch Aligment in Bytes. + ("maxSupportedPitch", c_size_t) ## [out] Maximum allowed pitch in Bytes. + ] + +############################################################################### +## @brief Specify user defined pitch for pitched linear image allocations. This +## structure may be passed to ::zeImageCreate in conjunction with +## ::ze_image_pitched_exp_desc_t via its pNext member +class ze_custom_pitch_exp_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("rowPitch", c_size_t), ## [in] user programmed aligned pitch for pitched linear image + ## allocations. This pitch should satisfy the pitchAlign requirement in + ## ::ze_pitched_alloc_2dimage_linear_pitch_exp_info_t + ("slicePitch", c_size_t) ## [in] user programmed slice pitch , must be multiple of rowPitch. For + ## 2D image arrary or a slice of a 3D image array - this pitch should be + ## >= rowPitch * image_height . For 1D iamge array >= rowPitch. + ] + +############################################################################### +## @brief Command List Clone Extension Name +ZE_COMMAND_LIST_CLONE_EXP_NAME = "ZE_experimental_command_list_clone" + +############################################################################### +## @brief Command List Clone Extension Version(s) +class ze_command_list_clone_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_command_list_clone_exp_version_t(c_int): + def __str__(self): + return str(ze_command_list_clone_exp_version_v(self.value)) + + +############################################################################### +## @brief Immediate Command List Append Extension Name +ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_NAME = "ZE_experimental_immediate_command_list_append" + +############################################################################### +## @brief Immediate Command List Append Extension Version(s) +class ze_immediate_command_list_append_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_immediate_command_list_append_exp_version_t(c_int): + def __str__(self): + return str(ze_immediate_command_list_append_exp_version_v(self.value)) + + +############################################################################### +## @brief Mutable Command List Extension Name +ZE_MUTABLE_COMMAND_LIST_EXP_NAME = "ZE_experimental_mutable_command_list" + +############################################################################### +## @brief Mutable Command List Extension Version(s) +class ze_mutable_command_list_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + _1_1 = ZE_MAKE_VERSION( 1, 1 ) ## version 1.1 + CURRENT = ZE_MAKE_VERSION( 1, 1 ) ## latest known version + +class ze_mutable_command_list_exp_version_t(c_int): + def __str__(self): + return str(ze_mutable_command_list_exp_version_v(self.value)) + + +############################################################################### +## @brief Mutable command flags +class ze_mutable_command_exp_flags_v(IntEnum): + KERNEL_ARGUMENTS = ZE_BIT(0) ## kernel arguments + GROUP_COUNT = ZE_BIT(1) ## kernel group count + GROUP_SIZE = ZE_BIT(2) ## kernel group size + GLOBAL_OFFSET = ZE_BIT(3) ## kernel global offset + SIGNAL_EVENT = ZE_BIT(4) ## command signal event + WAIT_EVENTS = ZE_BIT(5) ## command wait events + KERNEL_INSTRUCTION = ZE_BIT(6) ## command kernel + GRAPH_ARGUMENTS = ZE_BIT(7) ## graph arguments + +class ze_mutable_command_exp_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Mutable command identifier descriptor +class ze_mutable_command_id_exp_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_mutable_command_exp_flags_t) ## [in] mutable command flags. + ## - must be 0 (default, equivalent to setting all flags bar kernel + ## instruction), or a valid combination of ::ze_mutable_command_exp_flag_t + ## - in order to include kernel instruction mutation, + ## ::ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_INSTRUCTION must be explictly included + ] + +############################################################################### +## @brief Mutable command list flags +class ze_mutable_command_list_exp_flags_v(IntEnum): + RESERVED = ZE_BIT(0) ## reserved + +class ze_mutable_command_list_exp_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Mutable command list properties +class ze_mutable_command_list_exp_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("mutableCommandListFlags", ze_mutable_command_list_exp_flags_t), ## [out] mutable command list flags + ("mutableCommandFlags", ze_mutable_command_exp_flags_t) ## [out] mutable command flags + ] + +############################################################################### +## @brief Mutable command list descriptor +class ze_mutable_command_list_exp_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_mutable_command_list_exp_flags_t) ## [in] mutable command list flags. + ## - must be 0 (default) or a valid combination of ::ze_mutable_command_list_exp_flag_t + ] + +############################################################################### +## @brief Mutable commands descriptor +class ze_mutable_commands_exp_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", c_ulong) ## [in] must be 0, this field is reserved for future use + ] + +############################################################################### +## @brief Mutable kernel argument descriptor +class ze_mutable_kernel_argument_exp_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("commandId", c_ulonglong), ## [in] command identifier + ("argIndex", c_ulong), ## [in] kernel argument index + ("argSize", c_size_t), ## [in] kernel argument size + ("pArgValue", c_void_p) ## [in] pointer to kernel argument value + ] + +############################################################################### +## @brief Mutable kernel group count descriptor +class ze_mutable_group_count_exp_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("commandId", c_ulonglong), ## [in] command identifier + ("pGroupCount", POINTER(ze_group_count_t)) ## [in] pointer to group count + ] + +############################################################################### +## @brief Mutable kernel group size descriptor +class ze_mutable_group_size_exp_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("commandId", c_ulonglong), ## [in] command identifier + ("groupSizeX", c_ulong), ## [in] group size for X dimension to use for the kernel + ("groupSizeY", c_ulong), ## [in] group size for Y dimension to use for the kernel + ("groupSizeZ", c_ulong) ## [in] group size for Z dimension to use for the kernel + ] + +############################################################################### +## @brief Mutable kernel global offset descriptor +class ze_mutable_global_offset_exp_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("commandId", c_ulonglong), ## [in] command identifier + ("offsetX", c_ulong), ## [in] global offset for X dimension to use for this kernel + ("offsetY", c_ulong), ## [in] global offset for Y dimension to use for this kernel + ("offsetZ", c_ulong) ## [in] global offset for Z dimension to use for this kernel + ] + +############################################################################### +## @brief Mutable graph argument descriptor +class ze_mutable_graph_argument_exp_desc_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("commandId", c_ulonglong), ## [in] command identifier + ("argIndex", c_ulong), ## [in] graph argument index + ("pArgValue", c_void_p) ## [in] pointer to graph argument value + ] + +############################################################################### +__use_win_types = "Windows" == platform.uname()[0] + +############################################################################### +## @brief Function-pointer for zeRTASBuilderCreateExt +if __use_win_types: + _zeRTASBuilderCreateExt_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_rtas_builder_ext_desc_t), POINTER(ze_rtas_builder_ext_handle_t) ) +else: + _zeRTASBuilderCreateExt_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_rtas_builder_ext_desc_t), POINTER(ze_rtas_builder_ext_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeRTASBuilderGetBuildPropertiesExt +if __use_win_types: + _zeRTASBuilderGetBuildPropertiesExt_t = WINFUNCTYPE( ze_result_t, ze_rtas_builder_ext_handle_t, POINTER(ze_rtas_builder_build_op_ext_desc_t), POINTER(ze_rtas_builder_ext_properties_t) ) +else: + _zeRTASBuilderGetBuildPropertiesExt_t = CFUNCTYPE( ze_result_t, ze_rtas_builder_ext_handle_t, POINTER(ze_rtas_builder_build_op_ext_desc_t), POINTER(ze_rtas_builder_ext_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeRTASBuilderBuildExt +if __use_win_types: + _zeRTASBuilderBuildExt_t = WINFUNCTYPE( ze_result_t, ze_rtas_builder_ext_handle_t, POINTER(ze_rtas_builder_build_op_ext_desc_t), c_void_p, c_size_t, c_void_p, c_size_t, ze_rtas_parallel_operation_ext_handle_t, c_void_p, POINTER(ze_rtas_aabb_ext_t), POINTER(c_size_t) ) +else: + _zeRTASBuilderBuildExt_t = CFUNCTYPE( ze_result_t, ze_rtas_builder_ext_handle_t, POINTER(ze_rtas_builder_build_op_ext_desc_t), c_void_p, c_size_t, c_void_p, c_size_t, ze_rtas_parallel_operation_ext_handle_t, c_void_p, POINTER(ze_rtas_aabb_ext_t), POINTER(c_size_t) ) + +############################################################################### +## @brief Function-pointer for zeRTASBuilderCommandListAppendCopyExt +if __use_win_types: + _zeRTASBuilderCommandListAppendCopyExt_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, c_void_p, c_size_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeRTASBuilderCommandListAppendCopyExt_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, c_void_p, c_size_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeRTASBuilderDestroyExt +if __use_win_types: + _zeRTASBuilderDestroyExt_t = WINFUNCTYPE( ze_result_t, ze_rtas_builder_ext_handle_t ) +else: + _zeRTASBuilderDestroyExt_t = CFUNCTYPE( ze_result_t, ze_rtas_builder_ext_handle_t ) + + +############################################################################### +## @brief Table of RTASBuilder functions pointers +class _ze_rtas_builder_dditable_t(Structure): + _fields_ = [ + ("pfnCreateExt", c_void_p), ## _zeRTASBuilderCreateExt_t + ("pfnGetBuildPropertiesExt", c_void_p), ## _zeRTASBuilderGetBuildPropertiesExt_t + ("pfnBuildExt", c_void_p), ## _zeRTASBuilderBuildExt_t + ("pfnCommandListAppendCopyExt", c_void_p), ## _zeRTASBuilderCommandListAppendCopyExt_t + ("pfnDestroyExt", c_void_p) ## _zeRTASBuilderDestroyExt_t + ] + +############################################################################### +## @brief Function-pointer for zeRTASBuilderCreateExp +if __use_win_types: + _zeRTASBuilderCreateExp_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_rtas_builder_exp_desc_t), POINTER(ze_rtas_builder_exp_handle_t) ) +else: + _zeRTASBuilderCreateExp_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_rtas_builder_exp_desc_t), POINTER(ze_rtas_builder_exp_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeRTASBuilderGetBuildPropertiesExp +if __use_win_types: + _zeRTASBuilderGetBuildPropertiesExp_t = WINFUNCTYPE( ze_result_t, ze_rtas_builder_exp_handle_t, POINTER(ze_rtas_builder_build_op_exp_desc_t), POINTER(ze_rtas_builder_exp_properties_t) ) +else: + _zeRTASBuilderGetBuildPropertiesExp_t = CFUNCTYPE( ze_result_t, ze_rtas_builder_exp_handle_t, POINTER(ze_rtas_builder_build_op_exp_desc_t), POINTER(ze_rtas_builder_exp_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeRTASBuilderBuildExp +if __use_win_types: + _zeRTASBuilderBuildExp_t = WINFUNCTYPE( ze_result_t, ze_rtas_builder_exp_handle_t, POINTER(ze_rtas_builder_build_op_exp_desc_t), c_void_p, c_size_t, c_void_p, c_size_t, ze_rtas_parallel_operation_exp_handle_t, c_void_p, POINTER(ze_rtas_aabb_exp_t), POINTER(c_size_t) ) +else: + _zeRTASBuilderBuildExp_t = CFUNCTYPE( ze_result_t, ze_rtas_builder_exp_handle_t, POINTER(ze_rtas_builder_build_op_exp_desc_t), c_void_p, c_size_t, c_void_p, c_size_t, ze_rtas_parallel_operation_exp_handle_t, c_void_p, POINTER(ze_rtas_aabb_exp_t), POINTER(c_size_t) ) + +############################################################################### +## @brief Function-pointer for zeRTASBuilderDestroyExp +if __use_win_types: + _zeRTASBuilderDestroyExp_t = WINFUNCTYPE( ze_result_t, ze_rtas_builder_exp_handle_t ) +else: + _zeRTASBuilderDestroyExp_t = CFUNCTYPE( ze_result_t, ze_rtas_builder_exp_handle_t ) + + +############################################################################### +## @brief Table of RTASBuilderExp functions pointers +class _ze_rtas_builder_exp_dditable_t(Structure): + _fields_ = [ + ("pfnCreateExp", c_void_p), ## _zeRTASBuilderCreateExp_t + ("pfnGetBuildPropertiesExp", c_void_p), ## _zeRTASBuilderGetBuildPropertiesExp_t + ("pfnBuildExp", c_void_p), ## _zeRTASBuilderBuildExp_t + ("pfnDestroyExp", c_void_p) ## _zeRTASBuilderDestroyExp_t + ] + +############################################################################### +## @brief Function-pointer for zeRTASParallelOperationCreateExt +if __use_win_types: + _zeRTASParallelOperationCreateExt_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_rtas_parallel_operation_ext_handle_t) ) +else: + _zeRTASParallelOperationCreateExt_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_rtas_parallel_operation_ext_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeRTASParallelOperationGetPropertiesExt +if __use_win_types: + _zeRTASParallelOperationGetPropertiesExt_t = WINFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_ext_handle_t, POINTER(ze_rtas_parallel_operation_ext_properties_t) ) +else: + _zeRTASParallelOperationGetPropertiesExt_t = CFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_ext_handle_t, POINTER(ze_rtas_parallel_operation_ext_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeRTASParallelOperationJoinExt +if __use_win_types: + _zeRTASParallelOperationJoinExt_t = WINFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_ext_handle_t ) +else: + _zeRTASParallelOperationJoinExt_t = CFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_ext_handle_t ) + +############################################################################### +## @brief Function-pointer for zeRTASParallelOperationDestroyExt +if __use_win_types: + _zeRTASParallelOperationDestroyExt_t = WINFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_ext_handle_t ) +else: + _zeRTASParallelOperationDestroyExt_t = CFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_ext_handle_t ) + + +############################################################################### +## @brief Table of RTASParallelOperation functions pointers +class _ze_rtas_parallel_operation_dditable_t(Structure): + _fields_ = [ + ("pfnCreateExt", c_void_p), ## _zeRTASParallelOperationCreateExt_t + ("pfnGetPropertiesExt", c_void_p), ## _zeRTASParallelOperationGetPropertiesExt_t + ("pfnJoinExt", c_void_p), ## _zeRTASParallelOperationJoinExt_t + ("pfnDestroyExt", c_void_p) ## _zeRTASParallelOperationDestroyExt_t + ] + +############################################################################### +## @brief Function-pointer for zeRTASParallelOperationCreateExp +if __use_win_types: + _zeRTASParallelOperationCreateExp_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_rtas_parallel_operation_exp_handle_t) ) +else: + _zeRTASParallelOperationCreateExp_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_rtas_parallel_operation_exp_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeRTASParallelOperationGetPropertiesExp +if __use_win_types: + _zeRTASParallelOperationGetPropertiesExp_t = WINFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_exp_handle_t, POINTER(ze_rtas_parallel_operation_exp_properties_t) ) +else: + _zeRTASParallelOperationGetPropertiesExp_t = CFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_exp_handle_t, POINTER(ze_rtas_parallel_operation_exp_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeRTASParallelOperationJoinExp +if __use_win_types: + _zeRTASParallelOperationJoinExp_t = WINFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_exp_handle_t ) +else: + _zeRTASParallelOperationJoinExp_t = CFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_exp_handle_t ) + +############################################################################### +## @brief Function-pointer for zeRTASParallelOperationDestroyExp +if __use_win_types: + _zeRTASParallelOperationDestroyExp_t = WINFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_exp_handle_t ) +else: + _zeRTASParallelOperationDestroyExp_t = CFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_exp_handle_t ) + + +############################################################################### +## @brief Table of RTASParallelOperationExp functions pointers +class _ze_rtas_parallel_operation_exp_dditable_t(Structure): + _fields_ = [ + ("pfnCreateExp", c_void_p), ## _zeRTASParallelOperationCreateExp_t + ("pfnGetPropertiesExp", c_void_p), ## _zeRTASParallelOperationGetPropertiesExp_t + ("pfnJoinExp", c_void_p), ## _zeRTASParallelOperationJoinExp_t + ("pfnDestroyExp", c_void_p) ## _zeRTASParallelOperationDestroyExp_t + ] + +############################################################################### +## @brief Function-pointer for zeInit +if __use_win_types: + _zeInit_t = WINFUNCTYPE( ze_result_t, ze_init_flags_t ) +else: + _zeInit_t = CFUNCTYPE( ze_result_t, ze_init_flags_t ) + +############################################################################### +## @brief Function-pointer for zeInitDrivers +if __use_win_types: + _zeInitDrivers_t = WINFUNCTYPE( ze_result_t, POINTER(c_ulong), POINTER(ze_driver_handle_t), POINTER(ze_init_driver_type_desc_t) ) +else: + _zeInitDrivers_t = CFUNCTYPE( ze_result_t, POINTER(c_ulong), POINTER(ze_driver_handle_t), POINTER(ze_init_driver_type_desc_t) ) + + +############################################################################### +## @brief Table of Global functions pointers +class _ze_global_dditable_t(Structure): + _fields_ = [ + ("pfnInit", c_void_p), ## _zeInit_t + ("pfnInitDrivers", c_void_p) ## _zeInitDrivers_t + ] + +############################################################################### +## @brief Function-pointer for zeDriverGet +if __use_win_types: + _zeDriverGet_t = WINFUNCTYPE( ze_result_t, POINTER(c_ulong), POINTER(ze_driver_handle_t) ) +else: + _zeDriverGet_t = CFUNCTYPE( ze_result_t, POINTER(c_ulong), POINTER(ze_driver_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeDriverGetApiVersion +if __use_win_types: + _zeDriverGetApiVersion_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_api_version_t) ) +else: + _zeDriverGetApiVersion_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_api_version_t) ) + +############################################################################### +## @brief Function-pointer for zeDriverGetProperties +if __use_win_types: + _zeDriverGetProperties_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_driver_properties_t) ) +else: + _zeDriverGetProperties_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_driver_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeDriverGetIpcProperties +if __use_win_types: + _zeDriverGetIpcProperties_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_driver_ipc_properties_t) ) +else: + _zeDriverGetIpcProperties_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_driver_ipc_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeDriverGetExtensionProperties +if __use_win_types: + _zeDriverGetExtensionProperties_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(c_ulong), POINTER(ze_driver_extension_properties_t) ) +else: + _zeDriverGetExtensionProperties_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(c_ulong), POINTER(ze_driver_extension_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeDriverGetExtensionFunctionAddress +if __use_win_types: + _zeDriverGetExtensionFunctionAddress_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, c_char_p, POINTER(c_void_p) ) +else: + _zeDriverGetExtensionFunctionAddress_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, c_char_p, POINTER(c_void_p) ) + +############################################################################### +## @brief Function-pointer for zeDriverGetLastErrorDescription +if __use_win_types: + _zeDriverGetLastErrorDescription_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(c_char_p) ) +else: + _zeDriverGetLastErrorDescription_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(c_char_p) ) + +############################################################################### +## @brief Function-pointer for zeDriverRTASFormatCompatibilityCheckExt +if __use_win_types: + _zeDriverRTASFormatCompatibilityCheckExt_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, ze_rtas_format_ext_t, ze_rtas_format_ext_t ) +else: + _zeDriverRTASFormatCompatibilityCheckExt_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, ze_rtas_format_ext_t, ze_rtas_format_ext_t ) + +############################################################################### +## @brief Function-pointer for zeDriverGetDefaultContext +if __use_win_types: + _zeDriverGetDefaultContext_t = WINFUNCTYPE( ze_context_handle_t, ze_driver_handle_t ) +else: + _zeDriverGetDefaultContext_t = CFUNCTYPE( ze_context_handle_t, ze_driver_handle_t ) + + +############################################################################### +## @brief Table of Driver functions pointers +class _ze_driver_dditable_t(Structure): + _fields_ = [ + ("pfnGet", c_void_p), ## _zeDriverGet_t + ("pfnGetApiVersion", c_void_p), ## _zeDriverGetApiVersion_t + ("pfnGetProperties", c_void_p), ## _zeDriverGetProperties_t + ("pfnGetIpcProperties", c_void_p), ## _zeDriverGetIpcProperties_t + ("pfnGetExtensionProperties", c_void_p), ## _zeDriverGetExtensionProperties_t + ("pfnGetExtensionFunctionAddress", c_void_p), ## _zeDriverGetExtensionFunctionAddress_t + ("pfnGetLastErrorDescription", c_void_p), ## _zeDriverGetLastErrorDescription_t + ("pfnRTASFormatCompatibilityCheckExt", c_void_p), ## _zeDriverRTASFormatCompatibilityCheckExt_t + ("pfnGetDefaultContext", c_void_p) ## _zeDriverGetDefaultContext_t + ] + +############################################################################### +## @brief Function-pointer for zeDriverRTASFormatCompatibilityCheckExp +if __use_win_types: + _zeDriverRTASFormatCompatibilityCheckExp_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, ze_rtas_format_exp_t, ze_rtas_format_exp_t ) +else: + _zeDriverRTASFormatCompatibilityCheckExp_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, ze_rtas_format_exp_t, ze_rtas_format_exp_t ) + + +############################################################################### +## @brief Table of DriverExp functions pointers +class _ze_driver_exp_dditable_t(Structure): + _fields_ = [ + ("pfnRTASFormatCompatibilityCheckExp", c_void_p) ## _zeDriverRTASFormatCompatibilityCheckExp_t + ] + +############################################################################### +## @brief Function-pointer for zeDeviceGet +if __use_win_types: + _zeDeviceGet_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(c_ulong), POINTER(ze_device_handle_t) ) +else: + _zeDeviceGet_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(c_ulong), POINTER(ze_device_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeDeviceGetSubDevices +if __use_win_types: + _zeDeviceGetSubDevices_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_device_handle_t) ) +else: + _zeDeviceGetSubDevices_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_device_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeDeviceGetProperties +if __use_win_types: + _zeDeviceGetProperties_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_properties_t) ) +else: + _zeDeviceGetProperties_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeDeviceGetComputeProperties +if __use_win_types: + _zeDeviceGetComputeProperties_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_compute_properties_t) ) +else: + _zeDeviceGetComputeProperties_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_compute_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeDeviceGetModuleProperties +if __use_win_types: + _zeDeviceGetModuleProperties_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_module_properties_t) ) +else: + _zeDeviceGetModuleProperties_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_module_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeDeviceGetCommandQueueGroupProperties +if __use_win_types: + _zeDeviceGetCommandQueueGroupProperties_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_command_queue_group_properties_t) ) +else: + _zeDeviceGetCommandQueueGroupProperties_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_command_queue_group_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeDeviceGetMemoryProperties +if __use_win_types: + _zeDeviceGetMemoryProperties_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_device_memory_properties_t) ) +else: + _zeDeviceGetMemoryProperties_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_device_memory_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeDeviceGetMemoryAccessProperties +if __use_win_types: + _zeDeviceGetMemoryAccessProperties_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_memory_access_properties_t) ) +else: + _zeDeviceGetMemoryAccessProperties_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_memory_access_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeDeviceGetCacheProperties +if __use_win_types: + _zeDeviceGetCacheProperties_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_device_cache_properties_t) ) +else: + _zeDeviceGetCacheProperties_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_device_cache_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeDeviceGetImageProperties +if __use_win_types: + _zeDeviceGetImageProperties_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_image_properties_t) ) +else: + _zeDeviceGetImageProperties_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_image_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeDeviceGetExternalMemoryProperties +if __use_win_types: + _zeDeviceGetExternalMemoryProperties_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_external_memory_properties_t) ) +else: + _zeDeviceGetExternalMemoryProperties_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_external_memory_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeDeviceGetP2PProperties +if __use_win_types: + _zeDeviceGetP2PProperties_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, ze_device_handle_t, POINTER(ze_device_p2p_properties_t) ) +else: + _zeDeviceGetP2PProperties_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, ze_device_handle_t, POINTER(ze_device_p2p_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeDeviceCanAccessPeer +if __use_win_types: + _zeDeviceCanAccessPeer_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, ze_device_handle_t, POINTER(ze_bool_t) ) +else: + _zeDeviceCanAccessPeer_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, ze_device_handle_t, POINTER(ze_bool_t) ) + +############################################################################### +## @brief Function-pointer for zeDeviceGetStatus +if __use_win_types: + _zeDeviceGetStatus_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t ) +else: + _zeDeviceGetStatus_t = CFUNCTYPE( ze_result_t, ze_device_handle_t ) + +############################################################################### +## @brief Function-pointer for zeDeviceGetGlobalTimestamps +if __use_win_types: + _zeDeviceGetGlobalTimestamps_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulonglong), POINTER(c_ulonglong) ) +else: + _zeDeviceGetGlobalTimestamps_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulonglong), POINTER(c_ulonglong) ) + +############################################################################### +## @brief Function-pointer for zeDeviceReserveCacheExt +if __use_win_types: + _zeDeviceReserveCacheExt_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, c_size_t, c_size_t ) +else: + _zeDeviceReserveCacheExt_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, c_size_t, c_size_t ) + +############################################################################### +## @brief Function-pointer for zeDeviceSetCacheAdviceExt +if __use_win_types: + _zeDeviceSetCacheAdviceExt_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, c_void_p, c_size_t, ze_cache_ext_region_t ) +else: + _zeDeviceSetCacheAdviceExt_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, c_void_p, c_size_t, ze_cache_ext_region_t ) + +############################################################################### +## @brief Function-pointer for zeDevicePciGetPropertiesExt +if __use_win_types: + _zeDevicePciGetPropertiesExt_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_pci_ext_properties_t) ) +else: + _zeDevicePciGetPropertiesExt_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_pci_ext_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeDeviceGetRootDevice +if __use_win_types: + _zeDeviceGetRootDevice_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_handle_t) ) +else: + _zeDeviceGetRootDevice_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeDeviceImportExternalSemaphoreExt +if __use_win_types: + _zeDeviceImportExternalSemaphoreExt_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_external_semaphore_ext_desc_t), POINTER(ze_external_semaphore_ext_handle_t) ) +else: + _zeDeviceImportExternalSemaphoreExt_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_external_semaphore_ext_desc_t), POINTER(ze_external_semaphore_ext_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeDeviceReleaseExternalSemaphoreExt +if __use_win_types: + _zeDeviceReleaseExternalSemaphoreExt_t = WINFUNCTYPE( ze_result_t, ze_external_semaphore_ext_handle_t ) +else: + _zeDeviceReleaseExternalSemaphoreExt_t = CFUNCTYPE( ze_result_t, ze_external_semaphore_ext_handle_t ) + +############################################################################### +## @brief Function-pointer for zeDeviceGetVectorWidthPropertiesExt +if __use_win_types: + _zeDeviceGetVectorWidthPropertiesExt_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_device_vector_width_properties_ext_t) ) +else: + _zeDeviceGetVectorWidthPropertiesExt_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_device_vector_width_properties_ext_t) ) + +############################################################################### +## @brief Function-pointer for zeDeviceSynchronize +if __use_win_types: + _zeDeviceSynchronize_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t ) +else: + _zeDeviceSynchronize_t = CFUNCTYPE( ze_result_t, ze_device_handle_t ) + +############################################################################### +## @brief Function-pointer for zeDeviceGetAggregatedCopyOffloadIncrementValue +if __use_win_types: + _zeDeviceGetAggregatedCopyOffloadIncrementValue_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong) ) +else: + _zeDeviceGetAggregatedCopyOffloadIncrementValue_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong) ) + + +############################################################################### +## @brief Table of Device functions pointers +class _ze_device_dditable_t(Structure): + _fields_ = [ + ("pfnGet", c_void_p), ## _zeDeviceGet_t + ("pfnGetSubDevices", c_void_p), ## _zeDeviceGetSubDevices_t + ("pfnGetProperties", c_void_p), ## _zeDeviceGetProperties_t + ("pfnGetComputeProperties", c_void_p), ## _zeDeviceGetComputeProperties_t + ("pfnGetModuleProperties", c_void_p), ## _zeDeviceGetModuleProperties_t + ("pfnGetCommandQueueGroupProperties", c_void_p), ## _zeDeviceGetCommandQueueGroupProperties_t + ("pfnGetMemoryProperties", c_void_p), ## _zeDeviceGetMemoryProperties_t + ("pfnGetMemoryAccessProperties", c_void_p), ## _zeDeviceGetMemoryAccessProperties_t + ("pfnGetCacheProperties", c_void_p), ## _zeDeviceGetCacheProperties_t + ("pfnGetImageProperties", c_void_p), ## _zeDeviceGetImageProperties_t + ("pfnGetExternalMemoryProperties", c_void_p), ## _zeDeviceGetExternalMemoryProperties_t + ("pfnGetP2PProperties", c_void_p), ## _zeDeviceGetP2PProperties_t + ("pfnCanAccessPeer", c_void_p), ## _zeDeviceCanAccessPeer_t + ("pfnGetStatus", c_void_p), ## _zeDeviceGetStatus_t + ("pfnGetGlobalTimestamps", c_void_p), ## _zeDeviceGetGlobalTimestamps_t + ("pfnReserveCacheExt", c_void_p), ## _zeDeviceReserveCacheExt_t + ("pfnSetCacheAdviceExt", c_void_p), ## _zeDeviceSetCacheAdviceExt_t + ("pfnPciGetPropertiesExt", c_void_p), ## _zeDevicePciGetPropertiesExt_t + ("pfnGetRootDevice", c_void_p), ## _zeDeviceGetRootDevice_t + ("pfnImportExternalSemaphoreExt", c_void_p), ## _zeDeviceImportExternalSemaphoreExt_t + ("pfnReleaseExternalSemaphoreExt", c_void_p), ## _zeDeviceReleaseExternalSemaphoreExt_t + ("pfnGetVectorWidthPropertiesExt", c_void_p), ## _zeDeviceGetVectorWidthPropertiesExt_t + ("pfnSynchronize", c_void_p), ## _zeDeviceSynchronize_t + ("pfnGetAggregatedCopyOffloadIncrementValue", c_void_p) ## _zeDeviceGetAggregatedCopyOffloadIncrementValue_t + ] + +############################################################################### +## @brief Function-pointer for zeDeviceGetFabricVertexExp +if __use_win_types: + _zeDeviceGetFabricVertexExp_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_fabric_vertex_handle_t) ) +else: + _zeDeviceGetFabricVertexExp_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_fabric_vertex_handle_t) ) + + +############################################################################### +## @brief Table of DeviceExp functions pointers +class _ze_device_exp_dditable_t(Structure): + _fields_ = [ + ("pfnGetFabricVertexExp", c_void_p) ## _zeDeviceGetFabricVertexExp_t + ] + +############################################################################### +## @brief Function-pointer for zeContextCreate +if __use_win_types: + _zeContextCreate_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_context_desc_t), POINTER(ze_context_handle_t) ) +else: + _zeContextCreate_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_context_desc_t), POINTER(ze_context_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeContextDestroy +if __use_win_types: + _zeContextDestroy_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t ) +else: + _zeContextDestroy_t = CFUNCTYPE( ze_result_t, ze_context_handle_t ) + +############################################################################### +## @brief Function-pointer for zeContextGetStatus +if __use_win_types: + _zeContextGetStatus_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t ) +else: + _zeContextGetStatus_t = CFUNCTYPE( ze_result_t, ze_context_handle_t ) + +############################################################################### +## @brief Function-pointer for zeContextSystemBarrier +if __use_win_types: + _zeContextSystemBarrier_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t ) +else: + _zeContextSystemBarrier_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t ) + +############################################################################### +## @brief Function-pointer for zeContextMakeMemoryResident +if __use_win_types: + _zeContextMakeMemoryResident_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_void_p, c_size_t ) +else: + _zeContextMakeMemoryResident_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_void_p, c_size_t ) + +############################################################################### +## @brief Function-pointer for zeContextEvictMemory +if __use_win_types: + _zeContextEvictMemory_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_void_p, c_size_t ) +else: + _zeContextEvictMemory_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_void_p, c_size_t ) + +############################################################################### +## @brief Function-pointer for zeContextMakeImageResident +if __use_win_types: + _zeContextMakeImageResident_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, ze_image_handle_t ) +else: + _zeContextMakeImageResident_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, ze_image_handle_t ) + +############################################################################### +## @brief Function-pointer for zeContextEvictImage +if __use_win_types: + _zeContextEvictImage_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, ze_image_handle_t ) +else: + _zeContextEvictImage_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, ze_image_handle_t ) + +############################################################################### +## @brief Function-pointer for zeContextCreateEx +if __use_win_types: + _zeContextCreateEx_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_context_desc_t), c_ulong, POINTER(ze_device_handle_t), POINTER(ze_context_handle_t) ) +else: + _zeContextCreateEx_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_context_desc_t), c_ulong, POINTER(ze_device_handle_t), POINTER(ze_context_handle_t) ) + + +############################################################################### +## @brief Table of Context functions pointers +class _ze_context_dditable_t(Structure): + _fields_ = [ + ("pfnCreate", c_void_p), ## _zeContextCreate_t + ("pfnDestroy", c_void_p), ## _zeContextDestroy_t + ("pfnGetStatus", c_void_p), ## _zeContextGetStatus_t + ("pfnSystemBarrier", c_void_p), ## _zeContextSystemBarrier_t + ("pfnMakeMemoryResident", c_void_p), ## _zeContextMakeMemoryResident_t + ("pfnEvictMemory", c_void_p), ## _zeContextEvictMemory_t + ("pfnMakeImageResident", c_void_p), ## _zeContextMakeImageResident_t + ("pfnEvictImage", c_void_p), ## _zeContextEvictImage_t + ("pfnCreateEx", c_void_p) ## _zeContextCreateEx_t + ] + +############################################################################### +## @brief Function-pointer for zeCommandQueueCreate +if __use_win_types: + _zeCommandQueueCreate_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_command_queue_desc_t), POINTER(ze_command_queue_handle_t) ) +else: + _zeCommandQueueCreate_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_command_queue_desc_t), POINTER(ze_command_queue_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandQueueDestroy +if __use_win_types: + _zeCommandQueueDestroy_t = WINFUNCTYPE( ze_result_t, ze_command_queue_handle_t ) +else: + _zeCommandQueueDestroy_t = CFUNCTYPE( ze_result_t, ze_command_queue_handle_t ) + +############################################################################### +## @brief Function-pointer for zeCommandQueueExecuteCommandLists +if __use_win_types: + _zeCommandQueueExecuteCommandLists_t = WINFUNCTYPE( ze_result_t, ze_command_queue_handle_t, c_ulong, POINTER(ze_command_list_handle_t), ze_fence_handle_t ) +else: + _zeCommandQueueExecuteCommandLists_t = CFUNCTYPE( ze_result_t, ze_command_queue_handle_t, c_ulong, POINTER(ze_command_list_handle_t), ze_fence_handle_t ) + +############################################################################### +## @brief Function-pointer for zeCommandQueueSynchronize +if __use_win_types: + _zeCommandQueueSynchronize_t = WINFUNCTYPE( ze_result_t, ze_command_queue_handle_t, c_ulonglong ) +else: + _zeCommandQueueSynchronize_t = CFUNCTYPE( ze_result_t, ze_command_queue_handle_t, c_ulonglong ) + +############################################################################### +## @brief Function-pointer for zeCommandQueueGetOrdinal +if __use_win_types: + _zeCommandQueueGetOrdinal_t = WINFUNCTYPE( ze_result_t, ze_command_queue_handle_t, POINTER(c_ulong) ) +else: + _zeCommandQueueGetOrdinal_t = CFUNCTYPE( ze_result_t, ze_command_queue_handle_t, POINTER(c_ulong) ) + +############################################################################### +## @brief Function-pointer for zeCommandQueueGetIndex +if __use_win_types: + _zeCommandQueueGetIndex_t = WINFUNCTYPE( ze_result_t, ze_command_queue_handle_t, POINTER(c_ulong) ) +else: + _zeCommandQueueGetIndex_t = CFUNCTYPE( ze_result_t, ze_command_queue_handle_t, POINTER(c_ulong) ) + + +############################################################################### +## @brief Table of CommandQueue functions pointers +class _ze_command_queue_dditable_t(Structure): + _fields_ = [ + ("pfnCreate", c_void_p), ## _zeCommandQueueCreate_t + ("pfnDestroy", c_void_p), ## _zeCommandQueueDestroy_t + ("pfnExecuteCommandLists", c_void_p), ## _zeCommandQueueExecuteCommandLists_t + ("pfnSynchronize", c_void_p), ## _zeCommandQueueSynchronize_t + ("pfnGetOrdinal", c_void_p), ## _zeCommandQueueGetOrdinal_t + ("pfnGetIndex", c_void_p) ## _zeCommandQueueGetIndex_t + ] + +############################################################################### +## @brief Function-pointer for zeCommandListCreate +if __use_win_types: + _zeCommandListCreate_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_command_list_desc_t), POINTER(ze_command_list_handle_t) ) +else: + _zeCommandListCreate_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_command_list_desc_t), POINTER(ze_command_list_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListCreateImmediate +if __use_win_types: + _zeCommandListCreateImmediate_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_command_queue_desc_t), POINTER(ze_command_list_handle_t) ) +else: + _zeCommandListCreateImmediate_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_command_queue_desc_t), POINTER(ze_command_list_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListDestroy +if __use_win_types: + _zeCommandListDestroy_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t ) +else: + _zeCommandListDestroy_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t ) + +############################################################################### +## @brief Function-pointer for zeCommandListClose +if __use_win_types: + _zeCommandListClose_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t ) +else: + _zeCommandListClose_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t ) + +############################################################################### +## @brief Function-pointer for zeCommandListReset +if __use_win_types: + _zeCommandListReset_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t ) +else: + _zeCommandListReset_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendWriteGlobalTimestamp +if __use_win_types: + _zeCommandListAppendWriteGlobalTimestamp_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(c_ulonglong), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListAppendWriteGlobalTimestamp_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(c_ulonglong), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendBarrier +if __use_win_types: + _zeCommandListAppendBarrier_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListAppendBarrier_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendMemoryRangesBarrier +if __use_win_types: + _zeCommandListAppendMemoryRangesBarrier_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(c_size_t), POINTER(c_void_p), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListAppendMemoryRangesBarrier_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(c_size_t), POINTER(c_void_p), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendMemoryCopy +if __use_win_types: + _zeCommandListAppendMemoryCopy_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, c_void_p, c_size_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListAppendMemoryCopy_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, c_void_p, c_size_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendMemoryFill +if __use_win_types: + _zeCommandListAppendMemoryFill_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, c_void_p, c_size_t, c_size_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListAppendMemoryFill_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, c_void_p, c_size_t, c_size_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendMemoryCopyRegion +if __use_win_types: + _zeCommandListAppendMemoryCopyRegion_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, POINTER(ze_copy_region_t), c_ulong, c_ulong, c_void_p, POINTER(ze_copy_region_t), c_ulong, c_ulong, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListAppendMemoryCopyRegion_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, POINTER(ze_copy_region_t), c_ulong, c_ulong, c_void_p, POINTER(ze_copy_region_t), c_ulong, c_ulong, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendMemoryCopyFromContext +if __use_win_types: + _zeCommandListAppendMemoryCopyFromContext_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, ze_context_handle_t, c_void_p, c_size_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListAppendMemoryCopyFromContext_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, ze_context_handle_t, c_void_p, c_size_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendImageCopy +if __use_win_types: + _zeCommandListAppendImageCopy_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_image_handle_t, ze_image_handle_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListAppendImageCopy_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_image_handle_t, ze_image_handle_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendImageCopyRegion +if __use_win_types: + _zeCommandListAppendImageCopyRegion_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_image_handle_t, ze_image_handle_t, POINTER(ze_image_region_t), POINTER(ze_image_region_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListAppendImageCopyRegion_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_image_handle_t, ze_image_handle_t, POINTER(ze_image_region_t), POINTER(ze_image_region_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendImageCopyToMemory +if __use_win_types: + _zeCommandListAppendImageCopyToMemory_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, ze_image_handle_t, POINTER(ze_image_region_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListAppendImageCopyToMemory_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, ze_image_handle_t, POINTER(ze_image_region_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendImageCopyFromMemory +if __use_win_types: + _zeCommandListAppendImageCopyFromMemory_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_image_handle_t, c_void_p, POINTER(ze_image_region_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListAppendImageCopyFromMemory_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_image_handle_t, c_void_p, POINTER(ze_image_region_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendMemoryPrefetch +if __use_win_types: + _zeCommandListAppendMemoryPrefetch_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, c_size_t ) +else: + _zeCommandListAppendMemoryPrefetch_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, c_size_t ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendMemAdvise +if __use_win_types: + _zeCommandListAppendMemAdvise_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_device_handle_t, c_void_p, c_size_t, ze_memory_advice_t ) +else: + _zeCommandListAppendMemAdvise_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_device_handle_t, c_void_p, c_size_t, ze_memory_advice_t ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendSignalEvent +if __use_win_types: + _zeCommandListAppendSignalEvent_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_event_handle_t ) +else: + _zeCommandListAppendSignalEvent_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_event_handle_t ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendWaitOnEvents +if __use_win_types: + _zeCommandListAppendWaitOnEvents_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListAppendWaitOnEvents_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendEventReset +if __use_win_types: + _zeCommandListAppendEventReset_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_event_handle_t ) +else: + _zeCommandListAppendEventReset_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_event_handle_t ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendQueryKernelTimestamps +if __use_win_types: + _zeCommandListAppendQueryKernelTimestamps_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_event_handle_t), c_void_p, POINTER(c_size_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListAppendQueryKernelTimestamps_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_event_handle_t), c_void_p, POINTER(c_size_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendLaunchKernel +if __use_win_types: + _zeCommandListAppendLaunchKernel_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_kernel_handle_t, POINTER(ze_group_count_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListAppendLaunchKernel_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_kernel_handle_t, POINTER(ze_group_count_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendLaunchCooperativeKernel +if __use_win_types: + _zeCommandListAppendLaunchCooperativeKernel_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_kernel_handle_t, POINTER(ze_group_count_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListAppendLaunchCooperativeKernel_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_kernel_handle_t, POINTER(ze_group_count_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendLaunchKernelIndirect +if __use_win_types: + _zeCommandListAppendLaunchKernelIndirect_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_kernel_handle_t, POINTER(ze_group_count_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListAppendLaunchKernelIndirect_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_kernel_handle_t, POINTER(ze_group_count_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendLaunchMultipleKernelsIndirect +if __use_win_types: + _zeCommandListAppendLaunchMultipleKernelsIndirect_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_kernel_handle_t), POINTER(c_ulong), POINTER(ze_group_count_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListAppendLaunchMultipleKernelsIndirect_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_kernel_handle_t), POINTER(c_ulong), POINTER(ze_group_count_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendImageCopyToMemoryExt +if __use_win_types: + _zeCommandListAppendImageCopyToMemoryExt_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, ze_image_handle_t, POINTER(ze_image_region_t), c_ulong, c_ulong, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListAppendImageCopyToMemoryExt_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, ze_image_handle_t, POINTER(ze_image_region_t), c_ulong, c_ulong, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendImageCopyFromMemoryExt +if __use_win_types: + _zeCommandListAppendImageCopyFromMemoryExt_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_image_handle_t, c_void_p, POINTER(ze_image_region_t), c_ulong, c_ulong, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListAppendImageCopyFromMemoryExt_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_image_handle_t, c_void_p, POINTER(ze_image_region_t), c_ulong, c_ulong, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListHostSynchronize +if __use_win_types: + _zeCommandListHostSynchronize_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulonglong ) +else: + _zeCommandListHostSynchronize_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulonglong ) + +############################################################################### +## @brief Function-pointer for zeCommandListGetDeviceHandle +if __use_win_types: + _zeCommandListGetDeviceHandle_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_device_handle_t) ) +else: + _zeCommandListGetDeviceHandle_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_device_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListGetContextHandle +if __use_win_types: + _zeCommandListGetContextHandle_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_context_handle_t) ) +else: + _zeCommandListGetContextHandle_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_context_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListGetOrdinal +if __use_win_types: + _zeCommandListGetOrdinal_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(c_ulong) ) +else: + _zeCommandListGetOrdinal_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(c_ulong) ) + +############################################################################### +## @brief Function-pointer for zeCommandListImmediateGetIndex +if __use_win_types: + _zeCommandListImmediateGetIndex_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(c_ulong) ) +else: + _zeCommandListImmediateGetIndex_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(c_ulong) ) + +############################################################################### +## @brief Function-pointer for zeCommandListIsImmediate +if __use_win_types: + _zeCommandListIsImmediate_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_bool_t) ) +else: + _zeCommandListIsImmediate_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_bool_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendSignalExternalSemaphoreExt +if __use_win_types: + _zeCommandListAppendSignalExternalSemaphoreExt_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_external_semaphore_ext_handle_t), POINTER(ze_external_semaphore_signal_params_ext_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListAppendSignalExternalSemaphoreExt_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_external_semaphore_ext_handle_t), POINTER(ze_external_semaphore_signal_params_ext_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendWaitExternalSemaphoreExt +if __use_win_types: + _zeCommandListAppendWaitExternalSemaphoreExt_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_external_semaphore_ext_handle_t), POINTER(ze_external_semaphore_wait_params_ext_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListAppendWaitExternalSemaphoreExt_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_external_semaphore_ext_handle_t), POINTER(ze_external_semaphore_wait_params_ext_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendLaunchKernelWithParameters +if __use_win_types: + _zeCommandListAppendLaunchKernelWithParameters_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_kernel_handle_t, POINTER(ze_group_count_t), *, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListAppendLaunchKernelWithParameters_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_kernel_handle_t, POINTER(ze_group_count_t), *, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListAppendLaunchKernelWithArguments +if __use_win_types: + _zeCommandListAppendLaunchKernelWithArguments_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_kernel_handle_t, ze_group_count_t, ze_group_c_size_t, **, *, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListAppendLaunchKernelWithArguments_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_kernel_handle_t, ze_group_count_t, ze_group_c_size_t, **, *, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + + +############################################################################### +## @brief Table of CommandList functions pointers +class _ze_command_list_dditable_t(Structure): + _fields_ = [ + ("pfnCreate", c_void_p), ## _zeCommandListCreate_t + ("pfnCreateImmediate", c_void_p), ## _zeCommandListCreateImmediate_t + ("pfnDestroy", c_void_p), ## _zeCommandListDestroy_t + ("pfnClose", c_void_p), ## _zeCommandListClose_t + ("pfnReset", c_void_p), ## _zeCommandListReset_t + ("pfnAppendWriteGlobalTimestamp", c_void_p), ## _zeCommandListAppendWriteGlobalTimestamp_t + ("pfnAppendBarrier", c_void_p), ## _zeCommandListAppendBarrier_t + ("pfnAppendMemoryRangesBarrier", c_void_p), ## _zeCommandListAppendMemoryRangesBarrier_t + ("pfnAppendMemoryCopy", c_void_p), ## _zeCommandListAppendMemoryCopy_t + ("pfnAppendMemoryFill", c_void_p), ## _zeCommandListAppendMemoryFill_t + ("pfnAppendMemoryCopyRegion", c_void_p), ## _zeCommandListAppendMemoryCopyRegion_t + ("pfnAppendMemoryCopyFromContext", c_void_p), ## _zeCommandListAppendMemoryCopyFromContext_t + ("pfnAppendImageCopy", c_void_p), ## _zeCommandListAppendImageCopy_t + ("pfnAppendImageCopyRegion", c_void_p), ## _zeCommandListAppendImageCopyRegion_t + ("pfnAppendImageCopyToMemory", c_void_p), ## _zeCommandListAppendImageCopyToMemory_t + ("pfnAppendImageCopyFromMemory", c_void_p), ## _zeCommandListAppendImageCopyFromMemory_t + ("pfnAppendMemoryPrefetch", c_void_p), ## _zeCommandListAppendMemoryPrefetch_t + ("pfnAppendMemAdvise", c_void_p), ## _zeCommandListAppendMemAdvise_t + ("pfnAppendSignalEvent", c_void_p), ## _zeCommandListAppendSignalEvent_t + ("pfnAppendWaitOnEvents", c_void_p), ## _zeCommandListAppendWaitOnEvents_t + ("pfnAppendEventReset", c_void_p), ## _zeCommandListAppendEventReset_t + ("pfnAppendQueryKernelTimestamps", c_void_p), ## _zeCommandListAppendQueryKernelTimestamps_t + ("pfnAppendLaunchKernel", c_void_p), ## _zeCommandListAppendLaunchKernel_t + ("pfnAppendLaunchCooperativeKernel", c_void_p), ## _zeCommandListAppendLaunchCooperativeKernel_t + ("pfnAppendLaunchKernelIndirect", c_void_p), ## _zeCommandListAppendLaunchKernelIndirect_t + ("pfnAppendLaunchMultipleKernelsIndirect", c_void_p), ## _zeCommandListAppendLaunchMultipleKernelsIndirect_t + ("pfnAppendImageCopyToMemoryExt", c_void_p), ## _zeCommandListAppendImageCopyToMemoryExt_t + ("pfnAppendImageCopyFromMemoryExt", c_void_p), ## _zeCommandListAppendImageCopyFromMemoryExt_t + ("pfnHostSynchronize", c_void_p), ## _zeCommandListHostSynchronize_t + ("pfnGetDeviceHandle", c_void_p), ## _zeCommandListGetDeviceHandle_t + ("pfnGetContextHandle", c_void_p), ## _zeCommandListGetContextHandle_t + ("pfnGetOrdinal", c_void_p), ## _zeCommandListGetOrdinal_t + ("pfnImmediateGetIndex", c_void_p), ## _zeCommandListImmediateGetIndex_t + ("pfnIsImmediate", c_void_p), ## _zeCommandListIsImmediate_t + ("pfnAppendSignalExternalSemaphoreExt", c_void_p), ## _zeCommandListAppendSignalExternalSemaphoreExt_t + ("pfnAppendWaitExternalSemaphoreExt", c_void_p), ## _zeCommandListAppendWaitExternalSemaphoreExt_t + ("pfnAppendLaunchKernelWithParameters", c_void_p), ## _zeCommandListAppendLaunchKernelWithParameters_t + ("pfnAppendLaunchKernelWithArguments", c_void_p) ## _zeCommandListAppendLaunchKernelWithArguments_t + ] + +############################################################################### +## @brief Function-pointer for zeCommandListCreateCloneExp +if __use_win_types: + _zeCommandListCreateCloneExp_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_command_list_handle_t) ) +else: + _zeCommandListCreateCloneExp_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_command_list_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListImmediateAppendCommandListsExp +if __use_win_types: + _zeCommandListImmediateAppendCommandListsExp_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_command_list_handle_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListImmediateAppendCommandListsExp_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_command_list_handle_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListGetNextCommandIdExp +if __use_win_types: + _zeCommandListGetNextCommandIdExp_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_mutable_command_id_exp_desc_t), POINTER(c_ulonglong) ) +else: + _zeCommandListGetNextCommandIdExp_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_mutable_command_id_exp_desc_t), POINTER(c_ulonglong) ) + +############################################################################### +## @brief Function-pointer for zeCommandListUpdateMutableCommandsExp +if __use_win_types: + _zeCommandListUpdateMutableCommandsExp_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_mutable_commands_exp_desc_t) ) +else: + _zeCommandListUpdateMutableCommandsExp_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_mutable_commands_exp_desc_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListUpdateMutableCommandSignalEventExp +if __use_win_types: + _zeCommandListUpdateMutableCommandSignalEventExp_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulonglong, ze_event_handle_t ) +else: + _zeCommandListUpdateMutableCommandSignalEventExp_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulonglong, ze_event_handle_t ) + +############################################################################### +## @brief Function-pointer for zeCommandListUpdateMutableCommandWaitEventsExp +if __use_win_types: + _zeCommandListUpdateMutableCommandWaitEventsExp_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulonglong, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zeCommandListUpdateMutableCommandWaitEventsExp_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulonglong, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeCommandListGetNextCommandIdWithKernelsExp +if __use_win_types: + _zeCommandListGetNextCommandIdWithKernelsExp_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_mutable_command_id_exp_desc_t), c_ulong, POINTER(ze_kernel_handle_t), POINTER(c_ulonglong) ) +else: + _zeCommandListGetNextCommandIdWithKernelsExp_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_mutable_command_id_exp_desc_t), c_ulong, POINTER(ze_kernel_handle_t), POINTER(c_ulonglong) ) + +############################################################################### +## @brief Function-pointer for zeCommandListUpdateMutableCommandKernelsExp +if __use_win_types: + _zeCommandListUpdateMutableCommandKernelsExp_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(c_ulonglong), POINTER(ze_kernel_handle_t) ) +else: + _zeCommandListUpdateMutableCommandKernelsExp_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(c_ulonglong), POINTER(ze_kernel_handle_t) ) + + +############################################################################### +## @brief Table of CommandListExp functions pointers +class _ze_command_list_exp_dditable_t(Structure): + _fields_ = [ + ("pfnCreateCloneExp", c_void_p), ## _zeCommandListCreateCloneExp_t + ("pfnImmediateAppendCommandListsExp", c_void_p), ## _zeCommandListImmediateAppendCommandListsExp_t + ("pfnGetNextCommandIdExp", c_void_p), ## _zeCommandListGetNextCommandIdExp_t + ("pfnUpdateMutableCommandsExp", c_void_p), ## _zeCommandListUpdateMutableCommandsExp_t + ("pfnUpdateMutableCommandSignalEventExp", c_void_p), ## _zeCommandListUpdateMutableCommandSignalEventExp_t + ("pfnUpdateMutableCommandWaitEventsExp", c_void_p), ## _zeCommandListUpdateMutableCommandWaitEventsExp_t + ("pfnGetNextCommandIdWithKernelsExp", c_void_p), ## _zeCommandListGetNextCommandIdWithKernelsExp_t + ("pfnUpdateMutableCommandKernelsExp", c_void_p) ## _zeCommandListUpdateMutableCommandKernelsExp_t + ] + +############################################################################### +## @brief Function-pointer for zeImageGetProperties +if __use_win_types: + _zeImageGetProperties_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_image_desc_t), POINTER(ze_image_properties_t) ) +else: + _zeImageGetProperties_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_image_desc_t), POINTER(ze_image_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeImageCreate +if __use_win_types: + _zeImageCreate_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_image_desc_t), POINTER(ze_image_handle_t) ) +else: + _zeImageCreate_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_image_desc_t), POINTER(ze_image_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeImageDestroy +if __use_win_types: + _zeImageDestroy_t = WINFUNCTYPE( ze_result_t, ze_image_handle_t ) +else: + _zeImageDestroy_t = CFUNCTYPE( ze_result_t, ze_image_handle_t ) + +############################################################################### +## @brief Function-pointer for zeImageGetAllocPropertiesExt +if __use_win_types: + _zeImageGetAllocPropertiesExt_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_image_handle_t, POINTER(ze_image_allocation_ext_properties_t) ) +else: + _zeImageGetAllocPropertiesExt_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_image_handle_t, POINTER(ze_image_allocation_ext_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeImageViewCreateExt +if __use_win_types: + _zeImageViewCreateExt_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_image_desc_t), ze_image_handle_t, POINTER(ze_image_handle_t) ) +else: + _zeImageViewCreateExt_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_image_desc_t), ze_image_handle_t, POINTER(ze_image_handle_t) ) + + +############################################################################### +## @brief Table of Image functions pointers +class _ze_image_dditable_t(Structure): + _fields_ = [ + ("pfnGetProperties", c_void_p), ## _zeImageGetProperties_t + ("pfnCreate", c_void_p), ## _zeImageCreate_t + ("pfnDestroy", c_void_p), ## _zeImageDestroy_t + ("pfnGetAllocPropertiesExt", c_void_p), ## _zeImageGetAllocPropertiesExt_t + ("pfnViewCreateExt", c_void_p) ## _zeImageViewCreateExt_t + ] + +############################################################################### +## @brief Function-pointer for zeImageGetMemoryPropertiesExp +if __use_win_types: + _zeImageGetMemoryPropertiesExp_t = WINFUNCTYPE( ze_result_t, ze_image_handle_t, POINTER(ze_image_memory_properties_exp_t) ) +else: + _zeImageGetMemoryPropertiesExp_t = CFUNCTYPE( ze_result_t, ze_image_handle_t, POINTER(ze_image_memory_properties_exp_t) ) + +############################################################################### +## @brief Function-pointer for zeImageViewCreateExp +if __use_win_types: + _zeImageViewCreateExp_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_image_desc_t), ze_image_handle_t, POINTER(ze_image_handle_t) ) +else: + _zeImageViewCreateExp_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_image_desc_t), ze_image_handle_t, POINTER(ze_image_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeImageGetDeviceOffsetExp +if __use_win_types: + _zeImageGetDeviceOffsetExp_t = WINFUNCTYPE( ze_result_t, ze_image_handle_t, POINTER(c_ulonglong) ) +else: + _zeImageGetDeviceOffsetExp_t = CFUNCTYPE( ze_result_t, ze_image_handle_t, POINTER(c_ulonglong) ) + + +############################################################################### +## @brief Table of ImageExp functions pointers +class _ze_image_exp_dditable_t(Structure): + _fields_ = [ + ("pfnGetMemoryPropertiesExp", c_void_p), ## _zeImageGetMemoryPropertiesExp_t + ("pfnViewCreateExp", c_void_p), ## _zeImageViewCreateExp_t + ("pfnGetDeviceOffsetExp", c_void_p) ## _zeImageGetDeviceOffsetExp_t + ] + +############################################################################### +## @brief Function-pointer for zeMemAllocShared +if __use_win_types: + _zeMemAllocShared_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, POINTER(ze_device_mem_alloc_desc_t), POINTER(ze_host_mem_alloc_desc_t), c_size_t, c_size_t, ze_device_handle_t, POINTER(c_void_p) ) +else: + _zeMemAllocShared_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, POINTER(ze_device_mem_alloc_desc_t), POINTER(ze_host_mem_alloc_desc_t), c_size_t, c_size_t, ze_device_handle_t, POINTER(c_void_p) ) + +############################################################################### +## @brief Function-pointer for zeMemAllocDevice +if __use_win_types: + _zeMemAllocDevice_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, POINTER(ze_device_mem_alloc_desc_t), c_size_t, c_size_t, ze_device_handle_t, POINTER(c_void_p) ) +else: + _zeMemAllocDevice_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, POINTER(ze_device_mem_alloc_desc_t), c_size_t, c_size_t, ze_device_handle_t, POINTER(c_void_p) ) + +############################################################################### +## @brief Function-pointer for zeMemAllocHost +if __use_win_types: + _zeMemAllocHost_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, POINTER(ze_host_mem_alloc_desc_t), c_size_t, c_size_t, POINTER(c_void_p) ) +else: + _zeMemAllocHost_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, POINTER(ze_host_mem_alloc_desc_t), c_size_t, c_size_t, POINTER(c_void_p) ) + +############################################################################### +## @brief Function-pointer for zeMemFree +if __use_win_types: + _zeMemFree_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p ) +else: + _zeMemFree_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p ) + +############################################################################### +## @brief Function-pointer for zeMemGetAllocProperties +if __use_win_types: + _zeMemGetAllocProperties_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, POINTER(ze_memory_allocation_properties_t), POINTER(ze_device_handle_t) ) +else: + _zeMemGetAllocProperties_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, POINTER(ze_memory_allocation_properties_t), POINTER(ze_device_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeMemGetAddressRange +if __use_win_types: + _zeMemGetAddressRange_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, POINTER(c_void_p), POINTER(c_size_t) ) +else: + _zeMemGetAddressRange_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, POINTER(c_void_p), POINTER(c_size_t) ) + +############################################################################### +## @brief Function-pointer for zeMemGetIpcHandle +if __use_win_types: + _zeMemGetIpcHandle_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, POINTER(ze_ipc_mem_handle_t) ) +else: + _zeMemGetIpcHandle_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, POINTER(ze_ipc_mem_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeMemOpenIpcHandle +if __use_win_types: + _zeMemOpenIpcHandle_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, ze_ipc_mem_handle_t, ze_ipc_memory_flags_t, POINTER(c_void_p) ) +else: + _zeMemOpenIpcHandle_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, ze_ipc_mem_handle_t, ze_ipc_memory_flags_t, POINTER(c_void_p) ) + +############################################################################### +## @brief Function-pointer for zeMemCloseIpcHandle +if __use_win_types: + _zeMemCloseIpcHandle_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p ) +else: + _zeMemCloseIpcHandle_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p ) + +############################################################################### +## @brief Function-pointer for zeMemFreeExt +if __use_win_types: + _zeMemFreeExt_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, POINTER(ze_memory_free_ext_desc_t), c_void_p ) +else: + _zeMemFreeExt_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, POINTER(ze_memory_free_ext_desc_t), c_void_p ) + +############################################################################### +## @brief Function-pointer for zeMemPutIpcHandle +if __use_win_types: + _zeMemPutIpcHandle_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_ipc_mem_handle_t ) +else: + _zeMemPutIpcHandle_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_ipc_mem_handle_t ) + +############################################################################### +## @brief Function-pointer for zeMemGetPitchFor2dImage +if __use_win_types: + _zeMemGetPitchFor2dImage_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_size_t, c_size_t, c_int, * ) +else: + _zeMemGetPitchFor2dImage_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_size_t, c_size_t, c_int, * ) + +############################################################################### +## @brief Function-pointer for zeMemGetIpcHandleWithProperties +if __use_win_types: + _zeMemGetIpcHandleWithProperties_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_void_p, POINTER(ze_ipc_mem_handle_t) ) +else: + _zeMemGetIpcHandleWithProperties_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_void_p, POINTER(ze_ipc_mem_handle_t) ) + + +############################################################################### +## @brief Table of Mem functions pointers +class _ze_mem_dditable_t(Structure): + _fields_ = [ + ("pfnAllocShared", c_void_p), ## _zeMemAllocShared_t + ("pfnAllocDevice", c_void_p), ## _zeMemAllocDevice_t + ("pfnAllocHost", c_void_p), ## _zeMemAllocHost_t + ("pfnFree", c_void_p), ## _zeMemFree_t + ("pfnGetAllocProperties", c_void_p), ## _zeMemGetAllocProperties_t + ("pfnGetAddressRange", c_void_p), ## _zeMemGetAddressRange_t + ("pfnGetIpcHandle", c_void_p), ## _zeMemGetIpcHandle_t + ("pfnOpenIpcHandle", c_void_p), ## _zeMemOpenIpcHandle_t + ("pfnCloseIpcHandle", c_void_p), ## _zeMemCloseIpcHandle_t + ("pfnFreeExt", c_void_p), ## _zeMemFreeExt_t + ("pfnPutIpcHandle", c_void_p), ## _zeMemPutIpcHandle_t + ("pfnGetPitchFor2dImage", c_void_p), ## _zeMemGetPitchFor2dImage_t + ("pfnGetIpcHandleWithProperties", c_void_p) ## _zeMemGetIpcHandleWithProperties_t + ] + +############################################################################### +## @brief Function-pointer for zeMemGetIpcHandleFromFileDescriptorExp +if __use_win_types: + _zeMemGetIpcHandleFromFileDescriptorExp_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_ulonglong, POINTER(ze_ipc_mem_handle_t) ) +else: + _zeMemGetIpcHandleFromFileDescriptorExp_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_ulonglong, POINTER(ze_ipc_mem_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeMemGetFileDescriptorFromIpcHandleExp +if __use_win_types: + _zeMemGetFileDescriptorFromIpcHandleExp_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_ipc_mem_handle_t, POINTER(c_ulonglong) ) +else: + _zeMemGetFileDescriptorFromIpcHandleExp_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_ipc_mem_handle_t, POINTER(c_ulonglong) ) + +############################################################################### +## @brief Function-pointer for zeMemSetAtomicAccessAttributeExp +if __use_win_types: + _zeMemSetAtomicAccessAttributeExp_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_void_p, c_size_t, ze_memory_atomic_attr_exp_flags_t ) +else: + _zeMemSetAtomicAccessAttributeExp_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_void_p, c_size_t, ze_memory_atomic_attr_exp_flags_t ) + +############################################################################### +## @brief Function-pointer for zeMemGetAtomicAccessAttributeExp +if __use_win_types: + _zeMemGetAtomicAccessAttributeExp_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_void_p, c_size_t, POINTER(ze_memory_atomic_attr_exp_flags_t) ) +else: + _zeMemGetAtomicAccessAttributeExp_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_void_p, c_size_t, POINTER(ze_memory_atomic_attr_exp_flags_t) ) + + +############################################################################### +## @brief Table of MemExp functions pointers +class _ze_mem_exp_dditable_t(Structure): + _fields_ = [ + ("pfnGetIpcHandleFromFileDescriptorExp", c_void_p), ## _zeMemGetIpcHandleFromFileDescriptorExp_t + ("pfnGetFileDescriptorFromIpcHandleExp", c_void_p), ## _zeMemGetFileDescriptorFromIpcHandleExp_t + ("pfnSetAtomicAccessAttributeExp", c_void_p), ## _zeMemSetAtomicAccessAttributeExp_t + ("pfnGetAtomicAccessAttributeExp", c_void_p) ## _zeMemGetAtomicAccessAttributeExp_t + ] + +############################################################################### +## @brief Function-pointer for zeFenceCreate +if __use_win_types: + _zeFenceCreate_t = WINFUNCTYPE( ze_result_t, ze_command_queue_handle_t, POINTER(ze_fence_desc_t), POINTER(ze_fence_handle_t) ) +else: + _zeFenceCreate_t = CFUNCTYPE( ze_result_t, ze_command_queue_handle_t, POINTER(ze_fence_desc_t), POINTER(ze_fence_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeFenceDestroy +if __use_win_types: + _zeFenceDestroy_t = WINFUNCTYPE( ze_result_t, ze_fence_handle_t ) +else: + _zeFenceDestroy_t = CFUNCTYPE( ze_result_t, ze_fence_handle_t ) + +############################################################################### +## @brief Function-pointer for zeFenceHostSynchronize +if __use_win_types: + _zeFenceHostSynchronize_t = WINFUNCTYPE( ze_result_t, ze_fence_handle_t, c_ulonglong ) +else: + _zeFenceHostSynchronize_t = CFUNCTYPE( ze_result_t, ze_fence_handle_t, c_ulonglong ) + +############################################################################### +## @brief Function-pointer for zeFenceQueryStatus +if __use_win_types: + _zeFenceQueryStatus_t = WINFUNCTYPE( ze_result_t, ze_fence_handle_t ) +else: + _zeFenceQueryStatus_t = CFUNCTYPE( ze_result_t, ze_fence_handle_t ) + +############################################################################### +## @brief Function-pointer for zeFenceReset +if __use_win_types: + _zeFenceReset_t = WINFUNCTYPE( ze_result_t, ze_fence_handle_t ) +else: + _zeFenceReset_t = CFUNCTYPE( ze_result_t, ze_fence_handle_t ) + + +############################################################################### +## @brief Table of Fence functions pointers +class _ze_fence_dditable_t(Structure): + _fields_ = [ + ("pfnCreate", c_void_p), ## _zeFenceCreate_t + ("pfnDestroy", c_void_p), ## _zeFenceDestroy_t + ("pfnHostSynchronize", c_void_p), ## _zeFenceHostSynchronize_t + ("pfnQueryStatus", c_void_p), ## _zeFenceQueryStatus_t + ("pfnReset", c_void_p) ## _zeFenceReset_t + ] + +############################################################################### +## @brief Function-pointer for zeEventPoolCreate +if __use_win_types: + _zeEventPoolCreate_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, POINTER(ze_event_pool_desc_t), c_ulong, POINTER(ze_device_handle_t), POINTER(ze_event_pool_handle_t) ) +else: + _zeEventPoolCreate_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, POINTER(ze_event_pool_desc_t), c_ulong, POINTER(ze_device_handle_t), POINTER(ze_event_pool_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeEventPoolDestroy +if __use_win_types: + _zeEventPoolDestroy_t = WINFUNCTYPE( ze_result_t, ze_event_pool_handle_t ) +else: + _zeEventPoolDestroy_t = CFUNCTYPE( ze_result_t, ze_event_pool_handle_t ) + +############################################################################### +## @brief Function-pointer for zeEventPoolGetIpcHandle +if __use_win_types: + _zeEventPoolGetIpcHandle_t = WINFUNCTYPE( ze_result_t, ze_event_pool_handle_t, POINTER(ze_ipc_event_pool_handle_t) ) +else: + _zeEventPoolGetIpcHandle_t = CFUNCTYPE( ze_result_t, ze_event_pool_handle_t, POINTER(ze_ipc_event_pool_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeEventPoolOpenIpcHandle +if __use_win_types: + _zeEventPoolOpenIpcHandle_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_ipc_event_pool_handle_t, POINTER(ze_event_pool_handle_t) ) +else: + _zeEventPoolOpenIpcHandle_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_ipc_event_pool_handle_t, POINTER(ze_event_pool_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeEventPoolCloseIpcHandle +if __use_win_types: + _zeEventPoolCloseIpcHandle_t = WINFUNCTYPE( ze_result_t, ze_event_pool_handle_t ) +else: + _zeEventPoolCloseIpcHandle_t = CFUNCTYPE( ze_result_t, ze_event_pool_handle_t ) + +############################################################################### +## @brief Function-pointer for zeEventPoolPutIpcHandle +if __use_win_types: + _zeEventPoolPutIpcHandle_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_ipc_event_pool_handle_t ) +else: + _zeEventPoolPutIpcHandle_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_ipc_event_pool_handle_t ) + +############################################################################### +## @brief Function-pointer for zeEventPoolGetContextHandle +if __use_win_types: + _zeEventPoolGetContextHandle_t = WINFUNCTYPE( ze_result_t, ze_event_pool_handle_t, POINTER(ze_context_handle_t) ) +else: + _zeEventPoolGetContextHandle_t = CFUNCTYPE( ze_result_t, ze_event_pool_handle_t, POINTER(ze_context_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeEventPoolGetFlags +if __use_win_types: + _zeEventPoolGetFlags_t = WINFUNCTYPE( ze_result_t, ze_event_pool_handle_t, POINTER(ze_event_pool_flags_t) ) +else: + _zeEventPoolGetFlags_t = CFUNCTYPE( ze_result_t, ze_event_pool_handle_t, POINTER(ze_event_pool_flags_t) ) + + +############################################################################### +## @brief Table of EventPool functions pointers +class _ze_event_pool_dditable_t(Structure): + _fields_ = [ + ("pfnCreate", c_void_p), ## _zeEventPoolCreate_t + ("pfnDestroy", c_void_p), ## _zeEventPoolDestroy_t + ("pfnGetIpcHandle", c_void_p), ## _zeEventPoolGetIpcHandle_t + ("pfnOpenIpcHandle", c_void_p), ## _zeEventPoolOpenIpcHandle_t + ("pfnCloseIpcHandle", c_void_p), ## _zeEventPoolCloseIpcHandle_t + ("pfnPutIpcHandle", c_void_p), ## _zeEventPoolPutIpcHandle_t + ("pfnGetContextHandle", c_void_p), ## _zeEventPoolGetContextHandle_t + ("pfnGetFlags", c_void_p) ## _zeEventPoolGetFlags_t + ] + +############################################################################### +## @brief Function-pointer for zeEventCreate +if __use_win_types: + _zeEventCreate_t = WINFUNCTYPE( ze_result_t, ze_event_pool_handle_t, POINTER(ze_event_desc_t), POINTER(ze_event_handle_t) ) +else: + _zeEventCreate_t = CFUNCTYPE( ze_result_t, ze_event_pool_handle_t, POINTER(ze_event_desc_t), POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeEventDestroy +if __use_win_types: + _zeEventDestroy_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t ) +else: + _zeEventDestroy_t = CFUNCTYPE( ze_result_t, ze_event_handle_t ) + +############################################################################### +## @brief Function-pointer for zeEventHostSignal +if __use_win_types: + _zeEventHostSignal_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t ) +else: + _zeEventHostSignal_t = CFUNCTYPE( ze_result_t, ze_event_handle_t ) + +############################################################################### +## @brief Function-pointer for zeEventHostSynchronize +if __use_win_types: + _zeEventHostSynchronize_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t, c_ulonglong ) +else: + _zeEventHostSynchronize_t = CFUNCTYPE( ze_result_t, ze_event_handle_t, c_ulonglong ) + +############################################################################### +## @brief Function-pointer for zeEventQueryStatus +if __use_win_types: + _zeEventQueryStatus_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t ) +else: + _zeEventQueryStatus_t = CFUNCTYPE( ze_result_t, ze_event_handle_t ) + +############################################################################### +## @brief Function-pointer for zeEventHostReset +if __use_win_types: + _zeEventHostReset_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t ) +else: + _zeEventHostReset_t = CFUNCTYPE( ze_result_t, ze_event_handle_t ) + +############################################################################### +## @brief Function-pointer for zeEventQueryKernelTimestamp +if __use_win_types: + _zeEventQueryKernelTimestamp_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(ze_kernel_timestamp_result_t) ) +else: + _zeEventQueryKernelTimestamp_t = CFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(ze_kernel_timestamp_result_t) ) + +############################################################################### +## @brief Function-pointer for zeEventQueryKernelTimestampsExt +if __use_win_types: + _zeEventQueryKernelTimestampsExt_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_event_query_kernel_timestamps_results_ext_properties_t) ) +else: + _zeEventQueryKernelTimestampsExt_t = CFUNCTYPE( ze_result_t, ze_event_handle_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_event_query_kernel_timestamps_results_ext_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeEventGetEventPool +if __use_win_types: + _zeEventGetEventPool_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(ze_event_pool_handle_t) ) +else: + _zeEventGetEventPool_t = CFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(ze_event_pool_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeEventGetSignalScope +if __use_win_types: + _zeEventGetSignalScope_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(ze_event_scope_flags_t) ) +else: + _zeEventGetSignalScope_t = CFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(ze_event_scope_flags_t) ) + +############################################################################### +## @brief Function-pointer for zeEventGetWaitScope +if __use_win_types: + _zeEventGetWaitScope_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(ze_event_scope_flags_t) ) +else: + _zeEventGetWaitScope_t = CFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(ze_event_scope_flags_t) ) + +############################################################################### +## @brief Function-pointer for zeEventCounterBasedCreate +if __use_win_types: + _zeEventCounterBasedCreate_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_event_counter_based_desc_t), POINTER(ze_event_handle_t) ) +else: + _zeEventCounterBasedCreate_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_event_counter_based_desc_t), POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeEventCounterBasedGetIpcHandle +if __use_win_types: + _zeEventCounterBasedGetIpcHandle_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(ze_ipc_event_counter_based_handle_t) ) +else: + _zeEventCounterBasedGetIpcHandle_t = CFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(ze_ipc_event_counter_based_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeEventCounterBasedOpenIpcHandle +if __use_win_types: + _zeEventCounterBasedOpenIpcHandle_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_ipc_event_counter_based_handle_t, POINTER(ze_event_handle_t) ) +else: + _zeEventCounterBasedOpenIpcHandle_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_ipc_event_counter_based_handle_t, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeEventCounterBasedCloseIpcHandle +if __use_win_types: + _zeEventCounterBasedCloseIpcHandle_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t ) +else: + _zeEventCounterBasedCloseIpcHandle_t = CFUNCTYPE( ze_result_t, ze_event_handle_t ) + +############################################################################### +## @brief Function-pointer for zeEventCounterBasedGetDeviceAddress +if __use_win_types: + _zeEventCounterBasedGetDeviceAddress_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(c_ulonglong), POINTER(c_ulonglong) ) +else: + _zeEventCounterBasedGetDeviceAddress_t = CFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(c_ulonglong), POINTER(c_ulonglong) ) + + +############################################################################### +## @brief Table of Event functions pointers +class _ze_event_dditable_t(Structure): + _fields_ = [ + ("pfnCreate", c_void_p), ## _zeEventCreate_t + ("pfnDestroy", c_void_p), ## _zeEventDestroy_t + ("pfnHostSignal", c_void_p), ## _zeEventHostSignal_t + ("pfnHostSynchronize", c_void_p), ## _zeEventHostSynchronize_t + ("pfnQueryStatus", c_void_p), ## _zeEventQueryStatus_t + ("pfnHostReset", c_void_p), ## _zeEventHostReset_t + ("pfnQueryKernelTimestamp", c_void_p), ## _zeEventQueryKernelTimestamp_t + ("pfnQueryKernelTimestampsExt", c_void_p), ## _zeEventQueryKernelTimestampsExt_t + ("pfnGetEventPool", c_void_p), ## _zeEventGetEventPool_t + ("pfnGetSignalScope", c_void_p), ## _zeEventGetSignalScope_t + ("pfnGetWaitScope", c_void_p), ## _zeEventGetWaitScope_t + ("pfnCounterBasedCreate", c_void_p), ## _zeEventCounterBasedCreate_t + ("pfnCounterBasedGetIpcHandle", c_void_p), ## _zeEventCounterBasedGetIpcHandle_t + ("pfnCounterBasedOpenIpcHandle", c_void_p), ## _zeEventCounterBasedOpenIpcHandle_t + ("pfnCounterBasedCloseIpcHandle", c_void_p), ## _zeEventCounterBasedCloseIpcHandle_t + ("pfnCounterBasedGetDeviceAddress", c_void_p) ## _zeEventCounterBasedGetDeviceAddress_t + ] + +############################################################################### +## @brief Function-pointer for zeEventQueryTimestampsExp +if __use_win_types: + _zeEventQueryTimestampsExp_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_kernel_timestamp_result_t) ) +else: + _zeEventQueryTimestampsExp_t = CFUNCTYPE( ze_result_t, ze_event_handle_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_kernel_timestamp_result_t) ) + + +############################################################################### +## @brief Table of EventExp functions pointers +class _ze_event_exp_dditable_t(Structure): + _fields_ = [ + ("pfnQueryTimestampsExp", c_void_p) ## _zeEventQueryTimestampsExp_t + ] + +############################################################################### +## @brief Function-pointer for zeModuleCreate +if __use_win_types: + _zeModuleCreate_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_module_desc_t), POINTER(ze_module_handle_t), POINTER(ze_module_build_log_handle_t) ) +else: + _zeModuleCreate_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_module_desc_t), POINTER(ze_module_handle_t), POINTER(ze_module_build_log_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeModuleDestroy +if __use_win_types: + _zeModuleDestroy_t = WINFUNCTYPE( ze_result_t, ze_module_handle_t ) +else: + _zeModuleDestroy_t = CFUNCTYPE( ze_result_t, ze_module_handle_t ) + +############################################################################### +## @brief Function-pointer for zeModuleDynamicLink +if __use_win_types: + _zeModuleDynamicLink_t = WINFUNCTYPE( ze_result_t, c_ulong, POINTER(ze_module_handle_t), POINTER(ze_module_build_log_handle_t) ) +else: + _zeModuleDynamicLink_t = CFUNCTYPE( ze_result_t, c_ulong, POINTER(ze_module_handle_t), POINTER(ze_module_build_log_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeModuleGetNativeBinary +if __use_win_types: + _zeModuleGetNativeBinary_t = WINFUNCTYPE( ze_result_t, ze_module_handle_t, POINTER(c_size_t), POINTER(c_ubyte) ) +else: + _zeModuleGetNativeBinary_t = CFUNCTYPE( ze_result_t, ze_module_handle_t, POINTER(c_size_t), POINTER(c_ubyte) ) + +############################################################################### +## @brief Function-pointer for zeModuleGetGlobalPointer +if __use_win_types: + _zeModuleGetGlobalPointer_t = WINFUNCTYPE( ze_result_t, ze_module_handle_t, c_char_p, POINTER(c_size_t), POINTER(c_void_p) ) +else: + _zeModuleGetGlobalPointer_t = CFUNCTYPE( ze_result_t, ze_module_handle_t, c_char_p, POINTER(c_size_t), POINTER(c_void_p) ) + +############################################################################### +## @brief Function-pointer for zeModuleGetKernelNames +if __use_win_types: + _zeModuleGetKernelNames_t = WINFUNCTYPE( ze_result_t, ze_module_handle_t, POINTER(c_ulong), POINTER(c_char_p) ) +else: + _zeModuleGetKernelNames_t = CFUNCTYPE( ze_result_t, ze_module_handle_t, POINTER(c_ulong), POINTER(c_char_p) ) + +############################################################################### +## @brief Function-pointer for zeModuleGetProperties +if __use_win_types: + _zeModuleGetProperties_t = WINFUNCTYPE( ze_result_t, ze_module_handle_t, POINTER(ze_module_properties_t) ) +else: + _zeModuleGetProperties_t = CFUNCTYPE( ze_result_t, ze_module_handle_t, POINTER(ze_module_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeModuleGetFunctionPointer +if __use_win_types: + _zeModuleGetFunctionPointer_t = WINFUNCTYPE( ze_result_t, ze_module_handle_t, c_char_p, POINTER(c_void_p) ) +else: + _zeModuleGetFunctionPointer_t = CFUNCTYPE( ze_result_t, ze_module_handle_t, c_char_p, POINTER(c_void_p) ) + +############################################################################### +## @brief Function-pointer for zeModuleInspectLinkageExt +if __use_win_types: + _zeModuleInspectLinkageExt_t = WINFUNCTYPE( ze_result_t, POINTER(ze_linkage_inspection_ext_desc_t), c_ulong, POINTER(ze_module_handle_t), POINTER(ze_module_build_log_handle_t) ) +else: + _zeModuleInspectLinkageExt_t = CFUNCTYPE( ze_result_t, POINTER(ze_linkage_inspection_ext_desc_t), c_ulong, POINTER(ze_module_handle_t), POINTER(ze_module_build_log_handle_t) ) + + +############################################################################### +## @brief Table of Module functions pointers +class _ze_module_dditable_t(Structure): + _fields_ = [ + ("pfnCreate", c_void_p), ## _zeModuleCreate_t + ("pfnDestroy", c_void_p), ## _zeModuleDestroy_t + ("pfnDynamicLink", c_void_p), ## _zeModuleDynamicLink_t + ("pfnGetNativeBinary", c_void_p), ## _zeModuleGetNativeBinary_t + ("pfnGetGlobalPointer", c_void_p), ## _zeModuleGetGlobalPointer_t + ("pfnGetKernelNames", c_void_p), ## _zeModuleGetKernelNames_t + ("pfnGetProperties", c_void_p), ## _zeModuleGetProperties_t + ("pfnGetFunctionPointer", c_void_p), ## _zeModuleGetFunctionPointer_t + ("pfnInspectLinkageExt", c_void_p) ## _zeModuleInspectLinkageExt_t + ] + +############################################################################### +## @brief Function-pointer for zeModuleBuildLogDestroy +if __use_win_types: + _zeModuleBuildLogDestroy_t = WINFUNCTYPE( ze_result_t, ze_module_build_log_handle_t ) +else: + _zeModuleBuildLogDestroy_t = CFUNCTYPE( ze_result_t, ze_module_build_log_handle_t ) + +############################################################################### +## @brief Function-pointer for zeModuleBuildLogGetString +if __use_win_types: + _zeModuleBuildLogGetString_t = WINFUNCTYPE( ze_result_t, ze_module_build_log_handle_t, POINTER(c_size_t), c_char_p ) +else: + _zeModuleBuildLogGetString_t = CFUNCTYPE( ze_result_t, ze_module_build_log_handle_t, POINTER(c_size_t), c_char_p ) + + +############################################################################### +## @brief Table of ModuleBuildLog functions pointers +class _ze_module_build_log_dditable_t(Structure): + _fields_ = [ + ("pfnDestroy", c_void_p), ## _zeModuleBuildLogDestroy_t + ("pfnGetString", c_void_p) ## _zeModuleBuildLogGetString_t + ] + +############################################################################### +## @brief Function-pointer for zeKernelCreate +if __use_win_types: + _zeKernelCreate_t = WINFUNCTYPE( ze_result_t, ze_module_handle_t, POINTER(ze_kernel_desc_t), POINTER(ze_kernel_handle_t) ) +else: + _zeKernelCreate_t = CFUNCTYPE( ze_result_t, ze_module_handle_t, POINTER(ze_kernel_desc_t), POINTER(ze_kernel_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeKernelDestroy +if __use_win_types: + _zeKernelDestroy_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t ) +else: + _zeKernelDestroy_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t ) + +############################################################################### +## @brief Function-pointer for zeKernelSetCacheConfig +if __use_win_types: + _zeKernelSetCacheConfig_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, ze_cache_config_flags_t ) +else: + _zeKernelSetCacheConfig_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, ze_cache_config_flags_t ) + +############################################################################### +## @brief Function-pointer for zeKernelSetGroupSize +if __use_win_types: + _zeKernelSetGroupSize_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, c_ulong, c_ulong, c_ulong ) +else: + _zeKernelSetGroupSize_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, c_ulong, c_ulong, c_ulong ) + +############################################################################### +## @brief Function-pointer for zeKernelSuggestGroupSize +if __use_win_types: + _zeKernelSuggestGroupSize_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, c_ulong, c_ulong, c_ulong, POINTER(c_ulong), POINTER(c_ulong), POINTER(c_ulong) ) +else: + _zeKernelSuggestGroupSize_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, c_ulong, c_ulong, c_ulong, POINTER(c_ulong), POINTER(c_ulong), POINTER(c_ulong) ) + +############################################################################### +## @brief Function-pointer for zeKernelSuggestMaxCooperativeGroupCount +if __use_win_types: + _zeKernelSuggestMaxCooperativeGroupCount_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(c_ulong) ) +else: + _zeKernelSuggestMaxCooperativeGroupCount_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(c_ulong) ) + +############################################################################### +## @brief Function-pointer for zeKernelSetArgumentValue +if __use_win_types: + _zeKernelSetArgumentValue_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, c_ulong, c_size_t, c_void_p ) +else: + _zeKernelSetArgumentValue_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, c_ulong, c_size_t, c_void_p ) + +############################################################################### +## @brief Function-pointer for zeKernelSetIndirectAccess +if __use_win_types: + _zeKernelSetIndirectAccess_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, ze_kernel_indirect_access_flags_t ) +else: + _zeKernelSetIndirectAccess_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, ze_kernel_indirect_access_flags_t ) + +############################################################################### +## @brief Function-pointer for zeKernelGetIndirectAccess +if __use_win_types: + _zeKernelGetIndirectAccess_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(ze_kernel_indirect_access_flags_t) ) +else: + _zeKernelGetIndirectAccess_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(ze_kernel_indirect_access_flags_t) ) + +############################################################################### +## @brief Function-pointer for zeKernelGetSourceAttributes +if __use_win_types: + _zeKernelGetSourceAttributes_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(c_ulong), POINTER(c_char_p) ) +else: + _zeKernelGetSourceAttributes_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(c_ulong), POINTER(c_char_p) ) + +############################################################################### +## @brief Function-pointer for zeKernelGetProperties +if __use_win_types: + _zeKernelGetProperties_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(ze_kernel_properties_t) ) +else: + _zeKernelGetProperties_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(ze_kernel_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeKernelGetName +if __use_win_types: + _zeKernelGetName_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(c_size_t), c_char_p ) +else: + _zeKernelGetName_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(c_size_t), c_char_p ) + + +############################################################################### +## @brief Table of Kernel functions pointers +class _ze_kernel_dditable_t(Structure): + _fields_ = [ + ("pfnCreate", c_void_p), ## _zeKernelCreate_t + ("pfnDestroy", c_void_p), ## _zeKernelDestroy_t + ("pfnSetCacheConfig", c_void_p), ## _zeKernelSetCacheConfig_t + ("pfnSetGroupSize", c_void_p), ## _zeKernelSetGroupSize_t + ("pfnSuggestGroupSize", c_void_p), ## _zeKernelSuggestGroupSize_t + ("pfnSuggestMaxCooperativeGroupCount", c_void_p), ## _zeKernelSuggestMaxCooperativeGroupCount_t + ("pfnSetArgumentValue", c_void_p), ## _zeKernelSetArgumentValue_t + ("pfnSetIndirectAccess", c_void_p), ## _zeKernelSetIndirectAccess_t + ("pfnGetIndirectAccess", c_void_p), ## _zeKernelGetIndirectAccess_t + ("pfnGetSourceAttributes", c_void_p), ## _zeKernelGetSourceAttributes_t + ("pfnGetProperties", c_void_p), ## _zeKernelGetProperties_t + ("pfnGetName", c_void_p) ## _zeKernelGetName_t + ] + +############################################################################### +## @brief Function-pointer for zeKernelSetGlobalOffsetExp +if __use_win_types: + _zeKernelSetGlobalOffsetExp_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, c_ulong, c_ulong, c_ulong ) +else: + _zeKernelSetGlobalOffsetExp_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, c_ulong, c_ulong, c_ulong ) + +############################################################################### +## @brief Function-pointer for zeKernelSchedulingHintExp +if __use_win_types: + _zeKernelSchedulingHintExp_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(ze_scheduling_hint_exp_desc_t) ) +else: + _zeKernelSchedulingHintExp_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(ze_scheduling_hint_exp_desc_t) ) + +############################################################################### +## @brief Function-pointer for zeKernelGetBinaryExp +if __use_win_types: + _zeKernelGetBinaryExp_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(c_size_t), POINTER(c_ubyte) ) +else: + _zeKernelGetBinaryExp_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(c_size_t), POINTER(c_ubyte) ) + +############################################################################### +## @brief Function-pointer for zeKernelGetAllocationPropertiesExp +if __use_win_types: + _zeKernelGetAllocationPropertiesExp_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(c_ulong), POINTER(ze_kernel_allocation_exp_properties_t) ) +else: + _zeKernelGetAllocationPropertiesExp_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(c_ulong), POINTER(ze_kernel_allocation_exp_properties_t) ) + + +############################################################################### +## @brief Table of KernelExp functions pointers +class _ze_kernel_exp_dditable_t(Structure): + _fields_ = [ + ("pfnSetGlobalOffsetExp", c_void_p), ## _zeKernelSetGlobalOffsetExp_t + ("pfnSchedulingHintExp", c_void_p), ## _zeKernelSchedulingHintExp_t + ("pfnGetBinaryExp", c_void_p), ## _zeKernelGetBinaryExp_t + ("pfnGetAllocationPropertiesExp", c_void_p) ## _zeKernelGetAllocationPropertiesExp_t + ] + +############################################################################### +## @brief Function-pointer for zeSamplerCreate +if __use_win_types: + _zeSamplerCreate_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_sampler_desc_t), POINTER(ze_sampler_handle_t) ) +else: + _zeSamplerCreate_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_sampler_desc_t), POINTER(ze_sampler_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeSamplerDestroy +if __use_win_types: + _zeSamplerDestroy_t = WINFUNCTYPE( ze_result_t, ze_sampler_handle_t ) +else: + _zeSamplerDestroy_t = CFUNCTYPE( ze_result_t, ze_sampler_handle_t ) + + +############################################################################### +## @brief Table of Sampler functions pointers +class _ze_sampler_dditable_t(Structure): + _fields_ = [ + ("pfnCreate", c_void_p), ## _zeSamplerCreate_t + ("pfnDestroy", c_void_p) ## _zeSamplerDestroy_t + ] + +############################################################################### +## @brief Function-pointer for zePhysicalMemCreate +if __use_win_types: + _zePhysicalMemCreate_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_physical_mem_desc_t), POINTER(ze_physical_mem_handle_t) ) +else: + _zePhysicalMemCreate_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_physical_mem_desc_t), POINTER(ze_physical_mem_handle_t) ) + +############################################################################### +## @brief Function-pointer for zePhysicalMemDestroy +if __use_win_types: + _zePhysicalMemDestroy_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_physical_mem_handle_t ) +else: + _zePhysicalMemDestroy_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_physical_mem_handle_t ) + +############################################################################### +## @brief Function-pointer for zePhysicalMemGetProperties +if __use_win_types: + _zePhysicalMemGetProperties_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_physical_mem_handle_t, POINTER(ze_physical_mem_properties_t) ) +else: + _zePhysicalMemGetProperties_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_physical_mem_handle_t, POINTER(ze_physical_mem_properties_t) ) + + +############################################################################### +## @brief Table of PhysicalMem functions pointers +class _ze_physical_mem_dditable_t(Structure): + _fields_ = [ + ("pfnCreate", c_void_p), ## _zePhysicalMemCreate_t + ("pfnDestroy", c_void_p), ## _zePhysicalMemDestroy_t + ("pfnGetProperties", c_void_p) ## _zePhysicalMemGetProperties_t + ] + +############################################################################### +## @brief Function-pointer for zeVirtualMemReserve +if __use_win_types: + _zeVirtualMemReserve_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t, POINTER(c_void_p) ) +else: + _zeVirtualMemReserve_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t, POINTER(c_void_p) ) + +############################################################################### +## @brief Function-pointer for zeVirtualMemFree +if __use_win_types: + _zeVirtualMemFree_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t ) +else: + _zeVirtualMemFree_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t ) + +############################################################################### +## @brief Function-pointer for zeVirtualMemQueryPageSize +if __use_win_types: + _zeVirtualMemQueryPageSize_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_size_t, POINTER(c_size_t) ) +else: + _zeVirtualMemQueryPageSize_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_size_t, POINTER(c_size_t) ) + +############################################################################### +## @brief Function-pointer for zeVirtualMemMap +if __use_win_types: + _zeVirtualMemMap_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t, ze_physical_mem_handle_t, c_size_t, ze_memory_access_attribute_t ) +else: + _zeVirtualMemMap_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t, ze_physical_mem_handle_t, c_size_t, ze_memory_access_attribute_t ) + +############################################################################### +## @brief Function-pointer for zeVirtualMemUnmap +if __use_win_types: + _zeVirtualMemUnmap_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t ) +else: + _zeVirtualMemUnmap_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t ) + +############################################################################### +## @brief Function-pointer for zeVirtualMemSetAccessAttribute +if __use_win_types: + _zeVirtualMemSetAccessAttribute_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t, ze_memory_access_attribute_t ) +else: + _zeVirtualMemSetAccessAttribute_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t, ze_memory_access_attribute_t ) + +############################################################################### +## @brief Function-pointer for zeVirtualMemGetAccessAttribute +if __use_win_types: + _zeVirtualMemGetAccessAttribute_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t, POINTER(ze_memory_access_attribute_t), POINTER(c_size_t) ) +else: + _zeVirtualMemGetAccessAttribute_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t, POINTER(ze_memory_access_attribute_t), POINTER(c_size_t) ) + + +############################################################################### +## @brief Table of VirtualMem functions pointers +class _ze_virtual_mem_dditable_t(Structure): + _fields_ = [ + ("pfnReserve", c_void_p), ## _zeVirtualMemReserve_t + ("pfnFree", c_void_p), ## _zeVirtualMemFree_t + ("pfnQueryPageSize", c_void_p), ## _zeVirtualMemQueryPageSize_t + ("pfnMap", c_void_p), ## _zeVirtualMemMap_t + ("pfnUnmap", c_void_p), ## _zeVirtualMemUnmap_t + ("pfnSetAccessAttribute", c_void_p), ## _zeVirtualMemSetAccessAttribute_t + ("pfnGetAccessAttribute", c_void_p) ## _zeVirtualMemGetAccessAttribute_t + ] + +############################################################################### +## @brief Function-pointer for zeFabricVertexGetExp +if __use_win_types: + _zeFabricVertexGetExp_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(c_ulong), POINTER(ze_fabric_vertex_handle_t) ) +else: + _zeFabricVertexGetExp_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(c_ulong), POINTER(ze_fabric_vertex_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeFabricVertexGetSubVerticesExp +if __use_win_types: + _zeFabricVertexGetSubVerticesExp_t = WINFUNCTYPE( ze_result_t, ze_fabric_vertex_handle_t, POINTER(c_ulong), POINTER(ze_fabric_vertex_handle_t) ) +else: + _zeFabricVertexGetSubVerticesExp_t = CFUNCTYPE( ze_result_t, ze_fabric_vertex_handle_t, POINTER(c_ulong), POINTER(ze_fabric_vertex_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeFabricVertexGetPropertiesExp +if __use_win_types: + _zeFabricVertexGetPropertiesExp_t = WINFUNCTYPE( ze_result_t, ze_fabric_vertex_handle_t, POINTER(ze_fabric_vertex_exp_properties_t) ) +else: + _zeFabricVertexGetPropertiesExp_t = CFUNCTYPE( ze_result_t, ze_fabric_vertex_handle_t, POINTER(ze_fabric_vertex_exp_properties_t) ) + +############################################################################### +## @brief Function-pointer for zeFabricVertexGetDeviceExp +if __use_win_types: + _zeFabricVertexGetDeviceExp_t = WINFUNCTYPE( ze_result_t, ze_fabric_vertex_handle_t, POINTER(ze_device_handle_t) ) +else: + _zeFabricVertexGetDeviceExp_t = CFUNCTYPE( ze_result_t, ze_fabric_vertex_handle_t, POINTER(ze_device_handle_t) ) + + +############################################################################### +## @brief Table of FabricVertexExp functions pointers +class _ze_fabric_vertex_exp_dditable_t(Structure): + _fields_ = [ + ("pfnGetExp", c_void_p), ## _zeFabricVertexGetExp_t + ("pfnGetSubVerticesExp", c_void_p), ## _zeFabricVertexGetSubVerticesExp_t + ("pfnGetPropertiesExp", c_void_p), ## _zeFabricVertexGetPropertiesExp_t + ("pfnGetDeviceExp", c_void_p) ## _zeFabricVertexGetDeviceExp_t + ] + +############################################################################### +## @brief Function-pointer for zeFabricEdgeGetExp +if __use_win_types: + _zeFabricEdgeGetExp_t = WINFUNCTYPE( ze_result_t, ze_fabric_vertex_handle_t, ze_fabric_vertex_handle_t, POINTER(c_ulong), POINTER(ze_fabric_edge_handle_t) ) +else: + _zeFabricEdgeGetExp_t = CFUNCTYPE( ze_result_t, ze_fabric_vertex_handle_t, ze_fabric_vertex_handle_t, POINTER(c_ulong), POINTER(ze_fabric_edge_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeFabricEdgeGetVerticesExp +if __use_win_types: + _zeFabricEdgeGetVerticesExp_t = WINFUNCTYPE( ze_result_t, ze_fabric_edge_handle_t, POINTER(ze_fabric_vertex_handle_t), POINTER(ze_fabric_vertex_handle_t) ) +else: + _zeFabricEdgeGetVerticesExp_t = CFUNCTYPE( ze_result_t, ze_fabric_edge_handle_t, POINTER(ze_fabric_vertex_handle_t), POINTER(ze_fabric_vertex_handle_t) ) + +############################################################################### +## @brief Function-pointer for zeFabricEdgeGetPropertiesExp +if __use_win_types: + _zeFabricEdgeGetPropertiesExp_t = WINFUNCTYPE( ze_result_t, ze_fabric_edge_handle_t, POINTER(ze_fabric_edge_exp_properties_t) ) +else: + _zeFabricEdgeGetPropertiesExp_t = CFUNCTYPE( ze_result_t, ze_fabric_edge_handle_t, POINTER(ze_fabric_edge_exp_properties_t) ) + + +############################################################################### +## @brief Table of FabricEdgeExp functions pointers +class _ze_fabric_edge_exp_dditable_t(Structure): + _fields_ = [ + ("pfnGetExp", c_void_p), ## _zeFabricEdgeGetExp_t + ("pfnGetVerticesExp", c_void_p), ## _zeFabricEdgeGetVerticesExp_t + ("pfnGetPropertiesExp", c_void_p) ## _zeFabricEdgeGetPropertiesExp_t + ] + +############################################################################### +class _ze_dditable_t(Structure): + _fields_ = [ + ("RTASBuilder", _ze_rtas_builder_dditable_t), + ("RTASBuilderExp", _ze_rtas_builder_exp_dditable_t), + ("RTASParallelOperation", _ze_rtas_parallel_operation_dditable_t), + ("RTASParallelOperationExp", _ze_rtas_parallel_operation_exp_dditable_t), + ("Global", _ze_global_dditable_t), + ("Driver", _ze_driver_dditable_t), + ("DriverExp", _ze_driver_exp_dditable_t), + ("Device", _ze_device_dditable_t), + ("DeviceExp", _ze_device_exp_dditable_t), + ("Context", _ze_context_dditable_t), + ("CommandQueue", _ze_command_queue_dditable_t), + ("CommandList", _ze_command_list_dditable_t), + ("CommandListExp", _ze_command_list_exp_dditable_t), + ("Image", _ze_image_dditable_t), + ("ImageExp", _ze_image_exp_dditable_t), + ("Mem", _ze_mem_dditable_t), + ("MemExp", _ze_mem_exp_dditable_t), + ("Fence", _ze_fence_dditable_t), + ("EventPool", _ze_event_pool_dditable_t), + ("Event", _ze_event_dditable_t), + ("EventExp", _ze_event_exp_dditable_t), + ("Module", _ze_module_dditable_t), + ("ModuleBuildLog", _ze_module_build_log_dditable_t), + ("Kernel", _ze_kernel_dditable_t), + ("KernelExp", _ze_kernel_exp_dditable_t), + ("Sampler", _ze_sampler_dditable_t), + ("PhysicalMem", _ze_physical_mem_dditable_t), + ("VirtualMem", _ze_virtual_mem_dditable_t), + ("FabricVertexExp", _ze_fabric_vertex_exp_dditable_t), + ("FabricEdgeExp", _ze_fabric_edge_exp_dditable_t) + ] + +############################################################################### +## @brief ze device-driver interfaces +class ZE_DDI: + def __init__(self, version : ze_api_version_t): + # load the ze_loader library + if "Windows" == platform.uname()[0]: + self.__dll = WinDLL("ze_loader.dll") + else: + self.__dll = CDLL("ze_loader.so") + + # fill the ddi tables + self.__dditable = _ze_dditable_t() + + # call driver to get function pointers + _RTASBuilder = _ze_rtas_builder_dditable_t() + r = ze_result_v(self.__dll.zeGetRTASBuilderProcAddrTable(version, byref(_RTASBuilder))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.RTASBuilder = _RTASBuilder + + # attach function interface to function address + self.zeRTASBuilderCreateExt = _zeRTASBuilderCreateExt_t(self.__dditable.RTASBuilder.pfnCreateExt) + self.zeRTASBuilderGetBuildPropertiesExt = _zeRTASBuilderGetBuildPropertiesExt_t(self.__dditable.RTASBuilder.pfnGetBuildPropertiesExt) + self.zeRTASBuilderBuildExt = _zeRTASBuilderBuildExt_t(self.__dditable.RTASBuilder.pfnBuildExt) + self.zeRTASBuilderCommandListAppendCopyExt = _zeRTASBuilderCommandListAppendCopyExt_t(self.__dditable.RTASBuilder.pfnCommandListAppendCopyExt) + self.zeRTASBuilderDestroyExt = _zeRTASBuilderDestroyExt_t(self.__dditable.RTASBuilder.pfnDestroyExt) + + # call driver to get function pointers + _RTASBuilderExp = _ze_rtas_builder_exp_dditable_t() + r = ze_result_v(self.__dll.zeGetRTASBuilderExpProcAddrTable(version, byref(_RTASBuilderExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.RTASBuilderExp = _RTASBuilderExp + + # attach function interface to function address + self.zeRTASBuilderCreateExp = _zeRTASBuilderCreateExp_t(self.__dditable.RTASBuilderExp.pfnCreateExp) + self.zeRTASBuilderGetBuildPropertiesExp = _zeRTASBuilderGetBuildPropertiesExp_t(self.__dditable.RTASBuilderExp.pfnGetBuildPropertiesExp) + self.zeRTASBuilderBuildExp = _zeRTASBuilderBuildExp_t(self.__dditable.RTASBuilderExp.pfnBuildExp) + self.zeRTASBuilderDestroyExp = _zeRTASBuilderDestroyExp_t(self.__dditable.RTASBuilderExp.pfnDestroyExp) + + # call driver to get function pointers + _RTASParallelOperation = _ze_rtas_parallel_operation_dditable_t() + r = ze_result_v(self.__dll.zeGetRTASParallelOperationProcAddrTable(version, byref(_RTASParallelOperation))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.RTASParallelOperation = _RTASParallelOperation + + # attach function interface to function address + self.zeRTASParallelOperationCreateExt = _zeRTASParallelOperationCreateExt_t(self.__dditable.RTASParallelOperation.pfnCreateExt) + self.zeRTASParallelOperationGetPropertiesExt = _zeRTASParallelOperationGetPropertiesExt_t(self.__dditable.RTASParallelOperation.pfnGetPropertiesExt) + self.zeRTASParallelOperationJoinExt = _zeRTASParallelOperationJoinExt_t(self.__dditable.RTASParallelOperation.pfnJoinExt) + self.zeRTASParallelOperationDestroyExt = _zeRTASParallelOperationDestroyExt_t(self.__dditable.RTASParallelOperation.pfnDestroyExt) + + # call driver to get function pointers + _RTASParallelOperationExp = _ze_rtas_parallel_operation_exp_dditable_t() + r = ze_result_v(self.__dll.zeGetRTASParallelOperationExpProcAddrTable(version, byref(_RTASParallelOperationExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.RTASParallelOperationExp = _RTASParallelOperationExp + + # attach function interface to function address + self.zeRTASParallelOperationCreateExp = _zeRTASParallelOperationCreateExp_t(self.__dditable.RTASParallelOperationExp.pfnCreateExp) + self.zeRTASParallelOperationGetPropertiesExp = _zeRTASParallelOperationGetPropertiesExp_t(self.__dditable.RTASParallelOperationExp.pfnGetPropertiesExp) + self.zeRTASParallelOperationJoinExp = _zeRTASParallelOperationJoinExp_t(self.__dditable.RTASParallelOperationExp.pfnJoinExp) + self.zeRTASParallelOperationDestroyExp = _zeRTASParallelOperationDestroyExp_t(self.__dditable.RTASParallelOperationExp.pfnDestroyExp) + + # call driver to get function pointers + _Global = _ze_global_dditable_t() + r = ze_result_v(self.__dll.zeGetGlobalProcAddrTable(version, byref(_Global))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Global = _Global + + # attach function interface to function address + self.zeInit = _zeInit_t(self.__dditable.Global.pfnInit) + self.zeInitDrivers = _zeInitDrivers_t(self.__dditable.Global.pfnInitDrivers) + + # call driver to get function pointers + _Driver = _ze_driver_dditable_t() + r = ze_result_v(self.__dll.zeGetDriverProcAddrTable(version, byref(_Driver))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Driver = _Driver + + # attach function interface to function address + self.zeDriverGet = _zeDriverGet_t(self.__dditable.Driver.pfnGet) + self.zeDriverGetApiVersion = _zeDriverGetApiVersion_t(self.__dditable.Driver.pfnGetApiVersion) + self.zeDriverGetProperties = _zeDriverGetProperties_t(self.__dditable.Driver.pfnGetProperties) + self.zeDriverGetIpcProperties = _zeDriverGetIpcProperties_t(self.__dditable.Driver.pfnGetIpcProperties) + self.zeDriverGetExtensionProperties = _zeDriverGetExtensionProperties_t(self.__dditable.Driver.pfnGetExtensionProperties) + self.zeDriverGetExtensionFunctionAddress = _zeDriverGetExtensionFunctionAddress_t(self.__dditable.Driver.pfnGetExtensionFunctionAddress) + self.zeDriverGetLastErrorDescription = _zeDriverGetLastErrorDescription_t(self.__dditable.Driver.pfnGetLastErrorDescription) + self.zeDriverRTASFormatCompatibilityCheckExt = _zeDriverRTASFormatCompatibilityCheckExt_t(self.__dditable.Driver.pfnRTASFormatCompatibilityCheckExt) + self.zeDriverGetDefaultContext = _zeDriverGetDefaultContext_t(self.__dditable.Driver.pfnGetDefaultContext) + + # call driver to get function pointers + _DriverExp = _ze_driver_exp_dditable_t() + r = ze_result_v(self.__dll.zeGetDriverExpProcAddrTable(version, byref(_DriverExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.DriverExp = _DriverExp + + # attach function interface to function address + self.zeDriverRTASFormatCompatibilityCheckExp = _zeDriverRTASFormatCompatibilityCheckExp_t(self.__dditable.DriverExp.pfnRTASFormatCompatibilityCheckExp) + + # call driver to get function pointers + _Device = _ze_device_dditable_t() + r = ze_result_v(self.__dll.zeGetDeviceProcAddrTable(version, byref(_Device))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Device = _Device + + # attach function interface to function address + self.zeDeviceGet = _zeDeviceGet_t(self.__dditable.Device.pfnGet) + self.zeDeviceGetSubDevices = _zeDeviceGetSubDevices_t(self.__dditable.Device.pfnGetSubDevices) + self.zeDeviceGetProperties = _zeDeviceGetProperties_t(self.__dditable.Device.pfnGetProperties) + self.zeDeviceGetComputeProperties = _zeDeviceGetComputeProperties_t(self.__dditable.Device.pfnGetComputeProperties) + self.zeDeviceGetModuleProperties = _zeDeviceGetModuleProperties_t(self.__dditable.Device.pfnGetModuleProperties) + self.zeDeviceGetCommandQueueGroupProperties = _zeDeviceGetCommandQueueGroupProperties_t(self.__dditable.Device.pfnGetCommandQueueGroupProperties) + self.zeDeviceGetMemoryProperties = _zeDeviceGetMemoryProperties_t(self.__dditable.Device.pfnGetMemoryProperties) + self.zeDeviceGetMemoryAccessProperties = _zeDeviceGetMemoryAccessProperties_t(self.__dditable.Device.pfnGetMemoryAccessProperties) + self.zeDeviceGetCacheProperties = _zeDeviceGetCacheProperties_t(self.__dditable.Device.pfnGetCacheProperties) + self.zeDeviceGetImageProperties = _zeDeviceGetImageProperties_t(self.__dditable.Device.pfnGetImageProperties) + self.zeDeviceGetExternalMemoryProperties = _zeDeviceGetExternalMemoryProperties_t(self.__dditable.Device.pfnGetExternalMemoryProperties) + self.zeDeviceGetP2PProperties = _zeDeviceGetP2PProperties_t(self.__dditable.Device.pfnGetP2PProperties) + self.zeDeviceCanAccessPeer = _zeDeviceCanAccessPeer_t(self.__dditable.Device.pfnCanAccessPeer) + self.zeDeviceGetStatus = _zeDeviceGetStatus_t(self.__dditable.Device.pfnGetStatus) + self.zeDeviceGetGlobalTimestamps = _zeDeviceGetGlobalTimestamps_t(self.__dditable.Device.pfnGetGlobalTimestamps) + self.zeDeviceReserveCacheExt = _zeDeviceReserveCacheExt_t(self.__dditable.Device.pfnReserveCacheExt) + self.zeDeviceSetCacheAdviceExt = _zeDeviceSetCacheAdviceExt_t(self.__dditable.Device.pfnSetCacheAdviceExt) + self.zeDevicePciGetPropertiesExt = _zeDevicePciGetPropertiesExt_t(self.__dditable.Device.pfnPciGetPropertiesExt) + self.zeDeviceGetRootDevice = _zeDeviceGetRootDevice_t(self.__dditable.Device.pfnGetRootDevice) + self.zeDeviceImportExternalSemaphoreExt = _zeDeviceImportExternalSemaphoreExt_t(self.__dditable.Device.pfnImportExternalSemaphoreExt) + self.zeDeviceReleaseExternalSemaphoreExt = _zeDeviceReleaseExternalSemaphoreExt_t(self.__dditable.Device.pfnReleaseExternalSemaphoreExt) + self.zeDeviceGetVectorWidthPropertiesExt = _zeDeviceGetVectorWidthPropertiesExt_t(self.__dditable.Device.pfnGetVectorWidthPropertiesExt) + self.zeDeviceSynchronize = _zeDeviceSynchronize_t(self.__dditable.Device.pfnSynchronize) + self.zeDeviceGetAggregatedCopyOffloadIncrementValue = _zeDeviceGetAggregatedCopyOffloadIncrementValue_t(self.__dditable.Device.pfnGetAggregatedCopyOffloadIncrementValue) + + # call driver to get function pointers + _DeviceExp = _ze_device_exp_dditable_t() + r = ze_result_v(self.__dll.zeGetDeviceExpProcAddrTable(version, byref(_DeviceExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.DeviceExp = _DeviceExp + + # attach function interface to function address + self.zeDeviceGetFabricVertexExp = _zeDeviceGetFabricVertexExp_t(self.__dditable.DeviceExp.pfnGetFabricVertexExp) + + # call driver to get function pointers + _Context = _ze_context_dditable_t() + r = ze_result_v(self.__dll.zeGetContextProcAddrTable(version, byref(_Context))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Context = _Context + + # attach function interface to function address + self.zeContextCreate = _zeContextCreate_t(self.__dditable.Context.pfnCreate) + self.zeContextDestroy = _zeContextDestroy_t(self.__dditable.Context.pfnDestroy) + self.zeContextGetStatus = _zeContextGetStatus_t(self.__dditable.Context.pfnGetStatus) + self.zeContextSystemBarrier = _zeContextSystemBarrier_t(self.__dditable.Context.pfnSystemBarrier) + self.zeContextMakeMemoryResident = _zeContextMakeMemoryResident_t(self.__dditable.Context.pfnMakeMemoryResident) + self.zeContextEvictMemory = _zeContextEvictMemory_t(self.__dditable.Context.pfnEvictMemory) + self.zeContextMakeImageResident = _zeContextMakeImageResident_t(self.__dditable.Context.pfnMakeImageResident) + self.zeContextEvictImage = _zeContextEvictImage_t(self.__dditable.Context.pfnEvictImage) + self.zeContextCreateEx = _zeContextCreateEx_t(self.__dditable.Context.pfnCreateEx) + + # call driver to get function pointers + _CommandQueue = _ze_command_queue_dditable_t() + r = ze_result_v(self.__dll.zeGetCommandQueueProcAddrTable(version, byref(_CommandQueue))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.CommandQueue = _CommandQueue + + # attach function interface to function address + self.zeCommandQueueCreate = _zeCommandQueueCreate_t(self.__dditable.CommandQueue.pfnCreate) + self.zeCommandQueueDestroy = _zeCommandQueueDestroy_t(self.__dditable.CommandQueue.pfnDestroy) + self.zeCommandQueueExecuteCommandLists = _zeCommandQueueExecuteCommandLists_t(self.__dditable.CommandQueue.pfnExecuteCommandLists) + self.zeCommandQueueSynchronize = _zeCommandQueueSynchronize_t(self.__dditable.CommandQueue.pfnSynchronize) + self.zeCommandQueueGetOrdinal = _zeCommandQueueGetOrdinal_t(self.__dditable.CommandQueue.pfnGetOrdinal) + self.zeCommandQueueGetIndex = _zeCommandQueueGetIndex_t(self.__dditable.CommandQueue.pfnGetIndex) + + # call driver to get function pointers + _CommandList = _ze_command_list_dditable_t() + r = ze_result_v(self.__dll.zeGetCommandListProcAddrTable(version, byref(_CommandList))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.CommandList = _CommandList + + # attach function interface to function address + self.zeCommandListCreate = _zeCommandListCreate_t(self.__dditable.CommandList.pfnCreate) + self.zeCommandListCreateImmediate = _zeCommandListCreateImmediate_t(self.__dditable.CommandList.pfnCreateImmediate) + self.zeCommandListDestroy = _zeCommandListDestroy_t(self.__dditable.CommandList.pfnDestroy) + self.zeCommandListClose = _zeCommandListClose_t(self.__dditable.CommandList.pfnClose) + self.zeCommandListReset = _zeCommandListReset_t(self.__dditable.CommandList.pfnReset) + self.zeCommandListAppendWriteGlobalTimestamp = _zeCommandListAppendWriteGlobalTimestamp_t(self.__dditable.CommandList.pfnAppendWriteGlobalTimestamp) + self.zeCommandListAppendBarrier = _zeCommandListAppendBarrier_t(self.__dditable.CommandList.pfnAppendBarrier) + self.zeCommandListAppendMemoryRangesBarrier = _zeCommandListAppendMemoryRangesBarrier_t(self.__dditable.CommandList.pfnAppendMemoryRangesBarrier) + self.zeCommandListAppendMemoryCopy = _zeCommandListAppendMemoryCopy_t(self.__dditable.CommandList.pfnAppendMemoryCopy) + self.zeCommandListAppendMemoryFill = _zeCommandListAppendMemoryFill_t(self.__dditable.CommandList.pfnAppendMemoryFill) + self.zeCommandListAppendMemoryCopyRegion = _zeCommandListAppendMemoryCopyRegion_t(self.__dditable.CommandList.pfnAppendMemoryCopyRegion) + self.zeCommandListAppendMemoryCopyFromContext = _zeCommandListAppendMemoryCopyFromContext_t(self.__dditable.CommandList.pfnAppendMemoryCopyFromContext) + self.zeCommandListAppendImageCopy = _zeCommandListAppendImageCopy_t(self.__dditable.CommandList.pfnAppendImageCopy) + self.zeCommandListAppendImageCopyRegion = _zeCommandListAppendImageCopyRegion_t(self.__dditable.CommandList.pfnAppendImageCopyRegion) + self.zeCommandListAppendImageCopyToMemory = _zeCommandListAppendImageCopyToMemory_t(self.__dditable.CommandList.pfnAppendImageCopyToMemory) + self.zeCommandListAppendImageCopyFromMemory = _zeCommandListAppendImageCopyFromMemory_t(self.__dditable.CommandList.pfnAppendImageCopyFromMemory) + self.zeCommandListAppendMemoryPrefetch = _zeCommandListAppendMemoryPrefetch_t(self.__dditable.CommandList.pfnAppendMemoryPrefetch) + self.zeCommandListAppendMemAdvise = _zeCommandListAppendMemAdvise_t(self.__dditable.CommandList.pfnAppendMemAdvise) + self.zeCommandListAppendSignalEvent = _zeCommandListAppendSignalEvent_t(self.__dditable.CommandList.pfnAppendSignalEvent) + self.zeCommandListAppendWaitOnEvents = _zeCommandListAppendWaitOnEvents_t(self.__dditable.CommandList.pfnAppendWaitOnEvents) + self.zeCommandListAppendEventReset = _zeCommandListAppendEventReset_t(self.__dditable.CommandList.pfnAppendEventReset) + self.zeCommandListAppendQueryKernelTimestamps = _zeCommandListAppendQueryKernelTimestamps_t(self.__dditable.CommandList.pfnAppendQueryKernelTimestamps) + self.zeCommandListAppendLaunchKernel = _zeCommandListAppendLaunchKernel_t(self.__dditable.CommandList.pfnAppendLaunchKernel) + self.zeCommandListAppendLaunchCooperativeKernel = _zeCommandListAppendLaunchCooperativeKernel_t(self.__dditable.CommandList.pfnAppendLaunchCooperativeKernel) + self.zeCommandListAppendLaunchKernelIndirect = _zeCommandListAppendLaunchKernelIndirect_t(self.__dditable.CommandList.pfnAppendLaunchKernelIndirect) + self.zeCommandListAppendLaunchMultipleKernelsIndirect = _zeCommandListAppendLaunchMultipleKernelsIndirect_t(self.__dditable.CommandList.pfnAppendLaunchMultipleKernelsIndirect) + self.zeCommandListAppendImageCopyToMemoryExt = _zeCommandListAppendImageCopyToMemoryExt_t(self.__dditable.CommandList.pfnAppendImageCopyToMemoryExt) + self.zeCommandListAppendImageCopyFromMemoryExt = _zeCommandListAppendImageCopyFromMemoryExt_t(self.__dditable.CommandList.pfnAppendImageCopyFromMemoryExt) + self.zeCommandListHostSynchronize = _zeCommandListHostSynchronize_t(self.__dditable.CommandList.pfnHostSynchronize) + self.zeCommandListGetDeviceHandle = _zeCommandListGetDeviceHandle_t(self.__dditable.CommandList.pfnGetDeviceHandle) + self.zeCommandListGetContextHandle = _zeCommandListGetContextHandle_t(self.__dditable.CommandList.pfnGetContextHandle) + self.zeCommandListGetOrdinal = _zeCommandListGetOrdinal_t(self.__dditable.CommandList.pfnGetOrdinal) + self.zeCommandListImmediateGetIndex = _zeCommandListImmediateGetIndex_t(self.__dditable.CommandList.pfnImmediateGetIndex) + self.zeCommandListIsImmediate = _zeCommandListIsImmediate_t(self.__dditable.CommandList.pfnIsImmediate) + self.zeCommandListAppendSignalExternalSemaphoreExt = _zeCommandListAppendSignalExternalSemaphoreExt_t(self.__dditable.CommandList.pfnAppendSignalExternalSemaphoreExt) + self.zeCommandListAppendWaitExternalSemaphoreExt = _zeCommandListAppendWaitExternalSemaphoreExt_t(self.__dditable.CommandList.pfnAppendWaitExternalSemaphoreExt) + self.zeCommandListAppendLaunchKernelWithParameters = _zeCommandListAppendLaunchKernelWithParameters_t(self.__dditable.CommandList.pfnAppendLaunchKernelWithParameters) + self.zeCommandListAppendLaunchKernelWithArguments = _zeCommandListAppendLaunchKernelWithArguments_t(self.__dditable.CommandList.pfnAppendLaunchKernelWithArguments) + + # call driver to get function pointers + _CommandListExp = _ze_command_list_exp_dditable_t() + r = ze_result_v(self.__dll.zeGetCommandListExpProcAddrTable(version, byref(_CommandListExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.CommandListExp = _CommandListExp + + # attach function interface to function address + self.zeCommandListCreateCloneExp = _zeCommandListCreateCloneExp_t(self.__dditable.CommandListExp.pfnCreateCloneExp) + self.zeCommandListImmediateAppendCommandListsExp = _zeCommandListImmediateAppendCommandListsExp_t(self.__dditable.CommandListExp.pfnImmediateAppendCommandListsExp) + self.zeCommandListGetNextCommandIdExp = _zeCommandListGetNextCommandIdExp_t(self.__dditable.CommandListExp.pfnGetNextCommandIdExp) + self.zeCommandListUpdateMutableCommandsExp = _zeCommandListUpdateMutableCommandsExp_t(self.__dditable.CommandListExp.pfnUpdateMutableCommandsExp) + self.zeCommandListUpdateMutableCommandSignalEventExp = _zeCommandListUpdateMutableCommandSignalEventExp_t(self.__dditable.CommandListExp.pfnUpdateMutableCommandSignalEventExp) + self.zeCommandListUpdateMutableCommandWaitEventsExp = _zeCommandListUpdateMutableCommandWaitEventsExp_t(self.__dditable.CommandListExp.pfnUpdateMutableCommandWaitEventsExp) + self.zeCommandListGetNextCommandIdWithKernelsExp = _zeCommandListGetNextCommandIdWithKernelsExp_t(self.__dditable.CommandListExp.pfnGetNextCommandIdWithKernelsExp) + self.zeCommandListUpdateMutableCommandKernelsExp = _zeCommandListUpdateMutableCommandKernelsExp_t(self.__dditable.CommandListExp.pfnUpdateMutableCommandKernelsExp) + + # call driver to get function pointers + _Image = _ze_image_dditable_t() + r = ze_result_v(self.__dll.zeGetImageProcAddrTable(version, byref(_Image))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Image = _Image + + # attach function interface to function address + self.zeImageGetProperties = _zeImageGetProperties_t(self.__dditable.Image.pfnGetProperties) + self.zeImageCreate = _zeImageCreate_t(self.__dditable.Image.pfnCreate) + self.zeImageDestroy = _zeImageDestroy_t(self.__dditable.Image.pfnDestroy) + self.zeImageGetAllocPropertiesExt = _zeImageGetAllocPropertiesExt_t(self.__dditable.Image.pfnGetAllocPropertiesExt) + self.zeImageViewCreateExt = _zeImageViewCreateExt_t(self.__dditable.Image.pfnViewCreateExt) + + # call driver to get function pointers + _ImageExp = _ze_image_exp_dditable_t() + r = ze_result_v(self.__dll.zeGetImageExpProcAddrTable(version, byref(_ImageExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.ImageExp = _ImageExp + + # attach function interface to function address + self.zeImageGetMemoryPropertiesExp = _zeImageGetMemoryPropertiesExp_t(self.__dditable.ImageExp.pfnGetMemoryPropertiesExp) + self.zeImageViewCreateExp = _zeImageViewCreateExp_t(self.__dditable.ImageExp.pfnViewCreateExp) + self.zeImageGetDeviceOffsetExp = _zeImageGetDeviceOffsetExp_t(self.__dditable.ImageExp.pfnGetDeviceOffsetExp) + + # call driver to get function pointers + _Mem = _ze_mem_dditable_t() + r = ze_result_v(self.__dll.zeGetMemProcAddrTable(version, byref(_Mem))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Mem = _Mem + + # attach function interface to function address + self.zeMemAllocShared = _zeMemAllocShared_t(self.__dditable.Mem.pfnAllocShared) + self.zeMemAllocDevice = _zeMemAllocDevice_t(self.__dditable.Mem.pfnAllocDevice) + self.zeMemAllocHost = _zeMemAllocHost_t(self.__dditable.Mem.pfnAllocHost) + self.zeMemFree = _zeMemFree_t(self.__dditable.Mem.pfnFree) + self.zeMemGetAllocProperties = _zeMemGetAllocProperties_t(self.__dditable.Mem.pfnGetAllocProperties) + self.zeMemGetAddressRange = _zeMemGetAddressRange_t(self.__dditable.Mem.pfnGetAddressRange) + self.zeMemGetIpcHandle = _zeMemGetIpcHandle_t(self.__dditable.Mem.pfnGetIpcHandle) + self.zeMemOpenIpcHandle = _zeMemOpenIpcHandle_t(self.__dditable.Mem.pfnOpenIpcHandle) + self.zeMemCloseIpcHandle = _zeMemCloseIpcHandle_t(self.__dditable.Mem.pfnCloseIpcHandle) + self.zeMemFreeExt = _zeMemFreeExt_t(self.__dditable.Mem.pfnFreeExt) + self.zeMemPutIpcHandle = _zeMemPutIpcHandle_t(self.__dditable.Mem.pfnPutIpcHandle) + self.zeMemGetPitchFor2dImage = _zeMemGetPitchFor2dImage_t(self.__dditable.Mem.pfnGetPitchFor2dImage) + self.zeMemGetIpcHandleWithProperties = _zeMemGetIpcHandleWithProperties_t(self.__dditable.Mem.pfnGetIpcHandleWithProperties) + + # call driver to get function pointers + _MemExp = _ze_mem_exp_dditable_t() + r = ze_result_v(self.__dll.zeGetMemExpProcAddrTable(version, byref(_MemExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.MemExp = _MemExp + + # attach function interface to function address + self.zeMemGetIpcHandleFromFileDescriptorExp = _zeMemGetIpcHandleFromFileDescriptorExp_t(self.__dditable.MemExp.pfnGetIpcHandleFromFileDescriptorExp) + self.zeMemGetFileDescriptorFromIpcHandleExp = _zeMemGetFileDescriptorFromIpcHandleExp_t(self.__dditable.MemExp.pfnGetFileDescriptorFromIpcHandleExp) + self.zeMemSetAtomicAccessAttributeExp = _zeMemSetAtomicAccessAttributeExp_t(self.__dditable.MemExp.pfnSetAtomicAccessAttributeExp) + self.zeMemGetAtomicAccessAttributeExp = _zeMemGetAtomicAccessAttributeExp_t(self.__dditable.MemExp.pfnGetAtomicAccessAttributeExp) + + # call driver to get function pointers + _Fence = _ze_fence_dditable_t() + r = ze_result_v(self.__dll.zeGetFenceProcAddrTable(version, byref(_Fence))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Fence = _Fence + + # attach function interface to function address + self.zeFenceCreate = _zeFenceCreate_t(self.__dditable.Fence.pfnCreate) + self.zeFenceDestroy = _zeFenceDestroy_t(self.__dditable.Fence.pfnDestroy) + self.zeFenceHostSynchronize = _zeFenceHostSynchronize_t(self.__dditable.Fence.pfnHostSynchronize) + self.zeFenceQueryStatus = _zeFenceQueryStatus_t(self.__dditable.Fence.pfnQueryStatus) + self.zeFenceReset = _zeFenceReset_t(self.__dditable.Fence.pfnReset) + + # call driver to get function pointers + _EventPool = _ze_event_pool_dditable_t() + r = ze_result_v(self.__dll.zeGetEventPoolProcAddrTable(version, byref(_EventPool))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.EventPool = _EventPool + + # attach function interface to function address + self.zeEventPoolCreate = _zeEventPoolCreate_t(self.__dditable.EventPool.pfnCreate) + self.zeEventPoolDestroy = _zeEventPoolDestroy_t(self.__dditable.EventPool.pfnDestroy) + self.zeEventPoolGetIpcHandle = _zeEventPoolGetIpcHandle_t(self.__dditable.EventPool.pfnGetIpcHandle) + self.zeEventPoolOpenIpcHandle = _zeEventPoolOpenIpcHandle_t(self.__dditable.EventPool.pfnOpenIpcHandle) + self.zeEventPoolCloseIpcHandle = _zeEventPoolCloseIpcHandle_t(self.__dditable.EventPool.pfnCloseIpcHandle) + self.zeEventPoolPutIpcHandle = _zeEventPoolPutIpcHandle_t(self.__dditable.EventPool.pfnPutIpcHandle) + self.zeEventPoolGetContextHandle = _zeEventPoolGetContextHandle_t(self.__dditable.EventPool.pfnGetContextHandle) + self.zeEventPoolGetFlags = _zeEventPoolGetFlags_t(self.__dditable.EventPool.pfnGetFlags) + + # call driver to get function pointers + _Event = _ze_event_dditable_t() + r = ze_result_v(self.__dll.zeGetEventProcAddrTable(version, byref(_Event))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Event = _Event + + # attach function interface to function address + self.zeEventCreate = _zeEventCreate_t(self.__dditable.Event.pfnCreate) + self.zeEventDestroy = _zeEventDestroy_t(self.__dditable.Event.pfnDestroy) + self.zeEventHostSignal = _zeEventHostSignal_t(self.__dditable.Event.pfnHostSignal) + self.zeEventHostSynchronize = _zeEventHostSynchronize_t(self.__dditable.Event.pfnHostSynchronize) + self.zeEventQueryStatus = _zeEventQueryStatus_t(self.__dditable.Event.pfnQueryStatus) + self.zeEventHostReset = _zeEventHostReset_t(self.__dditable.Event.pfnHostReset) + self.zeEventQueryKernelTimestamp = _zeEventQueryKernelTimestamp_t(self.__dditable.Event.pfnQueryKernelTimestamp) + self.zeEventQueryKernelTimestampsExt = _zeEventQueryKernelTimestampsExt_t(self.__dditable.Event.pfnQueryKernelTimestampsExt) + self.zeEventGetEventPool = _zeEventGetEventPool_t(self.__dditable.Event.pfnGetEventPool) + self.zeEventGetSignalScope = _zeEventGetSignalScope_t(self.__dditable.Event.pfnGetSignalScope) + self.zeEventGetWaitScope = _zeEventGetWaitScope_t(self.__dditable.Event.pfnGetWaitScope) + self.zeEventCounterBasedCreate = _zeEventCounterBasedCreate_t(self.__dditable.Event.pfnCounterBasedCreate) + self.zeEventCounterBasedGetIpcHandle = _zeEventCounterBasedGetIpcHandle_t(self.__dditable.Event.pfnCounterBasedGetIpcHandle) + self.zeEventCounterBasedOpenIpcHandle = _zeEventCounterBasedOpenIpcHandle_t(self.__dditable.Event.pfnCounterBasedOpenIpcHandle) + self.zeEventCounterBasedCloseIpcHandle = _zeEventCounterBasedCloseIpcHandle_t(self.__dditable.Event.pfnCounterBasedCloseIpcHandle) + self.zeEventCounterBasedGetDeviceAddress = _zeEventCounterBasedGetDeviceAddress_t(self.__dditable.Event.pfnCounterBasedGetDeviceAddress) + + # call driver to get function pointers + _EventExp = _ze_event_exp_dditable_t() + r = ze_result_v(self.__dll.zeGetEventExpProcAddrTable(version, byref(_EventExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.EventExp = _EventExp + + # attach function interface to function address + self.zeEventQueryTimestampsExp = _zeEventQueryTimestampsExp_t(self.__dditable.EventExp.pfnQueryTimestampsExp) + + # call driver to get function pointers + _Module = _ze_module_dditable_t() + r = ze_result_v(self.__dll.zeGetModuleProcAddrTable(version, byref(_Module))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Module = _Module + + # attach function interface to function address + self.zeModuleCreate = _zeModuleCreate_t(self.__dditable.Module.pfnCreate) + self.zeModuleDestroy = _zeModuleDestroy_t(self.__dditable.Module.pfnDestroy) + self.zeModuleDynamicLink = _zeModuleDynamicLink_t(self.__dditable.Module.pfnDynamicLink) + self.zeModuleGetNativeBinary = _zeModuleGetNativeBinary_t(self.__dditable.Module.pfnGetNativeBinary) + self.zeModuleGetGlobalPointer = _zeModuleGetGlobalPointer_t(self.__dditable.Module.pfnGetGlobalPointer) + self.zeModuleGetKernelNames = _zeModuleGetKernelNames_t(self.__dditable.Module.pfnGetKernelNames) + self.zeModuleGetProperties = _zeModuleGetProperties_t(self.__dditable.Module.pfnGetProperties) + self.zeModuleGetFunctionPointer = _zeModuleGetFunctionPointer_t(self.__dditable.Module.pfnGetFunctionPointer) + self.zeModuleInspectLinkageExt = _zeModuleInspectLinkageExt_t(self.__dditable.Module.pfnInspectLinkageExt) + + # call driver to get function pointers + _ModuleBuildLog = _ze_module_build_log_dditable_t() + r = ze_result_v(self.__dll.zeGetModuleBuildLogProcAddrTable(version, byref(_ModuleBuildLog))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.ModuleBuildLog = _ModuleBuildLog + + # attach function interface to function address + self.zeModuleBuildLogDestroy = _zeModuleBuildLogDestroy_t(self.__dditable.ModuleBuildLog.pfnDestroy) + self.zeModuleBuildLogGetString = _zeModuleBuildLogGetString_t(self.__dditable.ModuleBuildLog.pfnGetString) + + # call driver to get function pointers + _Kernel = _ze_kernel_dditable_t() + r = ze_result_v(self.__dll.zeGetKernelProcAddrTable(version, byref(_Kernel))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Kernel = _Kernel + + # attach function interface to function address + self.zeKernelCreate = _zeKernelCreate_t(self.__dditable.Kernel.pfnCreate) + self.zeKernelDestroy = _zeKernelDestroy_t(self.__dditable.Kernel.pfnDestroy) + self.zeKernelSetCacheConfig = _zeKernelSetCacheConfig_t(self.__dditable.Kernel.pfnSetCacheConfig) + self.zeKernelSetGroupSize = _zeKernelSetGroupSize_t(self.__dditable.Kernel.pfnSetGroupSize) + self.zeKernelSuggestGroupSize = _zeKernelSuggestGroupSize_t(self.__dditable.Kernel.pfnSuggestGroupSize) + self.zeKernelSuggestMaxCooperativeGroupCount = _zeKernelSuggestMaxCooperativeGroupCount_t(self.__dditable.Kernel.pfnSuggestMaxCooperativeGroupCount) + self.zeKernelSetArgumentValue = _zeKernelSetArgumentValue_t(self.__dditable.Kernel.pfnSetArgumentValue) + self.zeKernelSetIndirectAccess = _zeKernelSetIndirectAccess_t(self.__dditable.Kernel.pfnSetIndirectAccess) + self.zeKernelGetIndirectAccess = _zeKernelGetIndirectAccess_t(self.__dditable.Kernel.pfnGetIndirectAccess) + self.zeKernelGetSourceAttributes = _zeKernelGetSourceAttributes_t(self.__dditable.Kernel.pfnGetSourceAttributes) + self.zeKernelGetProperties = _zeKernelGetProperties_t(self.__dditable.Kernel.pfnGetProperties) + self.zeKernelGetName = _zeKernelGetName_t(self.__dditable.Kernel.pfnGetName) + + # call driver to get function pointers + _KernelExp = _ze_kernel_exp_dditable_t() + r = ze_result_v(self.__dll.zeGetKernelExpProcAddrTable(version, byref(_KernelExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.KernelExp = _KernelExp + + # attach function interface to function address + self.zeKernelSetGlobalOffsetExp = _zeKernelSetGlobalOffsetExp_t(self.__dditable.KernelExp.pfnSetGlobalOffsetExp) + self.zeKernelSchedulingHintExp = _zeKernelSchedulingHintExp_t(self.__dditable.KernelExp.pfnSchedulingHintExp) + self.zeKernelGetBinaryExp = _zeKernelGetBinaryExp_t(self.__dditable.KernelExp.pfnGetBinaryExp) + self.zeKernelGetAllocationPropertiesExp = _zeKernelGetAllocationPropertiesExp_t(self.__dditable.KernelExp.pfnGetAllocationPropertiesExp) + + # call driver to get function pointers + _Sampler = _ze_sampler_dditable_t() + r = ze_result_v(self.__dll.zeGetSamplerProcAddrTable(version, byref(_Sampler))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Sampler = _Sampler + + # attach function interface to function address + self.zeSamplerCreate = _zeSamplerCreate_t(self.__dditable.Sampler.pfnCreate) + self.zeSamplerDestroy = _zeSamplerDestroy_t(self.__dditable.Sampler.pfnDestroy) + + # call driver to get function pointers + _PhysicalMem = _ze_physical_mem_dditable_t() + r = ze_result_v(self.__dll.zeGetPhysicalMemProcAddrTable(version, byref(_PhysicalMem))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.PhysicalMem = _PhysicalMem + + # attach function interface to function address + self.zePhysicalMemCreate = _zePhysicalMemCreate_t(self.__dditable.PhysicalMem.pfnCreate) + self.zePhysicalMemDestroy = _zePhysicalMemDestroy_t(self.__dditable.PhysicalMem.pfnDestroy) + self.zePhysicalMemGetProperties = _zePhysicalMemGetProperties_t(self.__dditable.PhysicalMem.pfnGetProperties) + + # call driver to get function pointers + _VirtualMem = _ze_virtual_mem_dditable_t() + r = ze_result_v(self.__dll.zeGetVirtualMemProcAddrTable(version, byref(_VirtualMem))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.VirtualMem = _VirtualMem + + # attach function interface to function address + self.zeVirtualMemReserve = _zeVirtualMemReserve_t(self.__dditable.VirtualMem.pfnReserve) + self.zeVirtualMemFree = _zeVirtualMemFree_t(self.__dditable.VirtualMem.pfnFree) + self.zeVirtualMemQueryPageSize = _zeVirtualMemQueryPageSize_t(self.__dditable.VirtualMem.pfnQueryPageSize) + self.zeVirtualMemMap = _zeVirtualMemMap_t(self.__dditable.VirtualMem.pfnMap) + self.zeVirtualMemUnmap = _zeVirtualMemUnmap_t(self.__dditable.VirtualMem.pfnUnmap) + self.zeVirtualMemSetAccessAttribute = _zeVirtualMemSetAccessAttribute_t(self.__dditable.VirtualMem.pfnSetAccessAttribute) + self.zeVirtualMemGetAccessAttribute = _zeVirtualMemGetAccessAttribute_t(self.__dditable.VirtualMem.pfnGetAccessAttribute) + + # call driver to get function pointers + _FabricVertexExp = _ze_fabric_vertex_exp_dditable_t() + r = ze_result_v(self.__dll.zeGetFabricVertexExpProcAddrTable(version, byref(_FabricVertexExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.FabricVertexExp = _FabricVertexExp + + # attach function interface to function address + self.zeFabricVertexGetExp = _zeFabricVertexGetExp_t(self.__dditable.FabricVertexExp.pfnGetExp) + self.zeFabricVertexGetSubVerticesExp = _zeFabricVertexGetSubVerticesExp_t(self.__dditable.FabricVertexExp.pfnGetSubVerticesExp) + self.zeFabricVertexGetPropertiesExp = _zeFabricVertexGetPropertiesExp_t(self.__dditable.FabricVertexExp.pfnGetPropertiesExp) + self.zeFabricVertexGetDeviceExp = _zeFabricVertexGetDeviceExp_t(self.__dditable.FabricVertexExp.pfnGetDeviceExp) + + # call driver to get function pointers + _FabricEdgeExp = _ze_fabric_edge_exp_dditable_t() + r = ze_result_v(self.__dll.zeGetFabricEdgeExpProcAddrTable(version, byref(_FabricEdgeExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.FabricEdgeExp = _FabricEdgeExp + + # attach function interface to function address + self.zeFabricEdgeGetExp = _zeFabricEdgeGetExp_t(self.__dditable.FabricEdgeExp.pfnGetExp) + self.zeFabricEdgeGetVerticesExp = _zeFabricEdgeGetVerticesExp_t(self.__dditable.FabricEdgeExp.pfnGetVerticesExp) + self.zeFabricEdgeGetPropertiesExp = _zeFabricEdgeGetPropertiesExp_t(self.__dditable.FabricEdgeExp.pfnGetPropertiesExp) + + # success! diff --git a/backends/ze/include/ze_api.h b/backends/ze/include/ze_api.h index 2f59f4bbc..55bd811dc 100644 --- a/backends/ze/include/ze_api.h +++ b/backends/ze/include/ze_api.h @@ -1,11 +1,11 @@ /* * - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2025 Intel Corporation * * SPDX-License-Identifier: MIT * * @file ze_api.h - * @version v1.9-r1.9.3 + * @version v1.15-r1.13.73 * */ #ifndef _ZE_API_H @@ -248,8 +248,17 @@ typedef enum _ze_result_t ZE_RESULT_ERROR_OVERLAPPING_REGIONS = 0x7800001a, ///< [Validation] copy operations do not support overlapping regions of ///< memory ZE_RESULT_WARNING_ACTION_REQUIRED = 0x7800001b, ///< [Sysman] an action is required to complete the desired operation + ZE_RESULT_ERROR_INVALID_KERNEL_HANDLE = 0x7800001c, ///< [Core, Validation] kernel handle is invalid for the operation + ZE_RESULT_EXT_RTAS_BUILD_RETRY = 0x7800001d, ///< [Core, Extension] ray tracing acceleration structure build operation + ///< failed due to insufficient resources, retry with a larger acceleration + ///< structure buffer allocation + ZE_RESULT_EXT_RTAS_BUILD_DEFERRED = 0x7800001e, ///< [Core, Extension] ray tracing acceleration structure build operation + ///< deferred to parallel operation join + ZE_RESULT_EXT_ERROR_OPERANDS_INCOMPATIBLE = 0x7800001f, ///< [Core, Extension] operands of comparison are not compatible + ZE_RESULT_ERROR_SURVIVABILITY_MODE_DETECTED = 0x78000020, ///< [Sysman] device is in survivability mode, firmware update needed + ZE_RESULT_ERROR_ADDRESS_NOT_FOUND = 0x78000021, ///< [Core] address not found within specified or current context ZE_RESULT_ERROR_UNKNOWN = 0x7ffffffe, ///< [Core] unknown or internal error - ZE_RESULT_FORCE_UINT32 = 0x7fffffff + ZE_RESULT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RESULT_* ENUMs } ze_result_t; @@ -311,6 +320,7 @@ typedef enum _ze_structure_type_t ZE_STRUCTURE_TYPE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_PROPERTIES = 0x10011, ///< ::ze_event_query_kernel_timestamps_ext_properties_t ZE_STRUCTURE_TYPE_EVENT_QUERY_KERNEL_TIMESTAMPS_RESULTS_EXT_PROPERTIES = 0x10012, ///< ::ze_event_query_kernel_timestamps_results_ext_properties_t ZE_STRUCTURE_TYPE_KERNEL_MAX_GROUP_SIZE_EXT_PROPERTIES = 0x10013, ///< ::ze_kernel_max_group_size_ext_properties_t + ZE_STRUCTURE_TYPE_IMAGE_FORMAT_SUPPORT_EXT_PROPERTIES = 0x10014, ///< ::ze_image_format_support_ext_properties_t ZE_STRUCTURE_TYPE_RELAXED_ALLOCATION_LIMITS_EXP_DESC = 0x00020001, ///< ::ze_relaxed_allocation_limits_exp_desc_t ZE_STRUCTURE_TYPE_MODULE_PROGRAM_EXP_DESC = 0x00020002, ///< ::ze_module_program_exp_desc_t ZE_STRUCTURE_TYPE_SCHEDULING_HINT_EXP_PROPERTIES = 0x00020003, ///< ::ze_scheduling_hint_exp_properties_t @@ -342,7 +352,36 @@ typedef enum _ze_structure_type_t ZE_STRUCTURE_TYPE_PITCHED_ALLOC_DEVICE_EXP_PROPERTIES = 0x0002001D, ///< ::ze_device_pitched_alloc_exp_properties_t ZE_STRUCTURE_TYPE_BINDLESS_IMAGE_EXP_DESC = 0x0002001E, ///< ::ze_image_bindless_exp_desc_t ZE_STRUCTURE_TYPE_PITCHED_IMAGE_EXP_DESC = 0x0002001F, ///< ::ze_image_pitched_exp_desc_t - ZE_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff + ZE_STRUCTURE_TYPE_MUTABLE_GRAPH_ARGUMENT_EXP_DESC = 0x00020020, ///< ::ze_mutable_graph_argument_exp_desc_t + ZE_STRUCTURE_TYPE_INIT_DRIVER_TYPE_DESC = 0x00020021, ///< ::ze_init_driver_type_desc_t + ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_EXT_DESC = 0x00020022, ///< ::ze_external_semaphore_ext_desc_t + ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_WIN32_EXT_DESC = 0x00020023, ///< ::ze_external_semaphore_win32_ext_desc_t + ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_FD_EXT_DESC = 0x00020024, ///< ::ze_external_semaphore_fd_ext_desc_t + ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_EXT = 0x00020025, ///< ::ze_external_semaphore_signal_params_ext_t + ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_WAIT_PARAMS_EXT = 0x00020026, ///< ::ze_external_semaphore_wait_params_ext_t + ZE_STRUCTURE_TYPE_DRIVER_DDI_HANDLES_EXT_PROPERTIES = 0x00020027, ///< ::ze_driver_ddi_handles_ext_properties_t + ZE_STRUCTURE_TYPE_DEVICE_CACHELINE_SIZE_EXT = 0x00020028, ///< ::ze_device_cache_line_size_ext_t + ZE_STRUCTURE_TYPE_DEVICE_VECTOR_WIDTH_PROPERTIES_EXT = 0x00020029, ///< ::ze_device_vector_width_properties_ext_t + ZE_STRUCTURE_TYPE_RTAS_BUILDER_EXT_DESC = 0x00020030, ///< ::ze_rtas_builder_ext_desc_t + ZE_STRUCTURE_TYPE_RTAS_BUILDER_BUILD_OP_EXT_DESC = 0x00020031, ///< ::ze_rtas_builder_build_op_ext_desc_t + ZE_STRUCTURE_TYPE_RTAS_BUILDER_EXT_PROPERTIES = 0x00020032, ///< ::ze_rtas_builder_ext_properties_t + ZE_STRUCTURE_TYPE_RTAS_PARALLEL_OPERATION_EXT_PROPERTIES = 0x00020033, ///< ::ze_rtas_parallel_operation_ext_properties_t + ZE_STRUCTURE_TYPE_RTAS_DEVICE_EXT_PROPERTIES = 0x00020034, ///< ::ze_rtas_device_ext_properties_t + ZE_STRUCTURE_TYPE_RTAS_GEOMETRY_AABBS_EXT_CB_PARAMS = 0x00020035, ///< ::ze_rtas_geometry_aabbs_ext_cb_params_t + ZE_STRUCTURE_TYPE_COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC = 0x00020036, ///< ::ze_command_list_append_launch_kernel_param_cooperative_desc_t + ZE_STRUCTURE_TYPE_EXTERNAL_MEMMAP_SYSMEM_EXT_DESC = 0x00020037, ///< ::ze_external_memmap_sysmem_ext_desc_t + ZE_STRUCTURE_TYPE_PITCHED_ALLOC_2DIMAGE_LINEAR_PITCH_EXP_INFO = 0x00020038, ///< ::ze_pitched_alloc_2dimage_linear_pitch_exp_info_t + ZE_STRUCTURE_TYPE_KERNEL_ALLOCATION_PROPERTIES = 0x00020039, ///< ::ze_kernel_allocation_exp_properties_t + ZE_STRUCTURE_TYPE_EVENT_COUNTER_BASED_DESC = 0x0002003A, ///< ::ze_event_counter_based_desc_t + ZE_STRUCTURE_TYPE_EVENT_COUNTER_BASED_EXTERNAL_SYNC_ALLOCATION_DESC = 0x0002003B, ///< ::ze_event_counter_based_external_sync_allocation_desc_t + ZE_STRUCTURE_TYPE_EVENT_SYNC_MODE_DESC = 0x0002003C, ///< ::ze_event_sync_mode_desc_t + ZE_STRUCTURE_TYPE_IPC_MEM_HANDLE_TYPE_EXT_DESC = 0x0002003D, ///< ::ze_ipc_mem_handle_type_ext_desc_t + ZE_STRUCTURE_TYPE_DEVICE_EVENT_PROPERTIES = 0x0002003E, ///< ::ze_device_event_properties_t + ZE_STRUCTURE_TYPE_EVENT_COUNTER_BASED_EXTERNAL_AGGREGATE_STORAGE_DESC = 0x0002003F, ///< ::ze_event_counter_based_external_aggregate_storage_desc_t + ZE_STRUCTURE_TYPE_PHYSICAL_MEM_PROPERTIES = 0x00020040, ///< ::ze_physical_mem_properties_t + ZE_STRUCTURE_TYPE_DEVICE_USABLEMEM_SIZE_EXT_PROPERTIES = 0x00020041, ///< ::ze_device_usablemem_size_ext_properties_t + ZE_STRUCTURE_TYPE_CUSTOM_PITCH_EXP_DESC = 0x00020042, ///< ::ze_custom_pitch_exp_desc_t + ZE_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_STRUCTURE_TYPE_* ENUMs } ze_structure_type_t; @@ -360,7 +399,7 @@ typedef enum _ze_external_memory_type_flag_t ///< resource ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D12_HEAP = ZE_BIT(6), ///< an NT handle referring to a Direct3D 12 heap resource ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D12_RESOURCE = ZE_BIT(7), ///< an NT handle referring to a Direct3D 12 committed resource - ZE_EXTERNAL_MEMORY_TYPE_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_EXTERNAL_MEMORY_TYPE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EXTERNAL_MEMORY_TYPE_FLAG_* ENUMs } ze_external_memory_type_flag_t; @@ -371,7 +410,7 @@ typedef enum _ze_bandwidth_unit_t ZE_BANDWIDTH_UNIT_UNKNOWN = 0, ///< The unit used for bandwidth is unknown ZE_BANDWIDTH_UNIT_BYTES_PER_NANOSEC = 1, ///< Bandwidth is provided in bytes/nanosec ZE_BANDWIDTH_UNIT_BYTES_PER_CLOCK = 2, ///< Bandwidth is provided in bytes/clock - ZE_BANDWIDTH_UNIT_FORCE_UINT32 = 0x7fffffff + ZE_BANDWIDTH_UNIT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_BANDWIDTH_UNIT_* ENUMs } ze_bandwidth_unit_t; @@ -384,7 +423,7 @@ typedef enum _ze_latency_unit_t ZE_LATENCY_UNIT_CLOCK = 2, ///< Latency is provided in clocks ZE_LATENCY_UNIT_HOP = 3, ///< Latency is provided in hops (normalized so that the lowest latency ///< link has a latency of 1 hop) - ZE_LATENCY_UNIT_FORCE_UINT32 = 0x7fffffff + ZE_LATENCY_UNIT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_LATENCY_UNIT_* ENUMs } ze_latency_unit_t; @@ -432,6 +471,14 @@ typedef struct _ze_base_desc_t } ze_base_desc_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief IPC handle to counter based event +typedef struct _ze_ipc_event_counter_based_handle_t +{ + char data[ZE_MAX_IPC_HANDLE_SIZE]; ///< [out] Opaque data representing an IPC handle + +} ze_ipc_event_counter_based_handle_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Forces driver to only report devices (and sub-devices) as specified by /// values @@ -446,6 +493,9 @@ typedef struct _ze_base_desc_t /// @brief Defines the device hierarchy model exposed by Level Zero driver /// implementation +/////////////////////////////////////////////////////////////////////////////// +/// @brief Defines/Refines ordering of drivers reported to user + /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare ze_ipc_mem_handle_t typedef struct _ze_ipc_mem_handle_t ze_ipc_mem_handle_t; @@ -470,6 +520,14 @@ typedef struct _ze_base_properties_t ze_base_properties_t; /// @brief Forward-declare ze_base_desc_t typedef struct _ze_base_desc_t ze_base_desc_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_ipc_event_counter_based_handle_t +typedef struct _ze_ipc_event_counter_based_handle_t ze_ipc_event_counter_based_handle_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_init_driver_type_desc_t +typedef struct _ze_init_driver_type_desc_t ze_init_driver_type_desc_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare ze_driver_uuid_t typedef struct _ze_driver_uuid_t ze_driver_uuid_t; @@ -538,6 +596,10 @@ typedef struct _ze_device_external_memory_properties_t ze_device_external_memory /// @brief Forward-declare ze_device_p2p_properties_t typedef struct _ze_device_p2p_properties_t ze_device_p2p_properties_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_device_event_properties_t +typedef struct _ze_device_event_properties_t ze_device_event_properties_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare ze_context_desc_t typedef struct _ze_context_desc_t ze_context_desc_t; @@ -562,10 +624,26 @@ typedef struct _ze_image_region_t ze_image_region_t; /// @brief Forward-declare ze_event_pool_desc_t typedef struct _ze_event_pool_desc_t ze_event_pool_desc_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_event_sync_mode_desc_t +typedef struct _ze_event_sync_mode_desc_t ze_event_sync_mode_desc_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare ze_event_desc_t typedef struct _ze_event_desc_t ze_event_desc_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_event_counter_based_desc_t +typedef struct _ze_event_counter_based_desc_t ze_event_counter_based_desc_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_event_counter_based_external_sync_allocation_desc_t +typedef struct _ze_event_counter_based_external_sync_allocation_desc_t ze_event_counter_based_external_sync_allocation_desc_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_event_counter_based_external_aggregate_storage_desc_t +typedef struct _ze_event_counter_based_external_aggregate_storage_desc_t ze_event_counter_based_external_aggregate_storage_desc_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare ze_kernel_timestamp_data_t typedef struct _ze_kernel_timestamp_data_t ze_kernel_timestamp_data_t; @@ -630,6 +708,10 @@ typedef struct _ze_module_constants_t ze_module_constants_t; /// @brief Forward-declare ze_module_desc_t typedef struct _ze_module_desc_t ze_module_desc_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_command_list_append_launch_kernel_param_cooperative_desc_t +typedef struct _ze_command_list_append_launch_kernel_param_cooperative_desc_t ze_command_list_append_launch_kernel_param_cooperative_desc_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare ze_module_properties_t typedef struct _ze_module_properties_t ze_module_properties_t; @@ -654,6 +736,10 @@ typedef struct _ze_kernel_preferred_group_size_properties_t ze_kernel_preferred_ /// @brief Forward-declare ze_group_count_t typedef struct _ze_group_count_t ze_group_count_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_group_size_t +typedef struct _ze_group_size_t ze_group_size_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare ze_module_program_exp_desc_t typedef struct _ze_module_program_exp_desc_t ze_module_program_exp_desc_t; @@ -674,6 +760,10 @@ typedef struct _ze_sampler_desc_t ze_sampler_desc_t; /// @brief Forward-declare ze_physical_mem_desc_t typedef struct _ze_physical_mem_desc_t ze_physical_mem_desc_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_physical_mem_properties_t +typedef struct _ze_physical_mem_properties_t ze_physical_mem_properties_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare ze_float_atomic_ext_properties_t typedef struct _ze_float_atomic_ext_properties_t ze_float_atomic_ext_properties_t; @@ -682,6 +772,130 @@ typedef struct _ze_float_atomic_ext_properties_t ze_float_atomic_ext_properties_ /// @brief Forward-declare ze_relaxed_allocation_limits_exp_desc_t typedef struct _ze_relaxed_allocation_limits_exp_desc_t ze_relaxed_allocation_limits_exp_desc_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_driver_ddi_handles_ext_properties_t +typedef struct _ze_driver_ddi_handles_ext_properties_t ze_driver_ddi_handles_ext_properties_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_external_semaphore_ext_desc_t +typedef struct _ze_external_semaphore_ext_desc_t ze_external_semaphore_ext_desc_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_external_semaphore_win32_ext_desc_t +typedef struct _ze_external_semaphore_win32_ext_desc_t ze_external_semaphore_win32_ext_desc_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_external_semaphore_fd_ext_desc_t +typedef struct _ze_external_semaphore_fd_ext_desc_t ze_external_semaphore_fd_ext_desc_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_external_semaphore_signal_params_ext_t +typedef struct _ze_external_semaphore_signal_params_ext_t ze_external_semaphore_signal_params_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_external_semaphore_wait_params_ext_t +typedef struct _ze_external_semaphore_wait_params_ext_t ze_external_semaphore_wait_params_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_device_cache_line_size_ext_t +typedef struct _ze_device_cache_line_size_ext_t ze_device_cache_line_size_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_rtas_builder_ext_desc_t +typedef struct _ze_rtas_builder_ext_desc_t ze_rtas_builder_ext_desc_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_rtas_builder_ext_properties_t +typedef struct _ze_rtas_builder_ext_properties_t ze_rtas_builder_ext_properties_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_rtas_parallel_operation_ext_properties_t +typedef struct _ze_rtas_parallel_operation_ext_properties_t ze_rtas_parallel_operation_ext_properties_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_rtas_device_ext_properties_t +typedef struct _ze_rtas_device_ext_properties_t ze_rtas_device_ext_properties_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_rtas_float3_ext_t +typedef struct _ze_rtas_float3_ext_t ze_rtas_float3_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_rtas_transform_float3x4_column_major_ext_t +typedef struct _ze_rtas_transform_float3x4_column_major_ext_t ze_rtas_transform_float3x4_column_major_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_rtas_transform_float3x4_aligned_column_major_ext_t +typedef struct _ze_rtas_transform_float3x4_aligned_column_major_ext_t ze_rtas_transform_float3x4_aligned_column_major_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_rtas_transform_float3x4_row_major_ext_t +typedef struct _ze_rtas_transform_float3x4_row_major_ext_t ze_rtas_transform_float3x4_row_major_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_rtas_aabb_ext_t +typedef struct _ze_rtas_aabb_ext_t ze_rtas_aabb_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_rtas_triangle_indices_uint32_ext_t +typedef struct _ze_rtas_triangle_indices_uint32_ext_t ze_rtas_triangle_indices_uint32_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_rtas_quad_indices_uint32_ext_t +typedef struct _ze_rtas_quad_indices_uint32_ext_t ze_rtas_quad_indices_uint32_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_rtas_builder_geometry_info_ext_t +typedef struct _ze_rtas_builder_geometry_info_ext_t ze_rtas_builder_geometry_info_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_rtas_builder_triangles_geometry_info_ext_t +typedef struct _ze_rtas_builder_triangles_geometry_info_ext_t ze_rtas_builder_triangles_geometry_info_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_rtas_builder_quads_geometry_info_ext_t +typedef struct _ze_rtas_builder_quads_geometry_info_ext_t ze_rtas_builder_quads_geometry_info_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_rtas_geometry_aabbs_ext_cb_params_t +typedef struct _ze_rtas_geometry_aabbs_ext_cb_params_t ze_rtas_geometry_aabbs_ext_cb_params_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_rtas_builder_procedural_geometry_info_ext_t +typedef struct _ze_rtas_builder_procedural_geometry_info_ext_t ze_rtas_builder_procedural_geometry_info_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_rtas_builder_instance_geometry_info_ext_t +typedef struct _ze_rtas_builder_instance_geometry_info_ext_t ze_rtas_builder_instance_geometry_info_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_rtas_builder_build_op_ext_desc_t +typedef struct _ze_rtas_builder_build_op_ext_desc_t ze_rtas_builder_build_op_ext_desc_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_device_vector_width_properties_ext_t +typedef struct _ze_device_vector_width_properties_ext_t ze_device_vector_width_properties_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_external_memmap_sysmem_ext_desc_t +typedef struct _ze_external_memmap_sysmem_ext_desc_t ze_external_memmap_sysmem_ext_desc_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_kernel_allocation_exp_properties_t +typedef struct _ze_kernel_allocation_exp_properties_t ze_kernel_allocation_exp_properties_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_device_usablemem_size_ext_properties_t +typedef struct _ze_device_usablemem_size_ext_properties_t ze_device_usablemem_size_ext_properties_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_image_format_support_ext_properties_t +typedef struct _ze_image_format_support_ext_properties_t ze_image_format_support_ext_properties_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_ipc_mem_handle_type_ext_desc_t +typedef struct _ze_ipc_mem_handle_type_ext_desc_t ze_ipc_mem_handle_type_ext_desc_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare ze_cache_reservation_ext_desc_t typedef struct _ze_cache_reservation_ext_desc_t ze_cache_reservation_ext_desc_t; @@ -902,6 +1116,14 @@ typedef struct _ze_image_pitched_exp_desc_t ze_image_pitched_exp_desc_t; /// @brief Forward-declare ze_device_pitched_alloc_exp_properties_t typedef struct _ze_device_pitched_alloc_exp_properties_t ze_device_pitched_alloc_exp_properties_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_pitched_alloc_2dimage_linear_pitch_exp_info_t +typedef struct _ze_pitched_alloc_2dimage_linear_pitch_exp_info_t ze_pitched_alloc_2dimage_linear_pitch_exp_info_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_custom_pitch_exp_desc_t +typedef struct _ze_custom_pitch_exp_desc_t ze_custom_pitch_exp_desc_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare ze_mutable_command_id_exp_desc_t typedef struct _ze_mutable_command_id_exp_desc_t ze_mutable_command_id_exp_desc_t; @@ -934,6 +1156,10 @@ typedef struct _ze_mutable_group_size_exp_desc_t ze_mutable_group_size_exp_desc_ /// @brief Forward-declare ze_mutable_global_offset_exp_desc_t typedef struct _ze_mutable_global_offset_exp_desc_t ze_mutable_global_offset_exp_desc_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_mutable_graph_argument_exp_desc_t +typedef struct _ze_mutable_graph_argument_exp_desc_t ze_mutable_graph_argument_exp_desc_t; + #if !defined(__GNUC__) #pragma endregion @@ -949,7 +1175,7 @@ typedef enum _ze_init_flag_t { ZE_INIT_FLAG_GPU_ONLY = ZE_BIT(0), ///< only initialize GPU drivers ZE_INIT_FLAG_VPU_ONLY = ZE_BIT(1), ///< only initialize VPU drivers - ZE_INIT_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_INIT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_INIT_FLAG_* ENUMs } ze_init_flag_t; @@ -957,8 +1183,9 @@ typedef enum _ze_init_flag_t /// @brief Initialize the 'oneAPI' driver(s) /// /// @details -/// - The application must call this function before calling any other -/// function. +/// - @deprecated since 1.10. Please use zeInitDrivers() +/// - The application must call this function or zeInitDrivers before +/// calling any other function. /// - If this function is not called then all other functions will return /// ::ZE_RESULT_ERROR_UNINITIALIZED. /// - Only one instance of each driver will be initialized per process. @@ -976,8 +1203,17 @@ typedef enum _ze_init_flag_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x3 < flags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeInit( ze_init_flags_t flags ///< [in] initialization flags. @@ -988,6 +1224,10 @@ zeInit( /// @brief Retrieves driver instances /// /// @details +/// - @deprecated since 1.10. Please use zeInitDrivers() +/// - Usage of zeInitDrivers and zeDriverGet is mutually exclusive and +/// should not be used together. Usage of them together will result in +/// undefined behavior. /// - A driver represents a collection of physical devices. /// - Multiple calls to this function will return identical driver handles, /// in the same order. @@ -1006,6 +1246,14 @@ zeInit( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pCount` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -1020,6 +1268,114 @@ zeDriverGet( ///< shall only retrieve that number of drivers. ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Supported driver initialization type flags +/// +/// @details +/// - Bit Field which details the driver types to be initialized and +/// returned to the user. +/// - Value Definition: +/// - 0, do not init or retrieve any drivers. +/// - ZE_INIT_DRIVER_TYPE_FLAG_GPU, GPU Drivers are Init and driver handles +/// retrieved. +/// - ZE_INIT_DRIVER_TYPE_FLAG_NPU, NPU Drivers are Init and driver handles +/// retrieved. +/// - ZE_INIT_DRIVER_TYPE_FLAG_GPU | ZE_INIT_DRIVER_TYPE_FLAG_NPU, NPU & GPU +/// Drivers are Init and driver handles retrieved. +/// - UINT32_MAX All Drivers of any type are Init and driver handles +/// retrieved. +typedef uint32_t ze_init_driver_type_flags_t; +typedef enum _ze_init_driver_type_flag_t +{ + ZE_INIT_DRIVER_TYPE_FLAG_GPU = ZE_BIT(0), ///< initialize and retrieve GPU drivers + ZE_INIT_DRIVER_TYPE_FLAG_NPU = ZE_BIT(1), ///< initialize and retrieve NPU drivers + ZE_INIT_DRIVER_TYPE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_INIT_DRIVER_TYPE_FLAG_* ENUMs + +} ze_init_driver_type_flag_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Init Driver Type descriptor +typedef struct _ze_init_driver_type_desc_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + ze_init_driver_type_flags_t flags; ///< [in] driver type init flags. + ///< must be a valid combination of ::ze_init_driver_type_flag_t or UINT32_MAX; + ///< driver types are init and retrieved based on these init flags in zeInitDrivers(). + +} ze_init_driver_type_desc_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Initialize the 'oneAPI' driver(s) based on the driver types requested +/// and retrieve the driver handles. +/// +/// @details +/// - The application must call this function or zeInit before calling any +/// other function. (zeInit is [Deprecated] and is replaced by +/// zeInitDrivers) +/// - Calls to zeInit[Deprecated] or InitDrivers will not alter the drivers +/// retrieved through either api. +/// - Drivers init through zeInit[Deprecated] or InitDrivers will not be +/// reInitialized once init in an application. The Loader will determine +/// if the already init driver needs to be delivered to the user through +/// the init type flags. +/// - Already init Drivers will not be uninitialized if the call to +/// InitDrivers does not include that driver's type. Those init drivers +/// which don't match the init flags will not have their driver handles +/// returned to the user in that InitDrivers call. +/// - If this function or zeInit[Deprecated] is not called, then all other +/// functions will return ::ZE_RESULT_ERROR_UNINITIALIZED. +/// - Only one instance of each driver will be initialized per process. +/// - A driver represents a collection of physical devices. +/// - Multiple calls to this function will return identical driver handles, +/// in the same order. +/// - The drivers returned to the caller will be based on the init types +/// which state the drivers to be included. +/// - The application may pass nullptr for pDrivers when only querying the +/// number of drivers. +/// - The application may call this function multiple times with different +/// flags or environment variables enabled. +/// - The application must call this function after forking new processes. +/// Each forked process must call this function. +/// - The application may call this function from simultaneous threads. +/// - The implementation of this function must be thread-safe for scenarios +/// where multiple libraries may initialize the driver(s) simultaneously. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == pCount` +/// + `nullptr == desc` +/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +/// + `0x0 == desc->flags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +ZE_APIEXPORT ze_result_t ZE_APICALL +zeInitDrivers( + uint32_t* pCount, ///< [in,out] pointer to the number of driver instances. + ///< if count is zero, then the loader shall update the value with the + ///< total number of drivers available. + ///< if count is greater than the number of drivers available, then the + ///< loader shall update the value with the correct number of drivers available. + ze_driver_handle_t* phDrivers, ///< [in,out][optional][range(0, *pCount)] array of driver instance handles. + ///< if count is less than the number of drivers available, then the loader + ///< shall only retrieve that number of drivers. + ze_init_driver_type_desc_t* desc ///< [in] descriptor containing the driver type initialization details + ///< including ::ze_init_driver_type_flag_t combinations. + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Supported API versions /// @@ -1038,11 +1394,23 @@ typedef enum _ze_api_version_t ZE_API_VERSION_1_7 = ZE_MAKE_VERSION( 1, 7 ), ///< version 1.7 ZE_API_VERSION_1_8 = ZE_MAKE_VERSION( 1, 8 ), ///< version 1.8 ZE_API_VERSION_1_9 = ZE_MAKE_VERSION( 1, 9 ), ///< version 1.9 - ZE_API_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 9 ), ///< latest known version - ZE_API_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_API_VERSION_1_10 = ZE_MAKE_VERSION( 1, 10 ), ///< version 1.10 + ZE_API_VERSION_1_11 = ZE_MAKE_VERSION( 1, 11 ), ///< version 1.11 + ZE_API_VERSION_1_12 = ZE_MAKE_VERSION( 1, 12 ), ///< version 1.12 + ZE_API_VERSION_1_13 = ZE_MAKE_VERSION( 1, 13 ), ///< version 1.13 + ZE_API_VERSION_1_14 = ZE_MAKE_VERSION( 1, 14 ), ///< version 1.14 + ZE_API_VERSION_1_15 = ZE_MAKE_VERSION( 1, 15 ), ///< version 1.15 + ZE_API_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 15 ), ///< latest known version + ZE_API_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_API_VERSION_* ENUMs } ze_api_version_t; +/////////////////////////////////////////////////////////////////////////////// +#ifndef ZE_API_VERSION_CURRENT_M +/// @brief Current API version as a macro +#define ZE_API_VERSION_CURRENT_M ZE_MAKE_VERSION( 1, 15 ) +#endif // ZE_API_VERSION_CURRENT_M + /////////////////////////////////////////////////////////////////////////////// /// @brief Returns the API version supported by the specified driver /// @@ -1056,6 +1424,14 @@ typedef enum _ze_api_version_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1111,6 +1487,14 @@ typedef struct _ze_driver_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1130,7 +1514,7 @@ typedef enum _ze_ipc_property_flag_t ///< ::zeMemGetIpcHandle. ZE_IPC_PROPERTY_FLAG_EVENT_POOL = ZE_BIT(1), ///< Supports passing event pools between processes. See ///< ::zeEventPoolGetIpcHandle. - ZE_IPC_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_IPC_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IPC_PROPERTY_FLAG_* ENUMs } ze_ipc_property_flag_t; @@ -1158,6 +1542,14 @@ typedef struct _ze_driver_ipc_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1200,6 +1592,14 @@ typedef struct _ze_driver_extension_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1233,6 +1633,14 @@ zeDriverGetExtensionProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1264,6 +1672,14 @@ zeDriverGetExtensionFunctionAddress( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1275,6 +1691,27 @@ zeDriverGetLastErrorDescription( ///< cause of error. ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Retrieves handle to default context from the driver. +/// +/// @details +/// - The implementation of this function should be lock-free. +/// - This returned context contains all the devices available in the +/// driver. +/// - This function does not return error code, to get info about failure +/// user may use ::zeDriverGetLastErrorDescription function. +/// - In case of failure, this function returns null. +/// - Details on the error can be retrieved using +/// ::zeDriverGetLastErrorDescription function. +/// +/// @returns +/// - handle of the default context +/// - nullptr +ZE_APIEXPORT ze_context_handle_t ZE_APICALL +zeDriverGetDefaultContext( + ze_driver_handle_t hDriver ///< [in] handle of the driver instance + ); + #if !defined(__GNUC__) #pragma endregion #endif @@ -1289,7 +1726,7 @@ zeDriverGetLastErrorDescription( /// - Multiple calls to this function will return identical device handles, /// in the same order. /// - The number and order of handles returned from this function is -/// affected by the ::ZE_AFFINITY_MASK and ::ZE_ENABLE_PCI_ID_DEVICE_ORDER +/// affected by the `ZE_AFFINITY_MASK` and `ZE_ENABLE_PCI_ID_DEVICE_ORDER` /// environment variables. /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. @@ -1300,6 +1737,14 @@ zeDriverGetLastErrorDescription( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1338,6 +1783,14 @@ zeDeviceGet( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1357,7 +1810,7 @@ zeDeviceGetRootDevice( /// - Multiple calls to this function will return identical device handles, /// in the same order. /// - The number of handles returned from this function is affected by the -/// ::ZE_AFFINITY_MASK environment variable. +/// `ZE_AFFINITY_MASK` environment variable. /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. /// @@ -1371,6 +1824,14 @@ zeDeviceGetRootDevice( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1397,7 +1858,7 @@ typedef enum _ze_device_type_t ZE_DEVICE_TYPE_FPGA = 3, ///< Field Programmable Gate Array ZE_DEVICE_TYPE_MCA = 4, ///< Memory Copy Accelerator ZE_DEVICE_TYPE_VPU = 5, ///< Vision Processing Unit - ZE_DEVICE_TYPE_FORCE_UINT32 = 0x7fffffff + ZE_DEVICE_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_TYPE_* ENUMs } ze_device_type_t; @@ -1430,7 +1891,7 @@ typedef enum _ze_device_property_flag_t ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE = ZE_BIT(1), ///< Device handle used for query represents a sub-device. ZE_DEVICE_PROPERTY_FLAG_ECC = ZE_BIT(2), ///< Device supports error correction memory access. ZE_DEVICE_PROPERTY_FLAG_ONDEMANDPAGING = ZE_BIT(3), ///< Device supports on-demand page-faulting. - ZE_DEVICE_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_DEVICE_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_PROPERTY_FLAG_* ENUMs } ze_device_property_flag_t; @@ -1506,6 +1967,14 @@ typedef struct _ze_device_thread_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1561,6 +2030,14 @@ typedef struct _ze_device_compute_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1594,7 +2071,7 @@ typedef enum _ze_device_module_flag_t ZE_DEVICE_MODULE_FLAG_FP64 = ZE_BIT(1), ///< Device supports 64-bit floating-point operations ZE_DEVICE_MODULE_FLAG_INT64_ATOMICS = ZE_BIT(2), ///< Device supports 64-bit atomic operations ZE_DEVICE_MODULE_FLAG_DP4A = ZE_BIT(3), ///< Device supports four component dot product and accumulate operations - ZE_DEVICE_MODULE_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_DEVICE_MODULE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_MODULE_FLAG_* ENUMs } ze_device_module_flag_t; @@ -1612,7 +2089,7 @@ typedef enum _ze_device_fp_flag_t ZE_DEVICE_FP_FLAG_ROUNDED_DIVIDE_SQRT = ZE_BIT(6), ///< Supports rounding as defined by IEEE754 for divide and sqrt ///< operations. ZE_DEVICE_FP_FLAG_SOFT_FLOAT = ZE_BIT(7), ///< Uses software implementation for basic floating-point operations. - ZE_DEVICE_FP_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_DEVICE_FP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_FP_FLAG_* ENUMs } ze_device_fp_flag_t; @@ -1660,6 +2137,14 @@ typedef struct _ze_device_module_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1680,7 +2165,7 @@ typedef enum _ze_command_queue_group_property_flag_t ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS = ZE_BIT(2), ///< Command queue group supports cooperative kernels. ///< See ::zeCommandListAppendLaunchCooperativeKernel for more details. ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_METRICS = ZE_BIT(3), ///< Command queue groups supports metric queries. - ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_* ENUMs } ze_command_queue_group_property_flag_t; @@ -1704,12 +2189,12 @@ typedef struct _ze_command_queue_group_properties_t /// @brief Retrieves command queue group properties of the device. /// /// @details -/// - Properties are reported for each physical command queue type supported -/// by the device. +/// - Properties are reported for each physical command queue group +/// available on the device. /// - Multiple calls to this function will return properties in the same /// order. -/// - The order in which the properties are returned defines the command -/// queue group's ordinal. +/// - The order in which the properties are returned is defined by the +/// command queue group's ordinal. /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. /// @@ -1723,6 +2208,14 @@ typedef struct _ze_command_queue_group_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1730,17 +2223,21 @@ typedef struct _ze_command_queue_group_properties_t ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceGetCommandQueueGroupProperties( ze_device_handle_t hDevice, ///< [in] handle of the device - uint32_t* pCount, ///< [in,out] pointer to the number of command queue group properties. - ///< if count is zero, then the driver shall update the value with the - ///< total number of command queue group properties available. - ///< if count is greater than the number of command queue group properties - ///< available, then the driver shall update the value with the correct - ///< number of command queue group properties available. + uint32_t* pCount, ///< [in,out] pointer to the number of available command queue groups. + ///< If count is zero, then the driver shall update the value with the + ///< total number of command queue groups available. + ///< If count is less than the number of command queue groups available, + ///< then the driver shall only retrieve command queue group properties for + ///< the given number of command queue groups. + ///< If count is greater than or equal to the number of command queue + ///< groups available, then the driver shall retrieve command queue group + ///< properties for all available command queue groups. ze_command_queue_group_properties_t* pCommandQueueGroupProperties ///< [in,out][optional][range(0, *pCount)] array of query results for ///< command queue group properties. - ///< if count is less than the number of command queue group properties - ///< available, then driver shall only retrieve that number of command - ///< queue group properties. + ///< If count is less than the number of command queue groups available, + ///< then the driver shall only retrieve that number of command queue group properties. + ///< The order of properties in the array corresponds to the command queue + ///< group ordinal. ); /////////////////////////////////////////////////////////////////////////////// @@ -1749,7 +2246,7 @@ typedef uint32_t ze_device_memory_property_flags_t; typedef enum _ze_device_memory_property_flag_t { ZE_DEVICE_MEMORY_PROPERTY_FLAG_TBD = ZE_BIT(0), ///< reserved for future use - ZE_DEVICE_MEMORY_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_DEVICE_MEMORY_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_MEMORY_PROPERTY_FLAG_* ENUMs } ze_device_memory_property_flag_t; @@ -1793,6 +2290,14 @@ typedef struct _ze_device_memory_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1825,7 +2330,7 @@ typedef enum _ze_memory_access_cap_flag_t ZE_MEMORY_ACCESS_CAP_FLAG_ATOMIC = ZE_BIT(1), ///< Supports atomic access ZE_MEMORY_ACCESS_CAP_FLAG_CONCURRENT = ZE_BIT(2), ///< Supports concurrent access ZE_MEMORY_ACCESS_CAP_FLAG_CONCURRENT_ATOMIC = ZE_BIT(3), ///< Supports concurrent atomic access - ZE_MEMORY_ACCESS_CAP_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_MEMORY_ACCESS_CAP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MEMORY_ACCESS_CAP_FLAG_* ENUMs } ze_memory_access_cap_flag_t; @@ -1867,6 +2372,14 @@ typedef struct _ze_device_memory_access_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1883,7 +2396,7 @@ typedef uint32_t ze_device_cache_property_flags_t; typedef enum _ze_device_cache_property_flag_t { ZE_DEVICE_CACHE_PROPERTY_FLAG_USER_CONTROL = ZE_BIT(0), ///< Device support User Cache Control (i.e. SLM section vs Generic Cache) - ZE_DEVICE_CACHE_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_DEVICE_CACHE_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_CACHE_PROPERTY_FLAG_* ENUMs } ze_device_cache_property_flag_t; @@ -1917,6 +2430,14 @@ typedef struct _ze_device_cache_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1977,6 +2498,14 @@ typedef struct _ze_device_image_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2014,6 +2543,14 @@ typedef struct _ze_device_external_memory_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2031,7 +2568,7 @@ typedef enum _ze_device_p2p_property_flag_t { ZE_DEVICE_P2P_PROPERTY_FLAG_ACCESS = ZE_BIT(0), ///< Device supports access between peer devices. ZE_DEVICE_P2P_PROPERTY_FLAG_ATOMICS = ZE_BIT(1), ///< Device supports atomics between peer devices. - ZE_DEVICE_P2P_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_DEVICE_P2P_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_P2P_PROPERTY_FLAG_* ENUMs } ze_device_p2p_property_flag_t; @@ -2062,6 +2599,14 @@ typedef struct _ze_device_p2p_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// + `nullptr == hPeerDevice` @@ -2101,6 +2646,14 @@ zeDeviceGetP2PProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// + `nullptr == hPeerDevice` @@ -2124,11 +2677,17 @@ zeDeviceCanAccessPeer( /// - The implementation of this function must be thread-safe. /// /// @returns -/// - ::ZE_RESULT_SUCCESS /// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_SUCCESS @@ -2154,18 +2713,122 @@ zeDeviceGetStatus( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == hostTimestamp` /// + `nullptr == deviceTimestamp` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// + The feature is not supported by the underlying platform. ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceGetGlobalTimestamps( ze_device_handle_t hDevice, ///< [in] handle of the device uint64_t* hostTimestamp, ///< [out] value of the Host's global timestamp that correlates with the - ///< Device's global timestamp value + ///< Device's global timestamp value. uint64_t* deviceTimestamp ///< [out] value of the Device's global timestamp that correlates with the - ///< Host's global timestamp value + ///< Host's global timestamp value. + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Synchronizes all command queues related to the device. +/// +/// @details +/// - The application may call this function from simultaneous threads with +/// the same device handle. +/// - The implementation of this function should be thread-safe. +/// - This function blocks until all preceding submissions to all queues on +/// the device are completed. +/// - This function returns an error if device execution fails. +/// - This function hangs indefinitely if the device is blocked on a +/// non-signaled event. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hDevice` +ZE_APIEXPORT ze_result_t ZE_APICALL +zeDeviceSynchronize( + ze_device_handle_t hDevice ///< [in] handle of the device + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Supported Event properties flags +typedef uint32_t ze_device_event_properties_flags_t; +typedef enum _ze_device_event_properties_flag_t +{ + ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_AGGREGATE_STORAGE = ZE_BIT(0), ///< Counter-based Event with external aggregate storage supported + ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_IPC = ZE_BIT(1), ///< Counter-based Event IPC sharing supported + ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_SYNC_ALLOCATION = ZE_BIT(2), ///< Counter-based Event with external sync allocation supported + ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_INTERRUPT_WAIT = ZE_BIT(3), ///< Counter-based Event waiting for external interrupt id supported + ZE_DEVICE_EVENT_PROPERTIES_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_EVENT_PROPERTIES_FLAG_* ENUMs + +} ze_device_event_properties_flag_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Device Event properties struct. Can be passed as pNext to +/// ::ze_device_properties_t to obtain properties +typedef struct _ze_device_event_properties_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + ze_device_event_properties_flags_t flags; ///< [out] Supported Event properties. Valid combination of + ///< ::ze_device_event_properties_flag_t. + +} ze_device_event_properties_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Returns unified increment value that can be used for Counter Based +/// Events created with +/// ::ze_event_counter_based_external_aggregate_storage_desc_t +/// +/// @details +/// - Value is applicable only to this specific device +/// - It may be used, when user is not able define number of internal driver +/// operations during given append call, for example dividing copy into +/// multiple engines. More details can be found in programming guide. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hDevice` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == incrementValue` +ZE_APIEXPORT ze_result_t ZE_APICALL +zeDeviceGetAggregatedCopyOffloadIncrementValue( + ze_device_handle_t hDevice, ///< [in] handle of the device + uint32_t* incrementValue ///< [out] increment value that can be used for Event creation ); #if !defined(__GNUC__) @@ -2181,7 +2844,7 @@ typedef uint32_t ze_context_flags_t; typedef enum _ze_context_flag_t { ZE_CONTEXT_FLAG_TBD = ZE_BIT(0), ///< reserved for future use - ZE_CONTEXT_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_CONTEXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_CONTEXT_FLAG_* ENUMs } ze_context_flag_t; @@ -2213,13 +2876,22 @@ typedef struct _ze_context_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == desc` /// + `nullptr == phContext` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x1 < desc->flags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeContextCreate( ze_driver_handle_t hDriver, ///< [in] handle of the driver object @@ -2242,6 +2914,14 @@ zeContextCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2249,6 +2929,7 @@ zeContextCreate( /// + `nullptr == phContext` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x1 < desc->flags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_SIZE /// + `(nullptr == phDevices) && (0 < numDevices)` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -2286,6 +2967,14 @@ zeContextCreateEx( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -2303,11 +2992,17 @@ zeContextDestroy( /// - The implementation of this function should be lock-free. /// /// @returns -/// - ::ZE_RESULT_SUCCESS /// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_SUCCESS @@ -2336,6 +3031,8 @@ typedef enum _ze_command_queue_flag_t ///< work across multiple engines. ///< this flag should be used when applications want full control over ///< multi-engine submission and scheduling. + ///< This flag is **DEPRECATED** as flag + ///< ${X}_COMMAND_LIST_FLAG_EXPLICIT_ONLY is **DEPRECATED**. ZE_COMMAND_QUEUE_FLAG_IN_ORDER = ZE_BIT(1), ///< To be used only when creating immediate command lists. Commands ///< appended to the immediate command ///< list are executed in-order, with driver implementation enforcing @@ -2345,7 +3042,12 @@ typedef enum _ze_command_queue_flag_t ///< the next to define an in-order list, and application is allowed to ///< pass signal and wait events ///< to each appended command to implement more complex dependency graphs. - ZE_COMMAND_QUEUE_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_COMMAND_QUEUE_FLAG_COPY_OFFLOAD_HINT = ZE_BIT(2), ///< To be used only when creating immediate command lists and only for + ///< compute queues. + ///< Try to offload copy operations to different engines. This is only a hint. + ///< Driver may ignore it per append call, based on platform capabilities + ///< or internal heuristics. + ZE_COMMAND_QUEUE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_COMMAND_QUEUE_FLAG_* ENUMs } ze_command_queue_flag_t; @@ -2358,7 +3060,7 @@ typedef enum _ze_command_queue_mode_t ///< Host thread is blocked using wait on implicit synchronization object ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS = 2, ///< Device execution is scheduled and will complete in future; ///< explicit synchronization object must be used to determine completeness - ZE_COMMAND_QUEUE_MODE_FORCE_UINT32 = 0x7fffffff + ZE_COMMAND_QUEUE_MODE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_COMMAND_QUEUE_MODE_* ENUMs } ze_command_queue_mode_t; @@ -2369,7 +3071,7 @@ typedef enum _ze_command_queue_priority_t ZE_COMMAND_QUEUE_PRIORITY_NORMAL = 0, ///< [default] normal priority ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_LOW = 1, ///< lower priority than normal ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_HIGH = 2, ///< higher priority than normal - ZE_COMMAND_QUEUE_PRIORITY_FORCE_UINT32 = 0x7fffffff + ZE_COMMAND_QUEUE_PRIORITY_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_COMMAND_QUEUE_PRIORITY_* ENUMs } ze_command_queue_priority_t; @@ -2382,7 +3084,7 @@ typedef struct _ze_command_queue_desc_t ///< structure (i.e. contains stype and pNext). uint32_t ordinal; ///< [in] command queue group ordinal uint32_t index; ///< [in] command queue index within the group; - ///< must be zero if ::ZE_COMMAND_QUEUE_FLAG_EXPLICIT_ONLY is not set + ///< must be zero. ze_command_queue_flags_t flags; ///< [in] usage flags. ///< must be 0 (default) or a valid combination of ::ze_command_queue_flag_t; ///< default behavior may use implicit driver-based heuristics to balance @@ -2413,6 +3115,14 @@ typedef struct _ze_command_queue_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -2420,9 +3130,10 @@ typedef struct _ze_command_queue_desc_t /// + `nullptr == desc` /// + `nullptr == phCommandQueue` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x3 < desc->flags` +/// + `0x7 < desc->flags` /// + `::ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS < desc->mode` /// + `::ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_HIGH < desc->priority` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandQueueCreate( ze_context_handle_t hContext, ///< [in] handle of the context object @@ -2455,6 +3166,14 @@ zeCommandQueueCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandQueue` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -2495,6 +3214,14 @@ zeCommandQueueDestroy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandQueue` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2525,6 +3252,14 @@ zeCommandQueueExecuteCommandLists( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandQueue` /// - ::ZE_RESULT_NOT_READY @@ -2554,6 +3289,14 @@ zeCommandQueueSynchronize( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandQueue` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2577,6 +3320,14 @@ zeCommandQueueGetOrdinal( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandQueue` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2613,6 +3364,8 @@ typedef enum _ze_command_list_flag_t ///< work across multiple engines. ///< this flag should be used when applications want full control over ///< multi-engine submission and scheduling. + ///< This flag is **DEPRECATED** and implementations are not expected to + ///< support this feature. ZE_COMMAND_LIST_FLAG_IN_ORDER = ZE_BIT(3), ///< commands appended to this command list are executed in-order, with ///< driver implementation ///< enforcing dependencies between them. Application is not required to @@ -2624,7 +3377,11 @@ typedef enum _ze_command_list_flag_t ///< more complex dependency graphs. Cannot be combined with ::ZE_COMMAND_LIST_FLAG_RELAXED_ORDERING. ZE_COMMAND_LIST_FLAG_EXP_CLONEABLE = ZE_BIT(4), ///< this command list may be cloned using ::zeCommandListCreateCloneExp ///< after ::zeCommandListClose. - ZE_COMMAND_LIST_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_COMMAND_LIST_FLAG_COPY_OFFLOAD_HINT = ZE_BIT(5), ///< Try to offload copy operations to different engines. Applicable only + ///< for compute queues. + ///< This is only a hint. Driver may ignore it per append call, based on + ///< platform capabilities or internal heuristics. + ZE_COMMAND_LIST_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_COMMAND_LIST_FLAG_* ENUMs } ze_command_list_flag_t; @@ -2662,6 +3419,14 @@ typedef struct _ze_command_list_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -2669,7 +3434,8 @@ typedef struct _ze_command_list_desc_t /// + `nullptr == desc` /// + `nullptr == phCommandList` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x1f < desc->flags` +/// + `0x3f < desc->flags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListCreate( ze_context_handle_t hContext, ///< [in] handle of the context object @@ -2702,6 +3468,14 @@ zeCommandListCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -2709,9 +3483,10 @@ zeCommandListCreate( /// + `nullptr == altdesc` /// + `nullptr == phCommandList` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x3 < altdesc->flags` +/// + `0x7 < altdesc->flags` /// + `::ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS < altdesc->mode` /// + `::ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_HIGH < altdesc->priority` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListCreateImmediate( ze_context_handle_t hContext, ///< [in] handle of the context object @@ -2738,6 +3513,14 @@ zeCommandListCreateImmediate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -2760,6 +3543,14 @@ zeCommandListDestroy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -2784,6 +3575,14 @@ zeCommandListClose( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -2816,6 +3615,14 @@ zeCommandListReset( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2855,6 +3662,13 @@ zeCommandListAppendWriteGlobalTimestamp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_NOT_READY @@ -2886,6 +3700,14 @@ zeCommandListHostSynchronize( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2909,6 +3731,14 @@ zeCommandListGetDeviceHandle( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2933,6 +3763,14 @@ zeCommandListGetContextHandle( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2959,6 +3797,13 @@ zeCommandListGetOrdinal( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandListImmediate` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2985,6 +3830,14 @@ zeCommandListImmediateGetIndex( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3031,6 +3884,14 @@ zeCommandListIsImmediate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT @@ -3068,6 +3929,14 @@ zeCommandListAppendBarrier( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3108,6 +3977,14 @@ zeCommandListAppendMemoryRangesBarrier( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -3154,6 +4031,14 @@ zeContextSystemBarrier( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3179,11 +4064,12 @@ zeCommandListAppendMemoryCopy( /// @brief Initializes host, device, or shared memory. /// /// @details -/// - The application must ensure the memory pointed to by dstptr is -/// accessible by the device on which the command list was created. -/// - The implementation must not access the memory pointed to by dstptr as -/// it is free to be modified by either the Host or device up until +/// - The application must ensure the memory pointed to by ptr is accessible +/// by the device on which the command list was created. +/// - The implementation must not access the memory pointed to by ptr as it +/// is free to be modified by either the Host or device up until /// execution. +/// - The ptr must be aligned to pattern_size /// - The value to initialize memory to is described by the pattern and the /// pattern size. /// - The pattern size must be a power-of-two and less than or equal to the @@ -3208,12 +4094,21 @@ zeCommandListAppendMemoryCopy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == ptr` /// + `nullptr == pattern` /// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT /// - ::ZE_RESULT_ERROR_INVALID_SIZE /// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -3271,6 +4166,14 @@ typedef struct _ze_copy_region_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3328,6 +4231,14 @@ zeCommandListAppendMemoryCopyRegion( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hContextSrc` @@ -3375,6 +4286,14 @@ zeCommandListAppendMemoryCopyFromContext( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hDstImage` @@ -3431,6 +4350,14 @@ typedef struct _ze_image_region_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hDstImage` @@ -3482,6 +4409,14 @@ zeCommandListAppendImageCopyRegion( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hSrcImage` @@ -3532,6 +4467,14 @@ zeCommandListAppendImageCopyToMemory( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hDstImage` @@ -3588,6 +4531,14 @@ zeCommandListAppendImageCopyFromMemory( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3614,7 +4565,7 @@ typedef enum _ze_memory_advice_t ZE_MEMORY_ADVICE_SET_SYSTEM_MEMORY_PREFERRED_LOCATION = 8, ///< hint that the preferred memory location is host memory ZE_MEMORY_ADVICE_CLEAR_SYSTEM_MEMORY_PREFERRED_LOCATION = 9, ///< removes the effect of ///< ::ZE_MEMORY_ADVICE_SET_SYSTEM_MEMORY_PREFERRED_LOCATION - ZE_MEMORY_ADVICE_FORCE_UINT32 = 0x7fffffff + ZE_MEMORY_ADVICE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MEMORY_ADVICE_* ENUMs } ze_memory_advice_t; @@ -3648,6 +4599,14 @@ typedef enum _ze_memory_advice_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hDevice` @@ -3655,6 +4614,7 @@ typedef enum _ze_memory_advice_t /// + `nullptr == ptr` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZE_MEMORY_ADVICE_CLEAR_SYSTEM_MEMORY_PREFERRED_LOCATION < advice` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListAppendMemAdvise( ze_command_list_handle_t hCommandList, ///< [in] handle of command list @@ -3682,7 +4642,7 @@ typedef enum _ze_event_pool_flag_t ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP = ZE_BIT(3), ///< Indicates all events in pool will contain kernel timestamps ///< synchronized to host time domain; cannot be combined with ///< ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP - ZE_EVENT_POOL_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_EVENT_POOL_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EVENT_POOL_FLAG_* ENUMs } ze_event_pool_flag_t; @@ -3716,6 +4676,14 @@ typedef struct _ze_event_pool_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3723,6 +4691,7 @@ typedef struct _ze_event_pool_desc_t /// + `nullptr == phEventPool` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0xf < desc->flags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_SIZE /// + `0 == desc->count` /// + `(nullptr == phDevices) && (0 < numDevices)` @@ -3759,6 +4728,14 @@ zeEventPoolCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEventPool` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -3778,10 +4755,60 @@ typedef enum _ze_event_scope_flag_t ///< device access and peer device access ZE_EVENT_SCOPE_FLAG_HOST = ZE_BIT(2), ///< cache hierarchies are flushed or invalidated sufficient for device and ///< host access - ZE_EVENT_SCOPE_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_EVENT_SCOPE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EVENT_SCOPE_FLAG_* ENUMs } ze_event_scope_flag_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Supported flags for defining counter based event +typedef uint32_t ze_event_counter_based_flags_t; +typedef enum _ze_event_counter_based_flag_t +{ + ZE_EVENT_COUNTER_BASED_FLAG_IMMEDIATE = ZE_BIT(0), ///< Counter-based event is used for immediate command lists (default) + ZE_EVENT_COUNTER_BASED_FLAG_NON_IMMEDIATE = ZE_BIT(1), ///< Counter-based event is used for non-immediate command lists + ZE_EVENT_COUNTER_BASED_FLAG_HOST_VISIBLE = ZE_BIT(2), ///< Signals and waits are also visible to host + ZE_EVENT_COUNTER_BASED_FLAG_IPC = ZE_BIT(3), ///< Event can be shared across processes for waiting + ZE_EVENT_COUNTER_BASED_FLAG_DEVICE_TIMESTAMP = ZE_BIT(4), ///< Event contains timestamps populated in the device time domain. + ///< Implementation of this can be vendor specific, but typically pulled + ///< from timers on the offload device and not the host. + ///< Cannot be combined with ::ZE_EVENT_COUNTER_BASED_FLAG_HOST_TIMESTAMP + ZE_EVENT_COUNTER_BASED_FLAG_HOST_TIMESTAMP = ZE_BIT(5), ///< Indicates that event will contain timestamps converted to the host + ///< time domain + ///< Cannot be combined with ::ZE_EVENT_COUNTER_BASED_FLAG_DEVICE_TIMESTAMP + ///< It is recommended to use this flag for most users that want to + ///< correlate timestamps from the host and device into a single timeline. + ///< For host timestamps see ::zeDeviceGetGlobalTimestamps. + ZE_EVENT_COUNTER_BASED_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EVENT_COUNTER_BASED_FLAG_* ENUMs + +} ze_event_counter_based_flag_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Supported event sync mode flags +typedef uint32_t ze_event_sync_mode_flags_t; +typedef enum _ze_event_sync_mode_flag_t +{ + ZE_EVENT_SYNC_MODE_FLAG_LOW_POWER_WAIT = ZE_BIT(0), ///< Low power host synchronization mode, for better CPU utilization + ZE_EVENT_SYNC_MODE_FLAG_SIGNAL_INTERRUPT = ZE_BIT(1), ///< Generate interrupt when Event is signalled on Device. It may be used + ///< to optimize low power CPU synchronization + ZE_EVENT_SYNC_MODE_FLAG_EXTERNAL_INTERRUPT_WAIT = ZE_BIT(2), ///< Host synchronization APIs wait for external interrupt id. Can be used + ///< only for Counter Based Events + ZE_EVENT_SYNC_MODE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EVENT_SYNC_MODE_FLAG_* ENUMs + +} ze_event_sync_mode_flag_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Event sync mode descriptor +typedef struct _ze_event_sync_mode_desc_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + ze_event_sync_mode_flags_t syncModeFlags; ///< [in] valid combination of ::ze_event_sync_mode_flag_t + uint32_t externalInterruptId; ///< [in] External interrupt id. Used only when + ///< ::ZE_EVENT_SYNC_MODE_FLAG_EXTERNAL_INTERRUPT_WAIT flag is set + +} ze_event_sync_mode_desc_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Event descriptor typedef struct _ze_event_desc_t @@ -3804,6 +4831,58 @@ typedef struct _ze_event_desc_t } ze_event_desc_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Counter Based Event descriptor +typedef struct _ze_event_counter_based_desc_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + ze_event_counter_based_flags_t flags; ///< [in] counter based event flags. + ///< Must be 0 (default) or a valid combination of ::ze_event_counter_based_flag_t + ze_event_scope_flags_t signal; ///< [in] defines the scope of relevant cache hierarchies to flush on a + ///< signal action before the event is triggered. + ///< must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; + ///< default behavior is synchronization within the command list only, no + ///< additional cache hierarchies are flushed. + ze_event_scope_flags_t wait; ///< [in] defines the scope of relevant cache hierarchies to invalidate on + ///< a wait action after the event is complete. + ///< must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; + ///< default behavior is synchronization within the command list only, no + ///< additional cache hierarchies are invalidated. + +} ze_event_counter_based_desc_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Counter Based Event external sync allocation descriptor. Passed as +/// pNext to ::ze_event_counter_based_desc_t +typedef struct _ze_event_counter_based_external_sync_allocation_desc_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + uint64_t* deviceAddress; ///< [in] device address for external synchronization allocation + uint64_t* hostAddress; ///< [in] host address for external synchronization allocation + uint64_t completionValue; ///< [in] completion value for external synchronization allocation + +} ze_event_counter_based_external_sync_allocation_desc_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Counter Based Event external aggregate storage. Passed as pNext to +/// ::ze_event_counter_based_desc_t +typedef struct _ze_event_counter_based_external_aggregate_storage_desc_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + uint64_t* deviceAddress; ///< [in] device address that would be updated with atomic_add upon + ///< signaling of this event, must be device USM memory + uint64_t incrementValue; ///< [in] value which would by atomically added upon each completion + uint64_t completionValue; ///< [in] final completion value, when value under deviceAddress is equal + ///< or greater then this value then event is considered as completed + +} ze_event_counter_based_external_aggregate_storage_desc_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Creates an event from the pool. /// @@ -3827,6 +4906,14 @@ typedef struct _ze_event_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEventPool` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3835,6 +4922,7 @@ typedef struct _ze_event_desc_t /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x7 < desc->signal` /// + `0x7 < desc->wait` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeEventCreate( ze_event_pool_handle_t hEventPool, ///< [in] handle of the event pool @@ -3842,6 +4930,42 @@ zeEventCreate( ze_event_handle_t* phEvent ///< [out] pointer to handle of event object created ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Creates Counter Based Event +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hContext` +/// + `nullptr == hDevice` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == desc` +/// + `nullptr == phEvent` +/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +/// + `0x3f < desc->flags` +/// + `0x7 < desc->signal` +/// + `0x7 < desc->wait` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +ZE_APIEXPORT ze_result_t ZE_APICALL +zeEventCounterBasedCreate( + ze_context_handle_t hContext, ///< [in] handle of the context object + ze_device_handle_t hDevice, ///< [in] handle of the device object + const ze_event_counter_based_desc_t* desc, ///< [in] pointer to counter based event descriptor + ze_event_handle_t* phEvent ///< [out] pointer to handle of event object created + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Deletes an event object. /// @@ -3865,6 +4989,14 @@ zeEventCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEvent` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -3887,6 +5019,14 @@ zeEventDestroy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEventPool` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3920,6 +5060,14 @@ zeEventPoolGetIpcHandle( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -3958,6 +5106,14 @@ zeEventPoolPutIpcHandle( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3985,6 +5141,14 @@ zeEventPoolOpenIpcHandle( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEventPool` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -3992,6 +5156,119 @@ zeEventPoolCloseIpcHandle( ze_event_pool_handle_t hEventPool ///< [in][release] handle of event pool object ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Gets an IPC counter based event handle that can be shared with another +/// process. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hEvent` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == phIpc` +/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +ZE_APIEXPORT ze_result_t ZE_APICALL +zeEventCounterBasedGetIpcHandle( + ze_event_handle_t hEvent, ///< [in] handle of event object + ze_ipc_event_counter_based_handle_t* phIpc ///< [out] Returned IPC event handle + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Opens an IPC event handle to retrieve from another process. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hContext` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == phEvent` +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +ZE_APIEXPORT ze_result_t ZE_APICALL +zeEventCounterBasedOpenIpcHandle( + ze_context_handle_t hContext, ///< [in] handle of the context object to associate with the IPC event + ///< handle + ze_ipc_event_counter_based_handle_t hIpc, ///< [in] IPC event handle + ze_event_handle_t* phEvent ///< [out] pointer handle of event object created + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Closes an IPC event handle in the current process. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hEvent` +/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +ZE_APIEXPORT ze_result_t ZE_APICALL +zeEventCounterBasedCloseIpcHandle( + ze_event_handle_t hEvent ///< [in][release] handle of event object + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Returns Counter Based Event completion value (counter) and its device +/// address +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hEvent` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == completionValue` +/// + `nullptr == deviceAddress` +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +ZE_APIEXPORT ze_result_t ZE_APICALL +zeEventCounterBasedGetDeviceAddress( + ze_event_handle_t hEvent, ///< [in] handle of event object + uint64_t* completionValue, ///< [in][out] completion value + uint64_t* deviceAddress ///< [in][out] counter device address + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Appends a signal of the event from the device into a command list. /// @@ -4020,6 +5297,14 @@ zeEventPoolCloseIpcHandle( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hEvent` @@ -4048,6 +5333,14 @@ zeCommandListAppendSignalEvent( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4083,6 +5376,14 @@ zeCommandListAppendWaitOnEvents( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEvent` /// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT @@ -4108,6 +5409,14 @@ zeEventHostSignal( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEvent` /// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT @@ -4143,6 +5452,14 @@ zeEventHostSynchronize( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEvent` /// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT @@ -4176,6 +5493,14 @@ zeEventQueryStatus( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hEvent` @@ -4203,6 +5528,14 @@ zeCommandListAppendEventReset( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEvent` /// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT @@ -4254,6 +5587,14 @@ typedef struct _ze_kernel_timestamp_result_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEvent` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4294,6 +5635,14 @@ zeEventQueryKernelTimestamp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4332,7 +5681,15 @@ zeCommandListAppendQueryKernelTimestamps( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEvent` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == phEventPool` @@ -4355,6 +5712,14 @@ zeEventGetEventPool( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEvent` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4380,6 +5745,14 @@ zeEventGetSignalScope( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEvent` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4405,6 +5778,14 @@ zeEventGetWaitScope( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEventPool` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4428,6 +5809,14 @@ zeEventPoolGetContextHandle( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEventPool` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4452,7 +5841,7 @@ typedef uint32_t ze_fence_flags_t; typedef enum _ze_fence_flag_t { ZE_FENCE_FLAG_SIGNALED = ZE_BIT(0), ///< fence is created in the signaled state, otherwise not signaled. - ZE_FENCE_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_FENCE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_FENCE_FLAG_* ENUMs } ze_fence_flag_t; @@ -4489,6 +5878,14 @@ typedef struct _ze_fence_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandQueue` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4496,6 +5893,7 @@ typedef struct _ze_fence_desc_t /// + `nullptr == phFence` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x1 < desc->flags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeFenceCreate( ze_command_queue_handle_t hCommandQueue, ///< [in] handle of command queue @@ -4525,6 +5923,14 @@ zeFenceCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFence` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -4550,6 +5956,14 @@ zeFenceDestroy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFence` /// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT @@ -4584,6 +5998,14 @@ zeFenceHostSynchronize( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFence` /// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT @@ -4611,6 +6033,14 @@ zeFenceQueryStatus( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFence` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -4632,7 +6062,7 @@ typedef enum _ze_image_flag_t { ZE_IMAGE_FLAG_KERNEL_WRITE = ZE_BIT(0), ///< kernels will write contents ZE_IMAGE_FLAG_BIAS_UNCACHED = ZE_BIT(1), ///< device should not cache contents - ZE_IMAGE_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_IMAGE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_FLAG_* ENUMs } ze_image_flag_t; @@ -4646,7 +6076,7 @@ typedef enum _ze_image_type_t ZE_IMAGE_TYPE_2DARRAY = 3, ///< 2D array ZE_IMAGE_TYPE_3D = 4, ///< 3D ZE_IMAGE_TYPE_BUFFER = 5, ///< Buffer - ZE_IMAGE_TYPE_FORCE_UINT32 = 0x7fffffff + ZE_IMAGE_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_TYPE_* ENUMs } ze_image_type_t; @@ -4700,7 +6130,7 @@ typedef enum _ze_image_format_layout_t ZE_IMAGE_FORMAT_LAYOUT_8_8_8 = 43, ///< 3-component 8-bit layout ZE_IMAGE_FORMAT_LAYOUT_16_16_16 = 44, ///< 3-component 16-bit layout ZE_IMAGE_FORMAT_LAYOUT_32_32_32 = 45, ///< 3-component 32-bit layout - ZE_IMAGE_FORMAT_LAYOUT_FORCE_UINT32 = 0x7fffffff + ZE_IMAGE_FORMAT_LAYOUT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_FORMAT_LAYOUT_* ENUMs } ze_image_format_layout_t; @@ -4713,7 +6143,7 @@ typedef enum _ze_image_format_type_t ZE_IMAGE_FORMAT_TYPE_UNORM = 2, ///< Unsigned normalized integer ZE_IMAGE_FORMAT_TYPE_SNORM = 3, ///< Signed normalized integer ZE_IMAGE_FORMAT_TYPE_FLOAT = 4, ///< Float - ZE_IMAGE_FORMAT_TYPE_FORCE_UINT32 = 0x7fffffff + ZE_IMAGE_FORMAT_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_FORMAT_TYPE_* ENUMs } ze_image_format_type_t; @@ -4728,7 +6158,8 @@ typedef enum _ze_image_format_swizzle_t ZE_IMAGE_FORMAT_SWIZZLE_0 = 4, ///< Zero ZE_IMAGE_FORMAT_SWIZZLE_1 = 5, ///< One ZE_IMAGE_FORMAT_SWIZZLE_X = 6, ///< Don't care - ZE_IMAGE_FORMAT_SWIZZLE_FORCE_UINT32 = 0x7fffffff + ZE_IMAGE_FORMAT_SWIZZLE_D = 7, ///< Depth Component + ZE_IMAGE_FORMAT_SWIZZLE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_FORMAT_SWIZZLE_* ENUMs } ze_image_format_swizzle_t; @@ -4793,7 +6224,7 @@ typedef enum _ze_image_sampler_filter_flag_t { ZE_IMAGE_SAMPLER_FILTER_FLAG_POINT = ZE_BIT(0), ///< device supports point filtering ZE_IMAGE_SAMPLER_FILTER_FLAG_LINEAR = ZE_BIT(1), ///< device supports linear filtering - ZE_IMAGE_SAMPLER_FILTER_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_IMAGE_SAMPLER_FILTER_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_SAMPLER_FILTER_FLAG_* ENUMs } ze_image_sampler_filter_flag_t; @@ -4822,6 +6253,14 @@ typedef struct _ze_image_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4830,6 +6269,7 @@ typedef struct _ze_image_properties_t /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x3 < desc->flags` /// + `::ZE_IMAGE_TYPE_BUFFER < desc->type` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeImageGetProperties( ze_device_handle_t hDevice, ///< [in] handle of the device @@ -4856,6 +6296,14 @@ zeImageGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -4865,6 +6313,7 @@ zeImageGetProperties( /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x3 < desc->flags` /// + `::ZE_IMAGE_TYPE_BUFFER < desc->type` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT ZE_APIEXPORT ze_result_t ZE_APICALL zeImageCreate( @@ -4892,6 +6341,14 @@ zeImageCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hImage` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -4915,7 +6372,7 @@ typedef enum _ze_device_mem_alloc_flag_t ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_CACHED = ZE_BIT(0), ///< device should cache allocation ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_UNCACHED = ZE_BIT(1), ///< device should not cache allocation (UC) ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_INITIAL_PLACEMENT = ZE_BIT(2), ///< optimize shared allocation for first access on the device - ZE_DEVICE_MEM_ALLOC_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_DEVICE_MEM_ALLOC_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_MEM_ALLOC_FLAG_* ENUMs } ze_device_mem_alloc_flag_t; @@ -4943,7 +6400,7 @@ typedef enum _ze_host_mem_alloc_flag_t ZE_HOST_MEM_ALLOC_FLAG_BIAS_UNCACHED = ZE_BIT(1), ///< host should not cache allocation (UC) ZE_HOST_MEM_ALLOC_FLAG_BIAS_WRITE_COMBINED = ZE_BIT(2), ///< host memory should be allocated write-combined (WC) ZE_HOST_MEM_ALLOC_FLAG_BIAS_INITIAL_PLACEMENT = ZE_BIT(3), ///< optimize shared allocation for first access on the host - ZE_HOST_MEM_ALLOC_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_HOST_MEM_ALLOC_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_HOST_MEM_ALLOC_FLAG_* ENUMs } ze_host_mem_alloc_flag_t; @@ -4988,6 +6445,14 @@ typedef struct _ze_host_mem_alloc_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4997,6 +6462,7 @@ typedef struct _ze_host_mem_alloc_desc_t /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x7 < device_desc->flags` /// + `0xf < host_desc->flags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE /// + `0 == size` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT @@ -5033,6 +6499,14 @@ zeMemAllocShared( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -5041,6 +6515,7 @@ zeMemAllocShared( /// + `nullptr == pptr` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x7 < device_desc->flags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE /// + `0 == size` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT @@ -5078,6 +6553,14 @@ zeMemAllocDevice( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5085,6 +6568,7 @@ zeMemAllocDevice( /// + `nullptr == pptr` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0xf < host_desc->flags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE /// + `0 == size` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT @@ -5108,8 +6592,11 @@ zeMemAllocHost( /// @details /// - The application must ensure the device is not currently referencing /// the memory before it is freed -/// - The implementation of this function may immediately free all Host and -/// Device allocations associated with this memory +/// - The implementation will use the default and immediate policy to +/// schedule all Host and Device allocations associated with this memory +/// to be freed, without any safety checking. Actual freeing of memory is +/// specific to user mode driver and kernel mode driver implementation and +/// may be done asynchronously. /// - The application must **not** call this function from simultaneous /// threads with the same pointer. /// - The implementation of this function must be thread-safe. @@ -5120,6 +6607,14 @@ zeMemAllocHost( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5138,7 +6633,9 @@ typedef enum _ze_memory_type_t ZE_MEMORY_TYPE_HOST = 1, ///< the memory pointed to is a host allocation ZE_MEMORY_TYPE_DEVICE = 2, ///< the memory pointed to is a device allocation ZE_MEMORY_TYPE_SHARED = 3, ///< the memory pointed to is a shared ownership allocation - ZE_MEMORY_TYPE_FORCE_UINT32 = 0x7fffffff + ZE_MEMORY_TYPE_HOST_IMPORTED = 4, ///< the memory pointed to is a host allocation created from external + ///< system memory + ZE_MEMORY_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MEMORY_TYPE_* ENUMs } ze_memory_type_t; @@ -5172,6 +6669,14 @@ typedef struct _ze_memory_allocation_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5197,10 +6702,19 @@ zeMemGetAllocProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == ptr` +/// - ::ZE_RESULT_ERROR_ADDRESS_NOT_FOUND ZE_APIEXPORT ze_result_t ZE_APICALL zeMemGetAddressRange( ze_context_handle_t hContext, ///< [in] handle of the context object @@ -5227,6 +6741,14 @@ zeMemGetAddressRange( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5244,7 +6766,8 @@ zeMemGetIpcHandle( /// /// @details /// - Handle passed must be a valid file descriptor obtained with -/// ::ze_external_memory_export_fd_t via ::zeMemGetAllocProperties. +/// ::ze_external_memory_export_fd_t via ::zeMemGetAllocProperties or +/// ::zePhysicalMemGetProperties. /// - Returned IPC handle may contain metadata in addition to the file /// descriptor. /// - The application may call this function from simultaneous threads. @@ -5256,6 +6779,14 @@ zeMemGetIpcHandle( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5282,6 +6813,14 @@ zeMemGetIpcHandleFromFileDescriptorExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5298,7 +6837,8 @@ zeMemGetFileDescriptorFromIpcHandleExp( /// /// @details /// - This call may be used for IPC handles previously obtained with either -/// ::zeMemGetIpcHandle or with ::ze_external_memory_export_fd_t via ::zeMemGetAllocProperties. +/// ::zeMemGetIpcHandle or with ::ze_external_memory_export_fd_t via +/// ::zeMemGetAllocProperties or ::zePhysicalMemGetProperties. /// - Upon call, driver may release any underlying resources associated with /// the IPC handle. /// For instance, it may close the file descriptor contained in the IPC @@ -5315,6 +6855,14 @@ zeMemGetFileDescriptorFromIpcHandleExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -5330,7 +6878,7 @@ typedef enum _ze_ipc_memory_flag_t { ZE_IPC_MEMORY_FLAG_BIAS_CACHED = ZE_BIT(0), ///< device should cache allocation ZE_IPC_MEMORY_FLAG_BIAS_UNCACHED = ZE_BIT(1), ///< device should not cache allocation (UC) - ZE_IPC_MEMORY_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_IPC_MEMORY_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IPC_MEMORY_FLAG_* ENUMs } ze_ipc_memory_flag_t; @@ -5354,11 +6902,20 @@ typedef enum _ze_ipc_memory_flag_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x3 < flags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pptr` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -5387,6 +6944,14 @@ zeMemOpenIpcHandle( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5401,10 +6966,11 @@ zeMemCloseIpcHandle( /// @brief Additional allocation descriptor for exporting external memory /// /// @details -/// - This structure may be passed to ::zeMemAllocDevice and -/// ::zeMemAllocHost, via the `pNext` member of -/// ::ze_device_mem_alloc_desc_t or ::ze_host_mem_alloc_desc_t, -/// respectively, to indicate an exportable memory allocation. +/// - This structure may be passed to ::zeMemAllocDevice, ::zeMemAllocHost, +/// or ::zePhysicalMemCreate, via the `pNext` member of +/// ::ze_device_mem_alloc_desc_t or ::ze_host_mem_alloc_desc_t, or +/// ::ze_physical_mem_desc_t, respectively, to indicate an exportable +/// memory allocation. /// - This structure may be passed to ::zeImageCreate, via the `pNext` /// member of ::ze_image_desc_t, to indicate an exportable image. typedef struct _ze_external_memory_export_desc_t @@ -5422,10 +6988,11 @@ typedef struct _ze_external_memory_export_desc_t /// file descriptor /// /// @details -/// - This structure may be passed to ::zeMemAllocDevice or -/// ::zeMemAllocHost, via the `pNext` member of -/// ::ze_device_mem_alloc_desc_t or of ::ze_host_mem_alloc_desc_t, -/// respectively, to import memory from a file descriptor. +/// - This structure may be passed to ::zeMemAllocDevice, ::zeMemAllocHost, +/// or ::zePhysicalMemCreate, via the `pNext` member of +/// ::ze_device_mem_alloc_desc_t or ::ze_host_mem_alloc_desc_t, or +/// ::ze_physical_mem_desc_t, respectively, to import memory from a file +/// descriptor. /// - This structure may be passed to ::zeImageCreate, via the `pNext` /// member of ::ze_image_desc_t, to import memory from a file descriptor. typedef struct _ze_external_memory_import_fd_t @@ -5449,6 +7016,9 @@ typedef struct _ze_external_memory_import_fd_t /// - This structure may be passed to ::zeImageGetAllocPropertiesExt, via /// the `pNext` member of ::ze_image_allocation_ext_properties_t, to /// export an image as a file descriptor. +/// - This structure may be passed to ::zePhysicalMemGetProperties, via the +/// `pNext` member of ::ze_physical_mem_properties_t, to export physical +/// memory as a file descriptor. /// - The requested memory export type must have been specified when the /// allocation was made. typedef struct _ze_external_memory_export_fd_t @@ -5471,10 +7041,11 @@ typedef struct _ze_external_memory_export_fd_t /// - When `name` is `nullptr`, `handle` must not be `nullptr`. /// - When `flags` is ::ZE_EXTERNAL_MEMORY_TYPE_FLAG_OPAQUE_WIN32_KMT, /// `name` must be `nullptr`. -/// - This structure may be passed to ::zeMemAllocDevice or -/// ::zeMemAllocHost, via the `pNext` member of -/// ::ze_device_mem_alloc_desc_t or of ::ze_host_mem_alloc_desc_t, -/// respectively, to import memory from a Win32 handle. +/// - This structure may be passed to ::zeMemAllocDevice, ::zeMemAllocHost, +/// or ::zePhysicalMemCreate, via the `pNext` member of +/// ::ze_device_mem_alloc_desc_t or ::ze_host_mem_alloc_desc_t, or +/// ::ze_physical_mem_desc_t, respectively, to import memory from a Win32 +/// handle. /// - This structure may be passed to ::zeImageCreate, via the `pNext` /// member of ::ze_image_desc_t, to import memory from a Win32 handle. typedef struct _ze_external_memory_import_win32_handle_t @@ -5499,6 +7070,9 @@ typedef struct _ze_external_memory_import_win32_handle_t /// - This structure may be passed to ::zeImageGetAllocPropertiesExt, via /// the `pNext` member of ::ze_image_allocation_ext_properties_t, to /// export an image as a Win32 handle. +/// - This structure may be passed to ::zePhysicalMemGetProperties, via the +/// `pNext` member of ::ze_physical_mem_properties_t, to export physical +/// memory as a Win32 handle. /// - The requested memory export type must have been specified when the /// allocation was made. typedef struct _ze_external_memory_export_win32_handle_t @@ -5531,7 +7105,7 @@ typedef enum _ze_memory_atomic_attr_exp_flag_t ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_SYSTEM_ATOMICS = ZE_BIT(6), ///< Concurrent atomics on the pointer from both host and device are ///< allowed. Requires ::ZE_MEMORY_ACCESS_CAP_FLAG_CONCURRENT_ATOMIC ///< returned by ::zeDeviceGetMemoryAccessProperties. - ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_* ENUMs } ze_memory_atomic_attr_exp_flag_t; @@ -5545,7 +7119,7 @@ typedef enum _ze_memory_atomic_attr_exp_flag_t /// passed in hDevice, then the atomic attributes are set in all devices /// associated with the allocation. /// - If the atomic access attribute select is not supported by the driver, -/// ::ZE_RESULT_INVALID_ARGUMENT is returned. +/// ::ZE_RESULT_ERROR_INVALID_ARGUMENT is returned. /// - The atomic access attribute may be only supported at a device-specific /// granularity, such as at a page boundary. In this case, the memory range /// may be expanded such that the start and end of the range satisfy granularity @@ -5564,6 +7138,14 @@ typedef enum _ze_memory_atomic_attr_exp_flag_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -5571,6 +7153,7 @@ typedef enum _ze_memory_atomic_attr_exp_flag_t /// + `nullptr == ptr` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x7f < attr` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeMemSetAtomicAccessAttributeExp( ze_context_handle_t hContext, ///< [in] handle of context @@ -5596,6 +7179,14 @@ zeMemSetAtomicAccessAttributeExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -5624,7 +7215,7 @@ typedef enum _ze_module_format_t { ZE_MODULE_FORMAT_IL_SPIRV = 0, ///< Format is SPIRV IL format ZE_MODULE_FORMAT_NATIVE = 1, ///< Format is device native format - ZE_MODULE_FORMAT_FORCE_UINT32 = 0x7fffffff + ZE_MODULE_FORMAT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MODULE_FORMAT_* ENUMs } ze_module_format_t; @@ -5676,6 +7267,17 @@ typedef struct _ze_module_desc_t } ze_module_desc_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Append launch kernel with parameters cooperative descriptor +typedef struct _ze_command_list_append_launch_kernel_param_cooperative_desc_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + ze_bool_t isCooperative; ///< [in] When true, kernel is treated as cooperative. + +} ze_command_list_append_launch_kernel_param_cooperative_desc_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Creates a module on the context. /// @@ -5698,6 +7300,14 @@ typedef struct _ze_module_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -5707,6 +7317,7 @@ typedef struct _ze_module_desc_t /// + `nullptr == phModule` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZE_MODULE_FORMAT_NATIVE < desc->format` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NATIVE_BINARY /// - ::ZE_RESULT_ERROR_INVALID_SIZE /// + `0 == desc->inputSize` @@ -5740,6 +7351,14 @@ zeModuleCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hModule` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -5787,6 +7406,14 @@ zeModuleDestroy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == phModules` /// - ::ZE_RESULT_ERROR_MODULE_LINK_FAILURE @@ -5816,6 +7443,14 @@ zeModuleDynamicLink( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hModuleBuildLog` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -5839,6 +7474,14 @@ zeModuleBuildLogDestroy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hModuleBuildLog` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5871,6 +7514,14 @@ zeModuleBuildLogGetString( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hModule` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5899,6 +7550,14 @@ zeModuleGetNativeBinary( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hModule` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5925,6 +7584,14 @@ zeModuleGetGlobalPointer( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hModule` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5949,7 +7616,7 @@ typedef enum _ze_module_property_flag_t { ZE_MODULE_PROPERTY_FLAG_IMPORTS = ZE_BIT(0), ///< Module has imports (i.e. imported global variables and/or kernels). ///< See ::zeModuleDynamicLink. - ZE_MODULE_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_MODULE_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MODULE_PROPERTY_FLAG_* ENUMs } ze_module_property_flag_t; @@ -5977,6 +7644,14 @@ typedef struct _ze_module_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hModule` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5995,7 +7670,7 @@ typedef enum _ze_kernel_flag_t ZE_KERNEL_FLAG_FORCE_RESIDENCY = ZE_BIT(0), ///< force all device allocations to be resident during execution ZE_KERNEL_FLAG_EXPLICIT_RESIDENCY = ZE_BIT(1), ///< application is responsible for all residency of device allocations. ///< driver may disable implicit residency management. - ZE_KERNEL_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_KERNEL_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_KERNEL_FLAG_* ENUMs } ze_kernel_flag_t; @@ -6028,6 +7703,14 @@ typedef struct _ze_kernel_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hModule` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6036,6 +7719,7 @@ typedef struct _ze_kernel_desc_t /// + `nullptr == phKernel` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x3 < desc->flags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_KERNEL_NAME /// - ::ZE_RESULT_ERROR_INVALID_MODULE_UNLINKED ZE_APIEXPORT ze_result_t ZE_APICALL @@ -6063,6 +7747,14 @@ zeKernelCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -6089,6 +7781,14 @@ zeKernelDestroy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hModule` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6118,6 +7818,14 @@ zeModuleGetFunctionPointer( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION @@ -6145,6 +7853,14 @@ zeKernelSetGroupSize( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6169,6 +7885,10 @@ zeKernelSuggestGroupSize( /// @details /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. +/// - Applications are recommended to use ::zeKernelSuggestGroupSize and +/// ::zeKernelSetGroupSize first before calling this function and +/// launching cooperative kernels. Otherwise, implementation may return +/// ::ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION. /// /// @returns /// - ::ZE_RESULT_SUCCESS @@ -6176,6 +7896,14 @@ zeKernelSuggestGroupSize( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6195,6 +7923,8 @@ zeKernelSuggestMaxCooperativeGroupCount( /// - The application must **not** call this function from simultaneous /// threads with the same kernel handle. /// - The implementation of this function should be lock-free. +/// - If argument is SLM (size), then SLM size in bytes for this resource is +/// provided as argument size and argument value is null /// /// @returns /// - ::ZE_RESULT_SUCCESS @@ -6202,10 +7932,19 @@ zeKernelSuggestMaxCooperativeGroupCount( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX /// - ::ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT ZE_APIEXPORT ze_result_t ZE_APICALL zeKernelSetArgumentValue( ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object @@ -6223,7 +7962,7 @@ typedef enum _ze_kernel_indirect_access_flag_t ZE_KERNEL_INDIRECT_ACCESS_FLAG_HOST = ZE_BIT(0), ///< Indicates that the kernel accesses host allocations indirectly. ZE_KERNEL_INDIRECT_ACCESS_FLAG_DEVICE = ZE_BIT(1), ///< Indicates that the kernel accesses device allocations indirectly. ZE_KERNEL_INDIRECT_ACCESS_FLAG_SHARED = ZE_BIT(2), ///< Indicates that the kernel accesses shared allocations indirectly. - ZE_KERNEL_INDIRECT_ACCESS_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_KERNEL_INDIRECT_ACCESS_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_KERNEL_INDIRECT_ACCESS_FLAG_* ENUMs } ze_kernel_indirect_access_flag_t; @@ -6244,10 +7983,19 @@ typedef enum _ze_kernel_indirect_access_flag_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x7 < flags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeKernelSetIndirectAccess( ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object @@ -6268,6 +8016,14 @@ zeKernelSetIndirectAccess( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6293,6 +8049,14 @@ zeKernelGetIndirectAccess( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6305,10 +8069,14 @@ zeKernelGetSourceAttributes( char** pString ///< [in,out][optional] pointer to application-managed character array ///< (string data). ///< If NULL, the string length of the kernel source attributes, including - ///< a null-terminating character, is returned in pSize. - ///< Otherwise, pString must point to valid application memory that is - ///< greater than or equal to *pSize bytes in length, and on return the - ///< pointed-to string will contain a space-separated list of kernel source attributes. + ///< a null-terminating character, is returned in pSize. Otherwise, pString + ///< must point to valid application memory that is greater than or equal + ///< to *pSize bytes in length, and on return the pointed-to string will + ///< contain a space-separated list of kernel source attributes. Note: This + ///< API was originally intended to ship with a char *pString, however this + ///< typo was introduced. Thus the API has to stay this way for backwards + ///< compatible reasons. It can be corrected in v2.0. Suggestion is to + ///< create your own char *pString and then pass to this API with &pString. ); /////////////////////////////////////////////////////////////////////////////// @@ -6318,7 +8086,7 @@ typedef enum _ze_cache_config_flag_t { ZE_CACHE_CONFIG_FLAG_LARGE_SLM = ZE_BIT(0), ///< Large SLM size ZE_CACHE_CONFIG_FLAG_LARGE_DATA = ZE_BIT(1), ///< Large General Data size - ZE_CACHE_CONFIG_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_CACHE_CONFIG_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_CACHE_CONFIG_FLAG_* ENUMs } ze_cache_config_flag_t; @@ -6338,10 +8106,18 @@ typedef enum _ze_cache_config_flag_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x3 < flags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE ZE_APIEXPORT ze_result_t ZE_APICALL zeKernelSetCacheConfig( @@ -6427,6 +8203,14 @@ typedef struct _ze_kernel_preferred_group_size_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6453,6 +8237,14 @@ zeKernelGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6495,6 +8287,14 @@ typedef struct _ze_group_count_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hKernel` @@ -6515,6 +8315,132 @@ zeCommandListAppendLaunchKernel( ///< on before launching ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Launch kernel over one or more work groups and allow to pass +/// additional parameters. +/// +/// @details +/// - The application must ensure the kernel and events are accessible by +/// the device on which the command list was created. +/// - This may **only** be called for a command list created with command +/// queue group ordinal that supports compute. +/// - The application must ensure the command list, kernel and events were +/// created on the same context. +/// - This function may **not** be called from simultaneous threads with the +/// same command list handle. +/// - The implementation of this function should be lock-free. +/// - This function allows to pass additional parameters in the form of +/// `${x}_base_desc_t` +/// - This function can replace ::zeCommandListAppendLaunchCooperativeKernel +/// with additional parameter +/// `${x}_command_list_append_launch_kernel_param_cooperative_desc_t` +/// - This function supports both immediate and regular command lists. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hCommandList` +/// + `nullptr == hKernel` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == pGroupCounts` +/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +/// - ::ZE_RESULT_ERROR_INVALID_SIZE +/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// + when passed additional parameters are invalid or incompatible with the device or command list +ZE_APIEXPORT ze_result_t ZE_APICALL +zeCommandListAppendLaunchKernelWithParameters( + ze_command_list_handle_t hCommandList, ///< [in] handle of the command list + ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object + const ze_group_count_t* pGroupCounts, ///< [in] thread group launch arguments + const void * pNext, ///< [in][optional] additional parameters passed to the function + ze_event_handle_t hSignalEvent, ///< [in][optional] handle of the event to signal on completion + uint32_t numWaitEvents, ///< [in][optional] number of events to wait on before launching; must be 0 + ///< if `nullptr == phWaitEvents` + ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait + ///< on before launching + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Kernel dispatch group sizes. +typedef struct _ze_group_size_t +{ + uint32_t groupSizeX; ///< [in] size of thread group in X dimension + uint32_t groupSizeY; ///< [in] size of thread group in Y dimension + uint32_t groupSizeZ; ///< [in] size of thread group in Z dimension + +} ze_group_size_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Launch kernel over one or more work groups with specifying work group +/// size and all kernel arguments and allow to pass additional extensions. +/// +/// @details +/// - The application must ensure the kernel and events are accessible by +/// the device on which the command list was created. +/// - This may **only** be called for a command list created with command +/// queue group ordinal that supports compute. +/// - The application must ensure the command list, kernel and events were +/// created on the same context. +/// - This function may **not** be called from simultaneous threads with the +/// same command list handle. +/// - The implementation of this function should be lock-free. +/// - This function supports both immediate and regular command lists. +/// - This function changes kernel state as if separate +/// ${x}KernelSetGroupSize and ${x}KernelSetArgumentValue functions were +/// called. +/// - This function allows to pass additional extensions in the form of +/// `${x}_base_desc_t` +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hCommandList` +/// + `nullptr == hKernel` +/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +/// - ::ZE_RESULT_ERROR_INVALID_SIZE +/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// + when passed additional extensions are invalid or incompatible with the device or command list +/// - ::ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION - "as per ${x}KernelSetGroupSize" +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT - "as per ${x}KernelSetArgumentValue" +ZE_APIEXPORT ze_result_t ZE_APICALL +zeCommandListAppendLaunchKernelWithArguments( + ze_command_list_handle_t hCommandList, ///< [in] handle of the command list + ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object + const ze_group_count_t groupCounts, ///< [in] thread group counts + const ze_group_size_t groupSizes, ///< [in] thread group sizes + void ** pArguments, ///< [in]pointer to an array of pointers + const void * pNext, ///< [in][optional] additional extensions passed to the function + ze_event_handle_t hSignalEvent, ///< [in][optional] handle of the event to signal on completion + uint32_t numWaitEvents, ///< [in][optional] number of events to wait on before launching; must be 0 + ///< if `nullptr == phWaitEvents` + ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait + ///< on before launching + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Launch kernel cooperatively over one or more work groups. /// @@ -6539,6 +8465,14 @@ zeCommandListAppendLaunchKernel( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hKernel` @@ -6584,6 +8518,14 @@ zeCommandListAppendLaunchCooperativeKernel( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hKernel` @@ -6632,6 +8574,14 @@ zeCommandListAppendLaunchKernelIndirect( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6677,7 +8627,7 @@ typedef enum _ze_module_program_exp_version_t { ZE_MODULE_PROGRAM_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_MODULE_PROGRAM_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_MODULE_PROGRAM_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_MODULE_PROGRAM_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MODULE_PROGRAM_EXP_VERSION_* ENUMs } ze_module_program_exp_version_t; @@ -6685,24 +8635,24 @@ typedef enum _ze_module_program_exp_version_t /// @brief Module extended descriptor to support multiple input modules. /// /// @details -/// - Implementation must support ::ZE_experimental_module_program extension +/// - Implementation must support ::ZE_MODULE_PROGRAM_EXP_NAME extension /// - Modules support import and export linkage for functions and global /// variables. -/// - SPIR-V import and export linkage types are used. See SPIR-V -/// specification for linkage details. /// - pInputModules, pBuildFlags, and pConstants from ::ze_module_desc_t is /// ignored. /// - Format in ::ze_module_desc_t needs to be set to -/// ::ZE_MODULE_FORMAT_IL_SPIRV. +/// ::ZE_MODULE_FORMAT_IL_SPIRV or ::ZE_MODULE_FORMAT_NATIVE. +/// - All modules in the list must be of the same format and match the +/// format specified in ::ze_module_desc_t. typedef struct _ze_module_program_exp_desc_t { ze_structure_type_t stype; ///< [in] type of this structure const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific ///< structure (i.e. contains stype and pNext). uint32_t count; ///< [in] Count of input modules - const size_t* inputSizes; ///< [in][range(0, count)] sizes of each input IL module in pInputModules. - const uint8_t** pInputModules; ///< [in][range(0, count)] pointer to an array of IL (e.g. SPIR-V modules). - ///< Valid only for SPIR-V input. + const size_t* inputSizes; ///< [in][range(0, count)] sizes of each input module in pInputModules. + const uint8_t** pInputModules; ///< [in][range(0, count)] pointer to an array of binary modules in format + ///< specified as part of ::ze_module_desc_t. const char** pBuildFlags; ///< [in][optional][range(0, count)] array of strings containing build ///< flags. See pBuildFlags in ::ze_module_desc_t. const ze_module_constants_t** pConstants; ///< [in][optional][range(0, count)] pointer to array of specialization @@ -6730,7 +8680,7 @@ typedef enum _ze_raytracing_ext_version_t { ZE_RAYTRACING_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_RAYTRACING_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_RAYTRACING_EXT_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_RAYTRACING_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RAYTRACING_EXT_VERSION_* ENUMs } ze_raytracing_ext_version_t; @@ -6740,7 +8690,7 @@ typedef uint32_t ze_device_raytracing_ext_flags_t; typedef enum _ze_device_raytracing_ext_flag_t { ZE_DEVICE_RAYTRACING_EXT_FLAG_RAYQUERY = ZE_BIT(0), ///< Supports rayquery - ZE_DEVICE_RAYTRACING_EXT_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_DEVICE_RAYTRACING_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_RAYTRACING_EXT_FLAG_* ENUMs } ze_device_raytracing_ext_flag_t; @@ -6766,7 +8716,7 @@ typedef uint32_t ze_raytracing_mem_alloc_ext_flags_t; typedef enum _ze_raytracing_mem_alloc_ext_flag_t { ZE_RAYTRACING_MEM_ALLOC_EXT_FLAG_TBD = ZE_BIT(0), ///< reserved for future use - ZE_RAYTRACING_MEM_ALLOC_EXT_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_RAYTRACING_MEM_ALLOC_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RAYTRACING_MEM_ALLOC_EXT_FLAG_* ENUMs } ze_raytracing_mem_alloc_ext_flag_t; @@ -6811,6 +8761,13 @@ typedef struct _ze_raytracing_mem_alloc_ext_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -6843,6 +8800,14 @@ zeContextMakeMemoryResident( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -6871,6 +8836,14 @@ zeContextEvictMemory( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -6899,6 +8872,14 @@ zeContextMakeImageResident( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -6928,7 +8909,7 @@ typedef enum _ze_sampler_address_mode_t ///< 0.0f, 0.0f, 0.0f) if image format swizzle contains alpha, otherwise ///< (0.0f, 0.0f, 0.0f, 1.0f). ZE_SAMPLER_ADDRESS_MODE_MIRROR = 4, ///< Out-of-bounds coordinates are mirrored starting from edge. - ZE_SAMPLER_ADDRESS_MODE_FORCE_UINT32 = 0x7fffffff + ZE_SAMPLER_ADDRESS_MODE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_SAMPLER_ADDRESS_MODE_* ENUMs } ze_sampler_address_mode_t; @@ -6938,7 +8919,7 @@ typedef enum _ze_sampler_filter_mode_t { ZE_SAMPLER_FILTER_MODE_NEAREST = 0, ///< No coordinate modifications for out of bounds image access. ZE_SAMPLER_FILTER_MODE_LINEAR = 1, ///< Out-of-bounds coordinates are wrapped back around. - ZE_SAMPLER_FILTER_MODE_FORCE_UINT32 = 0x7fffffff + ZE_SAMPLER_FILTER_MODE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_SAMPLER_FILTER_MODE_* ENUMs } ze_sampler_filter_mode_t; @@ -6971,6 +8952,14 @@ typedef struct _ze_sampler_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -6980,6 +8969,7 @@ typedef struct _ze_sampler_desc_t /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZE_SAMPLER_ADDRESS_MODE_MIRROR < desc->addressMode` /// + `::ZE_SAMPLER_FILTER_MODE_LINEAR < desc->filterMode` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeSamplerCreate( ze_context_handle_t hContext, ///< [in] handle of the context object @@ -7006,6 +8996,14 @@ zeSamplerCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hSampler` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -7028,7 +9026,7 @@ typedef enum _ze_memory_access_attribute_t ZE_MEMORY_ACCESS_ATTRIBUTE_NONE = 0, ///< Indicates the memory page is inaccessible. ZE_MEMORY_ACCESS_ATTRIBUTE_READWRITE = 1, ///< Indicates the memory page supports read write access. ZE_MEMORY_ACCESS_ATTRIBUTE_READONLY = 2, ///< Indicates the memory page supports read-only access. - ZE_MEMORY_ACCESS_ATTRIBUTE_FORCE_UINT32 = 0x7fffffff + ZE_MEMORY_ACCESS_ATTRIBUTE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MEMORY_ACCESS_ATTRIBUTE_* ENUMs } ze_memory_access_attribute_t; @@ -7054,6 +9052,14 @@ typedef enum _ze_memory_access_attribute_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7085,6 +9091,14 @@ zeVirtualMemReserve( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7113,6 +9127,14 @@ zeVirtualMemFree( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -7134,8 +9156,9 @@ zeVirtualMemQueryPageSize( typedef uint32_t ze_physical_mem_flags_t; typedef enum _ze_physical_mem_flag_t { - ZE_PHYSICAL_MEM_FLAG_TBD = ZE_BIT(0), ///< reserved for future use. - ZE_PHYSICAL_MEM_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_PHYSICAL_MEM_FLAG_ALLOCATE_ON_DEVICE = ZE_BIT(0), ///< [default] allocate physical device memory. + ZE_PHYSICAL_MEM_FLAG_ALLOCATE_ON_HOST = ZE_BIT(1), ///< Allocate physical host memory instead. + ZE_PHYSICAL_MEM_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_PHYSICAL_MEM_FLAG_* ENUMs } ze_physical_mem_flag_t; @@ -7147,18 +9170,68 @@ typedef struct _ze_physical_mem_desc_t const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific ///< structure (i.e. contains stype and pNext). ze_physical_mem_flags_t flags; ///< [in] creation flags. - ///< must be 0 (default) or a valid combination of ::ze_physical_mem_flag_t. + ///< must be 0 (default) or a valid combination of + ///< ::ze_physical_mem_flag_t; default is to create physical device memory. size_t size; ///< [in] size in bytes to reserve; must be page aligned. } ze_physical_mem_desc_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Physical memory properties queried using ::zePhysicalMemGetProperties +typedef struct _ze_physical_mem_properties_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + uint64_t id; ///< [out] unique identifier for the physical memory object + uint64_t size; ///< [out] size of the physical memory object in bytes + +} ze_physical_mem_properties_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Retrieves memory properties of the physical memory object. +/// +/// @details +/// - The application must only use the physical memory object on the +/// context for which it was created. +/// - The application may call this function from simultaneous threads. +/// - The implementation of this function must be thread-safe. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hContext` +/// + `nullptr == hPhysicalMem` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == pMemProperties` +ZE_APIEXPORT ze_result_t ZE_APICALL +zePhysicalMemGetProperties( + ze_context_handle_t hContext, ///< [in] handle of the context object + ze_physical_mem_handle_t hPhysicalMem, ///< [in] handle of the physical memory object + ze_physical_mem_properties_t* pMemProperties ///< [in,out] pointer to physical memory properties structure. + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Creates a physical memory object for the context. /// /// @details /// - The application must only use the physical memory object on the /// context for which it was created. -/// - The size must be page aligned. See ::zeVirtualMemQueryPageSize. +/// - The size must be page aligned. For host memory, the operating system +/// page size should be used. For device memory, see +/// ::zeVirtualMemQueryPageSize. /// - The application may call this function from simultaneous threads. /// - The implementation of this function must be thread-safe. /// @@ -7168,6 +9241,14 @@ typedef struct _ze_physical_mem_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -7175,14 +9256,16 @@ typedef struct _ze_physical_mem_desc_t /// + `nullptr == desc` /// + `nullptr == phPhysicalMemory` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x1 < desc->flags` +/// + `0x3 < desc->flags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE /// + `0 == desc->size` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT ZE_APIEXPORT ze_result_t ZE_APICALL zePhysicalMemCreate( ze_context_handle_t hContext, ///< [in] handle of the context object - ze_device_handle_t hDevice, ///< [in] handle of the device object + ze_device_handle_t hDevice, ///< [in] handle of the device object, can be `nullptr` if creating + ///< physical host memory. ze_physical_mem_desc_t* desc, ///< [in] pointer to physical memory descriptor. ze_physical_mem_handle_t* phPhysicalMemory ///< [out] pointer to handle of physical memory object created ); @@ -7203,6 +9286,14 @@ zePhysicalMemCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hPhysicalMemory` @@ -7235,6 +9326,14 @@ zePhysicalMemDestroy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hPhysicalMemory` @@ -7242,6 +9341,7 @@ zePhysicalMemDestroy( /// + `nullptr == ptr` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZE_MEMORY_ACCESS_ATTRIBUTE_READONLY < access` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE /// + `0 == size` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT @@ -7274,6 +9374,14 @@ zeVirtualMemMap( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7304,12 +9412,21 @@ zeVirtualMemUnmap( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == ptr` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZE_MEMORY_ACCESS_ATTRIBUTE_READONLY < access` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT /// + Address must be page aligned /// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE @@ -7340,6 +9457,14 @@ zeVirtualMemSetAccessAttribute( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7380,7 +9505,7 @@ typedef enum _ze_float_atomics_ext_version_t { ZE_FLOAT_ATOMICS_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_FLOAT_ATOMICS_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_FLOAT_ATOMICS_EXT_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_FLOAT_ATOMICS_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_FLOAT_ATOMICS_EXT_VERSION_* ENUMs } ze_float_atomics_ext_version_t; @@ -7395,7 +9520,7 @@ typedef enum _ze_device_fp_atomic_ext_flag_t ZE_DEVICE_FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE = ZE_BIT(16), ///< Supports atomic load, store, and exchange ZE_DEVICE_FP_ATOMIC_EXT_FLAG_LOCAL_ADD = ZE_BIT(17), ///< Supports atomic add and subtract ZE_DEVICE_FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX = ZE_BIT(18), ///< Supports atomic min and max - ZE_DEVICE_FP_ATOMIC_EXT_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_DEVICE_FP_ATOMIC_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_FP_ATOMIC_EXT_FLAG_* ENUMs } ze_device_fp_atomic_ext_flag_t; @@ -7438,7 +9563,7 @@ typedef enum _ze_global_offset_exp_version_t { ZE_GLOBAL_OFFSET_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_GLOBAL_OFFSET_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_GLOBAL_OFFSET_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_GLOBAL_OFFSET_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_GLOBAL_OFFSET_EXP_VERSION_* ENUMs } ze_global_offset_exp_version_t; @@ -7452,74 +9577,1922 @@ typedef enum _ze_global_offset_exp_version_t /// threads with the same kernel handle. /// - The implementation of this function should be lock-free. /// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hKernel` -ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelSetGlobalOffsetExp( - ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object - uint32_t offsetX, ///< [in] global offset for X dimension to use for this kernel - uint32_t offsetY, ///< [in] global offset for Y dimension to use for this kernel - uint32_t offsetZ ///< [in] global offset for Z dimension to use for this kernel - ); +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hKernel` +ZE_APIEXPORT ze_result_t ZE_APICALL +zeKernelSetGlobalOffsetExp( + ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object + uint32_t offsetX, ///< [in] global offset for X dimension to use for this kernel + uint32_t offsetY, ///< [in] global offset for Y dimension to use for this kernel + uint32_t offsetZ ///< [in] global offset for Z dimension to use for this kernel + ); + +#if !defined(__GNUC__) +#pragma endregion +#endif +// Intel 'oneAPI' Level-Zero Extension for supporting relaxed allocation limits. +#if !defined(__GNUC__) +#pragma region relaxedAllocLimits +#endif +/////////////////////////////////////////////////////////////////////////////// +#ifndef ZE_RELAXED_ALLOCATION_LIMITS_EXP_NAME +/// @brief Relaxed Allocation Limits Extension Name +#define ZE_RELAXED_ALLOCATION_LIMITS_EXP_NAME "ZE_experimental_relaxed_allocation_limits" +#endif // ZE_RELAXED_ALLOCATION_LIMITS_EXP_NAME + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Relaxed Allocation Limits Extension Version(s) +typedef enum _ze_relaxed_allocation_limits_exp_version_t +{ + ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 + ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version + ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_* ENUMs + +} ze_relaxed_allocation_limits_exp_version_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Supported relaxed memory allocation flags +typedef uint32_t ze_relaxed_allocation_limits_exp_flags_t; +typedef enum _ze_relaxed_allocation_limits_exp_flag_t +{ + ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_MAX_SIZE = ZE_BIT(0), ///< Allocation size may exceed the `maxMemAllocSize` member of + ///< ::ze_device_properties_t. + ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_* ENUMs + +} ze_relaxed_allocation_limits_exp_flag_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Relaxed limits memory allocation descriptor +/// +/// @details +/// - This structure may be passed to ::zeMemAllocShared or +/// ::zeMemAllocDevice, via the `pNext` member of +/// ::ze_device_mem_alloc_desc_t. +/// - This structure may also be passed to ::zeMemAllocHost, via the `pNext` +/// member of ::ze_host_mem_alloc_desc_t. +typedef struct _ze_relaxed_allocation_limits_exp_desc_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + ze_relaxed_allocation_limits_exp_flags_t flags; ///< [in] flags specifying allocation limits to relax. + ///< must be 0 (default) or a valid combination of ::ze_relaxed_allocation_limits_exp_flag_t; + +} ze_relaxed_allocation_limits_exp_desc_t; + +#if !defined(__GNUC__) +#pragma endregion +#endif +// Intel 'oneAPI' Level-Zero Extension for retrieving kernel binary program data. +#if !defined(__GNUC__) +#pragma region kernelBinary +#endif +/////////////////////////////////////////////////////////////////////////////// +#ifndef ZE_GET_KERNEL_BINARY_EXP_NAME +/// @brief Get Kernel Binary Extension Name +#define ZE_GET_KERNEL_BINARY_EXP_NAME "ZE_extension_kernel_binary_exp" +#endif // ZE_GET_KERNEL_BINARY_EXP_NAME + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Get Kernel Binary Extension Version(s) +typedef enum _ze_kernel_get_binary_exp_version_t +{ + ZE_KERNEL_GET_BINARY_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 + ZE_KERNEL_GET_BINARY_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version + ZE_KERNEL_GET_BINARY_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_KERNEL_GET_BINARY_EXP_VERSION_* ENUMs + +} ze_kernel_get_binary_exp_version_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Retrieves kernel binary program data (ISA GEN format). +/// +/// @details +/// - A valid kernel handle must be created with ::zeKernelCreate. +/// - Returns Intel Graphics Assembly (GEN ISA) format binary program data +/// for kernel handle. +/// - The application may call this function from simultaneous threads. +/// - The implementation of this function must be thread-safe. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hKernel` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == pSize` +/// + `nullptr == pKernelBinary` +ZE_APIEXPORT ze_result_t ZE_APICALL +zeKernelGetBinaryExp( + ze_kernel_handle_t hKernel, ///< [in] Kernel handle. + size_t* pSize, ///< [in,out] pointer to variable with size of GEN ISA binary. + uint8_t* pKernelBinary ///< [in,out] pointer to storage area for GEN ISA binary function. + ); + +#if !defined(__GNUC__) +#pragma endregion +#endif +// Intel 'oneAPI' Level-Zero Extension for Driver Direct Device Interface (DDI) Handles +#if !defined(__GNUC__) +#pragma region driverDDIHandles +#endif +/////////////////////////////////////////////////////////////////////////////// +#ifndef ZE_DRIVER_DDI_HANDLES_EXT_NAME +/// @brief Driver Direct Device Interface (DDI) Handles Extension Name +#define ZE_DRIVER_DDI_HANDLES_EXT_NAME "ZE_extension_driver_ddi_handles" +#endif // ZE_DRIVER_DDI_HANDLES_EXT_NAME + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Driver Direct Device Interface (DDI) Handles Extension Version(s) +typedef enum _ze_driver_ddi_handles_ext_version_t +{ + ZE_DRIVER_DDI_HANDLES_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 + ZE_DRIVER_DDI_HANDLES_EXT_VERSION_1_1 = ZE_MAKE_VERSION( 1, 1 ), ///< version 1.1 + ZE_DRIVER_DDI_HANDLES_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 1 ), ///< latest known version + ZE_DRIVER_DDI_HANDLES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DRIVER_DDI_HANDLES_EXT_VERSION_* ENUMs + +} ze_driver_ddi_handles_ext_version_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Driver Direct Device Interface (DDI) Handle Extension Flags +typedef uint32_t ze_driver_ddi_handle_ext_flags_t; +typedef enum _ze_driver_ddi_handle_ext_flag_t +{ + ZE_DRIVER_DDI_HANDLE_EXT_FLAG_DDI_HANDLE_EXT_SUPPORTED = ZE_BIT(0), ///< Driver Supports DDI Handles Extension + ZE_DRIVER_DDI_HANDLE_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DRIVER_DDI_HANDLE_EXT_FLAG_* ENUMs + +} ze_driver_ddi_handle_ext_flag_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Driver DDI Handles properties queried using ::zeDriverGetProperties +/// +/// @details +/// - This structure may be returned from ::zeDriverGetProperties, via the +/// `pNext` member of ::ze_driver_properties_t. +typedef struct _ze_driver_ddi_handles_ext_properties_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + ze_driver_ddi_handle_ext_flags_t flags; ///< [out] 0 (none) or a valid combination of ::ze_driver_ddi_handle_ext_flags_t + +} ze_driver_ddi_handles_ext_properties_t; + +#if !defined(__GNUC__) +#pragma endregion +#endif +// Intel 'oneAPI' Level-Zero Extension for external semaphores +#if !defined(__GNUC__) +#pragma region externalSemaphores +#endif +/////////////////////////////////////////////////////////////////////////////// +#ifndef ZE_EXTERNAL_SEMAPHORES_EXTENSION_NAME +/// @brief External Semaphores Extension Name +#define ZE_EXTERNAL_SEMAPHORES_EXTENSION_NAME "ZE_extension_external_semaphores" +#endif // ZE_EXTERNAL_SEMAPHORES_EXTENSION_NAME + +/////////////////////////////////////////////////////////////////////////////// +/// @brief External Semaphores Extension Version +typedef enum _ze_external_semaphore_ext_version_t +{ + ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 + ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version + ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_* ENUMs + +} ze_external_semaphore_ext_version_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Handle of external semaphore object +typedef struct _ze_external_semaphore_ext_handle_t *ze_external_semaphore_ext_handle_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief External Semaphores Type Flags +typedef uint32_t ze_external_semaphore_ext_flags_t; +typedef enum _ze_external_semaphore_ext_flag_t +{ + ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_OPAQUE_FD = ZE_BIT(0), ///< Semaphore is an Linux opaque file descriptor + ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_OPAQUE_WIN32 = ZE_BIT(1), ///< Semaphore is an opaque Win32 handle for monitored fence + ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_OPAQUE_WIN32_KMT = ZE_BIT(2), ///< Semaphore is an opaque Win32 KMT handle for monitored fence + ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_D3D12_FENCE = ZE_BIT(3), ///< Semaphore is a D3D12 fence + ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_D3D11_FENCE = ZE_BIT(4), ///< Semaphore is a D3D11 fence + ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_KEYED_MUTEX = ZE_BIT(5), ///< Semaphore is a keyed mutex for Win32 + ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_KEYED_MUTEX_KMT = ZE_BIT(6), ///< Semaphore is a keyed mutex for Win32 KMT + ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_VK_TIMELINE_SEMAPHORE_FD = ZE_BIT(7), ///< Semaphore is a Vulkan Timeline semaphore for Linux + ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_VK_TIMELINE_SEMAPHORE_WIN32 = ZE_BIT(8), ///< Semaphore is a Vulkan Timeline semaphore for Win32 + ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_* ENUMs + +} ze_external_semaphore_ext_flag_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief External Semaphore Descriptor +typedef struct _ze_external_semaphore_ext_desc_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + ze_external_semaphore_ext_flags_t flags; ///< [in] The flags describing the type of the semaphore. + ///< must be 0 (default) or a valid combination of ::ze_external_semaphore_ext_flag_t. + ///< When importing a semaphore, pNext should be pointing to one of the + ///< following structures: ::ze_external_semaphore_win32_ext_desc_t or ::ze_external_semaphore_fd_ext_desc_t. + +} ze_external_semaphore_ext_desc_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief External Semaphore Win32 Descriptor +typedef struct _ze_external_semaphore_win32_ext_desc_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + void* handle; ///< [in] Win32 handle of the semaphore. + ///< Must be a valid Win32 handle. + const char* name; ///< [in] Name of the semaphore. + ///< Must be a valid null-terminated string. + +} ze_external_semaphore_win32_ext_desc_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief External Semaphore FD Descriptor +typedef struct _ze_external_semaphore_fd_ext_desc_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + int fd; ///< [in] File descriptor of the semaphore. + ///< Must be a valid file descriptor. + +} ze_external_semaphore_fd_ext_desc_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief External Semaphore Signal parameters +typedef struct _ze_external_semaphore_signal_params_ext_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + uint64_t value; ///< [in] [optional] Value to signal. + ///< Specified by user as an expected value with some of semaphore types, + ///< such as ::ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_D3D12_FENCE. + +} ze_external_semaphore_signal_params_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief External Semaphore Wait parameters +typedef struct _ze_external_semaphore_wait_params_ext_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + uint64_t value; ///< [in] [optional] Value to wait for. + ///< Specified by user as an expected value with some of semaphore types, + ///< such as ::ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_D3D12_FENCE. + +} ze_external_semaphore_wait_params_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Import an external semaphore +/// +/// @details +/// - Imports an external semaphore. +/// - This function may be called from simultaneous threads with the same +/// device handle. +/// - The implementation of this function should be lock-free. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hDevice` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == desc` +/// + `nullptr == phSemaphore` +/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +/// + `0x1ff < desc->flags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +ZE_APIEXPORT ze_result_t ZE_APICALL +zeDeviceImportExternalSemaphoreExt( + ze_device_handle_t hDevice, ///< [in] The device handle. + const ze_external_semaphore_ext_desc_t* desc, ///< [in] The pointer to external semaphore descriptor. + ze_external_semaphore_ext_handle_t* phSemaphore ///< [out] The handle of the external semaphore imported. + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Release an external semaphore +/// +/// @details +/// - The application must ensure the device is not currently referencing +/// the semaphore before it is released. +/// - The application must **not** call this function from simultaneous +/// threads with the same semaphore handle. +/// - The implementation of this function must be thread-safe. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hSemaphore` +/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +ZE_APIEXPORT ze_result_t ZE_APICALL +zeDeviceReleaseExternalSemaphoreExt( + ze_external_semaphore_ext_handle_t hSemaphore ///< [in] The handle of the external semaphore. + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Signal an external semaphore +/// +/// @details +/// - Signals an external semaphore. +/// - This function must only be used with an immediate command list. +/// - This function may be called from simultaneous threads with the same +/// command list handle. +/// - The implementation of this function should be lock-free. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hCommandList` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == phSemaphores` +/// + `nullptr == signalParams` +/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +/// - ::ZE_RESULT_ERROR_INVALID_SIZE +/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +/// + `(nullptr == phSemaphores) && (0 < numSemaphores)` +/// + `(nullptr == signalParams) && (0 < numSemaphores)` +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// + Commandlist handle does not correspond to an immediate command list +ZE_APIEXPORT ze_result_t ZE_APICALL +zeCommandListAppendSignalExternalSemaphoreExt( + ze_command_list_handle_t hCommandList, ///< [in] The command list handle. + uint32_t numSemaphores, ///< [in] The number of external semaphores. + ze_external_semaphore_ext_handle_t* phSemaphores, ///< [in][range(0, numSemaphores)] The array of pointers to external + ///< semaphore handles to be appended into command list. + ze_external_semaphore_signal_params_ext_t* signalParams, ///< [in][range(0, numSemaphores)] The array of pointers to external + ///< semaphore signal parameters. + ze_event_handle_t hSignalEvent, ///< [in][optional] handle of the event to signal on completion + uint32_t numWaitEvents, ///< [in][optional] number of events to wait on before launching; must be 0 + ///< if `nullptr == phWaitEvents` + ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait + ///< on before launching + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Wait on external semaphores +/// +/// @details +/// - Waits on external semaphores. +/// - This function must only be used with an immediate command list. +/// - This function may be called from simultaneous threads with the same +/// command list handle. +/// - The implementation of this function should be lock-free. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hCommandList` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == phSemaphores` +/// + `nullptr == waitParams` +/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +/// - ::ZE_RESULT_ERROR_INVALID_SIZE +/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +/// + `(nullptr == phSemaphores) && (0 < numSemaphores)` +/// + `(nullptr == waitParams) && (0 < numSemaphores)` +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// + Commandlist handle does not correspond to an immediate command list +ZE_APIEXPORT ze_result_t ZE_APICALL +zeCommandListAppendWaitExternalSemaphoreExt( + ze_command_list_handle_t hCommandList, ///< [in] The command list handle. + uint32_t numSemaphores, ///< [in] The number of external semaphores. + ze_external_semaphore_ext_handle_t* phSemaphores, ///< [in][range(0,numSemaphores)] The array of pointers to external + ///< semaphore handles to append into command list. + ze_external_semaphore_wait_params_ext_t* waitParams, ///< [in][range(0,numSemaphores)] The array of pointers to external + ///< semaphore wait parameters. + ze_event_handle_t hSignalEvent, ///< [in][optional] handle of the event to signal on completion + uint32_t numWaitEvents, ///< [in][optional] number of events to wait on before launching; must be 0 + ///< if `nullptr == phWaitEvents` + ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait + ///< on before launching + ); + +#if !defined(__GNUC__) +#pragma endregion +#endif +// Intel 'oneAPI' Level-Zero Extension APIs for CacheLine Size +#if !defined(__GNUC__) +#pragma region CacheLineSize +#endif +/////////////////////////////////////////////////////////////////////////////// +#ifndef ZE_CACHELINE_SIZE_EXT_NAME +/// @brief CacheLine Size Extension Name +#define ZE_CACHELINE_SIZE_EXT_NAME "ZE_extension_device_cache_line_size" +#endif // ZE_CACHELINE_SIZE_EXT_NAME + +/////////////////////////////////////////////////////////////////////////////// +/// @brief CacheLine Size Extension Version(s) +typedef enum _ze_device_cache_line_size_ext_version_t +{ + ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 + ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ),///< latest known version + ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_* ENUMs + +} ze_device_cache_line_size_ext_version_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief CacheLine Size queried using ::zeDeviceGetCacheProperties +/// +/// @details +/// - This structure may be returned from ::zeDeviceGetCacheProperties via +/// the `pNext` member of ::ze_device_cache_properties_t. +/// - Used for determining the cache line size supported on a device. +typedef struct _ze_device_cache_line_size_ext_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + size_t cacheLineSize; ///< [out] The cache line size in bytes. + +} ze_device_cache_line_size_ext_t; + +#if !defined(__GNUC__) +#pragma endregion +#endif +// Intel 'oneAPI' Level-Zero Extension for supporting ray tracing acceleration structure. +#if !defined(__GNUC__) +#pragma region RTAS +#endif +/////////////////////////////////////////////////////////////////////////////// +#ifndef ZE_RTAS_EXT_NAME +/// @brief Ray Tracing Acceleration Structure Extension Name +#define ZE_RTAS_EXT_NAME "ZE_extension_rtas" +#endif // ZE_RTAS_EXT_NAME + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Ray Tracing Acceleration Structure Builder Extension Version(s) +typedef enum _ze_rtas_builder_ext_version_t +{ + ZE_RTAS_BUILDER_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 + ZE_RTAS_BUILDER_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version + ZE_RTAS_BUILDER_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_EXT_VERSION_* ENUMs + +} ze_rtas_builder_ext_version_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Ray tracing acceleration structure device flags +typedef uint32_t ze_rtas_device_ext_flags_t; +typedef enum _ze_rtas_device_ext_flag_t +{ + ZE_RTAS_DEVICE_EXT_FLAG_RESERVED = ZE_BIT(0), ///< reserved for future use + ZE_RTAS_DEVICE_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_DEVICE_EXT_FLAG_* ENUMs + +} ze_rtas_device_ext_flag_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Ray tracing acceleration structure format +/// +/// @details +/// - This is an opaque ray tracing acceleration structure format +/// identifier. +typedef enum _ze_rtas_format_ext_t +{ + ZE_RTAS_FORMAT_EXT_INVALID = 0x0, ///< Invalid acceleration structure format code + ZE_RTAS_FORMAT_EXT_MAX = 0x7ffffffe, ///< Maximum acceleration structure format code + ZE_RTAS_FORMAT_EXT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_FORMAT_EXT_* ENUMs + +} ze_rtas_format_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Ray tracing acceleration structure builder flags +typedef uint32_t ze_rtas_builder_ext_flags_t; +typedef enum _ze_rtas_builder_ext_flag_t +{ + ZE_RTAS_BUILDER_EXT_FLAG_RESERVED = ZE_BIT(0), ///< Reserved for future use + ZE_RTAS_BUILDER_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_EXT_FLAG_* ENUMs + +} ze_rtas_builder_ext_flag_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Ray tracing acceleration structure builder parallel operation flags +typedef uint32_t ze_rtas_parallel_operation_ext_flags_t; +typedef enum _ze_rtas_parallel_operation_ext_flag_t +{ + ZE_RTAS_PARALLEL_OPERATION_EXT_FLAG_RESERVED = ZE_BIT(0), ///< Reserved for future use + ZE_RTAS_PARALLEL_OPERATION_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_PARALLEL_OPERATION_EXT_FLAG_* ENUMs + +} ze_rtas_parallel_operation_ext_flag_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Ray tracing acceleration structure builder geometry flags +typedef uint32_t ze_rtas_builder_geometry_ext_flags_t; +typedef enum _ze_rtas_builder_geometry_ext_flag_t +{ + ZE_RTAS_BUILDER_GEOMETRY_EXT_FLAG_NON_OPAQUE = ZE_BIT(0), ///< non-opaque geometries invoke an any-hit shader + ZE_RTAS_BUILDER_GEOMETRY_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_GEOMETRY_EXT_FLAG_* ENUMs + +} ze_rtas_builder_geometry_ext_flag_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Packed ray tracing acceleration structure builder geometry flags (see +/// ::ze_rtas_builder_geometry_ext_flags_t) +typedef uint8_t ze_rtas_builder_packed_geometry_ext_flags_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Ray tracing acceleration structure builder instance flags +typedef uint32_t ze_rtas_builder_instance_ext_flags_t; +typedef enum _ze_rtas_builder_instance_ext_flag_t +{ + ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_TRIANGLE_CULL_DISABLE = ZE_BIT(0), ///< disables culling of front-facing and back-facing triangles + ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_TRIANGLE_FRONT_COUNTERCLOCKWISE = ZE_BIT(1), ///< reverses front and back face of triangles + ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_TRIANGLE_FORCE_OPAQUE = ZE_BIT(2), ///< forces instanced geometry to be opaque, unless ray flag forces it to + ///< be non-opaque + ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_TRIANGLE_FORCE_NON_OPAQUE = ZE_BIT(3),///< forces instanced geometry to be non-opaque, unless ray flag forces it + ///< to be opaque + ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_* ENUMs + +} ze_rtas_builder_instance_ext_flag_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Packed ray tracing acceleration structure builder instance flags (see +/// ::ze_rtas_builder_instance_ext_flags_t) +typedef uint8_t ze_rtas_builder_packed_instance_ext_flags_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Ray tracing acceleration structure builder build operation flags +/// +/// @details +/// - These flags allow the application to tune the acceleration structure +/// build operation. +/// - The acceleration structure builder implementation might choose to use +/// spatial splitting to split large or long primitives into smaller +/// pieces. This may result in any-hit shaders being invoked multiple +/// times for non-opaque primitives, unless +/// ::ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION is specified. +/// - Usage of any of these flags may reduce ray tracing performance. +typedef uint32_t ze_rtas_builder_build_op_ext_flags_t; +typedef enum _ze_rtas_builder_build_op_ext_flag_t +{ + ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_COMPACT = ZE_BIT(0), ///< build more compact acceleration structure + ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION = ZE_BIT(1), ///< guarantees single any-hit shader invocation per primitive + ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_* ENUMs + +} ze_rtas_builder_build_op_ext_flag_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Ray tracing acceleration structure builder build quality hint +/// +/// @details +/// - Depending on use case different quality modes for acceleration +/// structure build are supported. +/// - A low-quality build builds an acceleration structure fast, but at the +/// cost of some reduction in ray tracing performance. This mode is +/// recommended for dynamic content, such as animated characters. +/// - A medium-quality build uses a compromise between build quality and ray +/// tracing performance. This mode should be used by default. +/// - Higher ray tracing performance can be achieved by using a high-quality +/// build, but acceleration structure build performance might be +/// significantly reduced. +typedef enum _ze_rtas_builder_build_quality_hint_ext_t +{ + ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_LOW = 0, ///< build low-quality acceleration structure (fast) + ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_MEDIUM = 1, ///< build medium-quality acceleration structure (slower) + ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_HIGH = 2, ///< build high-quality acceleration structure (slow) + ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_* ENUMs + +} ze_rtas_builder_build_quality_hint_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Ray tracing acceleration structure builder geometry type +typedef enum _ze_rtas_builder_geometry_type_ext_t +{ + ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_TRIANGLES = 0, ///< triangle mesh geometry type + ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_QUADS = 1, ///< quad mesh geometry type + ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_PROCEDURAL = 2, ///< procedural geometry type + ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_INSTANCE = 3, ///< instance geometry type + ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_* ENUMs + +} ze_rtas_builder_geometry_type_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Packed ray tracing acceleration structure builder geometry type (see +/// ::ze_rtas_builder_geometry_type_ext_t) +typedef uint8_t ze_rtas_builder_packed_geometry_type_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Ray tracing acceleration structure data buffer element format +/// +/// @details +/// - Specifies the format of data buffer elements. +/// - Data buffers may contain instancing transform matrices, triangle/quad +/// vertex indices, etc... +typedef enum _ze_rtas_builder_input_data_format_ext_t +{ + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3 = 0, ///< 3-component float vector (see ::ze_rtas_float3_ext_t) + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3X4_COLUMN_MAJOR = 1, ///< 3x4 affine transformation in column-major format (see + ///< ::ze_rtas_transform_float3x4_column_major_ext_t) + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3X4_ALIGNED_COLUMN_MAJOR = 2,///< 3x4 affine transformation in column-major format (see + ///< ::ze_rtas_transform_float3x4_aligned_column_major_ext_t) + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3X4_ROW_MAJOR = 3, ///< 3x4 affine transformation in row-major format (see + ///< ::ze_rtas_transform_float3x4_row_major_ext_t) + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_AABB = 4, ///< 3-dimensional axis-aligned bounding-box (see ::ze_rtas_aabb_ext_t) + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_TRIANGLE_INDICES_UINT32 = 5, ///< Unsigned 32-bit triangle indices (see + ///< ::ze_rtas_triangle_indices_uint32_ext_t) + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_QUAD_INDICES_UINT32 = 6, ///< Unsigned 32-bit quad indices (see ::ze_rtas_quad_indices_uint32_ext_t) + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_* ENUMs + +} ze_rtas_builder_input_data_format_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Packed ray tracing acceleration structure data buffer element format +/// (see ::ze_rtas_builder_input_data_format_ext_t) +typedef uint8_t ze_rtas_builder_packed_input_data_format_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Handle of ray tracing acceleration structure builder object +typedef struct _ze_rtas_builder_ext_handle_t *ze_rtas_builder_ext_handle_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Handle of ray tracing acceleration structure builder parallel +/// operation object +typedef struct _ze_rtas_parallel_operation_ext_handle_t *ze_rtas_parallel_operation_ext_handle_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Ray tracing acceleration structure builder descriptor +typedef struct _ze_rtas_builder_ext_desc_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + ze_rtas_builder_ext_version_t builderVersion; ///< [in] ray tracing acceleration structure builder version + +} ze_rtas_builder_ext_desc_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Ray tracing acceleration structure builder properties +typedef struct _ze_rtas_builder_ext_properties_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + ze_rtas_builder_ext_flags_t flags; ///< [out] ray tracing acceleration structure builder flags + size_t rtasBufferSizeBytesExpected; ///< [out] expected size (in bytes) required for acceleration structure buffer + ///< - When using an acceleration structure buffer of this size, the + ///< build is expected to succeed; however, it is possible that the build + ///< may fail with ::ZE_RESULT_EXT_RTAS_BUILD_RETRY + size_t rtasBufferSizeBytesMaxRequired; ///< [out] worst-case size (in bytes) required for acceleration structure buffer + ///< - When using an acceleration structure buffer of this size, the + ///< build is guaranteed to not run out of memory. + size_t scratchBufferSizeBytes; ///< [out] scratch buffer size (in bytes) required for acceleration + ///< structure build. + +} ze_rtas_builder_ext_properties_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Ray tracing acceleration structure builder parallel operation +/// properties +typedef struct _ze_rtas_parallel_operation_ext_properties_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + ze_rtas_parallel_operation_ext_flags_t flags; ///< [out] ray tracing acceleration structure builder parallel operation + ///< flags + uint32_t maxConcurrency; ///< [out] maximum number of threads that may join the parallel operation + +} ze_rtas_parallel_operation_ext_properties_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Ray tracing acceleration structure device properties +/// +/// @details +/// - This structure may be passed to ::zeDeviceGetProperties, via `pNext` +/// member of ::ze_device_properties_t. +/// - The implementation shall populate `format` with a value other than +/// ::ZE_RTAS_FORMAT_EXT_INVALID when the device supports ray tracing. +typedef struct _ze_rtas_device_ext_properties_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + ze_rtas_device_ext_flags_t flags; ///< [out] ray tracing acceleration structure device flags + ze_rtas_format_ext_t rtasFormat; ///< [out] ray tracing acceleration structure format + uint32_t rtasBufferAlignment; ///< [out] required alignment of acceleration structure buffer + +} ze_rtas_device_ext_properties_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief A 3-component vector type +typedef struct _ze_rtas_float3_ext_t +{ + float x; ///< [in] x-coordinate of float3 vector + float y; ///< [in] y-coordinate of float3 vector + float z; ///< [in] z-coordinate of float3 vector + +} ze_rtas_float3_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief 3x4 affine transformation in column-major layout +/// +/// @details +/// - A 3x4 affine transformation in column major layout, consisting of vectors +/// - vx=(vx_x, vx_y, vx_z), +/// - vy=(vy_x, vy_y, vy_z), +/// - vz=(vz_x, vz_y, vz_z), and +/// - p=(p_x, p_y, p_z) +/// - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + +/// z*vz + p`. +typedef struct _ze_rtas_transform_float3x4_column_major_ext_t +{ + float vx_x; ///< [in] element 0 of column 0 of 3x4 matrix + float vx_y; ///< [in] element 1 of column 0 of 3x4 matrix + float vx_z; ///< [in] element 2 of column 0 of 3x4 matrix + float vy_x; ///< [in] element 0 of column 1 of 3x4 matrix + float vy_y; ///< [in] element 1 of column 1 of 3x4 matrix + float vy_z; ///< [in] element 2 of column 1 of 3x4 matrix + float vz_x; ///< [in] element 0 of column 2 of 3x4 matrix + float vz_y; ///< [in] element 1 of column 2 of 3x4 matrix + float vz_z; ///< [in] element 2 of column 2 of 3x4 matrix + float p_x; ///< [in] element 0 of column 3 of 3x4 matrix + float p_y; ///< [in] element 1 of column 3 of 3x4 matrix + float p_z; ///< [in] element 2 of column 3 of 3x4 matrix + +} ze_rtas_transform_float3x4_column_major_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief 3x4 affine transformation in column-major layout with aligned column +/// vectors +/// +/// @details +/// - A 3x4 affine transformation in column major layout, consisting of vectors +/// - vx=(vx_x, vx_y, vx_z), +/// - vy=(vy_x, vy_y, vy_z), +/// - vz=(vz_x, vz_y, vz_z), and +/// - p=(p_x, p_y, p_z) +/// - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + +/// z*vz + p`. +/// - The column vectors are aligned to 16-bytes and pad members are +/// ignored. +typedef struct _ze_rtas_transform_float3x4_aligned_column_major_ext_t +{ + float vx_x; ///< [in] element 0 of column 0 of 3x4 matrix + float vx_y; ///< [in] element 1 of column 0 of 3x4 matrix + float vx_z; ///< [in] element 2 of column 0 of 3x4 matrix + float pad0; ///< [in] ignored padding + float vy_x; ///< [in] element 0 of column 1 of 3x4 matrix + float vy_y; ///< [in] element 1 of column 1 of 3x4 matrix + float vy_z; ///< [in] element 2 of column 1 of 3x4 matrix + float pad1; ///< [in] ignored padding + float vz_x; ///< [in] element 0 of column 2 of 3x4 matrix + float vz_y; ///< [in] element 1 of column 2 of 3x4 matrix + float vz_z; ///< [in] element 2 of column 2 of 3x4 matrix + float pad2; ///< [in] ignored padding + float p_x; ///< [in] element 0 of column 3 of 3x4 matrix + float p_y; ///< [in] element 1 of column 3 of 3x4 matrix + float p_z; ///< [in] element 2 of column 3 of 3x4 matrix + float pad3; ///< [in] ignored padding + +} ze_rtas_transform_float3x4_aligned_column_major_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief 3x4 affine transformation in row-major layout +/// +/// @details +/// - A 3x4 affine transformation in row-major layout, consisting of vectors +/// - vx=(vx_x, vx_y, vx_z), +/// - vy=(vy_x, vy_y, vy_z), +/// - vz=(vz_x, vz_y, vz_z), and +/// - p=(p_x, p_y, p_z) +/// - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + +/// z*vz + p`. +typedef struct _ze_rtas_transform_float3x4_row_major_ext_t +{ + float vx_x; ///< [in] element 0 of row 0 of 3x4 matrix + float vy_x; ///< [in] element 1 of row 0 of 3x4 matrix + float vz_x; ///< [in] element 2 of row 0 of 3x4 matrix + float p_x; ///< [in] element 3 of row 0 of 3x4 matrix + float vx_y; ///< [in] element 0 of row 1 of 3x4 matrix + float vy_y; ///< [in] element 1 of row 1 of 3x4 matrix + float vz_y; ///< [in] element 2 of row 1 of 3x4 matrix + float p_y; ///< [in] element 3 of row 1 of 3x4 matrix + float vx_z; ///< [in] element 0 of row 2 of 3x4 matrix + float vy_z; ///< [in] element 1 of row 2 of 3x4 matrix + float vz_z; ///< [in] element 2 of row 2 of 3x4 matrix + float p_z; ///< [in] element 3 of row 2 of 3x4 matrix + +} ze_rtas_transform_float3x4_row_major_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief A 3-dimensional axis-aligned bounding-box with lower and upper bounds +/// in each dimension +typedef struct _ze_rtas_aabb_ext_t +{ + ze_rtas_float3_ext_t lower; ///< [in] lower bounds of AABB + ze_rtas_float3_ext_t upper; ///< [in] upper bounds of AABB + +} ze_rtas_aabb_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Triangle represented using 3 vertex indices +/// +/// @details +/// - Represents a triangle using 3 vertex indices that index into a vertex +/// array that needs to be provided together with the index array. +/// - The linear barycentric u/v parametrization of the triangle is defined as: +/// - (u=0, v=0) at v0, +/// - (u=1, v=0) at v1, and +/// - (u=0, v=1) at v2 +typedef struct _ze_rtas_triangle_indices_uint32_ext_t +{ + uint32_t v0; ///< [in] first index pointing to the first triangle vertex in vertex array + uint32_t v1; ///< [in] second index pointing to the second triangle vertex in vertex + ///< array + uint32_t v2; ///< [in] third index pointing to the third triangle vertex in vertex array + +} ze_rtas_triangle_indices_uint32_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Quad represented using 4 vertex indices +/// +/// @details +/// - Represents a quad composed of 4 indices that index into a vertex array +/// that needs to be provided together with the index array. +/// - A quad is a triangle pair represented using 4 vertex indices v0, v1, +/// v2, v3. +/// The first triangle is made out of indices v0, v1, v3 and the second triangle +/// from indices v2, v3, v1. The piecewise linear barycentric u/v parametrization +/// of the quad is defined as: +/// - (u=0, v=0) at v0, +/// - (u=1, v=0) at v1, +/// - (u=0, v=1) at v3, and +/// - (u=1, v=1) at v2 +/// This is achieved by correcting the u'/v' coordinates of the second +/// triangle by +/// *u = 1-u'* and *v = 1-v'*, yielding a piecewise linear parametrization. +typedef struct _ze_rtas_quad_indices_uint32_ext_t +{ + uint32_t v0; ///< [in] first index pointing to the first quad vertex in vertex array + uint32_t v1; ///< [in] second index pointing to the second quad vertex in vertex array + uint32_t v2; ///< [in] third index pointing to the third quad vertex in vertex array + uint32_t v3; ///< [in] fourth index pointing to the fourth quad vertex in vertex array + +} ze_rtas_quad_indices_uint32_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Ray tracing acceleration structure builder geometry info +typedef struct _ze_rtas_builder_geometry_info_ext_t +{ + ze_rtas_builder_packed_geometry_type_ext_t geometryType; ///< [in] geometry type + +} ze_rtas_builder_geometry_info_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Ray tracing acceleration structure builder triangle mesh geometry info +/// +/// @details +/// - The linear barycentric u/v parametrization of the triangle is defined as: +/// - (u=0, v=0) at v0, +/// - (u=1, v=0) at v1, and +/// - (u=0, v=1) at v2 +typedef struct _ze_rtas_builder_triangles_geometry_info_ext_t +{ + ze_rtas_builder_packed_geometry_type_ext_t geometryType; ///< [in] geometry type, must be + ///< ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_TRIANGLES + ze_rtas_builder_packed_geometry_ext_flags_t geometryFlags; ///< [in] 0 or some combination of ::ze_rtas_builder_geometry_ext_flag_t + ///< bits representing the geometry flags for all primitives of this + ///< geometry + uint8_t geometryMask; ///< [in] 8-bit geometry mask for ray masking + ze_rtas_builder_packed_input_data_format_ext_t triangleFormat; ///< [in] format of triangle buffer data, must be + ///< ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_TRIANGLE_INDICES_UINT32 + ze_rtas_builder_packed_input_data_format_ext_t vertexFormat; ///< [in] format of vertex buffer data, must be + ///< ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3 + uint32_t triangleCount; ///< [in] number of triangles in triangle buffer + uint32_t vertexCount; ///< [in] number of vertices in vertex buffer + uint32_t triangleStride; ///< [in] stride (in bytes) of triangles in triangle buffer + uint32_t vertexStride; ///< [in] stride (in bytes) of vertices in vertex buffer + void* pTriangleBuffer; ///< [in] pointer to array of triangle indices in specified format + void* pVertexBuffer; ///< [in] pointer to array of triangle vertices in specified format + +} ze_rtas_builder_triangles_geometry_info_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Ray tracing acceleration structure builder quad mesh geometry info +/// +/// @details +/// - A quad is a triangle pair represented using 4 vertex indices v0, v1, +/// v2, v3. +/// The first triangle is made out of indices v0, v1, v3 and the second triangle +/// from indices v2, v3, v1. The piecewise linear barycentric u/v parametrization +/// of the quad is defined as: +/// - (u=0, v=0) at v0, +/// - (u=1, v=0) at v1, +/// - (u=0, v=1) at v3, and +/// - (u=1, v=1) at v2 +/// This is achieved by correcting the u'/v' coordinates of the second +/// triangle by +/// *u = 1-u'* and *v = 1-v'*, yielding a piecewise linear parametrization. +typedef struct _ze_rtas_builder_quads_geometry_info_ext_t +{ + ze_rtas_builder_packed_geometry_type_ext_t geometryType; ///< [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_QUADS + ze_rtas_builder_packed_geometry_ext_flags_t geometryFlags; ///< [in] 0 or some combination of ::ze_rtas_builder_geometry_ext_flag_t + ///< bits representing the geometry flags for all primitives of this + ///< geometry + uint8_t geometryMask; ///< [in] 8-bit geometry mask for ray masking + ze_rtas_builder_packed_input_data_format_ext_t quadFormat; ///< [in] format of quad buffer data, must be + ///< ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_QUAD_INDICES_UINT32 + ze_rtas_builder_packed_input_data_format_ext_t vertexFormat; ///< [in] format of vertex buffer data, must be + ///< ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3 + uint32_t quadCount; ///< [in] number of quads in quad buffer + uint32_t vertexCount; ///< [in] number of vertices in vertex buffer + uint32_t quadStride; ///< [in] stride (in bytes) of quads in quad buffer + uint32_t vertexStride; ///< [in] stride (in bytes) of vertices in vertex buffer + void* pQuadBuffer; ///< [in] pointer to array of quad indices in specified format + void* pVertexBuffer; ///< [in] pointer to array of quad vertices in specified format + +} ze_rtas_builder_quads_geometry_info_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief AABB callback function parameters +typedef struct _ze_rtas_geometry_aabbs_ext_cb_params_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + uint32_t primID; ///< [in] first primitive to return bounds for + uint32_t primIDCount; ///< [in] number of primitives to return bounds for + void* pGeomUserPtr; ///< [in] pointer provided through geometry descriptor + void* pBuildUserPtr; ///< [in] pointer provided through ::zeRTASBuilderBuildExt function + ze_rtas_aabb_ext_t* pBoundsOut; ///< [out] destination buffer to write AABB bounds to + +} ze_rtas_geometry_aabbs_ext_cb_params_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Callback function pointer type to return AABBs for a range of +/// procedural primitives +typedef void (*ze_rtas_geometry_aabbs_cb_ext_t)( + ze_rtas_geometry_aabbs_ext_cb_params_t* params ///< [in] callback function parameters structure + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Ray tracing acceleration structure builder procedural primitives +/// geometry info +/// +/// @details +/// - A host-side bounds callback function is invoked by the acceleration +/// structure builder to query the bounds of procedural primitives on +/// demand. The callback is passed some `pGeomUserPtr` that can point to +/// an application-side representation of the procedural primitives. +/// Further, a second `pBuildUserPtr`, which is set by a parameter to +/// ::zeRTASBuilderBuildExt, is passed to the callback. This allows the +/// build to change the bounds of the procedural geometry, for example, to +/// build a BVH only over a short time range to implement multi-segment +/// motion blur. +typedef struct _ze_rtas_builder_procedural_geometry_info_ext_t +{ + ze_rtas_builder_packed_geometry_type_ext_t geometryType; ///< [in] geometry type, must be + ///< ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_PROCEDURAL + ze_rtas_builder_packed_geometry_ext_flags_t geometryFlags; ///< [in] 0 or some combination of ::ze_rtas_builder_geometry_ext_flag_t + ///< bits representing the geometry flags for all primitives of this + ///< geometry + uint8_t geometryMask; ///< [in] 8-bit geometry mask for ray masking + uint8_t reserved; ///< [in] reserved for future use + uint32_t primCount; ///< [in] number of primitives in geometry + ze_rtas_geometry_aabbs_cb_ext_t pfnGetBoundsCb; ///< [in] pointer to callback function to get the axis-aligned bounding-box + ///< for a range of primitives + void* pGeomUserPtr; ///< [in] user data pointer passed to callback + +} ze_rtas_builder_procedural_geometry_info_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Ray tracing acceleration structure builder instance geometry info +typedef struct _ze_rtas_builder_instance_geometry_info_ext_t +{ + ze_rtas_builder_packed_geometry_type_ext_t geometryType; ///< [in] geometry type, must be + ///< ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_INSTANCE + ze_rtas_builder_packed_instance_ext_flags_t instanceFlags; ///< [in] 0 or some combination of ::ze_rtas_builder_geometry_ext_flag_t + ///< bits representing the geometry flags for all primitives of this + ///< geometry + uint8_t geometryMask; ///< [in] 8-bit geometry mask for ray masking + ze_rtas_builder_packed_input_data_format_ext_t transformFormat; ///< [in] format of the specified transformation + uint32_t instanceUserID; ///< [in] user-specified identifier for the instance + void* pTransform; ///< [in] object-to-world instance transformation in specified format + ze_rtas_aabb_ext_t* pBounds; ///< [in] object-space axis-aligned bounding-box of the instanced + ///< acceleration structure + void* pAccelerationStructure; ///< [in] device pointer to acceleration structure to instantiate + +} ze_rtas_builder_instance_geometry_info_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief +typedef struct _ze_rtas_builder_build_op_ext_desc_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + ze_rtas_format_ext_t rtasFormat; ///< [in] ray tracing acceleration structure format + ze_rtas_builder_build_quality_hint_ext_t buildQuality; ///< [in] acceleration structure build quality hint + ze_rtas_builder_build_op_ext_flags_t buildFlags; ///< [in] 0 or some combination of ::ze_rtas_builder_build_op_ext_flag_t + ///< flags + const ze_rtas_builder_geometry_info_ext_t** ppGeometries; ///< [in][optional][range(0, `numGeometries`)] NULL or a valid array of + ///< pointers to geometry infos + uint32_t numGeometries; ///< [in] number of geometries in geometry infos array, can be zero when + ///< `ppGeometries` is NULL + +} ze_rtas_builder_build_op_ext_desc_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Creates a ray tracing acceleration structure builder object +/// +/// @details +/// - The application may call this function from simultaneous threads. +/// - The implementation of this function must be thread-safe. +/// - The implementation must support ::ZE_RTAS_EXT_NAME extension. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hDriver` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == pDescriptor` +/// + `nullptr == phBuilder` +/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +/// + `::ZE_RTAS_BUILDER_EXT_VERSION_CURRENT < pDescriptor->builderVersion` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +ZE_APIEXPORT ze_result_t ZE_APICALL +zeRTASBuilderCreateExt( + ze_driver_handle_t hDriver, ///< [in] handle of driver object + const ze_rtas_builder_ext_desc_t* pDescriptor, ///< [in] pointer to builder descriptor + ze_rtas_builder_ext_handle_t* phBuilder ///< [out] handle of builder object + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Retrieves ray tracing acceleration structure builder properties +/// +/// @details +/// - The application may call this function from simultaneous threads. +/// - The implementation of this function must be thread-safe. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hBuilder` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == pBuildOpDescriptor` +/// + `nullptr == pProperties` +/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +/// + `::ZE_RTAS_FORMAT_EXT_MAX < pBuildOpDescriptor->rtasFormat` +/// + `::ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_HIGH < pBuildOpDescriptor->buildQuality` +/// + `0x3 < pBuildOpDescriptor->buildFlags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +ZE_APIEXPORT ze_result_t ZE_APICALL +zeRTASBuilderGetBuildPropertiesExt( + ze_rtas_builder_ext_handle_t hBuilder, ///< [in] handle of builder object + const ze_rtas_builder_build_op_ext_desc_t* pBuildOpDescriptor, ///< [in] pointer to build operation descriptor + ze_rtas_builder_ext_properties_t* pProperties ///< [in,out] query result for builder properties + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Checks ray tracing acceleration structure format compatibility +/// +/// @details +/// - The application may call this function from simultaneous threads. +/// - The implementation of this function must be thread-safe. +/// +/// @returns +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hDriver` +/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +/// + `::ZE_RTAS_FORMAT_EXT_MAX < rtasFormatA` +/// + `::ZE_RTAS_FORMAT_EXT_MAX < rtasFormatB` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +/// - ::ZE_RESULT_SUCCESS +/// + An acceleration structure built with `rtasFormatA` is compatible with devices that report `rtasFormatB`. +/// - ::ZE_RESULT_EXT_ERROR_OPERANDS_INCOMPATIBLE +/// + An acceleration structure built with `rtasFormatA` is **not** compatible with devices that report `rtasFormatB`. +ZE_APIEXPORT ze_result_t ZE_APICALL +zeDriverRTASFormatCompatibilityCheckExt( + ze_driver_handle_t hDriver, ///< [in] handle of driver object + ze_rtas_format_ext_t rtasFormatA, ///< [in] operand A + ze_rtas_format_ext_t rtasFormatB ///< [in] operand B + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Build ray tracing acceleration structure +/// +/// @details +/// - This function builds an acceleration structure of the scene consisting +/// of the specified geometry information and writes the acceleration +/// structure to the provided destination buffer. All types of geometries +/// can get freely mixed inside a scene. +/// - Before an acceleration structure can be built, the user must allocate +/// the memory for the acceleration structure buffer and scratch buffer +/// using sizes queried with the ::zeRTASBuilderGetBuildPropertiesExt function. +/// - When using the "worst-case" size for the acceleration structure +/// buffer, the acceleration structure construction will never fail with ::ZE_RESULT_EXT_RTAS_BUILD_RETRY. +/// - When using the "expected" size for the acceleration structure buffer, +/// the acceleration structure construction may fail with +/// ::ZE_RESULT_EXT_RTAS_BUILD_RETRY. If this happens, the user may resize +/// their acceleration structure buffer using the returned +/// `*pRtasBufferSizeBytes` value, which will be updated with an improved +/// size estimate that will likely result in a successful build. +/// - The acceleration structure construction is run on the host and is +/// synchronous, thus after the function returns with a successful result, +/// the acceleration structure may be used. +/// - All provided data buffers must be host-accessible. The referenced +/// scene data (index- and vertex- buffers) have to be accessible from the +/// host, and will **not** be referenced by the build acceleration structure. +/// - The acceleration structure buffer is typicall a host allocation that +/// is later manually copied to a device allocation. Alternatively one can +/// also use a shared USM allocation as acceration structure buffer and +/// skip the copy. +/// - A successfully constructed acceleration structure is entirely +/// self-contained. There is no requirement for input data to persist +/// beyond build completion. +/// - A successfully constructed acceleration structure is non-copyable. +/// - Acceleration structure construction may be parallelized by passing a +/// valid handle to a parallel operation object and joining that parallel +/// operation using ::zeRTASParallelOperationJoinExt with user-provided +/// worker threads. +/// - A successfully constructed acceleration structure is generally +/// non-copyable. It can only get copied from host to device using the +/// special ::zeRTASBuilderCommandListAppendCopyExt function. +/// - **Additional Notes** +/// - "The geometry infos array, geometry infos, and scratch buffer must +/// all be standard host memory allocations." +/// - "A pointer to a geometry info can be a null pointer, in which case +/// the geometry is treated as empty." +/// - "If no parallel operation handle is provided, the build is run +/// sequentially on the current thread." +/// - "A parallel operation object may only be associated with a single +/// acceleration structure build at a time." +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hBuilder` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == pBuildOpDescriptor` +/// + `nullptr == pScratchBuffer` +/// + `nullptr == pRtasBuffer` +/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +/// + `::ZE_RTAS_FORMAT_EXT_MAX < pBuildOpDescriptor->rtasFormat` +/// + `::ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_HIGH < pBuildOpDescriptor->buildQuality` +/// + `0x3 < pBuildOpDescriptor->buildFlags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +/// - ::ZE_RESULT_EXT_RTAS_BUILD_DEFERRED +/// + Acceleration structure build completion is deferred to parallel operation join. +/// - ::ZE_RESULT_EXT_RTAS_BUILD_RETRY +/// + Acceleration structure build failed due to insufficient resources, retry the build operation with a larger acceleration structure buffer allocation. +/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +/// + Acceleration structure build failed due to parallel operation object participation in another build operation. +ZE_APIEXPORT ze_result_t ZE_APICALL +zeRTASBuilderBuildExt( + ze_rtas_builder_ext_handle_t hBuilder, ///< [in] handle of builder object + const ze_rtas_builder_build_op_ext_desc_t* pBuildOpDescriptor, ///< [in] pointer to build operation descriptor + void* pScratchBuffer, ///< [in][range(0, `scratchBufferSizeBytes`)] scratch buffer to be used + ///< during acceleration structure construction + size_t scratchBufferSizeBytes, ///< [in] size of scratch buffer, in bytes + void* pRtasBuffer, ///< [in] pointer to destination buffer + size_t rtasBufferSizeBytes, ///< [in] destination buffer size, in bytes + ze_rtas_parallel_operation_ext_handle_t hParallelOperation, ///< [in][optional] handle to parallel operation object + void* pBuildUserPtr, ///< [in][optional] pointer passed to callbacks + ze_rtas_aabb_ext_t* pBounds, ///< [in,out][optional] pointer to destination address for acceleration + ///< structure bounds + size_t* pRtasBufferSizeBytes ///< [out][optional] updated acceleration structure size requirement, in + ///< bytes + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Copies a ray tracing acceleration structure (RTAS) from host to device +/// memory. +/// +/// @details +/// - The memory pointed to by srcptr must be host memory containing a valid +/// ray tracing acceleration structure. +/// - The number of bytes to copy must be larger or equal to the size of the +/// ray tracing acceleration structure. +/// - The application must ensure the memory pointed to by dstptr and srcptr +/// is accessible by the device on which the command list was created. +/// - The implementation must not access the memory pointed to by dstptr and +/// srcptr as they are free to be modified by either the Host or device up +/// until execution. +/// - The application must ensure the events are accessible by the device on +/// which the command list was created. +/// - The application must ensure the command list and events were created, +/// and the memory was allocated, on the same context. +/// - The application must **not** call this function from simultaneous +/// threads with the same command list handle. +/// - The implementation of this function should be lock-free. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hCommandList` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == dstptr` +/// + `nullptr == srcptr` +/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +/// - ::ZE_RESULT_ERROR_INVALID_SIZE +/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +ZE_APIEXPORT ze_result_t ZE_APICALL +zeRTASBuilderCommandListAppendCopyExt( + ze_command_list_handle_t hCommandList, ///< [in] handle of command list + void* dstptr, ///< [in] pointer to destination in device memory to copy the ray tracing + ///< acceleration structure to + const void* srcptr, ///< [in] pointer to a valid source ray tracing acceleration structure in + ///< host memory to copy from + size_t size, ///< [in] size in bytes to copy + ze_event_handle_t hSignalEvent, ///< [in][optional] handle of the event to signal on completion + uint32_t numWaitEvents, ///< [in][optional] number of events to wait on before launching; must be 0 + ///< if `nullptr == phWaitEvents` + ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait + ///< on before launching + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Destroys a ray tracing acceleration structure builder object +/// +/// @details +/// - The implementation of this function may immediately release any +/// internal Host and Device resources associated with this builder. +/// - The application must **not** call this function from simultaneous +/// threads with the same builder handle. +/// - The implementation of this function must be thread-safe. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hBuilder` +/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +ZE_APIEXPORT ze_result_t ZE_APICALL +zeRTASBuilderDestroyExt( + ze_rtas_builder_ext_handle_t hBuilder ///< [in][release] handle of builder object to destroy + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Creates a ray tracing acceleration structure builder parallel +/// operation object +/// +/// @details +/// - The application may call this function from simultaneous threads. +/// - The implementation of this function must be thread-safe. +/// - The implementation must support ::ZE_RTAS_EXT_NAME extension. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hDriver` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == phParallelOperation` +ZE_APIEXPORT ze_result_t ZE_APICALL +zeRTASParallelOperationCreateExt( + ze_driver_handle_t hDriver, ///< [in] handle of driver object + ze_rtas_parallel_operation_ext_handle_t* phParallelOperation ///< [out] handle of parallel operation object + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Retrieves ray tracing acceleration structure builder parallel +/// operation properties +/// +/// @details +/// - The application must first bind the parallel operation object to a +/// build operation before it may query the parallel operation properties. +/// In other words, the application must first call +/// ::zeRTASBuilderBuildExt with **hParallelOperation** before calling +/// this function. +/// - The application may call this function from simultaneous threads. +/// - The implementation of this function must be thread-safe. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hParallelOperation` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == pProperties` +ZE_APIEXPORT ze_result_t ZE_APICALL +zeRTASParallelOperationGetPropertiesExt( + ze_rtas_parallel_operation_ext_handle_t hParallelOperation, ///< [in] handle of parallel operation object + ze_rtas_parallel_operation_ext_properties_t* pProperties ///< [in,out] query result for parallel operation properties + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Joins a parallel build operation +/// +/// @details +/// - All worker threads return the same error code for the parallel build +/// operation upon build completion +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hParallelOperation` +ZE_APIEXPORT ze_result_t ZE_APICALL +zeRTASParallelOperationJoinExt( + ze_rtas_parallel_operation_ext_handle_t hParallelOperation ///< [in] handle of parallel operation object + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Destroys a ray tracing acceleration structure builder parallel +/// operation object +/// +/// @details +/// - The implementation of this function may immediately release any +/// internal Host and Device resources associated with this parallel +/// operation. +/// - The application must **not** call this function from simultaneous +/// threads with the same parallel operation handle. +/// - The implementation of this function must be thread-safe. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hParallelOperation` +ZE_APIEXPORT ze_result_t ZE_APICALL +zeRTASParallelOperationDestroyExt( + ze_rtas_parallel_operation_ext_handle_t hParallelOperation ///< [in][release] handle of parallel operation object to destroy + ); + +#if !defined(__GNUC__) +#pragma endregion +#endif +// Intel 'oneAPI' Level-Zero Extension for Device Vector Sizes Query +#if !defined(__GNUC__) +#pragma region deviceVectorSizes +#endif +/////////////////////////////////////////////////////////////////////////////// +#ifndef ZE_DEVICE_VECTOR_SIZES_EXT_NAME +/// @brief Device Vector Sizes Query Extension Name +#define ZE_DEVICE_VECTOR_SIZES_EXT_NAME "ZE_extension_device_vector_sizes" +#endif // ZE_DEVICE_VECTOR_SIZES_EXT_NAME + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Device Vector Sizes Query Extension Version(s) +typedef enum _ze_device_vector_sizes_ext_version_t +{ + ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 + ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version + ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_* ENUMs + +} ze_device_vector_sizes_ext_version_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Device Vector Width Properties queried using +/// $DeviceGetVectorWidthPropertiesExt +typedef struct _ze_device_vector_width_properties_ext_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + uint32_t vector_width_size; ///< [out] The associated vector width size supported by the device. + uint32_t preferred_vector_width_char; ///< [out] The preferred vector width size for char type supported by the device. + uint32_t preferred_vector_width_short; ///< [out] The preferred vector width size for short type supported by the device. + uint32_t preferred_vector_width_int; ///< [out] The preferred vector width size for int type supported by the device. + uint32_t preferred_vector_width_long; ///< [out] The preferred vector width size for long type supported by the device. + uint32_t preferred_vector_width_float; ///< [out] The preferred vector width size for float type supported by the device. + uint32_t preferred_vector_width_double; ///< [out] The preferred vector width size for double type supported by the device. + uint32_t preferred_vector_width_half; ///< [out] The preferred vector width size for half type supported by the device. + uint32_t native_vector_width_char; ///< [out] The native vector width size for char type supported by the device. + uint32_t native_vector_width_short; ///< [out] The native vector width size for short type supported by the device. + uint32_t native_vector_width_int; ///< [out] The native vector width size for int type supported by the device. + uint32_t native_vector_width_long; ///< [out] The native vector width size for long type supported by the device. + uint32_t native_vector_width_float; ///< [out] The native vector width size for float type supported by the device. + uint32_t native_vector_width_double; ///< [out] The native vector width size for double type supported by the device. + uint32_t native_vector_width_half; ///< [out] The native vector width size for half type supported by the device. + +} ze_device_vector_width_properties_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Retrieves the vector width properties of the device. +/// +/// @details +/// - Properties are reported for each vector width supported by the device. +/// - Multiple calls to this function will return properties in the same +/// order. +/// - The number of vector width properties is reported thru the pCount +/// parameter which is updated by the driver given pCount == 0. +/// - The application may provide a buffer that is larger than the number of +/// properties, but the application must set pCount to the number of +/// properties to retrieve. +/// - The application may call this function from simultaneous threads. +/// - The implementation of this function should be lock-free. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hDevice` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == pCount` +ZE_APIEXPORT ze_result_t ZE_APICALL +zeDeviceGetVectorWidthPropertiesExt( + ze_device_handle_t hDevice, ///< [in] handle of the device + uint32_t* pCount, ///< [in,out] pointer to the number of vector width properties. + ///< if count is zero, then the driver shall update the value with the + ///< total number of vector width properties available. + ///< if count is greater than the number of vector width properties + ///< available, then the driver shall update the value with the correct + ///< number of vector width properties available. + ze_device_vector_width_properties_ext_t* pVectorWidthProperties ///< [in,out][optional][range(0, *pCount)] array of vector width properties. + ///< if count is less than the number of properties available, then the + ///< driver will return only the number requested. + ); + +#if !defined(__GNUC__) +#pragma endregion +#endif +// Intel 'oneAPI' Level-Zero Extension APIs for Mapping External Memory as part of host llocation +#if !defined(__GNUC__) +#pragma region externalMemMap +#endif +/////////////////////////////////////////////////////////////////////////////// +#ifndef ZE_EXTERNAL_MEMORY_MAPPING_EXT_NAME +/// @brief External Memory Mapping Extension Name +#define ZE_EXTERNAL_MEMORY_MAPPING_EXT_NAME "ZE_extension_external_memmap_sysmem" +#endif // ZE_EXTERNAL_MEMORY_MAPPING_EXT_NAME + +/////////////////////////////////////////////////////////////////////////////// +/// @brief External Memory Mapping Extension Version(s) +typedef enum _ze_external_memmap_sysmem_ext_version_t +{ + ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 + ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ),///< latest known version + ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_* ENUMs + +} ze_external_memmap_sysmem_ext_version_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Maps external system memory for an allocation +/// +/// @details +/// - This structure may be passed to ::zeMemAllocHost, via the `pNext` +/// member of ::ze_host_mem_alloc_desc_t to map system memory for a host +/// allocation. +/// - The system memory pointer and size being mapped must be page aligned +/// based on the supported page sizes on the device. +typedef struct _ze_external_memmap_sysmem_ext_desc_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + const void* pSystemMemory; ///< [in] system memory pointer to map; must be page-aligned. + uint64_t size; ///< [in] size of the system memory to map; must be page-aligned. + +} ze_external_memmap_sysmem_ext_desc_t; + +#if !defined(__GNUC__) +#pragma endregion +#endif +// Intel 'oneAPI' Level-Zero Extension for retrieving kernel memory allocation properties. +#if !defined(__GNUC__) +#pragma region kernelAllocationProperties +#endif +/////////////////////////////////////////////////////////////////////////////// +#ifndef ZE_GET_KERNEL_ALLOCATION_PROPERTIES_EXP_NAME +/// @brief Get Kernel Allocation Properties Extension Name +#define ZE_GET_KERNEL_ALLOCATION_PROPERTIES_EXP_NAME "ZE_experimental_kernel_allocation_properties" +#endif // ZE_GET_KERNEL_ALLOCATION_PROPERTIES_EXP_NAME + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Get Kernel Allocation Properties Extension Version(s) +typedef enum _ze_kernel_get_allocation_properties_exp_version_t +{ + ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 + ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version + ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_* ENUMs + +} ze_kernel_get_allocation_properties_exp_version_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Kernel allocation properties +typedef struct _ze_kernel_allocation_exp_properties_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + uint64_t base; ///< [out] base address of the allocation + size_t size; ///< [out] size of allocation + ze_memory_type_t type; ///< [out] type of allocation + uint32_t argIndex; ///< [out] kernel argument index for current allocation, -1 for driver + ///< internal (not kernel argument) allocations + +} ze_kernel_allocation_exp_properties_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Retrieves kernel allocation properties. +/// +/// @details +/// - A valid kernel handle must be created with ::zeKernelCreate. +/// - Returns array of kernel allocation properties for kernel handle. +/// - The application may call this function from simultaneous threads. +/// - The implementation of this function must be thread-safe. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hKernel` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == pCount` +ZE_APIEXPORT ze_result_t ZE_APICALL +zeKernelGetAllocationPropertiesExp( + ze_kernel_handle_t hKernel, ///< [in] Kernel handle. + uint32_t* pCount, ///< [in,out] pointer to the number of kernel allocation properties. + ///< if count is zero, then the driver shall update the value with the + ///< total number of kernel allocation properties available. + ///< if count is greater than the number of kernel allocation properties + ///< available, then the driver shall update the value with the correct + ///< number of kernel allocation properties. + ze_kernel_allocation_exp_properties_t* pAllocationProperties ///< [in,out][optional][range(0, *pCount)] array of kernel allocation properties. + ///< if count is less than the number of kernel allocation properties + ///< available, then driver shall only retrieve that number of kernel + ///< allocation properties. + ); + +#if !defined(__GNUC__) +#pragma endregion +#endif +// Intel 'oneAPI' Level-Zero Extension APIs for Device UsableMem Size Properties Extension +#if !defined(__GNUC__) +#pragma region deviceusablememproperties +#endif +/////////////////////////////////////////////////////////////////////////////// +#ifndef ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_NAME +/// @brief Device Usable Memory Size Properties Extension Name +#define ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_NAME "ZE_extension_device_usablemem_size_properties" +#endif // ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_NAME + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Device Usable Mem Size Extension Version(s) +typedef enum _ze_device_usablemem_size_properties_ext_version_t +{ + ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 + ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version + ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_* ENUMs + +} ze_device_usablemem_size_properties_ext_version_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Memory access property to discover current status of usable memory +/// +/// @details +/// - This structure may be returned from ::zeDeviceGetProperties via the +/// `pNext` member of ::ze_device_properties_t +typedef struct _ze_device_usablemem_size_ext_properties_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + uint64_t currUsableMemSize; ///< [out] Returns the available usable memory at the device level. This is + ///< typically less than or equal to the available physical memory on the + ///< device. It important to note that usable memory size reported is + ///< transient in nature and cannot be used to reliably guarentee success + ///< of future allocations. The usable memory includes all the memory that + ///< the clients can allocate for their use and by L0 Core for its internal + ///< allocations. + +} ze_device_usablemem_size_ext_properties_t; + +#if !defined(__GNUC__) +#pragma endregion +#endif +// Intel 'oneAPI' Level-Zero Extension APIs for Image Format Support +#if !defined(__GNUC__) +#pragma region imageFormatSupport +#endif +/////////////////////////////////////////////////////////////////////////////// +#ifndef ZE_IMAGE_FORMAT_SUPPORT_EXT_NAME +/// @brief Image Format Support Extension Name +#define ZE_IMAGE_FORMAT_SUPPORT_EXT_NAME "ZE_extension_image_format_support" +#endif // ZE_IMAGE_FORMAT_SUPPORT_EXT_NAME + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Image Format Support Extension Version(s) +typedef enum _ze_image_format_support_ext_version_t +{ + ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 + ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version + ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_* ENUMs + +} ze_image_format_support_ext_version_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Image format support query properties +/// +/// @details +/// - This structure may be passed to ::zeImageGetProperties via the pNext +/// member of ::ze_image_properties_t. +/// - The implementation shall populate the supported field based on the +/// ::ze_image_desc_t and ::ze_device_handle_t passed to +/// ::zeImageGetProperties. +/// - This provides a mechanism to query format support without requiring +/// image creation. +typedef struct _ze_image_format_support_ext_properties_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + ze_bool_t supported; ///< [out] boolean flag indicating whether the image format is supported on + ///< the queried device + +} ze_image_format_support_ext_properties_t; #if !defined(__GNUC__) #pragma endregion #endif -// Intel 'oneAPI' Level-Zero Extension for supporting relaxed allocation limits. +// Intel 'oneAPI' Level-Zero Extension for setting the IPC memory handle type requested at memory allocation time. #if !defined(__GNUC__) -#pragma region relaxedAllocLimits +#pragma region ipcMemHandleType #endif /////////////////////////////////////////////////////////////////////////////// -#ifndef ZE_RELAXED_ALLOCATION_LIMITS_EXP_NAME -/// @brief Relaxed Allocation Limits Extension Name -#define ZE_RELAXED_ALLOCATION_LIMITS_EXP_NAME "ZE_experimental_relaxed_allocation_limits" -#endif // ZE_RELAXED_ALLOCATION_LIMITS_EXP_NAME +#ifndef ZE_IPC_MEM_HANDLE_TYPE_EXT_NAME +/// @brief IPC Memory Handle Type Extension Name +#define ZE_IPC_MEM_HANDLE_TYPE_EXT_NAME "ZE_extension_ipc_mem_handle_type" +#endif // ZE_IPC_MEM_HANDLE_TYPE_EXT_NAME /////////////////////////////////////////////////////////////////////////////// -/// @brief Relaxed Allocation Limits Extension Version(s) -typedef enum _ze_relaxed_allocation_limits_exp_version_t +/// @brief IPC Memory Handle Type Extension Version(s) +typedef enum _ze_ipc_mem_handle_type_ext_version_t { - ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 - ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 + ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version + ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_* ENUMs -} ze_relaxed_allocation_limits_exp_version_t; +} ze_ipc_mem_handle_type_ext_version_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Supported relaxed memory allocation flags -typedef uint32_t ze_relaxed_allocation_limits_exp_flags_t; -typedef enum _ze_relaxed_allocation_limits_exp_flag_t +/// @brief Supported IPC memory handle type flags +typedef uint32_t ze_ipc_mem_handle_type_flags_t; +typedef enum _ze_ipc_mem_handle_type_flag_t { - ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_MAX_SIZE = ZE_BIT(0), ///< Allocation size may exceed the `maxMemAllocSize` member of - ///< ::ze_device_properties_t. - ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_IPC_MEM_HANDLE_TYPE_FLAG_DEFAULT = ZE_BIT(0), ///< Local IPC memory handle type for use within the same machine. + ZE_IPC_MEM_HANDLE_TYPE_FLAG_FABRIC_ACCESSIBLE = ZE_BIT(1), ///< Fabric accessible IPC memory handle type for use across machines via a + ///< supported fabric. + ZE_IPC_MEM_HANDLE_TYPE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IPC_MEM_HANDLE_TYPE_FLAG_* ENUMs -} ze_relaxed_allocation_limits_exp_flag_t; +} ze_ipc_mem_handle_type_flag_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Relaxed limits memory allocation descriptor -/// -/// @details -/// - This structure may be passed to ::zeMemAllocShared or -/// ::zeMemAllocDevice, via the `pNext` member of -/// ::ze_device_mem_alloc_desc_t. -/// - This structure may also be passed to ::zeMemAllocHost, via the `pNext` -/// member of ::ze_host_mem_alloc_desc_t. -typedef struct _ze_relaxed_allocation_limits_exp_desc_t +/// @brief ['IPC Memory Handle Type Extension Descriptor', 'Used in +/// ::zeMemGetIpcHandleWithProperties, ::zeMemAllocDevice, and +/// ::zeMemAllocHost, ::zePhysicalMemCreate to specify the IPC memory +/// handle type to create for this allocation.'] +typedef struct _ze_ipc_mem_handle_type_ext_desc_t { ze_structure_type_t stype; ///< [in] type of this structure const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific ///< structure (i.e. contains stype and pNext). - ze_relaxed_allocation_limits_exp_flags_t flags; ///< [in] flags specifying allocation limits to relax. - ///< must be 0 (default) or a valid combination of ::ze_relaxed_allocation_limits_exp_flag_t; + ze_ipc_mem_handle_type_flags_t typeFlags; ///< [in] valid combination of ::ze_ipc_mem_handle_type_flag_t -} ze_relaxed_allocation_limits_exp_desc_t; +} ze_ipc_mem_handle_type_ext_desc_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Creates an IPC memory handle for the specified allocation with +/// properties for the requested handle. +/// +/// @details +/// - Takes a pointer to a device or host memory allocation and creates an +/// IPC memory handle for exporting it for use in another process. +/// - The pointer must be the base pointer of a device or host memory +/// allocation; i.e. the value returned from ::zeMemAllocDevice or from +/// ::zeMemAllocHost, respectively or allocated from +/// ::zePhysicalMemCreate. +/// - The application may call this function from simultaneous threads. +/// - The implementation of this function must be thread-safe. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hContext` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == ptr` +/// + `nullptr == pIpcHandle` +ZE_APIEXPORT ze_result_t ZE_APICALL +zeMemGetIpcHandleWithProperties( + ze_context_handle_t hContext, ///< [in] handle of the context object + const void* ptr, ///< [in] pointer to the device memory allocation + void* pNext, ///< [in][optional] Pointer to extension-specific structure. + ze_ipc_mem_handle_t* pIpcHandle ///< [out] Returned IPC memory handle + ); #if !defined(__GNUC__) #pragma endregion @@ -7540,7 +11513,7 @@ typedef enum _ze_cache_reservation_ext_version_t { ZE_CACHE_RESERVATION_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_CACHE_RESERVATION_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_CACHE_RESERVATION_EXT_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_CACHE_RESERVATION_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_CACHE_RESERVATION_EXT_VERSION_* ENUMs } ze_cache_reservation_ext_version_t; @@ -7557,7 +11530,7 @@ typedef enum _ze_cache_ext_region_t ZE_CACHE_EXT_REGION_DEFAULT = 0, ///< utilize driver default scheme ZE_CACHE_EXT_REGION_RESERVED = 1, ///< utilize reserved region ZE_CACHE_EXT_REGION_NON_RESERVED = 2, ///< utilize non-reserverd region - ZE_CACHE_EXT_REGION_FORCE_UINT32 = 0x7fffffff + ZE_CACHE_EXT_REGION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_CACHE_EXT_REGION_* ENUMs } ze_cache_ext_region_t; @@ -7595,6 +11568,14 @@ typedef struct _ze_cache_reservation_ext_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -7620,12 +11601,21 @@ zeDeviceReserveCacheExt( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == ptr` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZE_CACHE_EXT_REGION_NON_RESERVED < cacheRegion` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceSetCacheAdviceExt( ze_device_handle_t hDevice, ///< [in] handle of the device object @@ -7653,7 +11643,7 @@ typedef enum _ze_event_query_timestamps_exp_version_t { ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ),///< latest known version - ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_* ENUMs } ze_event_query_timestamps_exp_version_t; @@ -7663,8 +11653,8 @@ typedef enum _ze_event_query_timestamps_exp_version_t /// @details /// - The application may call this function from simultaneous threads. /// - The implementation of this function must be thread-safe. -/// - The implementation must support -/// ::ZE_experimental_event_query_timestamps. +/// - The implementation must support ::ZE_EVENT_QUERY_TIMESTAMPS_EXP_NAME +/// extension. /// - The implementation must return all timestamps for the specified event /// and device pair. /// - The implementation must return all timestamps for all sub-devices when @@ -7682,6 +11672,14 @@ typedef enum _ze_event_query_timestamps_exp_version_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEvent` /// + `nullptr == hDevice` @@ -7720,7 +11718,7 @@ typedef enum _ze_image_memory_properties_exp_version_t { ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_* ENUMs } ze_image_memory_properties_exp_version_t; @@ -7743,8 +11741,8 @@ typedef struct _ze_image_memory_properties_exp_t /// @details /// - The application may call this function from simultaneous threads. /// - The implementation of this function must be thread-safe. -/// - The implementation must support -/// ::ZE_experimental_image_memory_properties extension. +/// - The implementation must support ::ZE_IMAGE_MEMORY_PROPERTIES_EXP_NAME +/// extension. /// /// @remarks /// _Analogues_ @@ -7756,6 +11754,14 @@ typedef struct _ze_image_memory_properties_exp_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hImage` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7785,7 +11791,7 @@ typedef enum _ze_image_view_ext_version_t { ZE_IMAGE_VIEW_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_IMAGE_VIEW_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_IMAGE_VIEW_EXT_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_IMAGE_VIEW_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_VIEW_EXT_VERSION_* ENUMs } ze_image_view_ext_version_t; @@ -7797,7 +11803,7 @@ typedef enum _ze_image_view_ext_version_t /// sub-devices, which was provided during creation. /// - The application may call this function from simultaneous threads. /// - The implementation of this function must be thread-safe. -/// - The implementation must support ::ZE_extension_image_view extension. +/// - The implementation must support ::ZE_IMAGE_VIEW_EXT_NAME extension. /// - Image views are treated as images from the API. /// - Image views provide a mechanism to redescribe how an image is /// interpreted (e.g. different format). @@ -7815,6 +11821,14 @@ typedef enum _ze_image_view_ext_version_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -7825,6 +11839,7 @@ typedef enum _ze_image_view_ext_version_t /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x3 < desc->flags` /// + `::ZE_IMAGE_TYPE_BUFFER < desc->type` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT ZE_APIEXPORT ze_result_t ZE_APICALL zeImageViewCreateExt( @@ -7847,7 +11862,7 @@ typedef enum _ze_image_view_exp_version_t { ZE_IMAGE_VIEW_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_IMAGE_VIEW_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_IMAGE_VIEW_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_IMAGE_VIEW_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_VIEW_EXP_VERSION_* ENUMs } ze_image_view_exp_version_t; @@ -7859,8 +11874,7 @@ typedef enum _ze_image_view_exp_version_t /// sub-devices, which was provided during creation. /// - The application may call this function from simultaneous threads. /// - The implementation of this function must be thread-safe. -/// - The implementation must support ::ZE_experimental_image_view -/// extension. +/// - The implementation must support ::ZE_IMAGE_VIEW_EXP_NAME extension. /// - Image views are treated as images from the API. /// - Image views provide a mechanism to redescribe how an image is /// interpreted (e.g. different format). @@ -7880,6 +11894,14 @@ typedef enum _ze_image_view_exp_version_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -7890,6 +11912,7 @@ typedef enum _ze_image_view_exp_version_t /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x3 < desc->flags` /// + `::ZE_IMAGE_TYPE_BUFFER < desc->type` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT ZE_APIEXPORT ze_result_t ZE_APICALL zeImageViewCreateExp( @@ -7919,7 +11942,7 @@ typedef enum _ze_image_view_planar_ext_version_t { ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_* ENUMs } ze_image_view_planar_ext_version_t; @@ -7946,7 +11969,7 @@ typedef enum _ze_image_view_planar_exp_version_t { ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_* ENUMs } ze_image_view_planar_exp_version_t; @@ -7957,7 +11980,8 @@ typedef struct _ze_image_view_planar_exp_desc_t ze_structure_type_t stype; ///< [in] type of this structure const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific ///< structure (i.e. contains stype and pNext). - uint32_t planeIndex; ///< [in] the 0-based plane index (e.g. NV12 is 0 = Y plane, 1 UV plane) + uint32_t planeIndex; ///< [DEPRECATED] no longer supported, use + ///< ::ze_image_view_planar_ext_desc_t instead } ze_image_view_planar_exp_desc_t; @@ -7980,7 +12004,7 @@ typedef enum _ze_scheduling_hints_exp_version_t { ZE_SCHEDULING_HINTS_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_SCHEDULING_HINTS_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_SCHEDULING_HINTS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_SCHEDULING_HINTS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_SCHEDULING_HINTS_EXP_VERSION_* ENUMs } ze_scheduling_hints_exp_version_t; @@ -7992,7 +12016,7 @@ typedef enum _ze_scheduling_hint_exp_flag_t ZE_SCHEDULING_HINT_EXP_FLAG_OLDEST_FIRST = ZE_BIT(0), ///< Hint that the kernel prefers oldest-first scheduling ZE_SCHEDULING_HINT_EXP_FLAG_ROUND_ROBIN = ZE_BIT(1), ///< Hint that the kernel prefers round-robin scheduling ZE_SCHEDULING_HINT_EXP_FLAG_STALL_BASED_ROUND_ROBIN = ZE_BIT(2), ///< Hint that the kernel prefers stall-based round-robin scheduling - ZE_SCHEDULING_HINT_EXP_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_SCHEDULING_HINT_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_SCHEDULING_HINT_EXP_FLAG_* ENUMs } ze_scheduling_hint_exp_flag_t; @@ -8048,12 +12072,21 @@ typedef struct _ze_scheduling_hint_exp_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pHint` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x7 < pHint->flags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeKernelSchedulingHintExp( ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object @@ -8079,7 +12112,7 @@ typedef enum _ze_linkonce_odr_ext_version_t { ZE_LINKONCE_ODR_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_LINKONCE_ODR_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_LINKONCE_ODR_EXT_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_LINKONCE_ODR_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_LINKONCE_ODR_EXT_VERSION_* ENUMs } ze_linkonce_odr_ext_version_t; @@ -8102,7 +12135,7 @@ typedef enum _ze_power_saving_hint_exp_version_t { ZE_POWER_SAVING_HINT_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_POWER_SAVING_HINT_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_POWER_SAVING_HINT_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_POWER_SAVING_HINT_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_POWER_SAVING_HINT_EXP_VERSION_* ENUMs } ze_power_saving_hint_exp_version_t; @@ -8114,7 +12147,7 @@ typedef enum _ze_power_saving_hint_type_t ///< while executing work submitted to this context. ZE_POWER_SAVING_HINT_TYPE_MAX = 100, ///< Maximum power savings. The device will do everything to bring power to ///< a minimum while executing work submitted to this context. - ZE_POWER_SAVING_HINT_TYPE_FORCE_UINT32 = 0x7fffffff + ZE_POWER_SAVING_HINT_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_POWER_SAVING_HINT_TYPE_* ENUMs } ze_power_saving_hint_type_t; @@ -8149,7 +12182,7 @@ typedef enum _ze_subgroup_ext_version_t { ZE_SUBGROUP_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_SUBGROUP_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_SUBGROUP_EXT_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_SUBGROUP_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_SUBGROUP_EXT_VERSION_* ENUMs } ze_subgroup_ext_version_t; @@ -8172,7 +12205,7 @@ typedef enum _ze_eu_count_ext_version_t { ZE_EU_COUNT_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_EU_COUNT_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_EU_COUNT_EXT_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_EU_COUNT_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EU_COUNT_EXT_VERSION_* ENUMs } ze_eu_count_ext_version_t; @@ -8211,7 +12244,7 @@ typedef enum _ze_pci_properties_ext_version_t { ZE_PCI_PROPERTIES_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_PCI_PROPERTIES_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_PCI_PROPERTIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_PCI_PROPERTIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_PCI_PROPERTIES_EXT_VERSION_* ENUMs } ze_pci_properties_ext_version_t; @@ -8275,6 +12308,14 @@ typedef struct _ze_pci_ext_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -8304,7 +12345,7 @@ typedef enum _ze_srgb_ext_version_t { ZE_SRGB_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_SRGB_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_SRGB_EXT_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_SRGB_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_SRGB_EXT_VERSION_* ENUMs } ze_srgb_ext_version_t; @@ -8343,7 +12384,7 @@ typedef enum _ze_image_copy_ext_version_t { ZE_IMAGE_COPY_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_IMAGE_COPY_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_IMAGE_COPY_EXT_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_IMAGE_COPY_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_COPY_EXT_VERSION_* ENUMs } ze_image_copy_ext_version_t; @@ -8386,6 +12427,14 @@ typedef enum _ze_image_copy_ext_version_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hSrcImage` @@ -8450,6 +12499,14 @@ zeCommandListAppendImageCopyToMemoryExt( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hDstImage` @@ -8494,7 +12551,7 @@ typedef enum _ze_image_query_alloc_properties_ext_version_t { ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_* ENUMs } ze_image_query_alloc_properties_ext_version_t; @@ -8522,6 +12579,14 @@ typedef struct _ze_image_allocation_ext_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hImage` @@ -8553,7 +12618,7 @@ typedef enum _ze_linkage_inspection_ext_version_t { ZE_LINKAGE_INSPECTION_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_LINKAGE_INSPECTION_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_LINKAGE_INSPECTION_EXT_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_LINKAGE_INSPECTION_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_LINKAGE_INSPECTION_EXT_VERSION_* ENUMs } ze_linkage_inspection_ext_version_t; @@ -8565,7 +12630,7 @@ typedef enum _ze_linkage_inspection_ext_flag_t ZE_LINKAGE_INSPECTION_EXT_FLAG_IMPORTS = ZE_BIT(0), ///< List all imports of modules ZE_LINKAGE_INSPECTION_EXT_FLAG_UNRESOLVABLE_IMPORTS = ZE_BIT(1), ///< List all imports of modules that do not have a corresponding export ZE_LINKAGE_INSPECTION_EXT_FLAG_EXPORTS = ZE_BIT(2), ///< List all exports of modules - ZE_LINKAGE_INSPECTION_EXT_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_LINKAGE_INSPECTION_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_LINKAGE_INSPECTION_EXT_FLAG_* ENUMs } ze_linkage_inspection_ext_flag_t; @@ -8601,12 +12666,21 @@ typedef struct _ze_linkage_inspection_ext_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pInspectDesc` /// + `nullptr == phModules` /// + `nullptr == phLog` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x7 < pInspectDesc->flags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeModuleInspectLinkageExt( ze_linkage_inspection_ext_desc_t* pInspectDesc, ///< [in] pointer to linkage inspection descriptor structure. @@ -8636,7 +12710,7 @@ typedef enum _ze_memory_compression_hints_ext_version_t { ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_* ENUMs } ze_memory_compression_hints_ext_version_t; @@ -8647,7 +12721,7 @@ typedef enum _ze_memory_compression_hints_ext_flag_t { ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_COMPRESSED = ZE_BIT(0), ///< Hint Driver implementation to make allocation compressible ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_UNCOMPRESSED = ZE_BIT(1), ///< Hint Driver implementation to make allocation not compressible - ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_* ENUMs } ze_memory_compression_hints_ext_flag_t; @@ -8691,7 +12765,7 @@ typedef enum _ze_memory_free_policies_ext_version_t { ZE_MEMORY_FREE_POLICIES_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_MEMORY_FREE_POLICIES_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_MEMORY_FREE_POLICIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_MEMORY_FREE_POLICIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MEMORY_FREE_POLICIES_EXT_VERSION_* ENUMs } ze_memory_free_policies_ext_version_t; @@ -8700,9 +12774,16 @@ typedef enum _ze_memory_free_policies_ext_version_t typedef uint32_t ze_driver_memory_free_policy_ext_flags_t; typedef enum _ze_driver_memory_free_policy_ext_flag_t { - ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_BLOCKING_FREE = ZE_BIT(0), ///< blocks until all commands using the memory are complete before freeing - ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_DEFER_FREE = ZE_BIT(1), ///< schedules the memory to be freed but does not free immediately - ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_BLOCKING_FREE = ZE_BIT(0), ///< Blocks until all commands using the memory are complete before + ///< scheduling memory to be freed. Does not guarantee memory is freed upon + ///< return, only that it is safe and is scheduled to be freed. Actual + ///< freeing of memory is specific to user mode driver and kernel mode + ///< driver implementation and may be done asynchronously. + ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_DEFER_FREE = ZE_BIT(1), ///< Immediately schedules the memory to be freed and returns without + ///< blocking. Memory may be freed after all commands using the memory are + ///< complete. Actual freeing of memory is specific to user mode driver and + ///< kernel mode driver implementation and may be done asynchronously. + ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_* ENUMs } ze_driver_memory_free_policy_ext_flag_t; @@ -8738,11 +12819,13 @@ typedef struct _ze_memory_free_ext_desc_t } ze_memory_free_ext_desc_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Frees allocated host memory, device memory, or shared memory using the -/// specified free policy. +/// @brief Frees allocated host memory, device memory, or shared memory on the +/// context using the specified free policy. /// /// @details -/// - The memory free policy is specified by the memory free descriptor. +/// - Similar to zeMemFree, with added parameter to choose the free policy. +/// - Does not gaurantee memory is freed upon return. See free policy +/// descriptions for details. /// - The application must **not** call this function from simultaneous /// threads with the same pointer. /// - The implementation of this function must be thread-safe. @@ -8753,6 +12836,14 @@ typedef struct _ze_memory_free_ext_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -8760,6 +12851,7 @@ typedef struct _ze_memory_free_ext_desc_t /// + `nullptr == ptr` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x3 < pMemFreeDesc->freePolicy` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeMemFreeExt( ze_context_handle_t hContext, ///< [in] handle of the context object @@ -8780,6 +12872,16 @@ zeMemFreeExt( #define ZE_BANDWIDTH_PROPERTIES_EXP_NAME "ZE_experimental_bandwidth_properties" #endif // ZE_BANDWIDTH_PROPERTIES_EXP_NAME +/////////////////////////////////////////////////////////////////////////////// +/// @brief Bandwidth Extension Version(s) +typedef enum _ze_bandwidth_properties_exp_version_t +{ + ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 + ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version + ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_* ENUMs + +} ze_bandwidth_properties_exp_version_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief P2P Bandwidth Properties /// @@ -8811,6 +12913,7 @@ typedef struct _ze_device_p2p_bandwidth_exp_properties_t /// - This structure may be passed to /// ::zeDeviceGetCommandQueueGroupProperties by having the pNext member of /// ::ze_command_queue_group_properties_t point at this struct. +/// - [DEPRECATED] typedef struct _ze_copy_bandwidth_exp_properties_t { ze_structure_type_t stype; ///< [in] type of this structure @@ -8841,7 +12944,7 @@ typedef enum _ze_device_luid_ext_version_t { ZE_DEVICE_LUID_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_DEVICE_LUID_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_DEVICE_LUID_EXT_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_DEVICE_LUID_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_LUID_EXT_VERSION_* ENUMs } ze_device_luid_ext_version_t; @@ -8899,6 +13002,16 @@ typedef struct _ze_device_luid_ext_properties_t #define ZE_FABRIC_EXP_NAME "ZE_experimental_fabric" #endif // ZE_FABRIC_EXP_NAME +/////////////////////////////////////////////////////////////////////////////// +/// @brief Fabric Topology Discovery Extension Version(s) +typedef enum _ze_fabric_exp_version_t +{ + ZE_FABRIC_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 + ZE_FABRIC_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version + ZE_FABRIC_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_FABRIC_EXP_VERSION_* ENUMs + +} ze_fabric_exp_version_t; + /////////////////////////////////////////////////////////////////////////////// #ifndef ZE_MAX_FABRIC_EDGE_MODEL_EXP_SIZE /// @brief Maximum fabric edge model string size @@ -8913,7 +13026,7 @@ typedef enum _ze_fabric_vertex_exp_type_t ZE_FABRIC_VERTEX_EXP_TYPE_DEVICE = 1, ///< Fabric vertex represents a device ZE_FABRIC_VERTEX_EXP_TYPE_SUBDEVICE = 2, ///< Fabric vertex represents a subdevice ZE_FABRIC_VERTEX_EXP_TYPE_SWITCH = 3, ///< Fabric vertex represents a switch - ZE_FABRIC_VERTEX_EXP_TYPE_FORCE_UINT32 = 0x7fffffff + ZE_FABRIC_VERTEX_EXP_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_FABRIC_VERTEX_EXP_TYPE_* ENUMs } ze_fabric_vertex_exp_type_t; @@ -8926,7 +13039,7 @@ typedef enum _ze_fabric_edge_exp_duplexity_t ///< one direction at time ZE_FABRIC_EDGE_EXP_DUPLEXITY_FULL_DUPLEX = 2, ///< Fabric edge is full duplex, i.e. stated bandwidth is supported in both ///< directions simultaneously - ZE_FABRIC_EDGE_EXP_DUPLEXITY_FORCE_UINT32 = 0x7fffffff + ZE_FABRIC_EDGE_EXP_DUPLEXITY_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_FABRIC_EDGE_EXP_DUPLEXITY_* ENUMs } ze_fabric_edge_exp_duplexity_t; @@ -8996,6 +13109,14 @@ typedef struct _ze_fabric_edge_exp_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -9021,7 +13142,7 @@ zeFabricVertexGetExp( /// - Multiple calls to this function will return identical fabric vertex /// handles, in the same order. /// - The number of handles returned from this function is affected by the -/// ::ZE_AFFINITY_MASK environment variable. +/// `ZE_AFFINITY_MASK` environment variable. /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. /// @@ -9031,6 +13152,14 @@ zeFabricVertexGetExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hVertex` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -9062,6 +13191,14 @@ zeFabricVertexGetSubVerticesExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hVertex` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -9085,6 +13222,14 @@ zeFabricVertexGetPropertiesExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hVertex` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -9112,6 +13257,14 @@ zeFabricVertexGetDeviceExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -9139,6 +13292,14 @@ zeDeviceGetFabricVertexExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hVertexA` /// + `nullptr == hVertexB` @@ -9174,6 +13335,14 @@ zeFabricEdgeGetExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEdge` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -9199,6 +13368,14 @@ zeFabricEdgeGetVerticesExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEdge` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -9228,7 +13405,7 @@ typedef enum _ze_device_memory_properties_ext_version_t { ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_* ENUMs } ze_device_memory_properties_ext_version_t; @@ -9258,7 +13435,11 @@ typedef enum _ze_device_memory_ext_type_t ZE_DEVICE_MEMORY_EXT_TYPE_GDDR6 = 19, ///< GDDR6 memory ZE_DEVICE_MEMORY_EXT_TYPE_GDDR6X = 20, ///< GDDR6X memory ZE_DEVICE_MEMORY_EXT_TYPE_GDDR7 = 21, ///< GDDR7 memory - ZE_DEVICE_MEMORY_EXT_TYPE_FORCE_UINT32 = 0x7fffffff + ZE_DEVICE_MEMORY_EXT_TYPE_HBM2E = 22, ///< HBM2E memory + ZE_DEVICE_MEMORY_EXT_TYPE_HBM3 = 23, ///< HBM3 memory + ZE_DEVICE_MEMORY_EXT_TYPE_HBM3E = 24, ///< HBM3E memory + ZE_DEVICE_MEMORY_EXT_TYPE_HBM4 = 25, ///< HBM4 memory + ZE_DEVICE_MEMORY_EXT_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_MEMORY_EXT_TYPE_* ENUMs } ze_device_memory_ext_type_t; @@ -9302,7 +13483,7 @@ typedef enum _ze_bfloat16_conversions_ext_version_t { ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_* ENUMs } ze_bfloat16_conversions_ext_version_t; @@ -9325,7 +13506,7 @@ typedef enum _ze_device_ip_version_version_t { ZE_DEVICE_IP_VERSION_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_DEVICE_IP_VERSION_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_DEVICE_IP_VERSION_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_DEVICE_IP_VERSION_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_IP_VERSION_VERSION_* ENUMs } ze_device_ip_version_version_t; @@ -9365,7 +13546,7 @@ typedef enum _ze_kernel_max_group_size_properties_ext_version_t { ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_* ENUMs } ze_kernel_max_group_size_properties_ext_version_t; @@ -9410,7 +13591,7 @@ typedef enum _ze_sub_allocations_exp_version_t { ZE_SUB_ALLOCATIONS_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_SUB_ALLOCATIONS_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_SUB_ALLOCATIONS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_SUB_ALLOCATIONS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_SUB_ALLOCATIONS_EXP_VERSION_* ENUMs } ze_sub_allocations_exp_version_t; @@ -9464,7 +13645,7 @@ typedef enum _ze_event_query_kernel_timestamps_ext_version_t { ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_* ENUMs } ze_event_query_kernel_timestamps_ext_version_t; @@ -9475,7 +13656,7 @@ typedef enum _ze_event_query_kernel_timestamps_ext_flag_t { ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_KERNEL = ZE_BIT(0), ///< Kernel timestamp results ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_SYNCHRONIZED = ZE_BIT(1), ///< Device event timestamps synchronized to the host time domain - ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_* ENUMs } ze_event_query_kernel_timestamps_ext_flag_t; @@ -9545,7 +13726,7 @@ typedef struct _ze_event_query_kernel_timestamps_results_ext_properties_t /// - The application may call this function from simultaneous threads. /// - The implementation of this function must be thread-safe. /// - The implementation must support -/// ::ZE_extension_event_query_kernel_timestamps. +/// ::ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_NAME extension. /// - The implementation must return all timestamps for the specified event /// and device pair. /// - The implementation must return all timestamps for all sub-devices when @@ -9559,6 +13740,14 @@ typedef struct _ze_event_query_kernel_timestamps_results_ext_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEvent` /// + `nullptr == hDevice` @@ -9604,7 +13793,7 @@ typedef enum _ze_rtas_builder_exp_version_t { ZE_RTAS_BUILDER_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_RTAS_BUILDER_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_RTAS_BUILDER_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_RTAS_BUILDER_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_EXP_VERSION_* ENUMs } ze_rtas_builder_exp_version_t; @@ -9614,7 +13803,7 @@ typedef uint32_t ze_rtas_device_exp_flags_t; typedef enum _ze_rtas_device_exp_flag_t { ZE_RTAS_DEVICE_EXP_FLAG_RESERVED = ZE_BIT(0), ///< reserved for future use - ZE_RTAS_DEVICE_EXP_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_RTAS_DEVICE_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_DEVICE_EXP_FLAG_* ENUMs } ze_rtas_device_exp_flag_t; @@ -9627,7 +13816,8 @@ typedef enum _ze_rtas_device_exp_flag_t typedef enum _ze_rtas_format_exp_t { ZE_RTAS_FORMAT_EXP_INVALID = 0, ///< Invalid acceleration structure format - ZE_RTAS_FORMAT_EXP_FORCE_UINT32 = 0x7fffffff + ZE_RTAS_FORMAT_EXP_MAX = 0x7ffffffe, ///< Maximum acceleration structure format code + ZE_RTAS_FORMAT_EXP_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_FORMAT_EXP_* ENUMs } ze_rtas_format_exp_t; @@ -9637,7 +13827,7 @@ typedef uint32_t ze_rtas_builder_exp_flags_t; typedef enum _ze_rtas_builder_exp_flag_t { ZE_RTAS_BUILDER_EXP_FLAG_RESERVED = ZE_BIT(0), ///< Reserved for future use - ZE_RTAS_BUILDER_EXP_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_RTAS_BUILDER_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_EXP_FLAG_* ENUMs } ze_rtas_builder_exp_flag_t; @@ -9647,7 +13837,7 @@ typedef uint32_t ze_rtas_parallel_operation_exp_flags_t; typedef enum _ze_rtas_parallel_operation_exp_flag_t { ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_RESERVED = ZE_BIT(0), ///< Reserved for future use - ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_* ENUMs } ze_rtas_parallel_operation_exp_flag_t; @@ -9657,7 +13847,7 @@ typedef uint32_t ze_rtas_builder_geometry_exp_flags_t; typedef enum _ze_rtas_builder_geometry_exp_flag_t { ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_NON_OPAQUE = ZE_BIT(0), ///< non-opaque geometries invoke an any-hit shader - ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_* ENUMs } ze_rtas_builder_geometry_exp_flag_t; @@ -9677,7 +13867,7 @@ typedef enum _ze_rtas_builder_instance_exp_flag_t ///< be non-opaque ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_FORCE_NON_OPAQUE = ZE_BIT(3),///< forces instanced geometry to be non-opaque, unless ray flag forces it ///< to be opaque - ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_* ENUMs } ze_rtas_builder_instance_exp_flag_t; @@ -9703,7 +13893,7 @@ typedef enum _ze_rtas_builder_build_op_exp_flag_t { ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_COMPACT = ZE_BIT(0), ///< build more compact acceleration structure ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION = ZE_BIT(1), ///< guarantees single any-hit shader invocation per primitive - ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_* ENUMs } ze_rtas_builder_build_op_exp_flag_t; @@ -9726,7 +13916,7 @@ typedef enum _ze_rtas_builder_build_quality_hint_exp_t ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_LOW = 0, ///< build low-quality acceleration structure (fast) ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_MEDIUM = 1, ///< build medium-quality acceleration structure (slower) ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_HIGH = 2, ///< build high-quality acceleration structure (slow) - ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_FORCE_UINT32 = 0x7fffffff + ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_* ENUMs } ze_rtas_builder_build_quality_hint_exp_t; @@ -9738,7 +13928,7 @@ typedef enum _ze_rtas_builder_geometry_type_exp_t ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_QUADS = 1, ///< quad mesh geometry type ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_PROCEDURAL = 2, ///< procedural geometry type ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_INSTANCE = 3, ///< instance geometry type - ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_FORCE_UINT32 = 0x7fffffff + ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_* ENUMs } ze_rtas_builder_geometry_type_exp_t; @@ -9767,7 +13957,7 @@ typedef enum _ze_rtas_builder_input_data_format_exp_t ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_TRIANGLE_INDICES_UINT32 = 5, ///< Unsigned 32-bit triangle indices (see ///< ::ze_rtas_triangle_indices_uint32_exp_t) ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_QUAD_INDICES_UINT32 = 6, ///< Unsigned 32-bit quad indices (see ::ze_rtas_quad_indices_uint32_exp_t) - ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FORCE_UINT32 = 0x7fffffff + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_* ENUMs } ze_rtas_builder_input_data_format_exp_t; @@ -10174,8 +14364,7 @@ typedef struct _ze_rtas_builder_build_op_exp_desc_t /// @details /// - The application may call this function from simultaneous threads. /// - The implementation of this function must be thread-safe. -/// - The implementation must support ::ZE_experimental_rtas_builder -/// extension. +/// - The implementation must support ::ZE_RTAS_BUILDER_EXP_NAME extension. /// /// @returns /// - ::ZE_RESULT_SUCCESS @@ -10183,6 +14372,14 @@ typedef struct _ze_rtas_builder_build_op_exp_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -10190,6 +14387,7 @@ typedef struct _ze_rtas_builder_build_op_exp_desc_t /// + `nullptr == phBuilder` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZE_RTAS_BUILDER_EXP_VERSION_CURRENT < pDescriptor->builderVersion` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeRTASBuilderCreateExp( ze_driver_handle_t hDriver, ///< [in] handle of driver object @@ -10210,15 +14408,24 @@ zeRTASBuilderCreateExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hBuilder` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pBuildOpDescriptor` /// + `nullptr == pProperties` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZE_RTAS_FORMAT_EXP_INVALID < pBuildOpDescriptor->rtasFormat` +/// + `::ZE_RTAS_FORMAT_EXP_MAX < pBuildOpDescriptor->rtasFormat` /// + `::ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_HIGH < pBuildOpDescriptor->buildQuality` /// + `0x3 < pBuildOpDescriptor->buildFlags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeRTASBuilderGetBuildPropertiesExp( ze_rtas_builder_exp_handle_t hBuilder, ///< [in] handle of builder object @@ -10234,16 +14441,24 @@ zeRTASBuilderGetBuildPropertiesExp( /// - The implementation of this function must be thread-safe. /// /// @returns -/// - ::ZE_RESULT_SUCCESS /// - ::ZE_RESULT_ERROR_UNINITIALIZED /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZE_RTAS_FORMAT_EXP_INVALID < rtasFormatA` -/// + `::ZE_RTAS_FORMAT_EXP_INVALID < rtasFormatB` +/// + `::ZE_RTAS_FORMAT_EXP_MAX < rtasFormatA` +/// + `::ZE_RTAS_FORMAT_EXP_MAX < rtasFormatB` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_SUCCESS /// + An acceleration structure built with `rtasFormatA` is compatible with devices that report `rtasFormatB`. /// - ::ZE_RESULT_EXP_ERROR_OPERANDS_INCOMPATIBLE @@ -10311,6 +14526,14 @@ zeDriverRTASFormatCompatibilityCheckExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hBuilder` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -10318,9 +14541,10 @@ zeDriverRTASFormatCompatibilityCheckExp( /// + `nullptr == pScratchBuffer` /// + `nullptr == pRtasBuffer` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZE_RTAS_FORMAT_EXP_INVALID < pBuildOpDescriptor->rtasFormat` +/// + `::ZE_RTAS_FORMAT_EXP_MAX < pBuildOpDescriptor->rtasFormat` /// + `::ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_HIGH < pBuildOpDescriptor->buildQuality` /// + `0x3 < pBuildOpDescriptor->buildFlags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_EXP_RTAS_BUILD_DEFERRED /// + Acceleration structure build completion is deferred to parallel operation join. /// - ::ZE_RESULT_EXP_RTAS_BUILD_RETRY @@ -10360,6 +14584,14 @@ zeRTASBuilderBuildExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hBuilder` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -10375,8 +14607,7 @@ zeRTASBuilderDestroyExp( /// @details /// - The application may call this function from simultaneous threads. /// - The implementation of this function must be thread-safe. -/// - The implementation must support ::ZE_experimental_rtas_builder -/// extension. +/// - The implementation must support ::ZE_RTAS_BUILDER_EXP_NAME extension. /// /// @returns /// - ::ZE_RESULT_SUCCESS @@ -10384,6 +14615,14 @@ zeRTASBuilderDestroyExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -10413,6 +14652,14 @@ zeRTASParallelOperationCreateExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hParallelOperation` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -10436,6 +14683,14 @@ zeRTASParallelOperationGetPropertiesExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hParallelOperation` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -10461,6 +14716,14 @@ zeRTASParallelOperationJoinExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hParallelOperation` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -10471,7 +14734,7 @@ zeRTASParallelOperationDestroyExp( #if !defined(__GNUC__) #pragma endregion #endif -// Intel 'oneAPI' Level-Zero Extension APIs for Counter-based Event Pools +// Intel 'oneAPI' Level-Zero Extension APIs for Counter-based Event Pools. @deprecated since 1.15 #if !defined(__GNUC__) #pragma region counterbasedeventpool #endif @@ -10487,7 +14750,7 @@ typedef enum _ze_event_pool_counter_based_exp_version_t { ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_* ENUMs } ze_event_pool_counter_based_exp_version_t; @@ -10498,14 +14761,14 @@ typedef enum _ze_event_pool_counter_based_exp_flag_t { ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_IMMEDIATE = ZE_BIT(0), ///< Counter-based event pool is used for immediate command lists (default) ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_NON_IMMEDIATE = ZE_BIT(1), ///< Counter-based event pool is for non-immediate command lists - ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_* ENUMs } ze_event_pool_counter_based_exp_flag_t; /////////////////////////////////////////////////////////////////////////////// /// @brief Event pool descriptor for counter-based events. This structure may be /// passed to ::zeEventPoolCreate as pNext member of -/// ::ze_event_pool_desc_t. +/// ::ze_event_pool_desc_t. @deprecated since 1.15 typedef struct _ze_event_pool_counter_based_exp_desc_t { ze_structure_type_t stype; ///< [in] type of this structure @@ -10537,7 +14800,7 @@ typedef enum _ze_bindless_image_exp_version_t { ZE_BINDLESS_IMAGE_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_BINDLESS_IMAGE_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_BINDLESS_IMAGE_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_BINDLESS_IMAGE_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_BINDLESS_IMAGE_EXP_VERSION_* ENUMs } ze_bindless_image_exp_version_t; @@ -10551,7 +14814,7 @@ typedef enum _ze_image_bindless_exp_flag_t ZE_IMAGE_BINDLESS_EXP_FLAG_SAMPLED_IMAGE = ZE_BIT(1), ///< Bindless sampled images are created with ::zeImageCreate by combining ///< BINDLESS and SAMPLED_IMAGE. ///< Create sampled image view from bindless unsampled image using SAMPLED_IMAGE. - ZE_IMAGE_BINDLESS_EXP_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_IMAGE_BINDLESS_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_BINDLESS_EXP_FLAG_* ENUMs } ze_image_bindless_exp_flag_t; @@ -10605,7 +14868,25 @@ typedef struct _ze_device_pitched_alloc_exp_properties_t } ze_device_pitched_alloc_exp_properties_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Allocate pitched USM memory for images +/// @brief Pitch information for 2-dimensional linear pitched allocations +/// +/// @details +/// - This structure may be passed to ::zeDeviceGetImageProperties in +/// conjunction with the ::ze_device_pitched_alloc_exp_properties_t via +/// its pNext member +typedef struct _ze_pitched_alloc_2dimage_linear_pitch_exp_info_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + size_t pitchAlign; ///< [out] Required pitch Aligment in Bytes. + size_t maxSupportedPitch; ///< [out] Maximum allowed pitch in Bytes. + +} ze_pitched_alloc_2dimage_linear_pitch_exp_info_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Retrieves pitch information that can be used to allocate USM memory +/// for a given image. /// /// @details /// - Retrieves pitch for 2D image given the width, height and size in bytes @@ -10614,7 +14895,7 @@ typedef struct _ze_device_pitched_alloc_exp_properties_t /// - The application may call this function from simultaneous threads /// - The implementation of this function must be thread-safe. /// - The implementation of this function should be lock-free. -/// - The implementation must support ::ZE_experimental_bindless_image extension. +/// - The implementation must support ::ZE_BINDLESS_IMAGE_EXP_NAME extension. /// /// @returns /// - ::ZE_RESULT_SUCCESS @@ -10622,6 +14903,14 @@ typedef struct _ze_device_pitched_alloc_exp_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -10642,7 +14931,7 @@ zeMemGetPitchFor2dImage( /// - The application may call this function from simultaneous threads /// - The implementation of this function must be thread-safe. /// - The implementation of this function should be lock-free. -/// - The implementation must support ::ZE_experimental_bindless_image +/// - The implementation must support ::ZE_BINDLESS_IMAGE_EXP_NAME /// extension. /// /// @returns @@ -10651,6 +14940,14 @@ zeMemGetPitchFor2dImage( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hImage` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -10661,6 +14958,24 @@ zeImageGetDeviceOffsetExp( uint64_t* pDeviceOffset ///< [out] bindless device offset for image ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Specify user defined pitch for pitched linear image allocations. This +/// structure may be passed to ::zeImageCreate in conjunction with +/// ::ze_image_pitched_exp_desc_t via its pNext member +typedef struct _ze_custom_pitch_exp_desc_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + size_t rowPitch; ///< [in] user programmed aligned pitch for pitched linear image + ///< allocations. This pitch should satisfy the pitchAlign requirement in + ///< ::ze_pitched_alloc_2dimage_linear_pitch_exp_info_t + size_t slicePitch; ///< [in] user programmed slice pitch , must be multiple of rowPitch. For + ///< 2D image arrary or a slice of a 3D image array - this pitch should be + ///< >= rowPitch * image_height . For 1D iamge array >= rowPitch. + +} ze_custom_pitch_exp_desc_t; + #if !defined(__GNUC__) #pragma endregion #endif @@ -10680,7 +14995,7 @@ typedef enum _ze_command_list_clone_exp_version_t { ZE_COMMAND_LIST_CLONE_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_COMMAND_LIST_CLONE_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_COMMAND_LIST_CLONE_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_COMMAND_LIST_CLONE_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_COMMAND_LIST_CLONE_EXP_VERSION_* ENUMs } ze_command_list_clone_exp_version_t; @@ -10708,6 +15023,14 @@ typedef enum _ze_command_list_clone_exp_version_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -10737,7 +15060,7 @@ typedef enum _ze_immediate_command_list_append_exp_version_t { ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_* ENUMs } ze_immediate_command_list_append_exp_version_t; @@ -10759,6 +15082,14 @@ typedef enum _ze_immediate_command_list_append_exp_version_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandListImmediate` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -10797,8 +15128,9 @@ zeCommandListImmediateAppendCommandListsExp( typedef enum _ze_mutable_command_list_exp_version_t { ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 - ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_1 = ZE_MAKE_VERSION( 1, 1 ), ///< version 1.1 + ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 1 ), ///< latest known version + ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_* ENUMs } ze_mutable_command_list_exp_version_t; @@ -10813,7 +15145,9 @@ typedef enum _ze_mutable_command_exp_flag_t ZE_MUTABLE_COMMAND_EXP_FLAG_GLOBAL_OFFSET = ZE_BIT(3), ///< kernel global offset ZE_MUTABLE_COMMAND_EXP_FLAG_SIGNAL_EVENT = ZE_BIT(4), ///< command signal event ZE_MUTABLE_COMMAND_EXP_FLAG_WAIT_EVENTS = ZE_BIT(5), ///< command wait events - ZE_MUTABLE_COMMAND_EXP_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_INSTRUCTION = ZE_BIT(6), ///< command kernel + ZE_MUTABLE_COMMAND_EXP_FLAG_GRAPH_ARGUMENTS = ZE_BIT(7), ///< graph arguments + ZE_MUTABLE_COMMAND_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MUTABLE_COMMAND_EXP_FLAG_* ENUMs } ze_mutable_command_exp_flag_t; @@ -10825,8 +15159,10 @@ typedef struct _ze_mutable_command_id_exp_desc_t const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific ///< structure (i.e. contains stype and pNext). ze_mutable_command_exp_flags_t flags; ///< [in] mutable command flags. - ///< - must be 0 (default, equivalent to setting all flags), or a valid - ///< combination of ::ze_mutable_command_exp_flag_t + ///< - must be 0 (default, equivalent to setting all flags bar kernel + ///< instruction), or a valid combination of ::ze_mutable_command_exp_flag_t + ///< - in order to include kernel instruction mutation, + ///< ::ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_INSTRUCTION must be explictly included } ze_mutable_command_id_exp_desc_t; @@ -10836,7 +15172,7 @@ typedef uint32_t ze_mutable_command_list_exp_flags_t; typedef enum _ze_mutable_command_list_exp_flag_t { ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_RESERVED = ZE_BIT(0), ///< reserved - ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_FORCE_UINT32 = 0x7fffffff + ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_* ENUMs } ze_mutable_command_list_exp_flag_t; @@ -10929,6 +15265,19 @@ typedef struct _ze_mutable_global_offset_exp_desc_t } ze_mutable_global_offset_exp_desc_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Mutable graph argument descriptor +typedef struct _ze_mutable_graph_argument_exp_desc_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + uint64_t commandId; ///< [in] command identifier + uint32_t argIndex; ///< [in] graph argument index + const void* pArgValue; ///< [in] pointer to graph argument value + +} ze_mutable_graph_argument_exp_desc_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Returns a unique command identifier for the next command to be /// appended to a command list. @@ -10946,13 +15295,22 @@ typedef struct _ze_mutable_global_offset_exp_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == desc` /// + `nullptr == pCommandId` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x3f < desc->flags` +/// + `0xff < desc->flags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListGetNextCommandIdExp( ze_command_list_handle_t hCommandList, ///< [in] handle of the command list @@ -10960,6 +15318,52 @@ zeCommandListGetNextCommandIdExp( uint64_t* pCommandId ///< [out] pointer to mutable command identifier to be written ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Returns a unique command identifier for the next command to be +/// appended to a command list. Provides possible kernel handles for +/// kernel mutation when ::ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_INSTRUCTION +/// flag is present. +/// +/// @details +/// - This function may only be called for a mutable command list. +/// - This function may not be called on a closed command list. +/// - This function may be called from simultaneous threads with the same +/// command list handle. +/// - The implementation of this function should be lock-free. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hCommandList` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == desc` +/// + `nullptr == pCommandId` +/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +/// + `0xff < desc->flags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +ZE_APIEXPORT ze_result_t ZE_APICALL +zeCommandListGetNextCommandIdWithKernelsExp( + ze_command_list_handle_t hCommandList, ///< [in] handle of the command list + const ze_mutable_command_id_exp_desc_t* desc, ///< [in][out] pointer to mutable command identifier descriptor + uint32_t numKernels, ///< [in][optional] number of entries on phKernels list + ze_kernel_handle_t* phKernels, ///< [in][optional][range(0, numKernels)] list of kernels that user can + ///< switch between using ::zeCommandListUpdateMutableCommandKernelsExp + ///< call + uint64_t* pCommandId ///< [out] pointer to mutable command identifier to be written + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Updates mutable commands. /// @@ -10979,10 +15383,19 @@ zeCommandListGetNextCommandIdExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == desc` +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// + Invalid kernel argument or not matching update descriptor provided ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListUpdateMutableCommandsExp( ze_command_list_handle_t hCommandList, ///< [in] handle of the command list @@ -10998,8 +15411,6 @@ zeCommandListUpdateMutableCommandsExp( /// - This function may only be called for a mutable command list. /// - The type, scope and flags of the signal event must match those of the /// source command. -/// - Passing a null pointer as the signal event will update the command to -/// not issue a signal. /// - The application must synchronize mutable command list execution before /// calling this function. /// - The application must close a mutable command list after completing all @@ -11014,6 +15425,14 @@ zeCommandListUpdateMutableCommandsExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -11050,6 +15469,14 @@ zeCommandListUpdateMutableCommandSignalEventExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_SIZE @@ -11063,6 +15490,52 @@ zeCommandListUpdateMutableCommandWaitEventsExp( ///< on before launching ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Updates the kernel for a mutable command in a mutable command list. +/// +/// @details +/// - This function may only be called for a mutable command list. +/// - The kernel handle must be from the provided list for given command id. +/// - The application must synchronize mutable command list execution before +/// calling this function. +/// - The application must close a mutable command list after completing all +/// updates. +/// - This function must not be called from simultaneous threads with the +/// same command list handle. +/// - This function must be called before updating kernel arguments and +/// dispatch parameters, when kernel is mutated. +/// - The implementation of this function should be lock-free. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hCommandList` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == pCommandId` +/// + `nullptr == phKernels` +/// - ::ZE_RESULT_ERROR_INVALID_KERNEL_HANDLE +/// + Invalid kernel handle provided for the mutation kernel instruction operation. +ZE_APIEXPORT ze_result_t ZE_APICALL +zeCommandListUpdateMutableCommandKernelsExp( + ze_command_list_handle_t hCommandList, ///< [in] handle of the command list + uint32_t numKernels, ///< [in] the number of kernels to update + uint64_t* pCommandId, ///< [in][range(0, numKernels)] command identifier + ze_kernel_handle_t* phKernels ///< [in][range(0, numKernels)] handle of the kernel for a command + ///< identifier to switch to + ); + #if !defined(__GNUC__) #pragma endregion #endif @@ -14239,4 +18712,4 @@ typedef struct _ze_callbacks_t } // extern "C" #endif -#endif // _ZE_API_H \ No newline at end of file +#endif // _ZE_API_H diff --git a/backends/ze/include/ze_ddi.h b/backends/ze/include/ze_ddi.h index 952cdb036..e7a042744 100644 --- a/backends/ze/include/ze_ddi.h +++ b/backends/ze/include/ze_ddi.h @@ -1,11 +1,11 @@ /* * - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2025 Intel Corporation * * SPDX-License-Identifier: MIT * * @file ze_ddi.h - * @version v1.9-r1.9.3 + * @version v1.15-r1.13.73 * */ #ifndef _ZE_DDI_H @@ -19,6 +19,88 @@ extern "C" { #endif +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeRTASBuilderCreateExt +typedef ze_result_t (ZE_APICALL *ze_pfnRTASBuilderCreateExt_t)( + ze_driver_handle_t, + const ze_rtas_builder_ext_desc_t*, + ze_rtas_builder_ext_handle_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeRTASBuilderGetBuildPropertiesExt +typedef ze_result_t (ZE_APICALL *ze_pfnRTASBuilderGetBuildPropertiesExt_t)( + ze_rtas_builder_ext_handle_t, + const ze_rtas_builder_build_op_ext_desc_t*, + ze_rtas_builder_ext_properties_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeRTASBuilderBuildExt +typedef ze_result_t (ZE_APICALL *ze_pfnRTASBuilderBuildExt_t)( + ze_rtas_builder_ext_handle_t, + const ze_rtas_builder_build_op_ext_desc_t*, + void*, + size_t, + void*, + size_t, + ze_rtas_parallel_operation_ext_handle_t, + void*, + ze_rtas_aabb_ext_t*, + size_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeRTASBuilderCommandListAppendCopyExt +typedef ze_result_t (ZE_APICALL *ze_pfnRTASBuilderCommandListAppendCopyExt_t)( + ze_command_list_handle_t, + void*, + const void*, + size_t, + ze_event_handle_t, + uint32_t, + ze_event_handle_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeRTASBuilderDestroyExt +typedef ze_result_t (ZE_APICALL *ze_pfnRTASBuilderDestroyExt_t)( + ze_rtas_builder_ext_handle_t + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Table of RTASBuilder functions pointers +typedef struct _ze_rtas_builder_dditable_t +{ + ze_pfnRTASBuilderCreateExt_t pfnCreateExt; + ze_pfnRTASBuilderGetBuildPropertiesExt_t pfnGetBuildPropertiesExt; + ze_pfnRTASBuilderBuildExt_t pfnBuildExt; + ze_pfnRTASBuilderCommandListAppendCopyExt_t pfnCommandListAppendCopyExt; + ze_pfnRTASBuilderDestroyExt_t pfnDestroyExt; +} ze_rtas_builder_dditable_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Exported function for filling application's RTASBuilder table +/// with current process' addresses +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION +ZE_DLLEXPORT ze_result_t ZE_APICALL +zeGetRTASBuilderProcAddrTable( + ze_api_version_t version, ///< [in] API version requested + ze_rtas_builder_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeGetRTASBuilderProcAddrTable +typedef ze_result_t (ZE_APICALL *ze_pfnGetRTASBuilderProcAddrTable_t)( + ze_api_version_t, + ze_rtas_builder_dditable_t* + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for zeRTASBuilderCreateExp typedef ze_result_t (ZE_APICALL *ze_pfnRTASBuilderCreateExp_t)( @@ -88,6 +170,64 @@ typedef ze_result_t (ZE_APICALL *ze_pfnGetRTASBuilderExpProcAddrTable_t)( ze_rtas_builder_exp_dditable_t* ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeRTASParallelOperationCreateExt +typedef ze_result_t (ZE_APICALL *ze_pfnRTASParallelOperationCreateExt_t)( + ze_driver_handle_t, + ze_rtas_parallel_operation_ext_handle_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeRTASParallelOperationGetPropertiesExt +typedef ze_result_t (ZE_APICALL *ze_pfnRTASParallelOperationGetPropertiesExt_t)( + ze_rtas_parallel_operation_ext_handle_t, + ze_rtas_parallel_operation_ext_properties_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeRTASParallelOperationJoinExt +typedef ze_result_t (ZE_APICALL *ze_pfnRTASParallelOperationJoinExt_t)( + ze_rtas_parallel_operation_ext_handle_t + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeRTASParallelOperationDestroyExt +typedef ze_result_t (ZE_APICALL *ze_pfnRTASParallelOperationDestroyExt_t)( + ze_rtas_parallel_operation_ext_handle_t + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Table of RTASParallelOperation functions pointers +typedef struct _ze_rtas_parallel_operation_dditable_t +{ + ze_pfnRTASParallelOperationCreateExt_t pfnCreateExt; + ze_pfnRTASParallelOperationGetPropertiesExt_t pfnGetPropertiesExt; + ze_pfnRTASParallelOperationJoinExt_t pfnJoinExt; + ze_pfnRTASParallelOperationDestroyExt_t pfnDestroyExt; +} ze_rtas_parallel_operation_dditable_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Exported function for filling application's RTASParallelOperation table +/// with current process' addresses +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION +ZE_DLLEXPORT ze_result_t ZE_APICALL +zeGetRTASParallelOperationProcAddrTable( + ze_api_version_t version, ///< [in] API version requested + ze_rtas_parallel_operation_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeGetRTASParallelOperationProcAddrTable +typedef ze_result_t (ZE_APICALL *ze_pfnGetRTASParallelOperationProcAddrTable_t)( + ze_api_version_t, + ze_rtas_parallel_operation_dditable_t* + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for zeRTASParallelOperationCreateExp typedef ze_result_t (ZE_APICALL *ze_pfnRTASParallelOperationCreateExp_t)( @@ -152,11 +292,20 @@ typedef ze_result_t (ZE_APICALL *ze_pfnInit_t)( ze_init_flags_t ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeInitDrivers +typedef ze_result_t (ZE_APICALL *ze_pfnInitDrivers_t)( + uint32_t*, + ze_driver_handle_t*, + ze_init_driver_type_desc_t* + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Table of Global functions pointers typedef struct _ze_global_dditable_t { ze_pfnInit_t pfnInit; + ze_pfnInitDrivers_t pfnInitDrivers; } ze_global_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -232,6 +381,20 @@ typedef ze_result_t (ZE_APICALL *ze_pfnDriverGetLastErrorDescription_t)( const char** ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeDriverRTASFormatCompatibilityCheckExt +typedef ze_result_t (ZE_APICALL *ze_pfnDriverRTASFormatCompatibilityCheckExt_t)( + ze_driver_handle_t, + ze_rtas_format_ext_t, + ze_rtas_format_ext_t + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeDriverGetDefaultContext +typedef ze_context_handle_t (ZE_APICALL *ze_pfnDriverGetDefaultContext_t)( + ze_driver_handle_t + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Table of Driver functions pointers typedef struct _ze_driver_dditable_t @@ -243,6 +406,8 @@ typedef struct _ze_driver_dditable_t ze_pfnDriverGetExtensionProperties_t pfnGetExtensionProperties; ze_pfnDriverGetExtensionFunctionAddress_t pfnGetExtensionFunctionAddress; ze_pfnDriverGetLastErrorDescription_t pfnGetLastErrorDescription; + ze_pfnDriverRTASFormatCompatibilityCheckExt_t pfnRTASFormatCompatibilityCheckExt; + ze_pfnDriverGetDefaultContext_t pfnGetDefaultContext; } ze_driver_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -447,6 +612,41 @@ typedef ze_result_t (ZE_APICALL *ze_pfnDeviceGetRootDevice_t)( ze_device_handle_t* ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeDeviceImportExternalSemaphoreExt +typedef ze_result_t (ZE_APICALL *ze_pfnDeviceImportExternalSemaphoreExt_t)( + ze_device_handle_t, + const ze_external_semaphore_ext_desc_t*, + ze_external_semaphore_ext_handle_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeDeviceReleaseExternalSemaphoreExt +typedef ze_result_t (ZE_APICALL *ze_pfnDeviceReleaseExternalSemaphoreExt_t)( + ze_external_semaphore_ext_handle_t + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeDeviceGetVectorWidthPropertiesExt +typedef ze_result_t (ZE_APICALL *ze_pfnDeviceGetVectorWidthPropertiesExt_t)( + ze_device_handle_t, + uint32_t*, + ze_device_vector_width_properties_ext_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeDeviceSynchronize +typedef ze_result_t (ZE_APICALL *ze_pfnDeviceSynchronize_t)( + ze_device_handle_t + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeDeviceGetAggregatedCopyOffloadIncrementValue +typedef ze_result_t (ZE_APICALL *ze_pfnDeviceGetAggregatedCopyOffloadIncrementValue_t)( + ze_device_handle_t, + uint32_t* + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Table of Device functions pointers typedef struct _ze_device_dditable_t @@ -470,6 +670,11 @@ typedef struct _ze_device_dditable_t ze_pfnDeviceSetCacheAdviceExt_t pfnSetCacheAdviceExt; ze_pfnDevicePciGetPropertiesExt_t pfnPciGetPropertiesExt; ze_pfnDeviceGetRootDevice_t pfnGetRootDevice; + ze_pfnDeviceImportExternalSemaphoreExt_t pfnImportExternalSemaphoreExt; + ze_pfnDeviceReleaseExternalSemaphoreExt_t pfnReleaseExternalSemaphoreExt; + ze_pfnDeviceGetVectorWidthPropertiesExt_t pfnGetVectorWidthPropertiesExt; + ze_pfnDeviceSynchronize_t pfnSynchronize; + ze_pfnDeviceGetAggregatedCopyOffloadIncrementValue_t pfnGetAggregatedCopyOffloadIncrementValue; } ze_device_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -1056,6 +1261,56 @@ typedef ze_result_t (ZE_APICALL *ze_pfnCommandListIsImmediate_t)( ze_bool_t* ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeCommandListAppendSignalExternalSemaphoreExt +typedef ze_result_t (ZE_APICALL *ze_pfnCommandListAppendSignalExternalSemaphoreExt_t)( + ze_command_list_handle_t, + uint32_t, + ze_external_semaphore_ext_handle_t*, + ze_external_semaphore_signal_params_ext_t*, + ze_event_handle_t, + uint32_t, + ze_event_handle_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeCommandListAppendWaitExternalSemaphoreExt +typedef ze_result_t (ZE_APICALL *ze_pfnCommandListAppendWaitExternalSemaphoreExt_t)( + ze_command_list_handle_t, + uint32_t, + ze_external_semaphore_ext_handle_t*, + ze_external_semaphore_wait_params_ext_t*, + ze_event_handle_t, + uint32_t, + ze_event_handle_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeCommandListAppendLaunchKernelWithParameters +typedef ze_result_t (ZE_APICALL *ze_pfnCommandListAppendLaunchKernelWithParameters_t)( + ze_command_list_handle_t, + ze_kernel_handle_t, + const ze_group_count_t*, + const void *, + ze_event_handle_t, + uint32_t, + ze_event_handle_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeCommandListAppendLaunchKernelWithArguments +typedef ze_result_t (ZE_APICALL *ze_pfnCommandListAppendLaunchKernelWithArguments_t)( + ze_command_list_handle_t, + ze_kernel_handle_t, + const ze_group_count_t, + const ze_group_size_t, + void **, + const void *, + ze_event_handle_t, + uint32_t, + ze_event_handle_t* + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Table of CommandList functions pointers typedef struct _ze_command_list_dditable_t @@ -1094,6 +1349,10 @@ typedef struct _ze_command_list_dditable_t ze_pfnCommandListGetOrdinal_t pfnGetOrdinal; ze_pfnCommandListImmediateGetIndex_t pfnImmediateGetIndex; ze_pfnCommandListIsImmediate_t pfnIsImmediate; + ze_pfnCommandListAppendSignalExternalSemaphoreExt_t pfnAppendSignalExternalSemaphoreExt; + ze_pfnCommandListAppendWaitExternalSemaphoreExt_t pfnAppendWaitExternalSemaphoreExt; + ze_pfnCommandListAppendLaunchKernelWithParameters_t pfnAppendLaunchKernelWithParameters; + ze_pfnCommandListAppendLaunchKernelWithArguments_t pfnAppendLaunchKernelWithArguments; } ze_command_list_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -1168,6 +1427,25 @@ typedef ze_result_t (ZE_APICALL *ze_pfnCommandListUpdateMutableCommandWaitEvents ze_event_handle_t* ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeCommandListGetNextCommandIdWithKernelsExp +typedef ze_result_t (ZE_APICALL *ze_pfnCommandListGetNextCommandIdWithKernelsExp_t)( + ze_command_list_handle_t, + const ze_mutable_command_id_exp_desc_t*, + uint32_t, + ze_kernel_handle_t*, + uint64_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeCommandListUpdateMutableCommandKernelsExp +typedef ze_result_t (ZE_APICALL *ze_pfnCommandListUpdateMutableCommandKernelsExp_t)( + ze_command_list_handle_t, + uint32_t, + uint64_t*, + ze_kernel_handle_t* + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Table of CommandListExp functions pointers typedef struct _ze_command_list_exp_dditable_t @@ -1178,6 +1456,8 @@ typedef struct _ze_command_list_exp_dditable_t ze_pfnCommandListUpdateMutableCommandsExp_t pfnUpdateMutableCommandsExp; ze_pfnCommandListUpdateMutableCommandSignalEventExp_t pfnUpdateMutableCommandSignalEventExp; ze_pfnCommandListUpdateMutableCommandWaitEventsExp_t pfnUpdateMutableCommandWaitEventsExp; + ze_pfnCommandListGetNextCommandIdWithKernelsExp_t pfnGetNextCommandIdWithKernelsExp; + ze_pfnCommandListUpdateMutableCommandKernelsExp_t pfnUpdateMutableCommandKernelsExp; } ze_command_list_exp_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -1440,6 +1720,15 @@ typedef ze_result_t (ZE_APICALL *ze_pfnMemGetPitchFor2dImage_t)( size_t * ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeMemGetIpcHandleWithProperties +typedef ze_result_t (ZE_APICALL *ze_pfnMemGetIpcHandleWithProperties_t)( + ze_context_handle_t, + const void*, + void*, + ze_ipc_mem_handle_t* + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Table of Mem functions pointers typedef struct _ze_mem_dditable_t @@ -1456,6 +1745,7 @@ typedef struct _ze_mem_dditable_t ze_pfnMemFreeExt_t pfnFreeExt; ze_pfnMemPutIpcHandle_t pfnPutIpcHandle; ze_pfnMemGetPitchFor2dImage_t pfnGetPitchFor2dImage; + ze_pfnMemGetIpcHandleWithProperties_t pfnGetIpcHandleWithProperties; } ze_mem_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -1784,6 +2074,44 @@ typedef ze_result_t (ZE_APICALL *ze_pfnEventGetWaitScope_t)( ze_event_scope_flags_t* ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeEventCounterBasedCreate +typedef ze_result_t (ZE_APICALL *ze_pfnEventCounterBasedCreate_t)( + ze_context_handle_t, + ze_device_handle_t, + const ze_event_counter_based_desc_t*, + ze_event_handle_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeEventCounterBasedGetIpcHandle +typedef ze_result_t (ZE_APICALL *ze_pfnEventCounterBasedGetIpcHandle_t)( + ze_event_handle_t, + ze_ipc_event_counter_based_handle_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeEventCounterBasedOpenIpcHandle +typedef ze_result_t (ZE_APICALL *ze_pfnEventCounterBasedOpenIpcHandle_t)( + ze_context_handle_t, + ze_ipc_event_counter_based_handle_t, + ze_event_handle_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeEventCounterBasedCloseIpcHandle +typedef ze_result_t (ZE_APICALL *ze_pfnEventCounterBasedCloseIpcHandle_t)( + ze_event_handle_t + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeEventCounterBasedGetDeviceAddress +typedef ze_result_t (ZE_APICALL *ze_pfnEventCounterBasedGetDeviceAddress_t)( + ze_event_handle_t, + uint64_t*, + uint64_t* + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Table of Event functions pointers typedef struct _ze_event_dditable_t @@ -1799,6 +2127,11 @@ typedef struct _ze_event_dditable_t ze_pfnEventGetEventPool_t pfnGetEventPool; ze_pfnEventGetSignalScope_t pfnGetSignalScope; ze_pfnEventGetWaitScope_t pfnGetWaitScope; + ze_pfnEventCounterBasedCreate_t pfnCounterBasedCreate; + ze_pfnEventCounterBasedGetIpcHandle_t pfnCounterBasedGetIpcHandle; + ze_pfnEventCounterBasedOpenIpcHandle_t pfnCounterBasedOpenIpcHandle; + ze_pfnEventCounterBasedCloseIpcHandle_t pfnCounterBasedCloseIpcHandle; + ze_pfnEventCounterBasedGetDeviceAddress_t pfnCounterBasedGetDeviceAddress; } ze_event_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -2166,12 +2499,30 @@ typedef ze_result_t (ZE_APICALL *ze_pfnKernelSchedulingHintExp_t)( ze_scheduling_hint_exp_desc_t* ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeKernelGetBinaryExp +typedef ze_result_t (ZE_APICALL *ze_pfnKernelGetBinaryExp_t)( + ze_kernel_handle_t, + size_t*, + uint8_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zeKernelGetAllocationPropertiesExp +typedef ze_result_t (ZE_APICALL *ze_pfnKernelGetAllocationPropertiesExp_t)( + ze_kernel_handle_t, + uint32_t*, + ze_kernel_allocation_exp_properties_t* + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Table of KernelExp functions pointers typedef struct _ze_kernel_exp_dditable_t { ze_pfnKernelSetGlobalOffsetExp_t pfnSetGlobalOffsetExp; ze_pfnKernelSchedulingHintExp_t pfnSchedulingHintExp; + ze_pfnKernelGetBinaryExp_t pfnGetBinaryExp; + ze_pfnKernelGetAllocationPropertiesExp_t pfnGetAllocationPropertiesExp; } ze_kernel_exp_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -2257,12 +2608,21 @@ typedef ze_result_t (ZE_APICALL *ze_pfnPhysicalMemDestroy_t)( ze_physical_mem_handle_t ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zePhysicalMemGetProperties +typedef ze_result_t (ZE_APICALL *ze_pfnPhysicalMemGetProperties_t)( + ze_context_handle_t, + ze_physical_mem_handle_t, + ze_physical_mem_properties_t* + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Table of PhysicalMem functions pointers typedef struct _ze_physical_mem_dditable_t { ze_pfnPhysicalMemCreate_t pfnCreate; ze_pfnPhysicalMemDestroy_t pfnDestroy; + ze_pfnPhysicalMemGetProperties_t pfnGetProperties; } ze_physical_mem_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -2507,7 +2867,9 @@ typedef ze_result_t (ZE_APICALL *ze_pfnGetFabricEdgeExpProcAddrTable_t)( /// @brief Container for all DDI tables typedef struct _ze_dditable_t { + ze_rtas_builder_dditable_t RTASBuilder; ze_rtas_builder_exp_dditable_t RTASBuilderExp; + ze_rtas_parallel_operation_dditable_t RTASParallelOperation; ze_rtas_parallel_operation_exp_dditable_t RTASParallelOperationExp; ze_global_dditable_t Global; ze_driver_dditable_t Driver; @@ -2536,6 +2898,42 @@ typedef struct _ze_dditable_t ze_fabric_vertex_exp_dditable_t FabricVertexExp; ze_fabric_edge_exp_dditable_t FabricEdgeExp; } ze_dditable_t; +/// @brief Container for all DDI tables with version and tables set by the Driver +typedef struct _ze_dditable_driver_t +{ + ze_api_version_t version; + uint8_t isValidFlag; + ze_rtas_builder_dditable_t * RTASBuilder; + ze_rtas_builder_exp_dditable_t * RTASBuilderExp; + ze_rtas_parallel_operation_dditable_t * RTASParallelOperation; + ze_rtas_parallel_operation_exp_dditable_t * RTASParallelOperationExp; + ze_global_dditable_t * Global; + ze_driver_dditable_t * Driver; + ze_driver_exp_dditable_t * DriverExp; + ze_device_dditable_t * Device; + ze_device_exp_dditable_t * DeviceExp; + ze_context_dditable_t * Context; + ze_command_queue_dditable_t * CommandQueue; + ze_command_list_dditable_t * CommandList; + ze_command_list_exp_dditable_t * CommandListExp; + ze_image_dditable_t * Image; + ze_image_exp_dditable_t * ImageExp; + ze_mem_dditable_t * Mem; + ze_mem_exp_dditable_t * MemExp; + ze_fence_dditable_t * Fence; + ze_event_pool_dditable_t * EventPool; + ze_event_dditable_t * Event; + ze_event_exp_dditable_t * EventExp; + ze_module_dditable_t * Module; + ze_module_build_log_dditable_t * ModuleBuildLog; + ze_kernel_dditable_t * Kernel; + ze_kernel_exp_dditable_t * KernelExp; + ze_sampler_dditable_t * Sampler; + ze_physical_mem_dditable_t * PhysicalMem; + ze_virtual_mem_dditable_t * VirtualMem; + ze_fabric_vertex_exp_dditable_t * FabricVertexExp; + ze_fabric_edge_exp_dditable_t * FabricEdgeExp; +} ze_dditable_driver_t; #if defined(__cplusplus) } // extern "C" diff --git a/backends/ze/include/ze_ddi_common.h b/backends/ze/include/ze_ddi_common.h new file mode 100644 index 000000000..6e5c6a0b5 --- /dev/null +++ b/backends/ze/include/ze_ddi_common.h @@ -0,0 +1,38 @@ +/* + * + * Copyright (C) 2024 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + * @file ze_ddi_common.h + * @version v1.15-r1.13.73 + * + */ +#ifndef _ZE_DDI_COMMON_H +#define _ZE_DDI_COMMON_H +#if defined(__cplusplus) +#pragma once +#endif +#include "ze_ddi.h" +#include "zet_ddi.h" +#include "zes_ddi.h" +#include "zer_ddi.h" + +#if defined(__cplusplus) +extern "C" { +#endif + +/// @brief Handle with pointers to Dispatch Tables allocated by the driver at the beginning of every L0 object handle. +typedef struct _ze_handle_t +{ + ze_dditable_driver_t *pCore; // [in] pointer to _ze_dditable_t_ object related to this handle + zet_dditable_driver_t *pTools; // [in] pointer to _zet_dditable_t_ object related to this handle + zes_dditable_driver_t *pSysman; // [in] pointer to _zes_dditable_t_ object related to this handle + zer_dditable_driver_t *pRuntime; // [in] pointer to _zer_dditable_t_ object related to this handle +} ze_handle_t; + +#if defined(__cplusplus) +} // extern "C" +#endif + +#endif // _ZE_DDI_COMMON_H \ No newline at end of file diff --git a/backends/ze/include/ze_ddi_ver.h b/backends/ze/include/ze_ddi_ver.h index 82d0ba009..7c9aac53c 100644 --- a/backends/ze/include/ze_ddi_ver.h +++ b/backends/ze/include/ze_ddi_ver.h @@ -5,7 +5,7 @@ * SPDX-License-Identifier: MIT * * @file ze_ddi.h - * @version v1.9-r1.9.3 + * @version v1.15-r1.13.73 * */ #ifndef _ZE_DDI_VER_H @@ -19,6 +19,18 @@ extern "C" { #endif +/////////////////////////////////////////////////////////////////////////////// +/// [1.13] +/// @brief Table of RTASBuilder functions pointers +typedef struct _ze_rtas_builder_dditable_t_1_13 +{ + ze_pfnRTASBuilderCreateExt_t pfnCreateExt; + ze_pfnRTASBuilderGetBuildPropertiesExt_t pfnGetBuildPropertiesExt; + ze_pfnRTASBuilderBuildExt_t pfnBuildExt; + ze_pfnRTASBuilderCommandListAppendCopyExt_t pfnCommandListAppendCopyExt; + ze_pfnRTASBuilderDestroyExt_t pfnDestroyExt; +} ze_rtas_builder_dditable_t_1_13; + /////////////////////////////////////////////////////////////////////////////// /// [1.7] /// @brief Table of RTASBuilderExp functions pointers @@ -30,6 +42,17 @@ typedef struct _ze_rtas_builder_exp_dditable_t_1_7 ze_pfnRTASBuilderDestroyExp_t pfnDestroyExp; } ze_rtas_builder_exp_dditable_t_1_7; +/////////////////////////////////////////////////////////////////////////////// +/// [1.13] +/// @brief Table of RTASParallelOperation functions pointers +typedef struct _ze_rtas_parallel_operation_dditable_t_1_13 +{ + ze_pfnRTASParallelOperationCreateExt_t pfnCreateExt; + ze_pfnRTASParallelOperationGetPropertiesExt_t pfnGetPropertiesExt; + ze_pfnRTASParallelOperationJoinExt_t pfnJoinExt; + ze_pfnRTASParallelOperationDestroyExt_t pfnDestroyExt; +} ze_rtas_parallel_operation_dditable_t_1_13; + /////////////////////////////////////////////////////////////////////////////// /// [1.7] /// @brief Table of RTASParallelOperationExp functions pointers @@ -42,15 +65,21 @@ typedef struct _ze_rtas_parallel_operation_exp_dditable_t_1_7 } ze_rtas_parallel_operation_exp_dditable_t_1_7; /////////////////////////////////////////////////////////////////////////////// -/// [1.0] +/// [1.0, 1.1] /// @brief Table of Global functions pointers typedef struct _ze_global_dditable_t_1_0 { ze_pfnInit_t pfnInit; } ze_global_dditable_t_1_0; +typedef struct _ze_global_dditable_t_1_1 +{ + ze_pfnInit_t pfnInit; + ze_pfnInitDrivers_t pfnInitDrivers; +} ze_global_dditable_t_1_1; + /////////////////////////////////////////////////////////////////////////////// -/// [1.0, 1.1, 1.6] +/// [1.0, 1.1, 1.13, 1.14, 1.6] /// @brief Table of Driver functions pointers typedef struct _ze_driver_dditable_t_1_0 { @@ -71,6 +100,29 @@ typedef struct _ze_driver_dditable_t_1_1 ze_pfnDriverGetExtensionFunctionAddress_t pfnGetExtensionFunctionAddress; } ze_driver_dditable_t_1_1; +typedef struct _ze_driver_dditable_t_1_13 +{ + ze_pfnDriverGet_t pfnGet; + ze_pfnDriverGetApiVersion_t pfnGetApiVersion; + ze_pfnDriverGetProperties_t pfnGetProperties; + ze_pfnDriverGetIpcProperties_t pfnGetIpcProperties; + ze_pfnDriverGetExtensionProperties_t pfnGetExtensionProperties; + ze_pfnDriverGetExtensionFunctionAddress_t pfnGetExtensionFunctionAddress; + ze_pfnDriverRTASFormatCompatibilityCheckExt_t pfnRTASFormatCompatibilityCheckExt; +} ze_driver_dditable_t_1_13; + +typedef struct _ze_driver_dditable_t_1_14 +{ + ze_pfnDriverGet_t pfnGet; + ze_pfnDriverGetApiVersion_t pfnGetApiVersion; + ze_pfnDriverGetProperties_t pfnGetProperties; + ze_pfnDriverGetIpcProperties_t pfnGetIpcProperties; + ze_pfnDriverGetExtensionProperties_t pfnGetExtensionProperties; + ze_pfnDriverGetExtensionFunctionAddress_t pfnGetExtensionFunctionAddress; + ze_pfnDriverRTASFormatCompatibilityCheckExt_t pfnRTASFormatCompatibilityCheckExt; + ze_pfnDriverGetDefaultContext_t pfnGetDefaultContext; +} ze_driver_dditable_t_1_14; + typedef struct _ze_driver_dditable_t_1_6 { ze_pfnDriverGet_t pfnGet; @@ -80,6 +132,8 @@ typedef struct _ze_driver_dditable_t_1_6 ze_pfnDriverGetExtensionProperties_t pfnGetExtensionProperties; ze_pfnDriverGetExtensionFunctionAddress_t pfnGetExtensionFunctionAddress; ze_pfnDriverGetLastErrorDescription_t pfnGetLastErrorDescription; + ze_pfnDriverRTASFormatCompatibilityCheckExt_t pfnRTASFormatCompatibilityCheckExt; + ze_pfnDriverGetDefaultContext_t pfnGetDefaultContext; } ze_driver_dditable_t_1_6; /////////////////////////////////////////////////////////////////////////////// @@ -91,7 +145,7 @@ typedef struct _ze_driver_exp_dditable_t_1_7 } ze_driver_exp_dditable_t_1_7; /////////////////////////////////////////////////////////////////////////////// -/// [1.0, 1.1, 1.2, 1.3, 1.7] +/// [1.0, 1.1, 1.12, 1.13, 1.14, 1.15, 1.2, 1.3, 1.7] /// @brief Table of Device functions pointers typedef struct _ze_device_dditable_t_1_0 { @@ -130,6 +184,96 @@ typedef struct _ze_device_dditable_t_1_1 ze_pfnDeviceGetGlobalTimestamps_t pfnGetGlobalTimestamps; } ze_device_dditable_t_1_1; +typedef struct _ze_device_dditable_t_1_12 +{ + ze_pfnDeviceGet_t pfnGet; + ze_pfnDeviceGetSubDevices_t pfnGetSubDevices; + ze_pfnDeviceGetProperties_t pfnGetProperties; + ze_pfnDeviceGetComputeProperties_t pfnGetComputeProperties; + ze_pfnDeviceGetModuleProperties_t pfnGetModuleProperties; + ze_pfnDeviceGetCommandQueueGroupProperties_t pfnGetCommandQueueGroupProperties; + ze_pfnDeviceGetMemoryProperties_t pfnGetMemoryProperties; + ze_pfnDeviceGetMemoryAccessProperties_t pfnGetMemoryAccessProperties; + ze_pfnDeviceGetCacheProperties_t pfnGetCacheProperties; + ze_pfnDeviceGetImageProperties_t pfnGetImageProperties; + ze_pfnDeviceGetExternalMemoryProperties_t pfnGetExternalMemoryProperties; + ze_pfnDeviceGetP2PProperties_t pfnGetP2PProperties; + ze_pfnDeviceCanAccessPeer_t pfnCanAccessPeer; + ze_pfnDeviceGetStatus_t pfnGetStatus; + ze_pfnDeviceGetGlobalTimestamps_t pfnGetGlobalTimestamps; + ze_pfnDeviceImportExternalSemaphoreExt_t pfnImportExternalSemaphoreExt; + ze_pfnDeviceReleaseExternalSemaphoreExt_t pfnReleaseExternalSemaphoreExt; +} ze_device_dditable_t_1_12; + +typedef struct _ze_device_dditable_t_1_13 +{ + ze_pfnDeviceGet_t pfnGet; + ze_pfnDeviceGetSubDevices_t pfnGetSubDevices; + ze_pfnDeviceGetProperties_t pfnGetProperties; + ze_pfnDeviceGetComputeProperties_t pfnGetComputeProperties; + ze_pfnDeviceGetModuleProperties_t pfnGetModuleProperties; + ze_pfnDeviceGetCommandQueueGroupProperties_t pfnGetCommandQueueGroupProperties; + ze_pfnDeviceGetMemoryProperties_t pfnGetMemoryProperties; + ze_pfnDeviceGetMemoryAccessProperties_t pfnGetMemoryAccessProperties; + ze_pfnDeviceGetCacheProperties_t pfnGetCacheProperties; + ze_pfnDeviceGetImageProperties_t pfnGetImageProperties; + ze_pfnDeviceGetExternalMemoryProperties_t pfnGetExternalMemoryProperties; + ze_pfnDeviceGetP2PProperties_t pfnGetP2PProperties; + ze_pfnDeviceCanAccessPeer_t pfnCanAccessPeer; + ze_pfnDeviceGetStatus_t pfnGetStatus; + ze_pfnDeviceGetGlobalTimestamps_t pfnGetGlobalTimestamps; + ze_pfnDeviceImportExternalSemaphoreExt_t pfnImportExternalSemaphoreExt; + ze_pfnDeviceReleaseExternalSemaphoreExt_t pfnReleaseExternalSemaphoreExt; + ze_pfnDeviceGetVectorWidthPropertiesExt_t pfnGetVectorWidthPropertiesExt; +} ze_device_dditable_t_1_13; + +typedef struct _ze_device_dditable_t_1_14 +{ + ze_pfnDeviceGet_t pfnGet; + ze_pfnDeviceGetSubDevices_t pfnGetSubDevices; + ze_pfnDeviceGetProperties_t pfnGetProperties; + ze_pfnDeviceGetComputeProperties_t pfnGetComputeProperties; + ze_pfnDeviceGetModuleProperties_t pfnGetModuleProperties; + ze_pfnDeviceGetCommandQueueGroupProperties_t pfnGetCommandQueueGroupProperties; + ze_pfnDeviceGetMemoryProperties_t pfnGetMemoryProperties; + ze_pfnDeviceGetMemoryAccessProperties_t pfnGetMemoryAccessProperties; + ze_pfnDeviceGetCacheProperties_t pfnGetCacheProperties; + ze_pfnDeviceGetImageProperties_t pfnGetImageProperties; + ze_pfnDeviceGetExternalMemoryProperties_t pfnGetExternalMemoryProperties; + ze_pfnDeviceGetP2PProperties_t pfnGetP2PProperties; + ze_pfnDeviceCanAccessPeer_t pfnCanAccessPeer; + ze_pfnDeviceGetStatus_t pfnGetStatus; + ze_pfnDeviceGetGlobalTimestamps_t pfnGetGlobalTimestamps; + ze_pfnDeviceImportExternalSemaphoreExt_t pfnImportExternalSemaphoreExt; + ze_pfnDeviceReleaseExternalSemaphoreExt_t pfnReleaseExternalSemaphoreExt; + ze_pfnDeviceGetVectorWidthPropertiesExt_t pfnGetVectorWidthPropertiesExt; + ze_pfnDeviceSynchronize_t pfnSynchronize; +} ze_device_dditable_t_1_14; + +typedef struct _ze_device_dditable_t_1_15 +{ + ze_pfnDeviceGet_t pfnGet; + ze_pfnDeviceGetSubDevices_t pfnGetSubDevices; + ze_pfnDeviceGetProperties_t pfnGetProperties; + ze_pfnDeviceGetComputeProperties_t pfnGetComputeProperties; + ze_pfnDeviceGetModuleProperties_t pfnGetModuleProperties; + ze_pfnDeviceGetCommandQueueGroupProperties_t pfnGetCommandQueueGroupProperties; + ze_pfnDeviceGetMemoryProperties_t pfnGetMemoryProperties; + ze_pfnDeviceGetMemoryAccessProperties_t pfnGetMemoryAccessProperties; + ze_pfnDeviceGetCacheProperties_t pfnGetCacheProperties; + ze_pfnDeviceGetImageProperties_t pfnGetImageProperties; + ze_pfnDeviceGetExternalMemoryProperties_t pfnGetExternalMemoryProperties; + ze_pfnDeviceGetP2PProperties_t pfnGetP2PProperties; + ze_pfnDeviceCanAccessPeer_t pfnCanAccessPeer; + ze_pfnDeviceGetStatus_t pfnGetStatus; + ze_pfnDeviceGetGlobalTimestamps_t pfnGetGlobalTimestamps; + ze_pfnDeviceImportExternalSemaphoreExt_t pfnImportExternalSemaphoreExt; + ze_pfnDeviceReleaseExternalSemaphoreExt_t pfnReleaseExternalSemaphoreExt; + ze_pfnDeviceGetVectorWidthPropertiesExt_t pfnGetVectorWidthPropertiesExt; + ze_pfnDeviceSynchronize_t pfnSynchronize; + ze_pfnDeviceGetAggregatedCopyOffloadIncrementValue_t pfnGetAggregatedCopyOffloadIncrementValue; +} ze_device_dditable_t_1_15; + typedef struct _ze_device_dditable_t_1_2 { ze_pfnDeviceGet_t pfnGet; @@ -149,6 +293,11 @@ typedef struct _ze_device_dditable_t_1_2 ze_pfnDeviceGetGlobalTimestamps_t pfnGetGlobalTimestamps; ze_pfnDeviceReserveCacheExt_t pfnReserveCacheExt; ze_pfnDeviceSetCacheAdviceExt_t pfnSetCacheAdviceExt; + ze_pfnDeviceImportExternalSemaphoreExt_t pfnImportExternalSemaphoreExt; + ze_pfnDeviceReleaseExternalSemaphoreExt_t pfnReleaseExternalSemaphoreExt; + ze_pfnDeviceGetVectorWidthPropertiesExt_t pfnGetVectorWidthPropertiesExt; + ze_pfnDeviceSynchronize_t pfnSynchronize; + ze_pfnDeviceGetAggregatedCopyOffloadIncrementValue_t pfnGetAggregatedCopyOffloadIncrementValue; } ze_device_dditable_t_1_2; typedef struct _ze_device_dditable_t_1_3 @@ -171,6 +320,11 @@ typedef struct _ze_device_dditable_t_1_3 ze_pfnDeviceReserveCacheExt_t pfnReserveCacheExt; ze_pfnDeviceSetCacheAdviceExt_t pfnSetCacheAdviceExt; ze_pfnDevicePciGetPropertiesExt_t pfnPciGetPropertiesExt; + ze_pfnDeviceImportExternalSemaphoreExt_t pfnImportExternalSemaphoreExt; + ze_pfnDeviceReleaseExternalSemaphoreExt_t pfnReleaseExternalSemaphoreExt; + ze_pfnDeviceGetVectorWidthPropertiesExt_t pfnGetVectorWidthPropertiesExt; + ze_pfnDeviceSynchronize_t pfnSynchronize; + ze_pfnDeviceGetAggregatedCopyOffloadIncrementValue_t pfnGetAggregatedCopyOffloadIncrementValue; } ze_device_dditable_t_1_3; typedef struct _ze_device_dditable_t_1_7 @@ -194,6 +348,11 @@ typedef struct _ze_device_dditable_t_1_7 ze_pfnDeviceSetCacheAdviceExt_t pfnSetCacheAdviceExt; ze_pfnDevicePciGetPropertiesExt_t pfnPciGetPropertiesExt; ze_pfnDeviceGetRootDevice_t pfnGetRootDevice; + ze_pfnDeviceImportExternalSemaphoreExt_t pfnImportExternalSemaphoreExt; + ze_pfnDeviceReleaseExternalSemaphoreExt_t pfnReleaseExternalSemaphoreExt; + ze_pfnDeviceGetVectorWidthPropertiesExt_t pfnGetVectorWidthPropertiesExt; + ze_pfnDeviceSynchronize_t pfnSynchronize; + ze_pfnDeviceGetAggregatedCopyOffloadIncrementValue_t pfnGetAggregatedCopyOffloadIncrementValue; } ze_device_dditable_t_1_7; /////////////////////////////////////////////////////////////////////////////// @@ -254,7 +413,7 @@ typedef struct _ze_command_queue_dditable_t_1_9 } ze_command_queue_dditable_t_1_9; /////////////////////////////////////////////////////////////////////////////// -/// [1.0, 1.3, 1.6, 1.9] +/// [1.0, 1.12, 1.14, 1.3, 1.6, 1.9] /// @brief Table of CommandList functions pointers typedef struct _ze_command_list_dditable_t_1_0 { @@ -286,6 +445,72 @@ typedef struct _ze_command_list_dditable_t_1_0 ze_pfnCommandListAppendLaunchMultipleKernelsIndirect_t pfnAppendLaunchMultipleKernelsIndirect; } ze_command_list_dditable_t_1_0; +typedef struct _ze_command_list_dditable_t_1_12 +{ + ze_pfnCommandListCreate_t pfnCreate; + ze_pfnCommandListCreateImmediate_t pfnCreateImmediate; + ze_pfnCommandListDestroy_t pfnDestroy; + ze_pfnCommandListClose_t pfnClose; + ze_pfnCommandListReset_t pfnReset; + ze_pfnCommandListAppendWriteGlobalTimestamp_t pfnAppendWriteGlobalTimestamp; + ze_pfnCommandListAppendBarrier_t pfnAppendBarrier; + ze_pfnCommandListAppendMemoryRangesBarrier_t pfnAppendMemoryRangesBarrier; + ze_pfnCommandListAppendMemoryCopy_t pfnAppendMemoryCopy; + ze_pfnCommandListAppendMemoryFill_t pfnAppendMemoryFill; + ze_pfnCommandListAppendMemoryCopyRegion_t pfnAppendMemoryCopyRegion; + ze_pfnCommandListAppendMemoryCopyFromContext_t pfnAppendMemoryCopyFromContext; + ze_pfnCommandListAppendImageCopy_t pfnAppendImageCopy; + ze_pfnCommandListAppendImageCopyRegion_t pfnAppendImageCopyRegion; + ze_pfnCommandListAppendImageCopyToMemory_t pfnAppendImageCopyToMemory; + ze_pfnCommandListAppendImageCopyFromMemory_t pfnAppendImageCopyFromMemory; + ze_pfnCommandListAppendMemoryPrefetch_t pfnAppendMemoryPrefetch; + ze_pfnCommandListAppendMemAdvise_t pfnAppendMemAdvise; + ze_pfnCommandListAppendSignalEvent_t pfnAppendSignalEvent; + ze_pfnCommandListAppendWaitOnEvents_t pfnAppendWaitOnEvents; + ze_pfnCommandListAppendEventReset_t pfnAppendEventReset; + ze_pfnCommandListAppendQueryKernelTimestamps_t pfnAppendQueryKernelTimestamps; + ze_pfnCommandListAppendLaunchKernel_t pfnAppendLaunchKernel; + ze_pfnCommandListAppendLaunchCooperativeKernel_t pfnAppendLaunchCooperativeKernel; + ze_pfnCommandListAppendLaunchKernelIndirect_t pfnAppendLaunchKernelIndirect; + ze_pfnCommandListAppendLaunchMultipleKernelsIndirect_t pfnAppendLaunchMultipleKernelsIndirect; + ze_pfnCommandListAppendSignalExternalSemaphoreExt_t pfnAppendSignalExternalSemaphoreExt; + ze_pfnCommandListAppendWaitExternalSemaphoreExt_t pfnAppendWaitExternalSemaphoreExt; +} ze_command_list_dditable_t_1_12; + +typedef struct _ze_command_list_dditable_t_1_14 +{ + ze_pfnCommandListCreate_t pfnCreate; + ze_pfnCommandListCreateImmediate_t pfnCreateImmediate; + ze_pfnCommandListDestroy_t pfnDestroy; + ze_pfnCommandListClose_t pfnClose; + ze_pfnCommandListReset_t pfnReset; + ze_pfnCommandListAppendWriteGlobalTimestamp_t pfnAppendWriteGlobalTimestamp; + ze_pfnCommandListAppendBarrier_t pfnAppendBarrier; + ze_pfnCommandListAppendMemoryRangesBarrier_t pfnAppendMemoryRangesBarrier; + ze_pfnCommandListAppendMemoryCopy_t pfnAppendMemoryCopy; + ze_pfnCommandListAppendMemoryFill_t pfnAppendMemoryFill; + ze_pfnCommandListAppendMemoryCopyRegion_t pfnAppendMemoryCopyRegion; + ze_pfnCommandListAppendMemoryCopyFromContext_t pfnAppendMemoryCopyFromContext; + ze_pfnCommandListAppendImageCopy_t pfnAppendImageCopy; + ze_pfnCommandListAppendImageCopyRegion_t pfnAppendImageCopyRegion; + ze_pfnCommandListAppendImageCopyToMemory_t pfnAppendImageCopyToMemory; + ze_pfnCommandListAppendImageCopyFromMemory_t pfnAppendImageCopyFromMemory; + ze_pfnCommandListAppendMemoryPrefetch_t pfnAppendMemoryPrefetch; + ze_pfnCommandListAppendMemAdvise_t pfnAppendMemAdvise; + ze_pfnCommandListAppendSignalEvent_t pfnAppendSignalEvent; + ze_pfnCommandListAppendWaitOnEvents_t pfnAppendWaitOnEvents; + ze_pfnCommandListAppendEventReset_t pfnAppendEventReset; + ze_pfnCommandListAppendQueryKernelTimestamps_t pfnAppendQueryKernelTimestamps; + ze_pfnCommandListAppendLaunchKernel_t pfnAppendLaunchKernel; + ze_pfnCommandListAppendLaunchCooperativeKernel_t pfnAppendLaunchCooperativeKernel; + ze_pfnCommandListAppendLaunchKernelIndirect_t pfnAppendLaunchKernelIndirect; + ze_pfnCommandListAppendLaunchMultipleKernelsIndirect_t pfnAppendLaunchMultipleKernelsIndirect; + ze_pfnCommandListAppendSignalExternalSemaphoreExt_t pfnAppendSignalExternalSemaphoreExt; + ze_pfnCommandListAppendWaitExternalSemaphoreExt_t pfnAppendWaitExternalSemaphoreExt; + ze_pfnCommandListAppendLaunchKernelWithParameters_t pfnAppendLaunchKernelWithParameters; + ze_pfnCommandListAppendLaunchKernelWithArguments_t pfnAppendLaunchKernelWithArguments; +} ze_command_list_dditable_t_1_14; + typedef struct _ze_command_list_dditable_t_1_3 { ze_pfnCommandListCreate_t pfnCreate; @@ -316,6 +541,10 @@ typedef struct _ze_command_list_dditable_t_1_3 ze_pfnCommandListAppendLaunchMultipleKernelsIndirect_t pfnAppendLaunchMultipleKernelsIndirect; ze_pfnCommandListAppendImageCopyToMemoryExt_t pfnAppendImageCopyToMemoryExt; ze_pfnCommandListAppendImageCopyFromMemoryExt_t pfnAppendImageCopyFromMemoryExt; + ze_pfnCommandListAppendSignalExternalSemaphoreExt_t pfnAppendSignalExternalSemaphoreExt; + ze_pfnCommandListAppendWaitExternalSemaphoreExt_t pfnAppendWaitExternalSemaphoreExt; + ze_pfnCommandListAppendLaunchKernelWithParameters_t pfnAppendLaunchKernelWithParameters; + ze_pfnCommandListAppendLaunchKernelWithArguments_t pfnAppendLaunchKernelWithArguments; } ze_command_list_dditable_t_1_3; typedef struct _ze_command_list_dditable_t_1_6 @@ -349,6 +578,10 @@ typedef struct _ze_command_list_dditable_t_1_6 ze_pfnCommandListAppendImageCopyToMemoryExt_t pfnAppendImageCopyToMemoryExt; ze_pfnCommandListAppendImageCopyFromMemoryExt_t pfnAppendImageCopyFromMemoryExt; ze_pfnCommandListHostSynchronize_t pfnHostSynchronize; + ze_pfnCommandListAppendSignalExternalSemaphoreExt_t pfnAppendSignalExternalSemaphoreExt; + ze_pfnCommandListAppendWaitExternalSemaphoreExt_t pfnAppendWaitExternalSemaphoreExt; + ze_pfnCommandListAppendLaunchKernelWithParameters_t pfnAppendLaunchKernelWithParameters; + ze_pfnCommandListAppendLaunchKernelWithArguments_t pfnAppendLaunchKernelWithArguments; } ze_command_list_dditable_t_1_6; typedef struct _ze_command_list_dditable_t_1_9 @@ -387,11 +620,21 @@ typedef struct _ze_command_list_dditable_t_1_9 ze_pfnCommandListGetOrdinal_t pfnGetOrdinal; ze_pfnCommandListImmediateGetIndex_t pfnImmediateGetIndex; ze_pfnCommandListIsImmediate_t pfnIsImmediate; + ze_pfnCommandListAppendSignalExternalSemaphoreExt_t pfnAppendSignalExternalSemaphoreExt; + ze_pfnCommandListAppendWaitExternalSemaphoreExt_t pfnAppendWaitExternalSemaphoreExt; + ze_pfnCommandListAppendLaunchKernelWithParameters_t pfnAppendLaunchKernelWithParameters; + ze_pfnCommandListAppendLaunchKernelWithArguments_t pfnAppendLaunchKernelWithArguments; } ze_command_list_dditable_t_1_9; /////////////////////////////////////////////////////////////////////////////// -/// [1.9] +/// [1.1, 1.9] /// @brief Table of CommandListExp functions pointers +typedef struct _ze_command_list_exp_dditable_t_1_1 +{ + ze_pfnCommandListGetNextCommandIdWithKernelsExp_t pfnGetNextCommandIdWithKernelsExp; + ze_pfnCommandListUpdateMutableCommandKernelsExp_t pfnUpdateMutableCommandKernelsExp; +} ze_command_list_exp_dditable_t_1_1; + typedef struct _ze_command_list_exp_dditable_t_1_9 { ze_pfnCommandListCreateCloneExp_t pfnCreateCloneExp; @@ -400,6 +643,8 @@ typedef struct _ze_command_list_exp_dditable_t_1_9 ze_pfnCommandListUpdateMutableCommandsExp_t pfnUpdateMutableCommandsExp; ze_pfnCommandListUpdateMutableCommandSignalEventExp_t pfnUpdateMutableCommandSignalEventExp; ze_pfnCommandListUpdateMutableCommandWaitEventsExp_t pfnUpdateMutableCommandWaitEventsExp; + ze_pfnCommandListGetNextCommandIdWithKernelsExp_t pfnGetNextCommandIdWithKernelsExp; + ze_pfnCommandListUpdateMutableCommandKernelsExp_t pfnUpdateMutableCommandKernelsExp; } ze_command_list_exp_dditable_t_1_9; /////////////////////////////////////////////////////////////////////////////// @@ -446,7 +691,7 @@ typedef struct _ze_image_exp_dditable_t_1_9 } ze_image_exp_dditable_t_1_9; /////////////////////////////////////////////////////////////////////////////// -/// [1.0, 1.3, 1.6, 1.9] +/// [1.0, 1.15, 1.3, 1.6, 1.9] /// @brief Table of Mem functions pointers typedef struct _ze_mem_dditable_t_1_0 { @@ -461,6 +706,20 @@ typedef struct _ze_mem_dditable_t_1_0 ze_pfnMemCloseIpcHandle_t pfnCloseIpcHandle; } ze_mem_dditable_t_1_0; +typedef struct _ze_mem_dditable_t_1_15 +{ + ze_pfnMemAllocShared_t pfnAllocShared; + ze_pfnMemAllocDevice_t pfnAllocDevice; + ze_pfnMemAllocHost_t pfnAllocHost; + ze_pfnMemFree_t pfnFree; + ze_pfnMemGetAllocProperties_t pfnGetAllocProperties; + ze_pfnMemGetAddressRange_t pfnGetAddressRange; + ze_pfnMemGetIpcHandle_t pfnGetIpcHandle; + ze_pfnMemOpenIpcHandle_t pfnOpenIpcHandle; + ze_pfnMemCloseIpcHandle_t pfnCloseIpcHandle; + ze_pfnMemGetIpcHandleWithProperties_t pfnGetIpcHandleWithProperties; +} ze_mem_dditable_t_1_15; + typedef struct _ze_mem_dditable_t_1_3 { ze_pfnMemAllocShared_t pfnAllocShared; @@ -473,6 +732,7 @@ typedef struct _ze_mem_dditable_t_1_3 ze_pfnMemOpenIpcHandle_t pfnOpenIpcHandle; ze_pfnMemCloseIpcHandle_t pfnCloseIpcHandle; ze_pfnMemFreeExt_t pfnFreeExt; + ze_pfnMemGetIpcHandleWithProperties_t pfnGetIpcHandleWithProperties; } ze_mem_dditable_t_1_3; typedef struct _ze_mem_dditable_t_1_6 @@ -488,6 +748,7 @@ typedef struct _ze_mem_dditable_t_1_6 ze_pfnMemCloseIpcHandle_t pfnCloseIpcHandle; ze_pfnMemFreeExt_t pfnFreeExt; ze_pfnMemPutIpcHandle_t pfnPutIpcHandle; + ze_pfnMemGetIpcHandleWithProperties_t pfnGetIpcHandleWithProperties; } ze_mem_dditable_t_1_6; typedef struct _ze_mem_dditable_t_1_9 @@ -504,6 +765,7 @@ typedef struct _ze_mem_dditable_t_1_9 ze_pfnMemFreeExt_t pfnFreeExt; ze_pfnMemPutIpcHandle_t pfnPutIpcHandle; ze_pfnMemGetPitchFor2dImage_t pfnGetPitchFor2dImage; + ze_pfnMemGetIpcHandleWithProperties_t pfnGetIpcHandleWithProperties; } ze_mem_dditable_t_1_9; /////////////////////////////////////////////////////////////////////////////// @@ -570,7 +832,7 @@ typedef struct _ze_event_pool_dditable_t_1_9 } ze_event_pool_dditable_t_1_9; /////////////////////////////////////////////////////////////////////////////// -/// [1.0, 1.6, 1.9] +/// [1.0, 1.15, 1.6, 1.9] /// @brief Table of Event functions pointers typedef struct _ze_event_dditable_t_1_0 { @@ -583,6 +845,22 @@ typedef struct _ze_event_dditable_t_1_0 ze_pfnEventQueryKernelTimestamp_t pfnQueryKernelTimestamp; } ze_event_dditable_t_1_0; +typedef struct _ze_event_dditable_t_1_15 +{ + ze_pfnEventCreate_t pfnCreate; + ze_pfnEventDestroy_t pfnDestroy; + ze_pfnEventHostSignal_t pfnHostSignal; + ze_pfnEventHostSynchronize_t pfnHostSynchronize; + ze_pfnEventQueryStatus_t pfnQueryStatus; + ze_pfnEventHostReset_t pfnHostReset; + ze_pfnEventQueryKernelTimestamp_t pfnQueryKernelTimestamp; + ze_pfnEventCounterBasedCreate_t pfnCounterBasedCreate; + ze_pfnEventCounterBasedGetIpcHandle_t pfnCounterBasedGetIpcHandle; + ze_pfnEventCounterBasedOpenIpcHandle_t pfnCounterBasedOpenIpcHandle; + ze_pfnEventCounterBasedCloseIpcHandle_t pfnCounterBasedCloseIpcHandle; + ze_pfnEventCounterBasedGetDeviceAddress_t pfnCounterBasedGetDeviceAddress; +} ze_event_dditable_t_1_15; + typedef struct _ze_event_dditable_t_1_6 { ze_pfnEventCreate_t pfnCreate; @@ -593,6 +871,11 @@ typedef struct _ze_event_dditable_t_1_6 ze_pfnEventHostReset_t pfnHostReset; ze_pfnEventQueryKernelTimestamp_t pfnQueryKernelTimestamp; ze_pfnEventQueryKernelTimestampsExt_t pfnQueryKernelTimestampsExt; + ze_pfnEventCounterBasedCreate_t pfnCounterBasedCreate; + ze_pfnEventCounterBasedGetIpcHandle_t pfnCounterBasedGetIpcHandle; + ze_pfnEventCounterBasedOpenIpcHandle_t pfnCounterBasedOpenIpcHandle; + ze_pfnEventCounterBasedCloseIpcHandle_t pfnCounterBasedCloseIpcHandle; + ze_pfnEventCounterBasedGetDeviceAddress_t pfnCounterBasedGetDeviceAddress; } ze_event_dditable_t_1_6; typedef struct _ze_event_dditable_t_1_9 @@ -608,6 +891,11 @@ typedef struct _ze_event_dditable_t_1_9 ze_pfnEventGetEventPool_t pfnGetEventPool; ze_pfnEventGetSignalScope_t pfnGetSignalScope; ze_pfnEventGetWaitScope_t pfnGetWaitScope; + ze_pfnEventCounterBasedCreate_t pfnCounterBasedCreate; + ze_pfnEventCounterBasedGetIpcHandle_t pfnCounterBasedGetIpcHandle; + ze_pfnEventCounterBasedOpenIpcHandle_t pfnCounterBasedOpenIpcHandle; + ze_pfnEventCounterBasedCloseIpcHandle_t pfnCounterBasedCloseIpcHandle; + ze_pfnEventCounterBasedGetDeviceAddress_t pfnCounterBasedGetDeviceAddress; } ze_event_dditable_t_1_9; /////////////////////////////////////////////////////////////////////////////// @@ -675,17 +963,32 @@ typedef struct _ze_kernel_dditable_t_1_0 } ze_kernel_dditable_t_1_0; /////////////////////////////////////////////////////////////////////////////// -/// [1.1, 1.2] +/// [1.1, 1.11, 1.14, 1.2] /// @brief Table of KernelExp functions pointers typedef struct _ze_kernel_exp_dditable_t_1_1 { ze_pfnKernelSetGlobalOffsetExp_t pfnSetGlobalOffsetExp; } ze_kernel_exp_dditable_t_1_1; +typedef struct _ze_kernel_exp_dditable_t_1_11 +{ + ze_pfnKernelSetGlobalOffsetExp_t pfnSetGlobalOffsetExp; + ze_pfnKernelGetBinaryExp_t pfnGetBinaryExp; +} ze_kernel_exp_dditable_t_1_11; + +typedef struct _ze_kernel_exp_dditable_t_1_14 +{ + ze_pfnKernelSetGlobalOffsetExp_t pfnSetGlobalOffsetExp; + ze_pfnKernelGetBinaryExp_t pfnGetBinaryExp; + ze_pfnKernelGetAllocationPropertiesExp_t pfnGetAllocationPropertiesExp; +} ze_kernel_exp_dditable_t_1_14; + typedef struct _ze_kernel_exp_dditable_t_1_2 { ze_pfnKernelSetGlobalOffsetExp_t pfnSetGlobalOffsetExp; ze_pfnKernelSchedulingHintExp_t pfnSchedulingHintExp; + ze_pfnKernelGetBinaryExp_t pfnGetBinaryExp; + ze_pfnKernelGetAllocationPropertiesExp_t pfnGetAllocationPropertiesExp; } ze_kernel_exp_dditable_t_1_2; /////////////////////////////////////////////////////////////////////////////// @@ -698,7 +1001,7 @@ typedef struct _ze_sampler_dditable_t_1_0 } ze_sampler_dditable_t_1_0; /////////////////////////////////////////////////////////////////////////////// -/// [1.0] +/// [1.0, 1.15] /// @brief Table of PhysicalMem functions pointers typedef struct _ze_physical_mem_dditable_t_1_0 { @@ -706,6 +1009,13 @@ typedef struct _ze_physical_mem_dditable_t_1_0 ze_pfnPhysicalMemDestroy_t pfnDestroy; } ze_physical_mem_dditable_t_1_0; +typedef struct _ze_physical_mem_dditable_t_1_15 +{ + ze_pfnPhysicalMemCreate_t pfnCreate; + ze_pfnPhysicalMemDestroy_t pfnDestroy; + ze_pfnPhysicalMemGetProperties_t pfnGetProperties; +} ze_physical_mem_dditable_t_1_15; + /////////////////////////////////////////////////////////////////////////////// /// [1.0] /// @brief Table of VirtualMem functions pointers diff --git a/backends/ze/include/zer.py b/backends/ze/include/zer.py new file mode 100644 index 000000000..4e6f46574 --- /dev/null +++ b/backends/ze/include/zer.py @@ -0,0 +1,102 @@ +""" + Copyright (C) 2019-2025 Intel Corporation + + SPDX-License-Identifier: MIT + + @file zer.py + @version v1.15-r1.13.73 + + """ +import platform +from ctypes import * +from enum import * + +############################################################################### +__version__ = "1.0" + +############################################################################### +## @brief Immediate Command List default descriptor for GPU devices + +############################################################################### +## @brief Device Unified Shared Memory Allocation default descriptor for GPU +## devices + +############################################################################### +## @brief Host Unified Shared Memory Allocation default descriptor for GPU +## devices + +############################################################################### +__use_win_types = "Windows" == platform.uname()[0] + +############################################################################### +## @brief Function-pointer for zerGetLastErrorDescription +if __use_win_types: + _zerGetLastErrorDescription_t = WINFUNCTYPE( ze_result_t, POINTER(c_char_p) ) +else: + _zerGetLastErrorDescription_t = CFUNCTYPE( ze_result_t, POINTER(c_char_p) ) + +############################################################################### +## @brief Function-pointer for zerTranslateDeviceHandleToIdentifier +if __use_win_types: + _zerTranslateDeviceHandleToIdentifier_t = WINFUNCTYPE( uint32_t, ze_device_handle_t ) +else: + _zerTranslateDeviceHandleToIdentifier_t = CFUNCTYPE( uint32_t, ze_device_handle_t ) + +############################################################################### +## @brief Function-pointer for zerTranslateIdentifierToDeviceHandle +if __use_win_types: + _zerTranslateIdentifierToDeviceHandle_t = WINFUNCTYPE( ze_device_handle_t, c_ulong ) +else: + _zerTranslateIdentifierToDeviceHandle_t = CFUNCTYPE( ze_device_handle_t, c_ulong ) + +############################################################################### +## @brief Function-pointer for zerGetDefaultContext +if __use_win_types: + _zerGetDefaultContext_t = WINFUNCTYPE( ze_context_handle_t, ) +else: + _zerGetDefaultContext_t = CFUNCTYPE( ze_context_handle_t, ) + + +############################################################################### +## @brief Table of Global functions pointers +class _zer_global_dditable_t(Structure): + _fields_ = [ + ("pfnGetLastErrorDescription", c_void_p), ## _zerGetLastErrorDescription_t + ("pfnTranslateDeviceHandleToIdentifier", c_void_p), ## _zerTranslateDeviceHandleToIdentifier_t + ("pfnTranslateIdentifierToDeviceHandle", c_void_p), ## _zerTranslateIdentifierToDeviceHandle_t + ("pfnGetDefaultContext", c_void_p) ## _zerGetDefaultContext_t + ] + +############################################################################### +class _zer_dditable_t(Structure): + _fields_ = [ + ("Global", _zer_global_dditable_t) + ] + +############################################################################### +## @brief zer device-driver interfaces +class ZER_DDI: + def __init__(self, version : ze_api_version_t): + # load the ze_loader library + if "Windows" == platform.uname()[0]: + self.__dll = WinDLL("ze_loader.dll") + else: + self.__dll = CDLL("ze_loader.so") + + # fill the ddi tables + self.__dditable = _zer_dditable_t() + + # call driver to get function pointers + _Global = _zer_global_dditable_t() + r = ze_result_v(self.__dll.zerGetGlobalProcAddrTable(version, byref(_Global))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Global = _Global + + # attach function interface to function address + self.zerGetLastErrorDescription = _zerGetLastErrorDescription_t(self.__dditable.Global.pfnGetLastErrorDescription) + self.zerTranslateDeviceHandleToIdentifier = _zerTranslateDeviceHandleToIdentifier_t(self.__dditable.Global.pfnTranslateDeviceHandleToIdentifier) + self.zerTranslateIdentifierToDeviceHandle = _zerTranslateIdentifierToDeviceHandle_t(self.__dditable.Global.pfnTranslateIdentifierToDeviceHandle) + self.zerGetDefaultContext = _zerGetDefaultContext_t(self.__dditable.Global.pfnGetDefaultContext) + + # success! diff --git a/backends/ze/include/zer_api.h b/backends/ze/include/zer_api.h new file mode 100644 index 000000000..9a2536f7e --- /dev/null +++ b/backends/ze/include/zer_api.h @@ -0,0 +1,162 @@ +/* + * + * Copyright (C) 2019-2025 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + * @file zer_api.h + * @version v1.15-r1.13.73 + * + */ +#ifndef _ZER_API_H +#define _ZER_API_H +#if defined(__cplusplus) +#pragma once +#endif + +// 'core' API headers +#include "ze_api.h" + +#if defined(__cplusplus) +extern "C" { +#endif + +// Intel 'oneAPI' Level-Zero Runtime API common types +#if !defined(__GNUC__) +#pragma region common +#endif +/////////////////////////////////////////////////////////////////////////////// +/// @brief Immediate Command List default descriptor for GPU devices +static const ze_command_queue_desc_t zeDefaultGPUImmediateCommandQueueDesc = { + ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC, ///< stype + 0, ///< pNext + 0, ///< ordinal + 0, ///< index + ZE_COMMAND_QUEUE_FLAG_IN_ORDER | ZE_COMMAND_QUEUE_FLAG_COPY_OFFLOAD_HINT, ///< flags + ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS, ///< mode + ZE_COMMAND_QUEUE_PRIORITY_NORMAL, ///< priority +}; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Device Unified Shared Memory Allocation default descriptor for GPU +/// devices +static const ze_device_mem_alloc_desc_t zeDefaultGPUDeviceMemAllocDesc = { + ZE_STRUCTURE_TYPE_DEVICE_MEM_ALLOC_DESC, ///< stype + 0, ///< pNext + ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_CACHED, ///< flags + 0, ///< ordinal +}; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Host Unified Shared Memory Allocation default descriptor for GPU +/// devices +static const ze_host_mem_alloc_desc_t zeDefaultGPUHostMemAllocDesc = { + ZE_STRUCTURE_TYPE_HOST_MEM_ALLOC_DESC, ///< stype + 0, ///< pNext + ZE_HOST_MEM_ALLOC_FLAG_BIAS_CACHED | ZE_HOST_MEM_ALLOC_FLAG_BIAS_INITIAL_PLACEMENT, ///< flags +}; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Retrieves a string describing the last error code returned by the +/// default driver in the current thread. +/// +/// @details +/// - String returned is thread local. +/// - String is only updated on calls returning an error, i.e., not on calls +/// returning ::ZE_RESULT_SUCCESS. +/// - String may be empty if driver considers error code is already explicit +/// enough to describe cause. +/// - Memory pointed to by ppString is owned by the default driver. +/// - String returned is null-terminated. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == ppString` +ZE_APIEXPORT ze_result_t ZE_APICALL +zerGetLastErrorDescription( + const char** ppString ///< [in,out] pointer to a null-terminated array of characters describing + ///< cause of error. + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Translates device handle to integer identifier. +/// +/// @details +/// - The implementation of this function should be lock-free. +/// - This function does not return error code, to get info about failure +/// user may use ::zerGetLastErrorDescription function. +/// - In case of failure, this function returns UINT32_MAX. +/// +/// @returns +/// - integer identifier for the device +/// - UINT32_MAX +ZE_APIEXPORT uint32_t ZE_APICALL +zerTranslateDeviceHandleToIdentifier( + ze_device_handle_t hDevice ///< [in] handle of the device + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Translates to integer identifier to a device handle. +/// +/// @details +/// - The driver must be initialized before calling this function. +/// - The implementation of this function should be lock-free. +/// - This function does not return error code, to get info about failure +/// user may use ::zerGetLastErrorDescription function. +/// - In case of failure, this function returns null. +/// - Details on the error can be retrieved using +/// ::zerGetLastErrorDescription function. +/// +/// @returns +/// - handle of the device with the given identifier +/// - nullptr +ZE_APIEXPORT ze_device_handle_t ZE_APICALL +zerTranslateIdentifierToDeviceHandle( + uint32_t identifier ///< [in] integer identifier of the device + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Retrieves handle to default context from the default driver. +/// +/// @details +/// - The driver must be initialized before calling this function. +/// - The implementation of this function should be lock-free. +/// - This returned context contains all the devices available in the +/// default driver. +/// - This function does not return error code, to get info about failure +/// user may use ::zerGetLastErrorDescription function. +/// - In case of failure, this function returns null. +/// - Details on the error can be retrieved using +/// ::zerGetLastErrorDescription function. +/// +/// @returns +/// - handle of the default context +/// - nullptr +ZE_APIEXPORT ze_context_handle_t ZE_APICALL +zerGetDefaultContext( + void + ); + + +#if !defined(__GNUC__) +#pragma endregion +#endif + +#if defined(__cplusplus) +} // extern "C" +#endif + +#endif // _ZER_API_H diff --git a/backends/ze/include/zer_ddi.h b/backends/ze/include/zer_ddi.h new file mode 100644 index 000000000..6cef429fa --- /dev/null +++ b/backends/ze/include/zer_ddi.h @@ -0,0 +1,96 @@ +/* + * + * Copyright (C) 2019-2025 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + * @file zer_ddi.h + * @version v1.15-r1.13.73 + * + */ +#ifndef _ZER_DDI_H +#define _ZER_DDI_H +#if defined(__cplusplus) +#pragma once +#endif +#include "zer_api.h" + +#if defined(__cplusplus) +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zerGetLastErrorDescription +typedef ze_result_t (ZE_APICALL *zer_pfnGetLastErrorDescription_t)( + const char** + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zerTranslateDeviceHandleToIdentifier +typedef uint32_t (ZE_APICALL *zer_pfnTranslateDeviceHandleToIdentifier_t)( + ze_device_handle_t + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zerTranslateIdentifierToDeviceHandle +typedef ze_device_handle_t (ZE_APICALL *zer_pfnTranslateIdentifierToDeviceHandle_t)( + uint32_t + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zerGetDefaultContext +typedef ze_context_handle_t (ZE_APICALL *zer_pfnGetDefaultContext_t)( + void + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Table of Global functions pointers +typedef struct _zer_global_dditable_t +{ + zer_pfnGetLastErrorDescription_t pfnGetLastErrorDescription; + zer_pfnTranslateDeviceHandleToIdentifier_t pfnTranslateDeviceHandleToIdentifier; + zer_pfnTranslateIdentifierToDeviceHandle_t pfnTranslateIdentifierToDeviceHandle; + zer_pfnGetDefaultContext_t pfnGetDefaultContext; +} zer_global_dditable_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Exported function for filling application's Global table +/// with current process' addresses +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION +ZE_DLLEXPORT ze_result_t ZE_APICALL +zerGetGlobalProcAddrTable( + ze_api_version_t version, ///< [in] API version requested + zer_global_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zerGetGlobalProcAddrTable +typedef ze_result_t (ZE_APICALL *zer_pfnGetGlobalProcAddrTable_t)( + ze_api_version_t, + zer_global_dditable_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Container for all DDI tables +typedef struct _zer_dditable_t +{ + zer_global_dditable_t Global; +} zer_dditable_t; +/// @brief Container for all DDI tables with version and tables set by the Driver +typedef struct _zer_dditable_driver_t +{ + ze_api_version_t version; + uint8_t isValidFlag; + zer_global_dditable_t * Global; +} zer_dditable_driver_t; + +#if defined(__cplusplus) +} // extern "C" +#endif + +#endif // _ZER_DDI_H \ No newline at end of file diff --git a/backends/ze/include/zer_ddi_ver.h b/backends/ze/include/zer_ddi_ver.h new file mode 100644 index 000000000..151847735 --- /dev/null +++ b/backends/ze/include/zer_ddi_ver.h @@ -0,0 +1,38 @@ +/* + * + * Copyright (C) 2019-2021 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + * @file zer_ddi.h + * @version v1.15-r1.13.73 + * + */ +#ifndef _ZER_DDI_VER_H +#define _ZER_DDI_VER_H +#if defined(__cplusplus) +#pragma once +#endif +#include "zer_ddi.h" + +#if defined(__cplusplus) +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////// +/// [1.14] +/// @brief Table of Global functions pointers +typedef struct _zer_global_dditable_t_1_14 +{ + zer_pfnGetLastErrorDescription_t pfnGetLastErrorDescription; + zer_pfnTranslateDeviceHandleToIdentifier_t pfnTranslateDeviceHandleToIdentifier; + zer_pfnTranslateIdentifierToDeviceHandle_t pfnTranslateIdentifierToDeviceHandle; + zer_pfnGetDefaultContext_t pfnGetDefaultContext; +} zer_global_dditable_t_1_14; + + +#if defined(__cplusplus) +} // extern "C" +#endif + +#endif // _ZER_DDI_VER_H diff --git a/backends/ze/include/zes.py b/backends/ze/include/zes.py new file mode 100644 index 000000000..52a0c1059 --- /dev/null +++ b/backends/ze/include/zes.py @@ -0,0 +1,4423 @@ +""" + Copyright (C) 2019-2025 Intel Corporation + + SPDX-License-Identifier: MIT + + @file zes.py + @version v1.15-r1.13.73 + + """ +import platform +from ctypes import * +from enum import * + +############################################################################### +__version__ = "1.0" + +############################################################################### +## @brief Handle to a driver instance +class zes_driver_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of device object +class zes_device_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle for a Sysman device scheduler queue +class zes_sched_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle for a Sysman device performance factors +class zes_perf_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle for a Sysman device power domain +class zes_pwr_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle for a Sysman device frequency domain +class zes_freq_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle for a Sysman device engine group +class zes_engine_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle for a Sysman device standby control +class zes_standby_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle for a Sysman device firmware +class zes_firmware_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle for a Sysman device memory module +class zes_mem_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle for a Sysman fabric port +class zes_fabric_port_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle for a Sysman device temperature sensor +class zes_temp_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle for a Sysman device power supply +class zes_psu_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle for a Sysman device fan +class zes_fan_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle for a Sysman device LED +class zes_led_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle for a Sysman device RAS error set +class zes_ras_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle for a Sysman device diagnostics test suite +class zes_diag_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle for a Sysman device overclock domain +class zes_overclock_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle for a Sysman virtual function management domain +class zes_vf_handle_t(c_void_p): + pass + +############################################################################### +## @brief Defines structure types +class zes_structure_type_v(IntEnum): + DEVICE_PROPERTIES = 0x1 ## ::zes_device_properties_t + PCI_PROPERTIES = 0x2 ## ::zes_pci_properties_t + PCI_BAR_PROPERTIES = 0x3 ## ::zes_pci_bar_properties_t + DIAG_PROPERTIES = 0x4 ## ::zes_diag_properties_t + ENGINE_PROPERTIES = 0x5 ## ::zes_engine_properties_t + FABRIC_PORT_PROPERTIES = 0x6 ## ::zes_fabric_port_properties_t + FAN_PROPERTIES = 0x7 ## ::zes_fan_properties_t + FIRMWARE_PROPERTIES = 0x8 ## ::zes_firmware_properties_t + FREQ_PROPERTIES = 0x9 ## ::zes_freq_properties_t + LED_PROPERTIES = 0xa ## ::zes_led_properties_t + MEM_PROPERTIES = 0xb ## ::zes_mem_properties_t + PERF_PROPERTIES = 0xc ## ::zes_perf_properties_t + POWER_PROPERTIES = 0xd ## ::zes_power_properties_t + PSU_PROPERTIES = 0xe ## ::zes_psu_properties_t + RAS_PROPERTIES = 0xf ## ::zes_ras_properties_t + SCHED_PROPERTIES = 0x10 ## ::zes_sched_properties_t + SCHED_TIMEOUT_PROPERTIES = 0x11 ## ::zes_sched_timeout_properties_t + SCHED_TIMESLICE_PROPERTIES = 0x12 ## ::zes_sched_timeslice_properties_t + STANDBY_PROPERTIES = 0x13 ## ::zes_standby_properties_t + TEMP_PROPERTIES = 0x14 ## ::zes_temp_properties_t + DEVICE_STATE = 0x15 ## ::zes_device_state_t + PROCESS_STATE = 0x16 ## ::zes_process_state_t + PCI_STATE = 0x17 ## ::zes_pci_state_t + FABRIC_PORT_CONFIG = 0x18 ## ::zes_fabric_port_config_t + FABRIC_PORT_STATE = 0x19 ## ::zes_fabric_port_state_t + FAN_CONFIG = 0x1a ## ::zes_fan_config_t + FREQ_STATE = 0x1b ## ::zes_freq_state_t + OC_CAPABILITIES = 0x1c ## ::zes_oc_capabilities_t + LED_STATE = 0x1d ## ::zes_led_state_t + MEM_STATE = 0x1e ## ::zes_mem_state_t + PSU_STATE = 0x1f ## ::zes_psu_state_t + BASE_STATE = 0x20 ## ::zes_base_state_t + RAS_CONFIG = 0x21 ## ::zes_ras_config_t + RAS_STATE = 0x22 ## ::zes_ras_state_t + TEMP_CONFIG = 0x23 ## ::zes_temp_config_t + PCI_BAR_PROPERTIES_1_2 = 0x24 ## ::zes_pci_bar_properties_1_2_t + DEVICE_ECC_DESC = 0x25 ## ::zes_device_ecc_desc_t + DEVICE_ECC_PROPERTIES = 0x26 ## ::zes_device_ecc_properties_t + POWER_LIMIT_EXT_DESC = 0x27 ## ::zes_power_limit_ext_desc_t + POWER_EXT_PROPERTIES = 0x28 ## ::zes_power_ext_properties_t + OVERCLOCK_PROPERTIES = 0x29 ## ::zes_overclock_properties_t + FABRIC_PORT_ERROR_COUNTERS = 0x2a ## ::zes_fabric_port_error_counters_t + ENGINE_EXT_PROPERTIES = 0x2b ## ::zes_engine_ext_properties_t + RESET_PROPERTIES = 0x2c ## ::zes_reset_properties_t + DEVICE_EXT_PROPERTIES = 0x2d ## ::zes_device_ext_properties_t + DEVICE_UUID = 0x2e ## ::zes_uuid_t + POWER_DOMAIN_EXP_PROPERTIES = 0x00020001 ## ::zes_power_domain_exp_properties_t + MEM_BANDWIDTH_COUNTER_BITS_EXP_PROPERTIES = 0x00020002 ## ::zes_mem_bandwidth_counter_bits_exp_properties_t + MEMORY_PAGE_OFFLINE_STATE_EXP = 0x00020003 ## ::zes_mem_page_offline_state_exp_t + SUBDEVICE_EXP_PROPERTIES = 0x00020004 ## ::zes_subdevice_exp_properties_t + VF_EXP_PROPERTIES = 0x00020005 ## ::zes_vf_exp_properties_t + VF_UTIL_MEM_EXP = 0x00020006 ## ::zes_vf_util_mem_exp_t + VF_UTIL_ENGINE_EXP = 0x00020007 ## ::zes_vf_util_engine_exp_t + VF_EXP_CAPABILITIES = 0x00020008 ## ::zes_vf_exp_capabilities_t + VF_UTIL_MEM_EXP2 = 0x00020009 ## ::zes_vf_util_mem_exp2_t + VF_UTIL_ENGINE_EXP2 = 0x00020010 ## ::zes_vf_util_engine_exp2_t + VF_EXP2_CAPABILITIES = 0x00020011 ## ::zes_vf_exp2_capabilities_t + DEVICE_ECC_DEFAULT_PROPERTIES_EXT = 0x00020012 ## ::zes_device_ecc_default_properties_ext_t + PCI_LINK_SPEED_DOWNGRADE_EXT_STATE = 0x00020013 ## ::zes_pci_link_speed_downgrade_ext_state_t + PCI_LINK_SPEED_DOWNGRADE_EXT_PROPERTIES = 0x00020014 ## ::zes_pci_link_speed_downgrade_ext_properties_t + +class zes_structure_type_t(c_int): + def __str__(self): + return str(zes_structure_type_v(self.value)) + + +############################################################################### +## @brief Base for all properties types +class zes_base_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p) ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ] + +############################################################################### +## @brief Base for all descriptor types +class zes_base_desc_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p) ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ] + +############################################################################### +## @brief Base for all state types +class zes_base_state_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p) ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ] + +############################################################################### +## @brief Base for all config types +class zes_base_config_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p) ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ] + +############################################################################### +## @brief Base for all capability types +class zes_base_capability_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p) ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ] + +############################################################################### +## @brief Supported sysman initialization flags +class zes_init_flags_v(IntEnum): + PLACEHOLDER = ZE_BIT(0) ## placeholder for future use + +class zes_init_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Maximum extension name string size +ZES_MAX_EXTENSION_NAME = 256 + +############################################################################### +## @brief Extension properties queried using ::zesDriverGetExtensionProperties +class zes_driver_extension_properties_t(Structure): + _fields_ = [ + ("name", c_char * ZES_MAX_EXTENSION_NAME), ## [out] extension name + ("version", c_ulong) ## [out] extension version using ::ZE_MAKE_VERSION + ] + +############################################################################### +## @brief Maximum number of characters in string properties. +ZES_STRING_PROPERTY_SIZE = 64 + +############################################################################### +## @brief Maximum device universal unique id (UUID) size in bytes. +ZES_MAX_UUID_SIZE = 16 + +############################################################################### +## @brief Types of accelerator engines +class zes_engine_type_flags_v(IntEnum): + OTHER = ZE_BIT(0) ## Undefined types of accelerators. + COMPUTE = ZE_BIT(1) ## Engines that process compute kernels only (no 3D content). + _3D = ZE_BIT(2) ## Engines that process 3D content only (no compute kernels). + MEDIA = ZE_BIT(3) ## Engines that process media workloads. + DMA = ZE_BIT(4) ## Engines that copy blocks of data. + RENDER = ZE_BIT(5) ## Engines that can process both 3D content and compute kernels. + +class zes_engine_type_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Device repair status +class zes_repair_status_v(IntEnum): + UNSUPPORTED = 0 ## The device does not support in-field repairs. + NOT_PERFORMED = 1 ## The device has never been repaired. + PERFORMED = 2 ## The device has been repaired. + +class zes_repair_status_t(c_int): + def __str__(self): + return str(zes_repair_status_v(self.value)) + + +############################################################################### +## @brief Device reset reasons +class zes_reset_reason_flags_v(IntEnum): + WEDGED = ZE_BIT(0) ## The device needs to be reset because one or more parts of the hardware + ## is wedged + REPAIR = ZE_BIT(1) ## The device needs to be reset in order to complete in-field repairs + +class zes_reset_reason_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Device reset type +class zes_reset_type_v(IntEnum): + WARM = 0 ## Apply warm reset + COLD = 1 ## Apply cold reset + FLR = 2 ## Apply FLR reset + +class zes_reset_type_t(c_int): + def __str__(self): + return str(zes_reset_type_v(self.value)) + + +############################################################################### +## @brief Device state +class zes_device_state_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("reset", zes_reset_reason_flags_t), ## [out] Indicates if the device needs to be reset and for what reasons. + ## returns 0 (none) or combination of ::zes_reset_reason_flag_t + ("repaired", zes_repair_status_t) ## [out] Indicates if the device has been repaired + ] + +############################################################################### +## @brief Device reset properties +class zes_reset_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("force", ze_bool_t), ## [in] If set to true, all applications that are currently using the + ## device will be forcibly killed. + ("resetType", zes_reset_type_t) ## [in] Type of reset needs to be performed + ] + +############################################################################### +## @brief Device universal unique id (UUID) +class zes_uuid_t(Structure): + _fields_ = [ + ("id", c_ubyte * ZES_MAX_UUID_SIZE) ## [out] opaque data representing a device UUID + ] + +############################################################################### +## @brief Supported device types +class zes_device_type_v(IntEnum): + GPU = 1 ## Graphics Processing Unit + CPU = 2 ## Central Processing Unit + FPGA = 3 ## Field Programmable Gate Array + MCA = 4 ## Memory Copy Accelerator + VPU = 5 ## Vision Processing Unit + +class zes_device_type_t(c_int): + def __str__(self): + return str(zes_device_type_v(self.value)) + + +############################################################################### +## @brief Supported device property flags +class zes_device_property_flags_v(IntEnum): + INTEGRATED = ZE_BIT(0) ## Device is integrated with the Host. + SUBDEVICE = ZE_BIT(1) ## Device handle used for query represents a sub-device. + ECC = ZE_BIT(2) ## Device supports error correction memory access. + ONDEMANDPAGING = ZE_BIT(3) ## Device supports on-demand page-faulting. + +class zes_device_property_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Device properties +class zes_device_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("core", ze_device_properties_t), ## [out] (Deprecated, use ::zes_uuid_t in the extended structure) Core + ## device properties + ("numSubdevices", c_ulong), ## [out] Number of sub-devices. A value of 0 indicates that this device + ## doesn't have sub-devices. + ("serialNumber", c_char * ZES_STRING_PROPERTY_SIZE), ## [out] Manufacturing serial number (NULL terminated string value). This + ## value is intended to reflect the Part ID/SoC ID assigned by + ## manufacturer that is unique for a SoC. Will be set to the string + ## "unknown" if this cannot be determined for the device. + ("boardNumber", c_char * ZES_STRING_PROPERTY_SIZE), ## [out] Manufacturing board number (NULL terminated string value). + ## Alternatively "boardSerialNumber", this value is intended to reflect + ## the string printed on board label by manufacturer. Will be set to the + ## string "unknown" if this cannot be determined for the device. + ("brandName", c_char * ZES_STRING_PROPERTY_SIZE), ## [out] Brand name of the device (NULL terminated string value). Will be + ## set to the string "unknown" if this cannot be determined for the + ## device. + ("modelName", c_char * ZES_STRING_PROPERTY_SIZE), ## [out] Model name of the device (NULL terminated string value). Will be + ## set to the string "unknown" if this cannot be determined for the + ## device. + ("vendorName", c_char * ZES_STRING_PROPERTY_SIZE), ## [out] Vendor name of the device (NULL terminated string value). Will + ## be set to the string "unknown" if this cannot be determined for the + ## device. + ("driverVersion", c_char * ZES_STRING_PROPERTY_SIZE) ## [out] Installed driver version (NULL terminated string value). Will be + ## set to the string "unknown" if this cannot be determined for the + ## device. + ] + +############################################################################### +## @brief Device properties +class zes_device_ext_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("uuid", zes_uuid_t), ## [out] universal unique identifier. Note: uuid obtained from Sysman API + ## is the same as from core API. Subdevices will have their own uuid. + ("type", zes_device_type_t), ## [out] generic device type + ("flags", zes_device_property_flags_t) ## [out] 0 (none) or a valid combination of ::zes_device_property_flag_t + ] + +############################################################################### +## @brief Contains information about a process that has an open connection with +## this device +## +## @details +## - The application can use the process ID to query the OS for the owner +## and the path to the executable. +class zes_process_state_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("processId", c_ulong), ## [out] Host OS process ID. + ("memSize", c_ulonglong), ## [out] Device memory size in bytes allocated by this process (may not + ## necessarily be resident on the device at the time of reading). + ("sharedSize", c_ulonglong), ## [out] The size of shared device memory mapped into this process (may + ## not necessarily be resident on the device at the time of reading). + ("engines", zes_engine_type_flags_t) ## [out] Bitfield of accelerator engine types being used by this process. + ] + +############################################################################### +## @brief PCI address +class zes_pci_address_t(Structure): + _fields_ = [ + ("domain", c_ulong), ## [out] BDF domain + ("bus", c_ulong), ## [out] BDF bus + ("device", c_ulong), ## [out] BDF device + ("function", c_ulong) ## [out] BDF function + ] + +############################################################################### +## @brief PCI speed +class zes_pci_speed_t(Structure): + _fields_ = [ + ("gen", c_int32_t), ## [out] The link generation. A value of -1 means that this property is + ## unknown. + ("width", c_int32_t), ## [out] The number of lanes. A value of -1 means that this property is + ## unknown. + ("maxBandwidth", c_int64_t) ## [out] The maximum bandwidth in bytes/sec (sum of all lanes). A value + ## of -1 means that this property is unknown. + ] + +############################################################################### +## @brief Static PCI properties +class zes_pci_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("address", zes_pci_address_t), ## [out] The BDF address + ("maxSpeed", zes_pci_speed_t), ## [out] Fastest port configuration supported by the device (sum of all + ## lanes) + ("haveBandwidthCounters", ze_bool_t), ## [out] Indicates whether the `rxCounter` and `txCounter` members of + ## ::zes_pci_stats_t will have valid values + ("havePacketCounters", ze_bool_t), ## [out] Indicates whether the `packetCounter` member of + ## ::zes_pci_stats_t will have a valid value + ("haveReplayCounters", ze_bool_t) ## [out] Indicates whether the `replayCounter` member of + ## ::zes_pci_stats_t will have a valid value + ] + +############################################################################### +## @brief PCI link status +class zes_pci_link_status_v(IntEnum): + UNKNOWN = 0 ## The link status could not be determined + GOOD = 1 ## The link is up and operating as expected + QUALITY_ISSUES = 2 ## The link is up but has quality and/or bandwidth degradation + STABILITY_ISSUES = 3 ## The link has stability issues and preventing workloads making forward + ## progress + +class zes_pci_link_status_t(c_int): + def __str__(self): + return str(zes_pci_link_status_v(self.value)) + + +############################################################################### +## @brief PCI link quality degradation reasons +class zes_pci_link_qual_issue_flags_v(IntEnum): + REPLAYS = ZE_BIT(0) ## A significant number of replays are occurring + SPEED = ZE_BIT(1) ## There is a degradation in the maximum bandwidth of the link + +class zes_pci_link_qual_issue_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief PCI link stability issues +class zes_pci_link_stab_issue_flags_v(IntEnum): + RETRAINING = ZE_BIT(0) ## Link retraining has occurred to deal with quality issues + +class zes_pci_link_stab_issue_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Dynamic PCI state +class zes_pci_state_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("status", zes_pci_link_status_t), ## [out] The current status of the port + ("qualityIssues", zes_pci_link_qual_issue_flags_t), ## [out] If status is ::ZES_PCI_LINK_STATUS_QUALITY_ISSUES, + ## then this gives a combination of ::zes_pci_link_qual_issue_flag_t for + ## quality issues that have been detected; + ## otherwise, 0 indicates there are no quality issues with the link at + ## this time." + ("stabilityIssues", zes_pci_link_stab_issue_flags_t), ## [out] If status is ::ZES_PCI_LINK_STATUS_STABILITY_ISSUES, + ## then this gives a combination of ::zes_pci_link_stab_issue_flag_t for + ## reasons for the connection instability; + ## otherwise, 0 indicates there are no connection stability issues at + ## this time." + ("speed", zes_pci_speed_t) ## [out] The current port configure speed + ] + +############################################################################### +## @brief PCI bar types +class zes_pci_bar_type_v(IntEnum): + MMIO = 0 ## MMIO registers + ROM = 1 ## ROM aperture + MEM = 2 ## Device memory + +class zes_pci_bar_type_t(c_int): + def __str__(self): + return str(zes_pci_bar_type_v(self.value)) + + +############################################################################### +## @brief Properties of a pci bar +class zes_pci_bar_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("type", zes_pci_bar_type_t), ## [out] The type of bar + ("index", c_ulong), ## [out] The index of the bar + ("base", c_ulonglong), ## [out] Base address of the bar. + ("size", c_ulonglong) ## [out] Size of the bar. + ] + +############################################################################### +## @brief Properties of a pci bar, including the resizable bar. +class zes_pci_bar_properties_1_2_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("type", zes_pci_bar_type_t), ## [out] The type of bar + ("index", c_ulong), ## [out] The index of the bar + ("base", c_ulonglong), ## [out] Base address of the bar. + ("size", c_ulonglong), ## [out] Size of the bar. + ("resizableBarSupported", ze_bool_t), ## [out] Support for Resizable Bar on this device. + ("resizableBarEnabled", ze_bool_t) ## [out] Resizable Bar enabled on this device + ] + +############################################################################### +## @brief PCI stats counters +## +## @details +## - Percent replays is calculated by taking two snapshots (s1, s2) and +## using the equation: %replay = 10^6 * (s2.replayCounter - +## s1.replayCounter) / (s2.maxBandwidth * (s2.timestamp - s1.timestamp)) +## - Percent throughput is calculated by taking two snapshots (s1, s2) and +## using the equation: %bw = 10^6 * ((s2.rxCounter - s1.rxCounter) + +## (s2.txCounter - s1.txCounter)) / (s2.maxBandwidth * (s2.timestamp - +## s1.timestamp)) +class zes_pci_stats_t(Structure): + _fields_ = [ + ("timestamp", c_ulonglong), ## [out] Monotonic timestamp counter in microseconds when the measurement + ## was made. + ## This timestamp should only be used to calculate delta time between + ## snapshots of this structure. + ## Never take the delta of this timestamp with the timestamp from a + ## different structure since they are not guaranteed to have the same base. + ## The absolute value of the timestamp is only valid during within the + ## application and may be different on the next execution. + ("replayCounter", c_ulonglong), ## [out] Monotonic counter for the number of replay packets (sum of all + ## lanes). Will always be 0 when the `haveReplayCounters` member of + ## ::zes_pci_properties_t is FALSE. + ("packetCounter", c_ulonglong), ## [out] Monotonic counter for the number of packets (sum of all lanes). + ## Will always be 0 when the `havePacketCounters` member of + ## ::zes_pci_properties_t is FALSE. + ("rxCounter", c_ulonglong), ## [out] Monotonic counter for the number of bytes received (sum of all + ## lanes). Will always be 0 when the `haveBandwidthCounters` member of + ## ::zes_pci_properties_t is FALSE. + ("txCounter", c_ulonglong), ## [out] Monotonic counter for the number of bytes transmitted (including + ## replays) (sum of all lanes). Will always be 0 when the + ## `haveBandwidthCounters` member of ::zes_pci_properties_t is FALSE. + ("speed", zes_pci_speed_t) ## [out] The current speed of the link (sum of all lanes) + ] + +############################################################################### +## @brief Overclock domains. +class zes_overclock_domain_v(IntEnum): + CARD = 1 ## Overclocking card level properties such as temperature limits. + PACKAGE = 2 ## Overclocking package level properties such as power limits. + GPU_ALL = 4 ## Overclocking a GPU that has all accelerator assets on the same PLL/VR. + GPU_RENDER_COMPUTE = 8 ## Overclocking a GPU with render and compute assets on the same PLL/VR. + GPU_RENDER = 16 ## Overclocking a GPU with render assets on its own PLL/VR. + GPU_COMPUTE = 32 ## Overclocking a GPU with compute assets on its own PLL/VR. + GPU_MEDIA = 64 ## Overclocking a GPU with media assets on its own PLL/VR. + VRAM = 128 ## Overclocking device local memory. + ADM = 256 ## Overclocking LLC/L4 cache. + +class zes_overclock_domain_t(c_int): + def __str__(self): + return str(zes_overclock_domain_v(self.value)) + + +############################################################################### +## @brief Overclock controls. +class zes_overclock_control_v(IntEnum): + VF = 1 ## This control permits setting a custom V-F curve. + FREQ_OFFSET = 2 ## The V-F curve of the overclock domain can be shifted up or down using + ## this control. + VMAX_OFFSET = 4 ## This control is used to increase the permitted voltage above the + ## shipped voltage maximum. + FREQ = 8 ## This control permits direct changes to the operating frequency. + VOLT_LIMIT = 16 ## This control prevents frequencies that would push the voltage above + ## this value, typically used by V-F scanners. + POWER_SUSTAINED_LIMIT = 32 ## This control changes the sustained power limit (PL1). + POWER_BURST_LIMIT = 64 ## This control changes the burst power limit (PL2). + POWER_PEAK_LIMIT = 128 ## his control changes the peak power limit (PL4). + ICCMAX_LIMIT = 256 ## This control changes the value of IccMax.. + TEMP_LIMIT = 512 ## This control changes the value of TjMax. + ITD_DISABLE = 1024 ## This control permits disabling the adaptive voltage feature ITD + ACM_DISABLE = 2048 ## This control permits disabling the adaptive voltage feature ACM. + +class zes_overclock_control_t(c_int): + def __str__(self): + return str(zes_overclock_control_v(self.value)) + + +############################################################################### +## @brief Overclock modes. +class zes_overclock_mode_v(IntEnum): + MODE_OFF = 0 ## Overclock mode is off + MODE_STOCK = 2 ## Stock (manufacturing settings) are being used. + MODE_ON = 3 ## Overclock mode is on. + MODE_UNAVAILABLE = 4 ## Overclocking is unavailable at this time since the system is running + ## on battery. + MODE_DISABLED = 5 ## Overclock mode is disabled. + +class zes_overclock_mode_t(c_int): + def __str__(self): + return str(zes_overclock_mode_v(self.value)) + + +############################################################################### +## @brief Overclock control states. +class zes_control_state_v(IntEnum): + STATE_UNSET = 0 ## No overclock control has not been changed by the driver since the last + ## boot/reset. + STATE_ACTIVE = 2 ## The overclock control has been set and it is active. + STATE_DISABLED = 3 ## The overclock control value has been disabled due to the current power + ## configuration (typically when running on DC). + +class zes_control_state_t(c_int): + def __str__(self): + return str(zes_control_state_v(self.value)) + + +############################################################################### +## @brief Overclock pending actions. +class zes_pending_action_v(IntEnum): + PENDING_NONE = 0 ## There no pending actions. . + PENDING_IMMINENT = 1 ## The requested change is in progress and should complete soon. + PENDING_COLD_RESET = 2 ## The requested change requires a device cold reset (hotplug, system + ## boot). + PENDING_WARM_RESET = 3 ## The requested change requires a device warm reset (PCIe FLR). + +class zes_pending_action_t(c_int): + def __str__(self): + return str(zes_pending_action_v(self.value)) + + +############################################################################### +## @brief Overclock V-F curve programing. +class zes_vf_program_type_v(IntEnum): + VF_ARBITRARY = 0 ## Can program an arbitrary number of V-F points up to the maximum number + ## and each point can have arbitrary voltage and frequency values within + ## the min/max/step limits + VF_FREQ_FIXED = 1 ## Can only program the voltage for the V-F points that it reads back - + ## the frequency of those points cannot be changed + VF_VOLT_FIXED = 2 ## Can only program the frequency for the V-F points that is reads back - + ## the voltage of each point cannot be changed. + +class zes_vf_program_type_t(c_int): + def __str__(self): + return str(zes_vf_program_type_v(self.value)) + + +############################################################################### +## @brief VF type +class zes_vf_type_v(IntEnum): + VOLT = 0 ## VF Voltage point + FREQ = 1 ## VF Frequency point + +class zes_vf_type_t(c_int): + def __str__(self): + return str(zes_vf_type_v(self.value)) + + +############################################################################### +## @brief VF type +class zes_vf_array_type_v(IntEnum): + USER_VF_ARRAY = 0 ## User V-F array + DEFAULT_VF_ARRAY = 1 ## Default V-F array + LIVE_VF_ARRAY = 2 ## Live V-F array + +class zes_vf_array_type_t(c_int): + def __str__(self): + return str(zes_vf_array_type_v(self.value)) + + +############################################################################### +## @brief Overclock properties +## +## @details +## - Information on the overclock domain type and all the contols that are +## part of the domain. +class zes_overclock_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("domainType", zes_overclock_domain_t), ## [out] The hardware block that this overclock domain controls (GPU, + ## VRAM, ...) + ("AvailableControls", c_ulong), ## [out] Returns the overclock controls that are supported (a bit for + ## each of enum ::zes_overclock_control_t). If no bits are set, the + ## domain doesn't support overclocking. + ("VFProgramType", zes_vf_program_type_t), ## [out] Type of V-F curve programming that is permitted:. + ("NumberOfVFPoints", c_ulong) ## [out] Number of VF points that can be programmed - max_num_points + ] + +############################################################################### +## @brief Overclock Control properties +## +## @details +## - Provides all the control capabilities supported by the device for the +## overclock domain. +class zes_control_property_t(Structure): + _fields_ = [ + ("MinValue", c_double), ## [out] This provides information about the limits of the control value + ## so that the driver can calculate the set of valid values. + ("MaxValue", c_double), ## [out] This provides information about the limits of the control value + ## so that the driver can calculate the set of valid values. + ("StepValue", c_double), ## [out] This provides information about the limits of the control value + ## so that the driver can calculate the set of valid values. + ("RefValue", c_double), ## [out] The reference value provides the anchor point, UIs can combine + ## this with the user offset request to show the anticipated improvement. + ("DefaultValue", c_double) ## [out] The shipped out-of-box position of this control. Driver can + ## request this value at any time to return to the out-of-box behavior. + ] + +############################################################################### +## @brief Overclock VF properties +## +## @details +## - Provides all the VF capabilities supported by the device for the +## overclock domain. +class zes_vf_property_t(Structure): + _fields_ = [ + ("MinFreq", c_double), ## [out] Read the minimum frequency that can be be programmed in the + ## custom V-F point.. + ("MaxFreq", c_double), ## [out] Read the maximum frequency that can be be programmed in the + ## custom V-F point.. + ("StepFreq", c_double), ## [out] Read the frequency step that can be be programmed in the custom + ## V-F point.. + ("MinVolt", c_double), ## [out] Read the minimum voltage that can be be programmed in the custom + ## V-F point.. + ("MaxVolt", c_double), ## [out] Read the maximum voltage that can be be programmed in the custom + ## V-F point.. + ("StepVolt", c_double) ## [out] Read the voltage step that can be be programmed in the custom + ## V-F point. + ] + +############################################################################### +## @brief Diagnostic results +class zes_diag_result_v(IntEnum): + NO_ERRORS = 0 ## Diagnostic completed without finding errors to repair + ABORT = 1 ## Diagnostic had problems running tests + FAIL_CANT_REPAIR = 2 ## Diagnostic had problems setting up repairs + REBOOT_FOR_REPAIR = 3 ## Diagnostics found errors, setup for repair and reboot is required to + ## complete the process + +class zes_diag_result_t(c_int): + def __str__(self): + return str(zes_diag_result_v(self.value)) + + +############################################################################### +## @brief Diagnostic test index to use for the very first test. +ZES_DIAG_FIRST_TEST_INDEX = 0x0 + +############################################################################### +## @brief Diagnostic test index to use for the very last test. +ZES_DIAG_LAST_TEST_INDEX = 0xFFFFFFFF + +############################################################################### +## @brief Diagnostic test +class zes_diag_test_t(Structure): + _fields_ = [ + ("index", c_ulong), ## [out] Index of the test + ("name", c_char * ZES_STRING_PROPERTY_SIZE) ## [out] Name of the test + ] + +############################################################################### +## @brief Diagnostics test suite properties +class zes_diag_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("onSubdevice", ze_bool_t), ## [out] True if the resource is located on a sub-device; false means + ## that the resource is on the device of the calling Sysman handle + ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device + ("name", c_char * ZES_STRING_PROPERTY_SIZE), ## [out] Name of the diagnostics test suite + ("haveTests", ze_bool_t) ## [out] Indicates if this test suite has individual tests which can be + ## run separately (use the function ::zesDiagnosticsGetTests() to get the + ## list of these tests) + ] + +############################################################################### +## @brief ECC State +class zes_device_ecc_state_v(IntEnum): + UNAVAILABLE = 0 ## None + ENABLED = 1 ## ECC enabled. + DISABLED = 2 ## ECC disabled. + +class zes_device_ecc_state_t(c_int): + def __str__(self): + return str(zes_device_ecc_state_v(self.value)) + + +############################################################################### +## @brief State Change Requirements +class zes_device_action_v(IntEnum): + NONE = 0 ## No action. + WARM_CARD_RESET = 1 ## Warm reset of the card. + COLD_CARD_RESET = 2 ## Cold reset of the card. + COLD_SYSTEM_REBOOT = 3 ## Cold reboot of the system. + +class zes_device_action_t(c_int): + def __str__(self): + return str(zes_device_action_v(self.value)) + + +############################################################################### +## @brief ECC State Descriptor +class zes_device_ecc_desc_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("state", zes_device_ecc_state_t) ## [out] ECC state + ] + +############################################################################### +## @brief ECC State +class zes_device_ecc_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("currentState", zes_device_ecc_state_t), ## [out] Current ECC state + ("pendingState", zes_device_ecc_state_t), ## [out] Pending ECC state + ("pendingAction", zes_device_action_t) ## [out] Pending action + ] + +############################################################################### +## @brief Accelerator engine groups +class zes_engine_group_v(IntEnum): + ALL = 0 ## Access information about all engines combined. + COMPUTE_ALL = 1 ## Access information about all compute engines combined. Compute engines + ## can only process compute kernels (no 3D content). + MEDIA_ALL = 2 ## Access information about all media engines combined. + COPY_ALL = 3 ## Access information about all copy (blitter) engines combined. + COMPUTE_SINGLE = 4 ## Access information about a single compute engine - this is an engine + ## that can process compute kernels. Note that single engines may share + ## the same underlying accelerator resources as other engines so activity + ## of such an engine may not be indicative of the underlying resource + ## utilization - use ::ZES_ENGINE_GROUP_3D_RENDER_COMPUTE_ALL for that. + RENDER_SINGLE = 5 ## Access information about a single render engine - this is an engine + ## that can process both 3D content and compute kernels. Note that single + ## engines may share the same underlying accelerator resources as other + ## engines so activity of such an engine may not be indicative of the + ## underlying resource utilization - use + ## ::ZES_ENGINE_GROUP_3D_RENDER_COMPUTE_ALL for that. + MEDIA_DECODE_SINGLE = 6 ## [DEPRECATED] No longer supported. + MEDIA_ENCODE_SINGLE = 7 ## [DEPRECATED] No longer supported. + COPY_SINGLE = 8 ## Access information about a single media encode engine. Note that + ## single engines may share the same underlying accelerator resources as + ## other engines so activity of such an engine may not be indicative of + ## the underlying resource utilization - use ::ZES_ENGINE_GROUP_COPY_ALL + ## for that. + MEDIA_ENHANCEMENT_SINGLE = 9 ## Access information about a single media enhancement engine. Note that + ## single engines may share the same underlying accelerator resources as + ## other engines so activity of such an engine may not be indicative of + ## the underlying resource utilization - use ::ZES_ENGINE_GROUP_MEDIA_ALL + ## for that. + _3D_SINGLE = 10 ## [DEPRECATED] No longer supported. + _3D_RENDER_COMPUTE_ALL = 11 ## [DEPRECATED] No longer supported. + RENDER_ALL = 12 ## Access information about all render engines combined. Render engines + ## are those than process both 3D content and compute kernels. + _3D_ALL = 13 ## [DEPRECATED] No longer supported. + MEDIA_CODEC_SINGLE = 14 ## Access information about a single media engine. Note that single + ## engines may share the same underlying accelerator resources as other + ## engines so activity of such an engine may not be indicative of the + ## underlying resource utilization - use ::ZES_ENGINE_GROUP_MEDIA_ALL for + ## that. + +class zes_engine_group_t(c_int): + def __str__(self): + return str(zes_engine_group_v(self.value)) + + +############################################################################### +## @brief Engine group properties +class zes_engine_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("type", zes_engine_group_t), ## [out] The engine group + ("onSubdevice", ze_bool_t), ## [out] True if this resource is located on a sub-device; false means + ## that the resource is on the device of the calling Sysman handle + ("subdeviceId", c_ulong) ## [out] If onSubdevice is true, this gives the ID of the sub-device + ] + +############################################################################### +## @brief Engine activity counters +## +## @details +## - Percent utilization is calculated by taking two snapshots (s1, s2) and +## using the equation: %util = (s2.activeTime - s1.activeTime) / +## (s2.timestamp - s1.timestamp) +## - The `activeTime` time units are implementation-specific since the +## value is only intended to be used for calculating utilization +## percentage. +## - The `timestamp` should only be used to calculate delta between +## snapshots of this structure. +## - The application should never take the delta of `timestamp` with the +## timestamp from a different structure since they are not guaranteed to +## have the same base. +## - When taking the delta, the difference between `timestamp` samples +## could be `0`, if the frequency of sampling the snapshots is higher +## than the frequency of the timestamp update. +## - The absolute value of `timestamp` is only valid during within the +## application and may be different on the next execution. +class zes_engine_stats_t(Structure): + _fields_ = [ + ("activeTime", c_ulonglong), ## [out] Monotonic counter where the resource is actively running + ## workloads. + ("timestamp", c_ulonglong) ## [out] Monotonic counter when activeTime counter was sampled. + ] + +############################################################################### +## @brief Event types +class zes_event_type_flags_v(IntEnum): + DEVICE_DETACH = ZE_BIT(0) ## Event is triggered when the device is no longer available (due to a + ## reset or being disabled). + DEVICE_ATTACH = ZE_BIT(1) ## Event is triggered after the device is available again. + DEVICE_SLEEP_STATE_ENTER = ZE_BIT(2) ## Event is triggered when the driver is about to put the device into a + ## deep sleep state + DEVICE_SLEEP_STATE_EXIT = ZE_BIT(3) ## Event is triggered when the driver is waking the device up from a deep + ## sleep state + FREQ_THROTTLED = ZE_BIT(4) ## Event is triggered when the frequency starts being throttled + ENERGY_THRESHOLD_CROSSED = ZE_BIT(5) ## Event is triggered when the energy consumption threshold is reached + ## (use ::zesPowerSetEnergyThreshold() to configure). + TEMP_CRITICAL = ZE_BIT(6) ## Event is triggered when the critical temperature is reached (use + ## ::zesTemperatureSetConfig() to configure - disabled by default). + TEMP_THRESHOLD1 = ZE_BIT(7) ## Event is triggered when the temperature crosses threshold 1 (use + ## ::zesTemperatureSetConfig() to configure - disabled by default). + TEMP_THRESHOLD2 = ZE_BIT(8) ## Event is triggered when the temperature crosses threshold 2 (use + ## ::zesTemperatureSetConfig() to configure - disabled by default). + MEM_HEALTH = ZE_BIT(9) ## Event is triggered when the health of device memory changes. + FABRIC_PORT_HEALTH = ZE_BIT(10) ## Event is triggered when the health of fabric ports change. + PCI_LINK_HEALTH = ZE_BIT(11) ## Event is triggered when the health of the PCI link changes. + RAS_CORRECTABLE_ERRORS = ZE_BIT(12) ## Event is triggered when accelerator RAS correctable errors cross + ## thresholds (use ::zesRasSetConfig() to configure - disabled by + ## default). + RAS_UNCORRECTABLE_ERRORS = ZE_BIT(13) ## Event is triggered when accelerator RAS uncorrectable errors cross + ## thresholds (use ::zesRasSetConfig() to configure - disabled by + ## default). + DEVICE_RESET_REQUIRED = ZE_BIT(14) ## Event is triggered when the device needs to be reset (use + ## ::zesDeviceGetState() to determine the reasons for the reset). + SURVIVABILITY_MODE_DETECTED = ZE_BIT(15) ## Event is triggered when graphics driver encounter an error condition. + +class zes_event_type_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Maximum Fabric port model string size +ZES_MAX_FABRIC_PORT_MODEL_SIZE = 256 + +############################################################################### +## @brief Maximum size of the buffer that will return information about link +## types +ZES_MAX_FABRIC_LINK_TYPE_SIZE = 256 + +############################################################################### +## @brief Fabric port status +class zes_fabric_port_status_v(IntEnum): + UNKNOWN = 0 ## The port status cannot be determined + HEALTHY = 1 ## The port is up and operating as expected + DEGRADED = 2 ## The port is up but has quality and/or speed degradation + FAILED = 3 ## Port connection instabilities are preventing workloads making forward + ## progress + DISABLED = 4 ## The port is configured down + +class zes_fabric_port_status_t(c_int): + def __str__(self): + return str(zes_fabric_port_status_v(self.value)) + + +############################################################################### +## @brief Fabric port quality degradation reasons +class zes_fabric_port_qual_issue_flags_v(IntEnum): + LINK_ERRORS = ZE_BIT(0) ## Excessive link errors are occurring + SPEED = ZE_BIT(1) ## There is a degradation in the bitrate and/or width of the link + +class zes_fabric_port_qual_issue_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Fabric port failure reasons +class zes_fabric_port_failure_flags_v(IntEnum): + FAILED = ZE_BIT(0) ## A previously operating link has failed. Hardware will automatically + ## retrain this port. This state will persist until either the physical + ## connection is removed or the link trains successfully. + TRAINING_TIMEOUT = ZE_BIT(1) ## A connection has not been established within an expected time. + ## Hardware will continue to attempt port training. This status will + ## persist until either the physical connection is removed or the link + ## successfully trains. + FLAPPING = ZE_BIT(2) ## Port has excessively trained and then transitioned down for some + ## period of time. Driver will allow port to continue to train, but will + ## not enable the port for use until the port has been disabled and + ## subsequently re-enabled using ::zesFabricPortSetConfig(). + +class zes_fabric_port_failure_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Unique identifier for a fabric port +## +## @details +## - This not a universal identifier. The identified is garanteed to be +## unique for the current hardware configuration of the system. Changes +## in the hardware may result in a different identifier for a given port. +## - The main purpose of this identifier to build up an instantaneous +## topology map of system connectivity. An application should enumerate +## all fabric ports and match the `remotePortId` member of +## ::zes_fabric_port_state_t to the `portId` member of +## ::zes_fabric_port_properties_t. +class zes_fabric_port_id_t(Structure): + _fields_ = [ + ("fabricId", c_ulong), ## [out] Unique identifier for the fabric end-point + ("attachId", c_ulong), ## [out] Unique identifier for the device attachment point + ("portNumber", c_ubyte) ## [out] The logical port number (this is typically marked somewhere on + ## the physical device) + ] + +############################################################################### +## @brief Fabric port speed in one direction +class zes_fabric_port_speed_t(Structure): + _fields_ = [ + ("bitRate", c_int64_t), ## [out] Bits/sec that the link is operating at. A value of -1 means that + ## this property is unknown. + ("width", c_int32_t) ## [out] The number of lanes. A value of -1 means that this property is + ## unknown. + ] + +############################################################################### +## @brief Fabric port properties +class zes_fabric_port_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("model", c_char * ZES_MAX_FABRIC_PORT_MODEL_SIZE), ## [out] Description of port technology. Will be set to the string + ## "unkown" if this cannot be determined for this port. + ("onSubdevice", ze_bool_t), ## [out] True if the port is located on a sub-device; false means that + ## the port is on the device of the calling Sysman handle + ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device + ("portId", zes_fabric_port_id_t), ## [out] The unique port identifier + ("maxRxSpeed", zes_fabric_port_speed_t), ## [out] Maximum speed supported by the receive side of the port (sum of + ## all lanes) + ("maxTxSpeed", zes_fabric_port_speed_t) ## [out] Maximum speed supported by the transmit side of the port (sum of + ## all lanes) + ] + +############################################################################### +## @brief Provides information about the fabric link attached to a port +class zes_fabric_link_type_t(Structure): + _fields_ = [ + ("desc", c_char * ZES_MAX_FABRIC_LINK_TYPE_SIZE) ## [out] Description of link technology. Will be set to the string + ## "unkown" if this cannot be determined for this link. + ] + +############################################################################### +## @brief Fabric port configuration +class zes_fabric_port_config_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("enabled", ze_bool_t), ## [in,out] Port is configured up/down + ("beaconing", ze_bool_t) ## [in,out] Beaconing is configured on/off + ] + +############################################################################### +## @brief Fabric port state +class zes_fabric_port_state_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("status", zes_fabric_port_status_t), ## [out] The current status of the port + ("qualityIssues", zes_fabric_port_qual_issue_flags_t), ## [out] If status is ::ZES_FABRIC_PORT_STATUS_DEGRADED, + ## then this gives a combination of ::zes_fabric_port_qual_issue_flag_t + ## for quality issues that have been detected; + ## otherwise, 0 indicates there are no quality issues with the link at + ## this time. + ("failureReasons", zes_fabric_port_failure_flags_t), ## [out] If status is ::ZES_FABRIC_PORT_STATUS_FAILED, + ## then this gives a combination of ::zes_fabric_port_failure_flag_t for + ## reasons for the connection instability; + ## otherwise, 0 indicates there are no connection stability issues at + ## this time. + ("remotePortId", zes_fabric_port_id_t), ## [out] The unique port identifier for the remote connection point if + ## status is ::ZES_FABRIC_PORT_STATUS_HEALTHY, + ## ::ZES_FABRIC_PORT_STATUS_DEGRADED or ::ZES_FABRIC_PORT_STATUS_FAILED + ("rxSpeed", zes_fabric_port_speed_t), ## [out] Current maximum receive speed (sum of all lanes) + ("txSpeed", zes_fabric_port_speed_t) ## [out] Current maximum transmit speed (sum of all lanes) + ] + +############################################################################### +## @brief Fabric port throughput. +class zes_fabric_port_throughput_t(Structure): + _fields_ = [ + ("timestamp", c_ulonglong), ## [out] Monotonic timestamp counter in microseconds when the measurement + ## was made. + ## This timestamp should only be used to calculate delta time between + ## snapshots of this structure. + ## Never take the delta of this timestamp with the timestamp from a + ## different structure since they are not guaranteed to have the same base. + ## The absolute value of the timestamp is only valid during within the + ## application and may be different on the next execution. + ("rxCounter", c_ulonglong), ## [out] Monotonic counter for the number of bytes received (sum of all + ## lanes). This includes all protocol overhead, not only the GPU traffic. + ("txCounter", c_ulonglong) ## [out] Monotonic counter for the number of bytes transmitted (sum of + ## all lanes). This includes all protocol overhead, not only the GPU + ## traffic. + ] + +############################################################################### +## @brief Fabric Port Error Counters +class zes_fabric_port_error_counters_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("linkFailureCount", c_ulonglong), ## [out] Link Failure Error Count reported per port + ("fwCommErrorCount", c_ulonglong), ## [out] Firmware Communication Error Count reported per device + ("fwErrorCount", c_ulonglong), ## [out] Firmware reported Error Count reported per device + ("linkDegradeCount", c_ulonglong) ## [out] Link Degrade Error Count reported per port + ] + +############################################################################### +## @brief Fan resource speed mode +class zes_fan_speed_mode_v(IntEnum): + DEFAULT = 0 ## The fan speed is operating using the hardware default settings + FIXED = 1 ## The fan speed is currently set to a fixed value + TABLE = 2 ## The fan speed is currently controlled dynamically by hardware based on + ## a temp/speed table + +class zes_fan_speed_mode_t(c_int): + def __str__(self): + return str(zes_fan_speed_mode_v(self.value)) + + +############################################################################### +## @brief Fan speed units +class zes_fan_speed_units_v(IntEnum): + RPM = 0 ## The fan speed is in units of revolutions per minute (rpm) + PERCENT = 1 ## The fan speed is a percentage of the maximum speed of the fan + +class zes_fan_speed_units_t(c_int): + def __str__(self): + return str(zes_fan_speed_units_v(self.value)) + + +############################################################################### +## @brief Fan speed +class zes_fan_speed_t(Structure): + _fields_ = [ + ("speed", c_int32_t), ## [in,out] The speed of the fan. On output, a value of -1 indicates that + ## there is no fixed fan speed setting. + ("units", zes_fan_speed_units_t) ## [in,out] The units that the fan speed is expressed in. On output, if + ## fan speed is -1 then units should be ignored. + ] + +############################################################################### +## @brief Fan temperature/speed pair +class zes_fan_temp_speed_t(Structure): + _fields_ = [ + ("temperature", c_ulong), ## [in,out] Temperature in degrees Celsius. + ("speed", zes_fan_speed_t) ## [in,out] The speed of the fan + ] + +############################################################################### +## @brief Maximum number of fan temperature/speed pairs in the fan speed table. +ZES_FAN_TEMP_SPEED_PAIR_COUNT = 32 + +############################################################################### +## @brief Fan speed table +class zes_fan_speed_table_t(Structure): + _fields_ = [ + ("numPoints", c_int32_t), ## [in,out] The number of valid points in the fan speed table. 0 means + ## that there is no fan speed table configured. -1 means that a fan speed + ## table is not supported by the hardware. + ("table", zes_fan_temp_speed_t * ZES_FAN_TEMP_SPEED_PAIR_COUNT) ## [in,out] Array of temperature/fan speed pairs. The table is ordered + ## based on temperature from lowest to highest. + ] + +############################################################################### +## @brief Fan properties +class zes_fan_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("onSubdevice", ze_bool_t), ## [out] True if the resource is located on a sub-device; false means + ## that the resource is on the device of the calling Sysman handle + ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device + ("canControl", ze_bool_t), ## [out] Indicates if software can control the fan speed assuming the + ## user has permissions + ("supportedModes", c_ulong), ## [out] Bitfield of supported fan configuration modes + ## (1<<::zes_fan_speed_mode_t) + ("supportedUnits", c_ulong), ## [out] Bitfield of supported fan speed units + ## (1<<::zes_fan_speed_units_t) + ("maxRPM", c_int32_t), ## [out] The maximum RPM of the fan. A value of -1 means that this + ## property is unknown. + ("maxPoints", c_int32_t) ## [out] The maximum number of points in the fan temp/speed table. A + ## value of -1 means that this fan doesn't support providing a temp/speed + ## table. + ] + +############################################################################### +## @brief Fan configuration +class zes_fan_config_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("mode", zes_fan_speed_mode_t), ## [in,out] The fan speed mode (fixed, temp-speed table) + ("speedFixed", zes_fan_speed_t), ## [in,out] The current fixed fan speed setting + ("speedTable", zes_fan_speed_table_t) ## [out] A table containing temperature/speed pairs + ] + +############################################################################### +## @brief Firmware properties +class zes_firmware_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("onSubdevice", ze_bool_t), ## [out] True if the resource is located on a sub-device; false means + ## that the resource is on the device of the calling Sysman handle + ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device + ("canControl", ze_bool_t), ## [out] Indicates if software can flash the firmware assuming the user + ## has permissions + ("name", c_char * ZES_STRING_PROPERTY_SIZE), ## [out] NULL terminated string value. The string "unknown" will be + ## returned if this property cannot be determined. + ("version", c_char * ZES_STRING_PROPERTY_SIZE) ## [out] NULL terminated string value. The string "unknown" will be + ## returned if this property cannot be determined. + ] + +############################################################################### +## @brief Frequency domains. +class zes_freq_domain_v(IntEnum): + GPU = 0 ## GPU Core Domain. + MEMORY = 1 ## Local Memory Domain. + MEDIA = 2 ## GPU Media Domain. + +class zes_freq_domain_t(c_int): + def __str__(self): + return str(zes_freq_domain_v(self.value)) + + +############################################################################### +## @brief Frequency properties +## +## @details +## - Indicates if this frequency domain can be overclocked (if true, +## functions such as ::zesFrequencyOcSetFrequencyTarget() are supported). +## - The min/max hardware frequencies are specified for non-overclock +## configurations. For overclock configurations, use +## ::zesFrequencyOcGetFrequencyTarget() to determine the maximum +## frequency that can be requested. +class zes_freq_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("type", zes_freq_domain_t), ## [out] The hardware block that this frequency domain controls (GPU, + ## memory, ...) + ("onSubdevice", ze_bool_t), ## [out] True if this resource is located on a sub-device; false means + ## that the resource is on the device of the calling Sysman handle + ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device + ("canControl", ze_bool_t), ## [out] Indicates if software can control the frequency of this domain + ## assuming the user has permissions + ("isThrottleEventSupported", ze_bool_t), ## [out] Indicates if software can register to receive event + ## ::ZES_EVENT_TYPE_FLAG_FREQ_THROTTLED + ("min", c_double), ## [out] The minimum hardware clock frequency in units of MHz. + ("max", c_double) ## [out] The maximum non-overclock hardware clock frequency in units of + ## MHz. + ] + +############################################################################### +## @brief Frequency range between which the hardware can operate. +## +## @details +## - When setting limits, they will be clamped to the hardware limits. +## - When setting limits, ensure that the max frequency is greater than or +## equal to the min frequency specified. +## - When setting limits to return to factory settings, specify -1 for both +## the min and max limit. +class zes_freq_range_t(Structure): + _fields_ = [ + ("min", c_double), ## [in,out] The min frequency in MHz below which hardware frequency + ## management will not request frequencies. On input, setting to 0 will + ## permit the frequency to go down to the hardware minimum while setting + ## to -1 will return the min frequency limit to the factory value (can be + ## larger than the hardware min). On output, a negative value indicates + ## that no external minimum frequency limit is in effect. + ("max", c_double) ## [in,out] The max frequency in MHz above which hardware frequency + ## management will not request frequencies. On input, setting to 0 or a + ## very big number will permit the frequency to go all the way up to the + ## hardware maximum while setting to -1 will return the max frequency to + ## the factory value (which can be less than the hardware max). On + ## output, a negative number indicates that no external maximum frequency + ## limit is in effect. + ] + +############################################################################### +## @brief Frequency throttle reasons +class zes_freq_throttle_reason_flags_v(IntEnum): + AVE_PWR_CAP = ZE_BIT(0) ## frequency throttled due to average power excursion (PL1) + BURST_PWR_CAP = ZE_BIT(1) ## frequency throttled due to burst power excursion (PL2) + CURRENT_LIMIT = ZE_BIT(2) ## frequency throttled due to current excursion (PL4) + THERMAL_LIMIT = ZE_BIT(3) ## frequency throttled due to thermal excursion (T > TjMax) + PSU_ALERT = ZE_BIT(4) ## frequency throttled due to power supply assertion + SW_RANGE = ZE_BIT(5) ## frequency throttled due to software supplied frequency range + HW_RANGE = ZE_BIT(6) ## frequency throttled due to a sub block that has a lower frequency + ## range when it receives clocks + VOLTAGE = ZE_BIT(7) ## frequency throttled due to voltage excursion + THERMAL = ZE_BIT(8) ## frequency throttled due to thermal conditions + POWER = ZE_BIT(9) ## frequency throttled due to power constraints + +class zes_freq_throttle_reason_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Frequency state +class zes_freq_state_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("currentVoltage", c_double), ## [out] Current voltage in Volts. A negative value indicates that this + ## property is not known. + ("request", c_double), ## [out] The current frequency request in MHz. A negative value indicates + ## that this property is not known. + ("tdp", c_double), ## [out] The maximum frequency in MHz supported under the current TDP + ## conditions. This fluctuates dynamically based on the power and thermal + ## limits of the part. A negative value indicates that this property is + ## not known. + ("efficient", c_double), ## [out] The efficient minimum frequency in MHz. A negative value + ## indicates that this property is not known. + ("actual", c_double), ## [out] The resolved frequency in MHz. A negative value indicates that + ## this property is not known. + ("throttleReasons", zes_freq_throttle_reason_flags_t) ## [out] The reasons that the frequency is being limited by the hardware. + ## Returns 0 (frequency not throttled) or a combination of ::zes_freq_throttle_reason_flag_t. + ] + +############################################################################### +## @brief Frequency throttle time snapshot +## +## @details +## - Percent time throttled is calculated by taking two snapshots (s1, s2) +## and using the equation: %throttled = (s2.throttleTime - +## s1.throttleTime) / (s2.timestamp - s1.timestamp) +class zes_freq_throttle_time_t(Structure): + _fields_ = [ + ("throttleTime", c_ulonglong), ## [out] The monotonic counter of time in microseconds that the frequency + ## has been limited by the hardware. + ("timestamp", c_ulonglong) ## [out] Microsecond timestamp when throttleTime was captured. + ## This timestamp should only be used to calculate delta time between + ## snapshots of this structure. + ## Never take the delta of this timestamp with the timestamp from a + ## different structure since they are not guaranteed to have the same base. + ## The absolute value of the timestamp is only valid during within the + ## application and may be different on the next execution. + ] + +############################################################################### +## @brief Overclocking modes +## +## @details +## - [DEPRECATED] No longer supported. +class zes_oc_mode_v(IntEnum): + OFF = 0 ## Overclocking if off - hardware is running using factory default + ## voltages/frequencies. + OVERRIDE = 1 ## Overclock override mode - In this mode, a fixed user-supplied voltage + ## is applied independent of the frequency request. The maximum permitted + ## frequency can also be increased. This mode disables INTERPOLATIVE and + ## FIXED modes. + INTERPOLATIVE = 2 ## Overclock interpolative mode - In this mode, the voltage/frequency + ## curve can be extended with a new voltage/frequency point that will be + ## interpolated. The existing voltage/frequency points can also be offset + ## (up or down) by a fixed voltage. This mode disables FIXED and OVERRIDE + ## modes. + FIXED = 3 ## Overclocking fixed Mode - In this mode, hardware will disable most + ## frequency throttling and lock the frequency and voltage at the + ## specified overclock values. This mode disables OVERRIDE and + ## INTERPOLATIVE modes. This mode can damage the part, most of the + ## protections are disabled on this mode. + +class zes_oc_mode_t(c_int): + def __str__(self): + return str(zes_oc_mode_v(self.value)) + + +############################################################################### +## @brief Overclocking properties +## +## @details +## - Provides all the overclocking capabilities and properties supported by +## the device for the frequency domain. +## - [DEPRECATED] No longer supported. +class zes_oc_capabilities_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("isOcSupported", ze_bool_t), ## [out] Indicates if any overclocking features are supported on this + ## frequency domain. + ("maxFactoryDefaultFrequency", c_double), ## [out] Factory default non-overclock maximum frequency in Mhz. + ("maxFactoryDefaultVoltage", c_double), ## [out] Factory default voltage used for the non-overclock maximum + ## frequency in MHz. + ("maxOcFrequency", c_double), ## [out] Maximum hardware overclocking frequency limit in Mhz. + ("minOcVoltageOffset", c_double), ## [out] The minimum voltage offset that can be applied to the + ## voltage/frequency curve. Note that this number can be negative. + ("maxOcVoltageOffset", c_double), ## [out] The maximum voltage offset that can be applied to the + ## voltage/frequency curve. + ("maxOcVoltage", c_double), ## [out] The maximum overclock voltage that hardware supports. + ("isTjMaxSupported", ze_bool_t), ## [out] Indicates if the maximum temperature limit (TjMax) can be + ## changed for this frequency domain. + ("isIccMaxSupported", ze_bool_t), ## [out] Indicates if the maximum current (IccMax) can be changed for + ## this frequency domain. + ("isHighVoltModeCapable", ze_bool_t), ## [out] Indicates if this frequency domains supports a feature to set + ## very high voltages. + ("isHighVoltModeEnabled", ze_bool_t), ## [out] Indicates if very high voltages are permitted on this frequency + ## domain. + ("isExtendedModeSupported", ze_bool_t), ## [out] Indicates if the extended overclocking features are supported. + ## If this is supported, increments are on 1 Mhz basis. + ("isFixedModeSupported", ze_bool_t) ## [out] Indicates if the fixed mode is supported. In this mode, hardware + ## will disable most frequency throttling and lock the frequency and + ## voltage at the specified overclock values. + ] + +############################################################################### +## @brief LED properties +class zes_led_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("onSubdevice", ze_bool_t), ## [out] True if the resource is located on a sub-device; false means + ## that the resource is on the device of the calling Sysman handle + ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device + ("canControl", ze_bool_t), ## [out] Indicates if software can control the LED assuming the user has + ## permissions + ("haveRGB", ze_bool_t) ## [out] Indicates if the LED is RGB capable + ] + +############################################################################### +## @brief LED color +class zes_led_color_t(Structure): + _fields_ = [ + ("red", c_double), ## [in,out][range(0.0, 1.0)] The LED red value. On output, a value less + ## than 0.0 indicates that the color is not known. + ("green", c_double), ## [in,out][range(0.0, 1.0)] The LED green value. On output, a value less + ## than 0.0 indicates that the color is not known. + ("blue", c_double) ## [in,out][range(0.0, 1.0)] The LED blue value. On output, a value less + ## than 0.0 indicates that the color is not known. + ] + +############################################################################### +## @brief LED state +class zes_led_state_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("isOn", ze_bool_t), ## [out] Indicates if the LED is on or off + ("color", zes_led_color_t) ## [out] Color of the LED + ] + +############################################################################### +## @brief Memory module types +class zes_mem_type_v(IntEnum): + HBM = 0 ## HBM memory + DDR = 1 ## DDR memory + DDR3 = 2 ## DDR3 memory + DDR4 = 3 ## DDR4 memory + DDR5 = 4 ## DDR5 memory + LPDDR = 5 ## LPDDR memory + LPDDR3 = 6 ## LPDDR3 memory + LPDDR4 = 7 ## LPDDR4 memory + LPDDR5 = 8 ## LPDDR5 memory + SRAM = 9 ## SRAM memory + L1 = 10 ## L1 cache + L3 = 11 ## L3 cache + GRF = 12 ## Execution unit register file + SLM = 13 ## Execution unit shared local memory + GDDR4 = 14 ## GDDR4 memory + GDDR5 = 15 ## GDDR5 memory + GDDR5X = 16 ## GDDR5X memory + GDDR6 = 17 ## GDDR6 memory + GDDR6X = 18 ## GDDR6X memory + GDDR7 = 19 ## GDDR7 memory + +class zes_mem_type_t(c_int): + def __str__(self): + return str(zes_mem_type_v(self.value)) + + +############################################################################### +## @brief Memory module location +class zes_mem_loc_v(IntEnum): + SYSTEM = 0 ## System memory + DEVICE = 1 ## On board local device memory + +class zes_mem_loc_t(c_int): + def __str__(self): + return str(zes_mem_loc_v(self.value)) + + +############################################################################### +## @brief Memory health +class zes_mem_health_v(IntEnum): + UNKNOWN = 0 ## The memory health cannot be determined. + OK = 1 ## All memory channels are healthy. + DEGRADED = 2 ## Excessive correctable errors have been detected on one or more + ## channels. Device should be reset. + CRITICAL = 3 ## Operating with reduced memory to cover banks with too many + ## uncorrectable errors. + REPLACE = 4 ## Device should be replaced due to excessive uncorrectable errors. + +class zes_mem_health_t(c_int): + def __str__(self): + return str(zes_mem_health_v(self.value)) + + +############################################################################### +## @brief Memory properties +class zes_mem_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("type", zes_mem_type_t), ## [out] The memory type + ("onSubdevice", ze_bool_t), ## [out] True if this resource is located on a sub-device; false means + ## that the resource is on the device of the calling Sysman handle + ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device + ("location", zes_mem_loc_t), ## [out] Location of this memory (system, device) + ("physicalSize", c_ulonglong), ## [out] Physical memory capacity in bytes. A value of 0 indicates that + ## this property is not known. However, a call to zesMemoryGetState() + ## will return the available free physical memory. + ("busWidth", c_int32_t), ## [out] Width of the memory bus. A value of -1 means that this property + ## is unknown. + ("numChannels", c_int32_t) ## [out] The number of memory channels. A value of -1 means that this + ## property is unknown. + ] + +############################################################################### +## @brief Memory state - health, allocated +## +## @details +## - Percent free is given by 100 * free / pysical mem size. +class zes_mem_state_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("health", zes_mem_health_t), ## [out] Indicates the health of the memory + ("free", c_ulonglong), ## [out] The free physical memory in bytes + ("size", c_ulonglong) ## [out] The total allocatable memory in bytes (can be less than the + ## `physicalSize` member of ::zes_mem_properties_t). *DEPRECATED* + ## This member can no longer track the allocatable memory reliably. + ## Clients depending on this information can use the + ## zeDeviceGetMemoryProperties with + ## ze_device_usablemem_size_ext_properties_t extention to get information + ## of the available usable memory. + ] + +############################################################################### +## @brief Memory bandwidth +## +## @details +## - Percent bandwidth is calculated by taking two snapshots (s1, s2) and +## using the equation: %bw = 10^6 * ((s2.readCounter - s1.readCounter) + +## (s2.writeCounter - s1.writeCounter)) / (s2.maxBandwidth * +## (s2.timestamp - s1.timestamp)) +## - Counter can roll over and rollover needs to be handled by comparing +## the current read against the previous read +## - Counter is a 32 byte transaction count, which means the calculated +## delta (delta = current_value - previous_value or delta = 2^32 - +## previous_value + current_value in case of rollover) needs to be +## multiplied by 32 to get delta between samples in actual byte count +class zes_mem_bandwidth_t(Structure): + _fields_ = [ + ("readCounter", c_ulonglong), ## [out] Total bytes read from memory + ("writeCounter", c_ulonglong), ## [out] Total bytes written to memory + ("maxBandwidth", c_ulonglong), ## [out] Current maximum bandwidth in units of bytes/sec + ("timestamp", c_ulonglong) ## [out] The timestamp in microseconds when these measurements were sampled. + ## This timestamp should only be used to calculate delta time between + ## snapshots of this structure. + ## Never take the delta of this timestamp with the timestamp from a + ## different structure since they are not guaranteed to have the same base. + ## The absolute value of the timestamp is only valid during within the + ## application and may be different on the next execution. + ] + +############################################################################### +## @brief Extension properties for Memory bandwidth +## +## @details +## - Number of counter bits +## - [DEPRECATED] No longer supported. +class zes_mem_ext_bandwidth_t(Structure): + _fields_ = [ + ("memoryTimestampValidBits", c_ulong) ## [out] Returns the number of valid bits in the timestamp values + ] + +############################################################################### +## @brief Static information about a Performance Factor domain +class zes_perf_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("onSubdevice", ze_bool_t), ## [out] True if this Performance Factor affects accelerators located on + ## a sub-device + ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device + ("engines", zes_engine_type_flags_t) ## [out] Bitfield of accelerator engine types that are affected by this + ## Performance Factor. + ] + +############################################################################### +## @brief Power Domain +class zes_power_domain_v(IntEnum): + UNKNOWN = 0 ## The PUnit power domain level cannot be determined. + CARD = 1 ## The PUnit power domain is a card-level power domain. + PACKAGE = 2 ## The PUnit power domain is a package-level power domain. + STACK = 3 ## The PUnit power domain is a stack-level power domain. + MEMORY = 4 ## The PUnit power domain is a memory-level power domain. + GPU = 5 ## The PUnit power domain is a GPU-level power domain. + +class zes_power_domain_t(c_int): + def __str__(self): + return str(zes_power_domain_v(self.value)) + + +############################################################################### +## @brief Power Level Type +class zes_power_level_v(IntEnum): + UNKNOWN = 0 ## The PUnit power monitoring duration cannot be determined. + SUSTAINED = 1 ## The PUnit determines effective power draw by computing a moving + ## average of the actual power draw over a time interval (longer than + ## BURST). + BURST = 2 ## The PUnit determines effective power draw by computing a moving + ## average of the actual power draw over a time interval (longer than + ## PEAK). + PEAK = 3 ## The PUnit determines effective power draw by computing a moving + ## average of the actual power draw over a very short time interval. + INSTANTANEOUS = 4 ## The PUnit predicts effective power draw using the current device + ## configuration (frequency, voltage, etc...) & throttles proactively to + ## stay within the specified limit. + +class zes_power_level_t(c_int): + def __str__(self): + return str(zes_power_level_v(self.value)) + + +############################################################################### +## @brief Power Source Type +class zes_power_source_v(IntEnum): + ANY = 0 ## Limit active no matter whether the power source is mains powered or + ## battery powered. + MAINS = 1 ## Limit active only when the device is mains powered. + BATTERY = 2 ## Limit active only when the device is battery powered. + +class zes_power_source_t(c_int): + def __str__(self): + return str(zes_power_source_v(self.value)) + + +############################################################################### +## @brief Limit Unit +class zes_limit_unit_v(IntEnum): + UNKNOWN = 0 ## The PUnit power monitoring unit cannot be determined. + CURRENT = 1 ## The limit is specified in milliamperes of current drawn. + POWER = 2 ## The limit is specified in milliwatts of power generated. + +class zes_limit_unit_t(c_int): + def __str__(self): + return str(zes_limit_unit_v(self.value)) + + +############################################################################### +## @brief Properties related to device power settings +class zes_power_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("onSubdevice", ze_bool_t), ## [out] True if this resource is located on a sub-device; false means + ## that the resource is on the device of the calling Sysman handle + ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device + ("canControl", ze_bool_t), ## [out] Software can change the power limits of this domain assuming the + ## user has permissions. + ("isEnergyThresholdSupported", ze_bool_t), ## [out] Indicates if this power domain supports the energy threshold + ## event (::ZES_EVENT_TYPE_FLAG_ENERGY_THRESHOLD_CROSSED). + ("defaultLimit", c_int32_t), ## [out] (Deprecated) The factory default TDP power limit of the part in + ## milliwatts. A value of -1 means that this is not known. + ("minLimit", c_int32_t), ## [out] (Deprecated) The minimum power limit in milliwatts that can be + ## requested. A value of -1 means that this is not known. + ("maxLimit", c_int32_t) ## [out] (Deprecated) The maximum power limit in milliwatts that can be + ## requested. A value of -1 means that this is not known. + ] + +############################################################################### +## @brief Energy counter snapshot +## +## @details +## - Average power is calculated by taking two snapshots (s1, s2) and using +## the equation: PowerWatts = (s2.energy - s1.energy) / (s2.timestamp - +## s1.timestamp) +class zes_power_energy_counter_t(Structure): + _fields_ = [ + ("energy", c_ulonglong), ## [out] The monotonic energy counter in microjoules. + ("timestamp", c_ulonglong) ## [out] Microsecond timestamp when energy was captured. + ## This timestamp should only be used to calculate delta time between + ## snapshots of this structure. + ## Never take the delta of this timestamp with the timestamp from a + ## different structure since they are not guaranteed to have the same base. + ## The absolute value of the timestamp is only valid during within the + ## application and may be different on the next execution. + ] + +############################################################################### +## @brief Sustained power limits +## +## @details +## - The power controller (Punit) will throttle the operating frequency if +## the power averaged over a window (typically seconds) exceeds this +## limit. +## - [DEPRECATED] No longer supported. +class zes_power_sustained_limit_t(Structure): + _fields_ = [ + ("enabled", ze_bool_t), ## [in,out] indicates if the limit is enabled (true) or ignored (false) + ("power", c_int32_t), ## [in,out] power limit in milliwatts + ("interval", c_int32_t) ## [in,out] power averaging window (Tau) in milliseconds + ] + +############################################################################### +## @brief Burst power limit +## +## @details +## - The power controller (Punit) will throttle the operating frequency of +## the device if the power averaged over a few milliseconds exceeds a +## limit known as PL2. Typically PL2 > PL1 so that it permits the +## frequency to burst higher for short periods than would be otherwise +## permitted by PL1. +## - [DEPRECATED] No longer supported. +class zes_power_burst_limit_t(Structure): + _fields_ = [ + ("enabled", ze_bool_t), ## [in,out] indicates if the limit is enabled (true) or ignored (false) + ("power", c_int32_t) ## [in,out] power limit in milliwatts + ] + +############################################################################### +## @brief Peak power limit +## +## @details +## - The power controller (Punit) will reactively/proactively throttle the +## operating frequency of the device when the instantaneous/100usec power +## exceeds this limit. The limit is known as PL4 or Psys. It expresses +## the maximum power that can be drawn from the power supply. +## - If this power limit is removed or set too high, the power supply will +## generate an interrupt when it detects an overcurrent condition and the +## power controller will throttle the device frequencies down to min. It +## is thus better to tune the PL4 value in order to avoid such +## excursions. +## - [DEPRECATED] No longer supported. +class zes_power_peak_limit_t(Structure): + _fields_ = [ + ("powerAC", c_int32_t), ## [in,out] power limit in milliwatts for the AC power source. + ("powerDC", c_int32_t) ## [in,out] power limit in milliwatts for the DC power source. On input, + ## this is ignored if the product does not have a battery. On output, + ## this will be -1 if the product does not have a battery. + ] + +############################################################################### +## @brief Energy threshold +## +## @details +## - . +class zes_energy_threshold_t(Structure): + _fields_ = [ + ("enable", ze_bool_t), ## [in,out] Indicates if the energy threshold is enabled. + ("threshold", c_double), ## [in,out] The energy threshold in Joules. Will be 0.0 if no threshold + ## has been set. + ("processId", c_ulong) ## [in,out] The host process ID that set the energy threshold. Will be + ## 0xFFFFFFFF if no threshold has been set. + ] + +############################################################################### +## @brief PSU voltage status +class zes_psu_voltage_status_v(IntEnum): + UNKNOWN = 0 ## The status of the power supply voltage controllers cannot be + ## determined + NORMAL = 1 ## No unusual voltages have been detected + OVER = 2 ## Over-voltage has occurred + UNDER = 3 ## Under-voltage has occurred + +class zes_psu_voltage_status_t(c_int): + def __str__(self): + return str(zes_psu_voltage_status_v(self.value)) + + +############################################################################### +## @brief Static properties of the power supply +class zes_psu_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("onSubdevice", ze_bool_t), ## [out] True if the resource is located on a sub-device; false means + ## that the resource is on the device of the calling Sysman handle + ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device + ("haveFan", ze_bool_t), ## [out] True if the power supply has a fan + ("ampLimit", c_int32_t) ## [out] The maximum electrical current in milliamperes that can be + ## drawn. A value of -1 indicates that this property cannot be + ## determined. + ] + +############################################################################### +## @brief Dynamic state of the power supply +class zes_psu_state_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("voltStatus", zes_psu_voltage_status_t), ## [out] The current PSU voltage status + ("fanFailed", ze_bool_t), ## [out] Indicates if the fan has failed + ("temperature", c_int32_t), ## [out] Read the current heatsink temperature in degrees Celsius. A + ## value of -1 indicates that this property cannot be determined. + ("current", c_int32_t) ## [out] The amps being drawn in milliamperes. A value of -1 indicates + ## that this property cannot be determined. + ] + +############################################################################### +## @brief RAS error type +class zes_ras_error_type_v(IntEnum): + CORRECTABLE = 0 ## Errors were corrected by hardware + UNCORRECTABLE = 1 ## Error were not corrected + +class zes_ras_error_type_t(c_int): + def __str__(self): + return str(zes_ras_error_type_v(self.value)) + + +############################################################################### +## @brief RAS error categories +class zes_ras_error_cat_v(IntEnum): + RESET = 0 ## The number of accelerator engine resets attempted by the driver + PROGRAMMING_ERRORS = 1 ## The number of hardware exceptions generated by the way workloads have + ## programmed the hardware + DRIVER_ERRORS = 2 ## The number of low level driver communication errors have occurred + COMPUTE_ERRORS = 3 ## The number of errors that have occurred in the compute accelerator + ## hardware + NON_COMPUTE_ERRORS = 4 ## The number of errors that have occurred in the fixed-function + ## accelerator hardware + CACHE_ERRORS = 5 ## The number of errors that have occurred in caches (L1/L3/register + ## file/shared local memory/sampler) + DISPLAY_ERRORS = 6 ## The number of errors that have occurred in the display + +class zes_ras_error_cat_t(c_int): + def __str__(self): + return str(zes_ras_error_cat_v(self.value)) + + +############################################################################### +## @brief The maximum number of categories +ZES_MAX_RAS_ERROR_CATEGORY_COUNT = 7 + +############################################################################### +## @brief RAS properties +class zes_ras_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("type", zes_ras_error_type_t), ## [out] The type of RAS error + ("onSubdevice", ze_bool_t), ## [out] True if the resource is located on a sub-device; false means + ## that the resource is on the device of the calling Sysman handle + ("subdeviceId", c_ulong) ## [out] If onSubdevice is true, this gives the ID of the sub-device + ] + +############################################################################### +## @brief RAS error details +class zes_ras_state_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("category", c_ulonglong * ZES_MAX_RAS_ERROR_CATEGORY_COUNT) ## [in][out] Breakdown of error by category + ] + +############################################################################### +## @brief RAS error configuration - thresholds used for triggering RAS events +## (::ZES_EVENT_TYPE_FLAG_RAS_CORRECTABLE_ERRORS, +## ::ZES_EVENT_TYPE_FLAG_RAS_UNCORRECTABLE_ERRORS) +## +## @details +## - The driver maintains a total counter which is updated every time a +## hardware block covered by the corresponding RAS error set notifies +## that an error has occurred. When this total count goes above the +## totalThreshold specified below, a RAS event is triggered. +## - The driver also maintains a counter for each category of RAS error +## (see ::zes_ras_state_t for a breakdown). Each time a hardware block of +## that category notifies that an error has occurred, that corresponding +## category counter is updated. When it goes above the threshold +## specified in detailedThresholds, a RAS event is triggered. +class zes_ras_config_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("totalThreshold", c_ulonglong), ## [in,out] If the total RAS errors exceeds this threshold, the event + ## will be triggered. A value of 0ULL disables triggering the event based + ## on the total counter. + ("detailedThresholds", zes_ras_state_t) ## [in,out] If the RAS errors for each category exceed the threshold for + ## that category, the event will be triggered. A value of 0ULL will + ## disable an event being triggered for that category. + ] + +############################################################################### +## @brief Scheduler mode +class zes_sched_mode_v(IntEnum): + TIMEOUT = 0 ## Multiple applications or contexts are submitting work to the hardware. + ## When higher priority work arrives, the scheduler attempts to pause the + ## current executing work within some timeout interval, then submits the + ## other work. + TIMESLICE = 1 ## The scheduler attempts to fairly timeslice hardware execution time + ## between multiple contexts submitting work to the hardware + ## concurrently. + EXCLUSIVE = 2 ## Any application or context can run indefinitely on the hardware + ## without being preempted or terminated. All pending work for other + ## contexts must wait until the running context completes with no further + ## submitted work. + COMPUTE_UNIT_DEBUG = 3 ## [DEPRECATED] No longer supported. + +class zes_sched_mode_t(c_int): + def __str__(self): + return str(zes_sched_mode_v(self.value)) + + +############################################################################### +## @brief Properties related to scheduler component +class zes_sched_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("onSubdevice", ze_bool_t), ## [out] True if this resource is located on a sub-device; false means + ## that the resource is on the device of the calling Sysman handle + ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device + ("canControl", ze_bool_t), ## [out] Software can change the scheduler component configuration + ## assuming the user has permissions. + ("engines", zes_engine_type_flags_t), ## [out] Bitfield of accelerator engine types that are managed by this + ## scheduler component. Note that there can be more than one scheduler + ## component for the same type of accelerator engine. + ("supportedModes", c_ulong) ## [out] Bitfield of scheduler modes that can be configured for this + ## scheduler component (bitfield of 1<<::zes_sched_mode_t). + ] + +############################################################################### +## @brief Disable forward progress guard timeout. +ZES_SCHED_WATCHDOG_DISABLE = (~(0ULL)) + +############################################################################### +## @brief Configuration for timeout scheduler mode (::ZES_SCHED_MODE_TIMEOUT) +class zes_sched_timeout_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("watchdogTimeout", c_ulonglong) ## [in,out] The maximum time in microseconds that the scheduler will wait + ## for a batch of work submitted to a hardware engine to complete or to + ## be preempted so as to run another context. + ## If this time is exceeded, the hardware engine is reset and the context terminated. + ## If set to ::ZES_SCHED_WATCHDOG_DISABLE, a running workload can run as + ## long as it wants without being terminated, but preemption attempts to + ## run other contexts are permitted but not enforced. + ] + +############################################################################### +## @brief Configuration for timeslice scheduler mode +## (::ZES_SCHED_MODE_TIMESLICE) +class zes_sched_timeslice_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("interval", c_ulonglong), ## [in,out] The average interval in microseconds that a submission for a + ## context will run on a hardware engine before being preempted out to + ## run a pending submission for another context. + ("yieldTimeout", c_ulonglong) ## [in,out] The maximum time in microseconds that the scheduler will wait + ## to preempt a workload running on an engine before deciding to reset + ## the hardware engine and terminating the associated context. + ] + +############################################################################### +## @brief Standby hardware components +class zes_standby_type_v(IntEnum): + GLOBAL = 0 ## Control the overall standby policy of the device/sub-device + +class zes_standby_type_t(c_int): + def __str__(self): + return str(zes_standby_type_v(self.value)) + + +############################################################################### +## @brief Standby hardware component properties +class zes_standby_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("type", zes_standby_type_t), ## [out] Which standby hardware component this controls + ("onSubdevice", ze_bool_t), ## [out] True if the resource is located on a sub-device; false means + ## that the resource is on the device of the calling Sysman handle + ("subdeviceId", c_ulong) ## [out] If onSubdevice is true, this gives the ID of the sub-device + ] + +############################################################################### +## @brief Standby promotion modes +class zes_standby_promo_mode_v(IntEnum): + DEFAULT = 0 ## Best compromise between performance and energy savings. + NEVER = 1 ## The device/component will never shutdown. This can improve performance + ## but uses more energy. + +class zes_standby_promo_mode_t(c_int): + def __str__(self): + return str(zes_standby_promo_mode_v(self.value)) + + +############################################################################### +## @brief Temperature sensors +class zes_temp_sensors_v(IntEnum): + GLOBAL = 0 ## The maximum temperature across all device sensors + GPU = 1 ## The maximum temperature across all sensors in the GPU + MEMORY = 2 ## The maximum temperature across all sensors in the local memory + GLOBAL_MIN = 3 ## The minimum temperature across all device sensors + GPU_MIN = 4 ## The minimum temperature across all sensors in the GPU + MEMORY_MIN = 5 ## The minimum temperature across all sensors in the local device memory + GPU_BOARD = 6 ## The maximum temperature across all sensors in the GPU Board + GPU_BOARD_MIN = 7 ## The minimum temperature across all sensors in the GPU Board + VOLTAGE_REGULATOR = 8 ## The maximum temperature across all sensors in the Voltage Regulator + +class zes_temp_sensors_t(c_int): + def __str__(self): + return str(zes_temp_sensors_v(self.value)) + + +############################################################################### +## @brief Temperature sensor properties +class zes_temp_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("type", zes_temp_sensors_t), ## [out] Which part of the device the temperature sensor measures + ("onSubdevice", ze_bool_t), ## [out] True if the resource is located on a sub-device; false means + ## that the resource is on the device of the calling Sysman handle + ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device + ("maxTemperature", c_double), ## [out] Will contain the maximum temperature for the specific device in + ## degrees Celsius. + ("isCriticalTempSupported", ze_bool_t), ## [out] Indicates if the critical temperature event + ## ::ZES_EVENT_TYPE_FLAG_TEMP_CRITICAL is supported + ("isThreshold1Supported", ze_bool_t), ## [out] Indicates if the temperature threshold 1 event + ## ::ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD1 is supported + ("isThreshold2Supported", ze_bool_t) ## [out] Indicates if the temperature threshold 2 event + ## ::ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD2 is supported + ] + +############################################################################### +## @brief Temperature sensor threshold +class zes_temp_threshold_t(Structure): + _fields_ = [ + ("enableLowToHigh", ze_bool_t), ## [in,out] Trigger an event when the temperature crosses from below the + ## threshold to above. + ("enableHighToLow", ze_bool_t), ## [in,out] Trigger an event when the temperature crosses from above the + ## threshold to below. + ("threshold", c_double) ## [in,out] The threshold in degrees Celsius. + ] + +############################################################################### +## @brief Temperature configuration - which events should be triggered and the +## trigger conditions. +class zes_temp_config_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("enableCritical", ze_bool_t), ## [in,out] Indicates if event ::ZES_EVENT_TYPE_FLAG_TEMP_CRITICAL should + ## be triggered by the driver. + ("threshold1", zes_temp_threshold_t), ## [in,out] Configuration controlling if and when event + ## ::ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD1 should be triggered by the + ## driver. + ("threshold2", zes_temp_threshold_t) ## [in,out] Configuration controlling if and when event + ## ::ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD2 should be triggered by the + ## driver. + ] + +############################################################################### +## @brief Device ECC default properties Extension Name +ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_NAME = "ZES_extension_device_ecc_default_properties" + +############################################################################### +## @brief Device ECC default properties Extension Version(s) +class zes_device_ecc_default_properties_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class zes_device_ecc_default_properties_ext_version_t(c_int): + def __str__(self): + return str(zes_device_ecc_default_properties_ext_version_v(self.value)) + + +############################################################################### +## @brief This structure may be passed to ::zesDeviceGetEccState as pNext member +## of ::zes_device_ecc_properties_t. +class zes_device_ecc_default_properties_ext_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("defaultState", zes_device_ecc_state_t) ## [out] Default ECC state + ] + +############################################################################### +## @brief PCI Link Speed Downgrade Extension Name +ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_NAME = "ZES_extension_pci_link_speed_downgrade" + +############################################################################### +## @brief PCI Link Speed Downgrade Extension Version(s) +class zes_pci_link_speed_downgrade_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class zes_pci_link_speed_downgrade_ext_version_t(c_int): + def __str__(self): + return str(zes_pci_link_speed_downgrade_ext_version_v(self.value)) + + +############################################################################### +## @brief Query PCIe downgrade status. +## +## @details +## - This structure can be passed in the 'pNext' of ::zes_pci_state_t +class zes_pci_link_speed_downgrade_ext_state_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("pciLinkSpeedDowngradeStatus", ze_bool_t) ## [out] Returns the current PCIe downgrade status. + ] + +############################################################################### +## @brief Query PCIe downgrade capability. +## +## @details +## - This structure can be passed in the 'pNext' of ::zes_pci_properties_t +class zes_pci_link_speed_downgrade_ext_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("pciLinkSpeedUpdateCapable", ze_bool_t), ## [out] Returns if PCIe downgrade capability is available. + ("maxPciGenSupported", c_int32_t) ## [out] Returns the max supported PCIe generation of the device. -1 + ## indicates the information is not available + ] + +############################################################################### +## @brief Power Limits Extension Name +ZES_POWER_LIMITS_EXT_NAME = "ZES_extension_power_limits" + +############################################################################### +## @brief Power Limits Extension Version(s) +class zes_power_limits_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class zes_power_limits_ext_version_t(c_int): + def __str__(self): + return str(zes_power_limits_ext_version_v(self.value)) + + +############################################################################### +## @brief Device power/current limit descriptor. +class zes_power_limit_ext_desc_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("level", zes_power_level_t), ## [in,out] duration type over which the power draw is measured, i.e. + ## sustained, burst, peak, or critical. + ("source", zes_power_source_t), ## [out] source of power used by the system, i.e. AC or DC. + ("limitUnit", zes_limit_unit_t), ## [out] unit used for specifying limit, i.e. current units (milliamps) + ## or power units (milliwatts). + ("enabledStateLocked", ze_bool_t), ## [out] indicates if the power limit state (enabled/ignored) can be set + ## (false) or is locked (true). + ("enabled", ze_bool_t), ## [in,out] indicates if the limit is enabled (true) or ignored (false). + ## If enabledStateIsLocked is True, this value is ignored. + ("intervalValueLocked", ze_bool_t), ## [out] indicates if the interval can be modified (false) or is fixed + ## (true). + ("interval", c_int32_t), ## [in,out] power averaging window in milliseconds. If + ## intervalValueLocked is true, this value is ignored. + ("limitValueLocked", ze_bool_t), ## [out] indicates if the limit can be set (false) or if the limit is + ## fixed (true). + ("limit", c_int32_t) ## [in,out] limit value. If limitValueLocked is true, this value is + ## ignored. The value should be provided in the unit specified by + ## limitUnit. + ] + +############################################################################### +## @brief Extension properties related to device power settings +## +## @details +## - This structure may be returned from ::zesPowerGetProperties via the +## `pNext` member of ::zes_power_properties_t. +## - This structure may also be returned from ::zesPowerGetProperties via +## the `pNext` member of ::zes_power_ext_properties_t +## - Used for determining the power domain level, i.e. card-level v/s +## package-level v/s stack-level & the factory default power limits. +class zes_power_ext_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("domain", zes_power_domain_t), ## [out] domain that the power limit belongs to. + ("defaultLimit", POINTER(zes_power_limit_ext_desc_t)) ## [out] the factory default limit of the part. + ] + +############################################################################### +## @brief Engine Activity Extension Name +ZES_ENGINE_ACTIVITY_EXT_NAME = "ZES_extension_engine_activity" + +############################################################################### +## @brief Engine Activity Extension Version(s) +class zes_engine_activity_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class zes_engine_activity_ext_version_t(c_int): + def __str__(self): + return str(zes_engine_activity_ext_version_v(self.value)) + + +############################################################################### +## @brief Extension properties related to Engine Groups +## +## @details +## - This structure may be passed to ::zesEngineGetProperties by having the +## pNext member of ::zes_engine_properties_t point at this struct. +## - Used for SRIOV per Virtual Function device utilization by +## ::zes_engine_group_t +class zes_engine_ext_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("countOfVirtualFunctionInstance", c_ulong) ## [out] Number of Virtual Function(VF) instances associated with engine + ## to monitor the utilization of hardware across all Virtual Function + ## from a Physical Function (PF) instance. + ## These VF-by-VF views should provide engine group and individual engine + ## level granularity. + ## This count represents the number of VF instances that are actively + ## using the resource represented by the engine handle. + ] + +############################################################################### +## @brief RAS Get State Extension Name +ZES_RAS_GET_STATE_EXP_NAME = "ZES_extension_ras_state" + +############################################################################### +## @brief RAS Get State Extension Version(s) +class zes_ras_state_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class zes_ras_state_exp_version_t(c_int): + def __str__(self): + return str(zes_ras_state_exp_version_v(self.value)) + + +############################################################################### +## @brief RAS error categories +class zes_ras_error_category_exp_v(IntEnum): + RESET = 0 ## The number of accelerator engine resets attempted by the driver + PROGRAMMING_ERRORS = 1 ## The number of hardware exceptions generated by the way workloads have + ## programmed the hardware + DRIVER_ERRORS = 2 ## The number of low level driver communication errors have occurred + COMPUTE_ERRORS = 3 ## The number of errors that have occurred in the compute accelerator + ## hardware + NON_COMPUTE_ERRORS = 4 ## The number of errors that have occurred in the fixed-function + ## accelerator hardware + CACHE_ERRORS = 5 ## The number of errors that have occurred in caches (L1/L3/register + ## file/shared local memory/sampler) + DISPLAY_ERRORS = 6 ## The number of errors that have occurred in the display + MEMORY_ERRORS = 7 ## The number of errors that have occurred in Memory + SCALE_ERRORS = 8 ## The number of errors that have occurred in Scale Fabric + L3FABRIC_ERRORS = 9 ## The number of errors that have occurred in L3 Fabric + +class zes_ras_error_category_exp_t(c_int): + def __str__(self): + return str(zes_ras_error_category_exp_v(self.value)) + + +############################################################################### +## @brief Extension structure for providing RAS error counters for different +## error sets +class zes_ras_state_exp_t(Structure): + _fields_ = [ + ("category", zes_ras_error_category_exp_t), ## [out] category for which error counter is provided. + ("errorCounter", c_ulonglong) ## [out] Current value of RAS counter for specific error category. + ] + +############################################################################### +## @brief Memory State Extension Name +ZES_MEM_PAGE_OFFLINE_STATE_EXP_NAME = "ZES_extension_mem_state" + +############################################################################### +## @brief Memory State Extension Version(s) +class zes_mem_page_offline_state_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class zes_mem_page_offline_state_exp_version_t(c_int): + def __str__(self): + return str(zes_mem_page_offline_state_exp_version_v(self.value)) + + +############################################################################### +## @brief Extension properties for Memory State +## +## @details +## - This structure may be returned from ::zesMemoryGetState via the +## `pNext` member of ::zes_mem_state_t +## - These additional parameters get Memory Page Offline Metrics +class zes_mem_page_offline_state_exp_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("memoryPageOffline", c_ulong), ## [out] Returns the number of Memory Pages Offline + ("maxMemoryPageOffline", c_ulong) ## [out] Returns the Allowed Memory Pages Offline + ] + +############################################################################### +## @brief Memory Bandwidth Counter Valid Bits Extension Name +ZES_MEMORY_BANDWIDTH_COUNTER_BITS_EXP_PROPERTIES_NAME = "ZES_extension_mem_bandwidth_counter_bits_properties" + +############################################################################### +## @brief Memory Bandwidth Counter Valid Bits Extension Version(s) +class zes_mem_bandwidth_counter_bits_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class zes_mem_bandwidth_counter_bits_exp_version_t(c_int): + def __str__(self): + return str(zes_mem_bandwidth_counter_bits_exp_version_v(self.value)) + + +############################################################################### +## @brief Extension properties for reporting valid bit count for memory +## bandwidth counter value +## +## @details +## - Number of valid read and write counter bits of memory bandwidth +## - This structure may be returned from ::zesMemoryGetProperties via the +## `pNext` member of ::zes_mem_properties_t. +## - Used for denoting number of valid bits in the counter value returned +## in ::zes_mem_bandwidth_t. +class zes_mem_bandwidth_counter_bits_exp_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("validBitsCount", c_ulong) ## [out] Returns the number of valid bits in the counter values + ] + +############################################################################### +## @brief Power Domain Properties Name +ZES_POWER_DOMAIN_PROPERTIES_EXP_NAME = "ZES_extension_power_domain_properties" + +############################################################################### +## @brief Power Domain Properties Extension Version(s) +class zes_power_domain_properties_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class zes_power_domain_properties_exp_version_t(c_int): + def __str__(self): + return str(zes_power_domain_properties_exp_version_v(self.value)) + + +############################################################################### +## @brief Extension structure for providing power domain information associated +## with a power handle +## +## @details +## - This structure may be returned from ::zesPowerGetProperties via the +## `pNext` member of ::zes_power_properties_t. +## - Used for associating a power handle with a power domain. +class zes_power_domain_exp_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("powerDomain", zes_power_domain_t) ## [out] Power domain associated with the power handle. + ] + +############################################################################### +## @brief Firmware security version +ZES_FIRMWARE_SECURITY_VERSION_EXP_NAME = "ZES_experimental_firmware_security_version" + +############################################################################### +## @brief Firmware security version Extension Version(s) +class zes_firmware_security_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class zes_firmware_security_exp_version_t(c_int): + def __str__(self): + return str(zes_firmware_security_exp_version_v(self.value)) + + +############################################################################### +## @brief Sysman Device Mapping Extension Name +ZES_SYSMAN_DEVICE_MAPPING_EXP_NAME = "ZES_experimental_sysman_device_mapping" + +############################################################################### +## @brief Sysman Device Mapping Extension Version(s) +class zes_sysman_device_mapping_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class zes_sysman_device_mapping_exp_version_t(c_int): + def __str__(self): + return str(zes_sysman_device_mapping_exp_version_v(self.value)) + + +############################################################################### +## @brief Sub Device Properties +class zes_subdevice_exp_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("subdeviceId", c_ulong), ## [out] this gives the ID of the sub device + ("uuid", zes_uuid_t) ## [out] universal unique identifier of the sub device. + ] + +############################################################################### +## @brief Virtual Function Management Extension Name +ZES_VIRTUAL_FUNCTION_MANAGEMENT_EXP_NAME = "ZES_experimental_virtual_function_management" + +############################################################################### +## @brief Virtual Function Management Extension Version(s) +class zes_vf_management_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 (deprecated) + _1_1 = ZE_MAKE_VERSION( 1, 1 ) ## version 1.1 (deprecated) + _1_2 = ZE_MAKE_VERSION( 1, 2 ) ## version 1.2 + CURRENT = ZE_MAKE_VERSION( 1, 2 ) ## latest known version + +class zes_vf_management_exp_version_t(c_int): + def __str__(self): + return str(zes_vf_management_exp_version_v(self.value)) + + +############################################################################### +## @brief Virtual function memory types (deprecated) +class zes_vf_info_mem_type_exp_flags_v(IntEnum): + MEM_TYPE_SYSTEM = ZE_BIT(0) ## System memory + MEM_TYPE_DEVICE = ZE_BIT(1) ## Device local memory + +class zes_vf_info_mem_type_exp_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Virtual function utilization flag bit fields (deprecated) +class zes_vf_info_util_exp_flags_v(IntEnum): + INFO_NONE = ZE_BIT(0) ## No info associated with virtual function + INFO_MEM_CPU = ZE_BIT(1) ## System memory utilization associated with virtual function + INFO_MEM_GPU = ZE_BIT(2) ## Device memory utilization associated with virtual function + INFO_ENGINE = ZE_BIT(3) ## Engine utilization associated with virtual function + +class zes_vf_info_util_exp_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Virtual function management properties (deprecated) +class zes_vf_exp_properties_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("address", zes_pci_address_t), ## [out] Virtual function BDF address + ("uuid", zes_uuid_t), ## [out] universal unique identifier of the device + ("flags", zes_vf_info_util_exp_flags_t) ## [out] utilization flags available. May be 0 or a valid combination of + ## ::zes_vf_info_util_exp_flag_t. + ] + +############################################################################### +## @brief Provides memory utilization values for a virtual function (deprecated) +class zes_vf_util_mem_exp_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("memTypeFlags", zes_vf_info_mem_type_exp_flags_t), ## [out] Memory type flags. + ("free", c_ulonglong), ## [out] Free memory size in bytes. + ("size", c_ulonglong), ## [out] Total allocatable memory in bytes. + ("timestamp", c_ulonglong) ## [out] Wall clock time from VF when value was sampled. + ] + +############################################################################### +## @brief Provides engine utilization values for a virtual function (deprecated) +class zes_vf_util_engine_exp_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("type", zes_engine_group_t), ## [out] The engine group. + ("activeCounterValue", c_ulonglong), ## [out] Represents active counter. + ("samplingCounterValue", c_ulonglong), ## [out] Represents counter value when activeCounterValue was sampled. + ("timestamp", c_ulonglong) ## [out] Wall clock time when the activeCounterValue was sampled. + ] + +############################################################################### +## @brief Virtual function management capabilities (deprecated) +class zes_vf_exp_capabilities_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("address", zes_pci_address_t), ## [out] Virtual function BDF address + ("vfDeviceMemSize", c_ulong), ## [out] Virtual function memory size in kilo bytes + ("vfID", c_ulong) ## [out] Virtual Function ID + ] + +############################################################################### +## @brief Virtual function management capabilities +class zes_vf_exp2_capabilities_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("address", zes_pci_address_t), ## [out] Virtual function BDF address + ("vfDeviceMemSize", c_ulonglong), ## [out] Virtual function memory size in bytes + ("vfID", c_ulong) ## [out] Virtual Function ID + ] + +############################################################################### +## @brief Provides memory utilization values for a virtual function +class zes_vf_util_mem_exp2_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("vfMemLocation", zes_mem_loc_t), ## [out] Location of this memory (system, device) + ("vfMemUtilized", c_ulonglong) ## [out] Utilized memory size in bytes. + ] + +############################################################################### +## @brief Provides engine utilization values for a virtual function +## +## @details +## - Percent utilization is calculated by taking two snapshots (s1, s2) and +## using the equation: %util = (s2.activeCounterValue - +## s1.activeCounterValue) / (s2.samplingCounterValue - +## s1.samplingCounterValue) +class zes_vf_util_engine_exp2_t(Structure): + _fields_ = [ + ("stype", zes_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("vfEngineType", zes_engine_group_t), ## [out] The engine group. + ("activeCounterValue", c_ulonglong), ## [out] Represents active counter. + ("samplingCounterValue", c_ulonglong) ## [out] Represents counter value when activeCounterValue was sampled. + ## Refer to the formulae above for calculating the utilization percent + ] + +############################################################################### +__use_win_types = "Windows" == platform.uname()[0] + +############################################################################### +## @brief Function-pointer for zesInit +if __use_win_types: + _zesInit_t = WINFUNCTYPE( ze_result_t, zes_init_flags_t ) +else: + _zesInit_t = CFUNCTYPE( ze_result_t, zes_init_flags_t ) + + +############################################################################### +## @brief Table of Global functions pointers +class _zes_global_dditable_t(Structure): + _fields_ = [ + ("pfnInit", c_void_p) ## _zesInit_t + ] + +############################################################################### +## @brief Function-pointer for zesDeviceGetProperties +if __use_win_types: + _zesDeviceGetProperties_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_device_properties_t) ) +else: + _zesDeviceGetProperties_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_device_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceGetState +if __use_win_types: + _zesDeviceGetState_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_device_state_t) ) +else: + _zesDeviceGetState_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_device_state_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceReset +if __use_win_types: + _zesDeviceReset_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, ze_bool_t ) +else: + _zesDeviceReset_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, ze_bool_t ) + +############################################################################### +## @brief Function-pointer for zesDeviceProcessesGetState +if __use_win_types: + _zesDeviceProcessesGetState_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_process_state_t) ) +else: + _zesDeviceProcessesGetState_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_process_state_t) ) + +############################################################################### +## @brief Function-pointer for zesDevicePciGetProperties +if __use_win_types: + _zesDevicePciGetProperties_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_pci_properties_t) ) +else: + _zesDevicePciGetProperties_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_pci_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesDevicePciGetState +if __use_win_types: + _zesDevicePciGetState_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_pci_state_t) ) +else: + _zesDevicePciGetState_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_pci_state_t) ) + +############################################################################### +## @brief Function-pointer for zesDevicePciGetBars +if __use_win_types: + _zesDevicePciGetBars_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_pci_bar_properties_t) ) +else: + _zesDevicePciGetBars_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_pci_bar_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesDevicePciGetStats +if __use_win_types: + _zesDevicePciGetStats_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_pci_stats_t) ) +else: + _zesDevicePciGetStats_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_pci_stats_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceEnumDiagnosticTestSuites +if __use_win_types: + _zesDeviceEnumDiagnosticTestSuites_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_diag_handle_t) ) +else: + _zesDeviceEnumDiagnosticTestSuites_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_diag_handle_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceEnumEngineGroups +if __use_win_types: + _zesDeviceEnumEngineGroups_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_engine_handle_t) ) +else: + _zesDeviceEnumEngineGroups_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_engine_handle_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceEventRegister +if __use_win_types: + _zesDeviceEventRegister_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, zes_event_type_flags_t ) +else: + _zesDeviceEventRegister_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, zes_event_type_flags_t ) + +############################################################################### +## @brief Function-pointer for zesDeviceEnumFabricPorts +if __use_win_types: + _zesDeviceEnumFabricPorts_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_fabric_port_handle_t) ) +else: + _zesDeviceEnumFabricPorts_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_fabric_port_handle_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceEnumFans +if __use_win_types: + _zesDeviceEnumFans_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_fan_handle_t) ) +else: + _zesDeviceEnumFans_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_fan_handle_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceEnumFirmwares +if __use_win_types: + _zesDeviceEnumFirmwares_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_firmware_handle_t) ) +else: + _zesDeviceEnumFirmwares_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_firmware_handle_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceEnumFrequencyDomains +if __use_win_types: + _zesDeviceEnumFrequencyDomains_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_freq_handle_t) ) +else: + _zesDeviceEnumFrequencyDomains_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_freq_handle_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceEnumLeds +if __use_win_types: + _zesDeviceEnumLeds_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_led_handle_t) ) +else: + _zesDeviceEnumLeds_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_led_handle_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceEnumMemoryModules +if __use_win_types: + _zesDeviceEnumMemoryModules_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_mem_handle_t) ) +else: + _zesDeviceEnumMemoryModules_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_mem_handle_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceEnumPerformanceFactorDomains +if __use_win_types: + _zesDeviceEnumPerformanceFactorDomains_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_perf_handle_t) ) +else: + _zesDeviceEnumPerformanceFactorDomains_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_perf_handle_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceEnumPowerDomains +if __use_win_types: + _zesDeviceEnumPowerDomains_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_pwr_handle_t) ) +else: + _zesDeviceEnumPowerDomains_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_pwr_handle_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceGetCardPowerDomain +if __use_win_types: + _zesDeviceGetCardPowerDomain_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_pwr_handle_t) ) +else: + _zesDeviceGetCardPowerDomain_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_pwr_handle_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceEnumPsus +if __use_win_types: + _zesDeviceEnumPsus_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_psu_handle_t) ) +else: + _zesDeviceEnumPsus_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_psu_handle_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceEnumRasErrorSets +if __use_win_types: + _zesDeviceEnumRasErrorSets_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_ras_handle_t) ) +else: + _zesDeviceEnumRasErrorSets_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_ras_handle_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceEnumSchedulers +if __use_win_types: + _zesDeviceEnumSchedulers_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_sched_handle_t) ) +else: + _zesDeviceEnumSchedulers_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_sched_handle_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceEnumStandbyDomains +if __use_win_types: + _zesDeviceEnumStandbyDomains_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_standby_handle_t) ) +else: + _zesDeviceEnumStandbyDomains_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_standby_handle_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceEnumTemperatureSensors +if __use_win_types: + _zesDeviceEnumTemperatureSensors_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_temp_handle_t) ) +else: + _zesDeviceEnumTemperatureSensors_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_temp_handle_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceEccAvailable +if __use_win_types: + _zesDeviceEccAvailable_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(ze_bool_t) ) +else: + _zesDeviceEccAvailable_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(ze_bool_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceEccConfigurable +if __use_win_types: + _zesDeviceEccConfigurable_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(ze_bool_t) ) +else: + _zesDeviceEccConfigurable_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(ze_bool_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceGetEccState +if __use_win_types: + _zesDeviceGetEccState_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_device_ecc_properties_t) ) +else: + _zesDeviceGetEccState_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_device_ecc_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceSetEccState +if __use_win_types: + _zesDeviceSetEccState_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_device_ecc_desc_t), POINTER(zes_device_ecc_properties_t) ) +else: + _zesDeviceSetEccState_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_device_ecc_desc_t), POINTER(zes_device_ecc_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceGet +if __use_win_types: + _zesDeviceGet_t = WINFUNCTYPE( ze_result_t, zes_driver_handle_t, POINTER(c_ulong), POINTER(zes_device_handle_t) ) +else: + _zesDeviceGet_t = CFUNCTYPE( ze_result_t, zes_driver_handle_t, POINTER(c_ulong), POINTER(zes_device_handle_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceSetOverclockWaiver +if __use_win_types: + _zesDeviceSetOverclockWaiver_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t ) +else: + _zesDeviceSetOverclockWaiver_t = CFUNCTYPE( ze_result_t, zes_device_handle_t ) + +############################################################################### +## @brief Function-pointer for zesDeviceGetOverclockDomains +if __use_win_types: + _zesDeviceGetOverclockDomains_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong) ) +else: + _zesDeviceGetOverclockDomains_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong) ) + +############################################################################### +## @brief Function-pointer for zesDeviceGetOverclockControls +if __use_win_types: + _zesDeviceGetOverclockControls_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, zes_overclock_domain_t, POINTER(c_ulong) ) +else: + _zesDeviceGetOverclockControls_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, zes_overclock_domain_t, POINTER(c_ulong) ) + +############################################################################### +## @brief Function-pointer for zesDeviceResetOverclockSettings +if __use_win_types: + _zesDeviceResetOverclockSettings_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, ze_bool_t ) +else: + _zesDeviceResetOverclockSettings_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, ze_bool_t ) + +############################################################################### +## @brief Function-pointer for zesDeviceReadOverclockState +if __use_win_types: + _zesDeviceReadOverclockState_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_overclock_mode_t), POINTER(ze_bool_t), POINTER(ze_bool_t), POINTER(zes_pending_action_t), POINTER(ze_bool_t) ) +else: + _zesDeviceReadOverclockState_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_overclock_mode_t), POINTER(ze_bool_t), POINTER(ze_bool_t), POINTER(zes_pending_action_t), POINTER(ze_bool_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceEnumOverclockDomains +if __use_win_types: + _zesDeviceEnumOverclockDomains_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_overclock_handle_t) ) +else: + _zesDeviceEnumOverclockDomains_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_overclock_handle_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceResetExt +if __use_win_types: + _zesDeviceResetExt_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_reset_properties_t) ) +else: + _zesDeviceResetExt_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_reset_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesDevicePciLinkSpeedUpdateExt +if __use_win_types: + _zesDevicePciLinkSpeedUpdateExt_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, ze_bool_t, POINTER(zes_device_action_t) ) +else: + _zesDevicePciLinkSpeedUpdateExt_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, ze_bool_t, POINTER(zes_device_action_t) ) + + +############################################################################### +## @brief Table of Device functions pointers +class _zes_device_dditable_t(Structure): + _fields_ = [ + ("pfnGetProperties", c_void_p), ## _zesDeviceGetProperties_t + ("pfnGetState", c_void_p), ## _zesDeviceGetState_t + ("pfnReset", c_void_p), ## _zesDeviceReset_t + ("pfnProcessesGetState", c_void_p), ## _zesDeviceProcessesGetState_t + ("pfnPciGetProperties", c_void_p), ## _zesDevicePciGetProperties_t + ("pfnPciGetState", c_void_p), ## _zesDevicePciGetState_t + ("pfnPciGetBars", c_void_p), ## _zesDevicePciGetBars_t + ("pfnPciGetStats", c_void_p), ## _zesDevicePciGetStats_t + ("pfnEnumDiagnosticTestSuites", c_void_p), ## _zesDeviceEnumDiagnosticTestSuites_t + ("pfnEnumEngineGroups", c_void_p), ## _zesDeviceEnumEngineGroups_t + ("pfnEventRegister", c_void_p), ## _zesDeviceEventRegister_t + ("pfnEnumFabricPorts", c_void_p), ## _zesDeviceEnumFabricPorts_t + ("pfnEnumFans", c_void_p), ## _zesDeviceEnumFans_t + ("pfnEnumFirmwares", c_void_p), ## _zesDeviceEnumFirmwares_t + ("pfnEnumFrequencyDomains", c_void_p), ## _zesDeviceEnumFrequencyDomains_t + ("pfnEnumLeds", c_void_p), ## _zesDeviceEnumLeds_t + ("pfnEnumMemoryModules", c_void_p), ## _zesDeviceEnumMemoryModules_t + ("pfnEnumPerformanceFactorDomains", c_void_p), ## _zesDeviceEnumPerformanceFactorDomains_t + ("pfnEnumPowerDomains", c_void_p), ## _zesDeviceEnumPowerDomains_t + ("pfnGetCardPowerDomain", c_void_p), ## _zesDeviceGetCardPowerDomain_t + ("pfnEnumPsus", c_void_p), ## _zesDeviceEnumPsus_t + ("pfnEnumRasErrorSets", c_void_p), ## _zesDeviceEnumRasErrorSets_t + ("pfnEnumSchedulers", c_void_p), ## _zesDeviceEnumSchedulers_t + ("pfnEnumStandbyDomains", c_void_p), ## _zesDeviceEnumStandbyDomains_t + ("pfnEnumTemperatureSensors", c_void_p), ## _zesDeviceEnumTemperatureSensors_t + ("pfnEccAvailable", c_void_p), ## _zesDeviceEccAvailable_t + ("pfnEccConfigurable", c_void_p), ## _zesDeviceEccConfigurable_t + ("pfnGetEccState", c_void_p), ## _zesDeviceGetEccState_t + ("pfnSetEccState", c_void_p), ## _zesDeviceSetEccState_t + ("pfnGet", c_void_p), ## _zesDeviceGet_t + ("pfnSetOverclockWaiver", c_void_p), ## _zesDeviceSetOverclockWaiver_t + ("pfnGetOverclockDomains", c_void_p), ## _zesDeviceGetOverclockDomains_t + ("pfnGetOverclockControls", c_void_p), ## _zesDeviceGetOverclockControls_t + ("pfnResetOverclockSettings", c_void_p), ## _zesDeviceResetOverclockSettings_t + ("pfnReadOverclockState", c_void_p), ## _zesDeviceReadOverclockState_t + ("pfnEnumOverclockDomains", c_void_p), ## _zesDeviceEnumOverclockDomains_t + ("pfnResetExt", c_void_p), ## _zesDeviceResetExt_t + ("pfnPciLinkSpeedUpdateExt", c_void_p) ## _zesDevicePciLinkSpeedUpdateExt_t + ] + +############################################################################### +## @brief Function-pointer for zesDeviceGetSubDevicePropertiesExp +if __use_win_types: + _zesDeviceGetSubDevicePropertiesExp_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_subdevice_exp_properties_t) ) +else: + _zesDeviceGetSubDevicePropertiesExp_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_subdevice_exp_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceEnumActiveVFExp +if __use_win_types: + _zesDeviceEnumActiveVFExp_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_vf_handle_t) ) +else: + _zesDeviceEnumActiveVFExp_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_vf_handle_t) ) + +############################################################################### +## @brief Function-pointer for zesDeviceEnumEnabledVFExp +if __use_win_types: + _zesDeviceEnumEnabledVFExp_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_vf_handle_t) ) +else: + _zesDeviceEnumEnabledVFExp_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_vf_handle_t) ) + + +############################################################################### +## @brief Table of DeviceExp functions pointers +class _zes_device_exp_dditable_t(Structure): + _fields_ = [ + ("pfnGetSubDevicePropertiesExp", c_void_p), ## _zesDeviceGetSubDevicePropertiesExp_t + ("pfnEnumActiveVFExp", c_void_p), ## _zesDeviceEnumActiveVFExp_t + ("pfnEnumEnabledVFExp", c_void_p) ## _zesDeviceEnumEnabledVFExp_t + ] + +############################################################################### +## @brief Function-pointer for zesDriverEventListen +if __use_win_types: + _zesDriverEventListen_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, c_ulong, c_ulong, POINTER(zes_device_handle_t), POINTER(c_ulong), POINTER(zes_event_type_flags_t) ) +else: + _zesDriverEventListen_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, c_ulong, c_ulong, POINTER(zes_device_handle_t), POINTER(c_ulong), POINTER(zes_event_type_flags_t) ) + +############################################################################### +## @brief Function-pointer for zesDriverEventListenEx +if __use_win_types: + _zesDriverEventListenEx_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, c_ulonglong, c_ulong, POINTER(zes_device_handle_t), POINTER(c_ulong), POINTER(zes_event_type_flags_t) ) +else: + _zesDriverEventListenEx_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, c_ulonglong, c_ulong, POINTER(zes_device_handle_t), POINTER(c_ulong), POINTER(zes_event_type_flags_t) ) + +############################################################################### +## @brief Function-pointer for zesDriverGet +if __use_win_types: + _zesDriverGet_t = WINFUNCTYPE( ze_result_t, POINTER(c_ulong), POINTER(zes_driver_handle_t) ) +else: + _zesDriverGet_t = CFUNCTYPE( ze_result_t, POINTER(c_ulong), POINTER(zes_driver_handle_t) ) + +############################################################################### +## @brief Function-pointer for zesDriverGetExtensionProperties +if __use_win_types: + _zesDriverGetExtensionProperties_t = WINFUNCTYPE( ze_result_t, zes_driver_handle_t, POINTER(c_ulong), POINTER(zes_driver_extension_properties_t) ) +else: + _zesDriverGetExtensionProperties_t = CFUNCTYPE( ze_result_t, zes_driver_handle_t, POINTER(c_ulong), POINTER(zes_driver_extension_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesDriverGetExtensionFunctionAddress +if __use_win_types: + _zesDriverGetExtensionFunctionAddress_t = WINFUNCTYPE( ze_result_t, zes_driver_handle_t, c_char_p, POINTER(c_void_p) ) +else: + _zesDriverGetExtensionFunctionAddress_t = CFUNCTYPE( ze_result_t, zes_driver_handle_t, c_char_p, POINTER(c_void_p) ) + + +############################################################################### +## @brief Table of Driver functions pointers +class _zes_driver_dditable_t(Structure): + _fields_ = [ + ("pfnEventListen", c_void_p), ## _zesDriverEventListen_t + ("pfnEventListenEx", c_void_p), ## _zesDriverEventListenEx_t + ("pfnGet", c_void_p), ## _zesDriverGet_t + ("pfnGetExtensionProperties", c_void_p), ## _zesDriverGetExtensionProperties_t + ("pfnGetExtensionFunctionAddress", c_void_p) ## _zesDriverGetExtensionFunctionAddress_t + ] + +############################################################################### +## @brief Function-pointer for zesDriverGetDeviceByUuidExp +if __use_win_types: + _zesDriverGetDeviceByUuidExp_t = WINFUNCTYPE( ze_result_t, zes_driver_handle_t, zes_uuid_t, POINTER(zes_device_handle_t), POINTER(ze_bool_t), POINTER(c_ulong) ) +else: + _zesDriverGetDeviceByUuidExp_t = CFUNCTYPE( ze_result_t, zes_driver_handle_t, zes_uuid_t, POINTER(zes_device_handle_t), POINTER(ze_bool_t), POINTER(c_ulong) ) + + +############################################################################### +## @brief Table of DriverExp functions pointers +class _zes_driver_exp_dditable_t(Structure): + _fields_ = [ + ("pfnGetDeviceByUuidExp", c_void_p) ## _zesDriverGetDeviceByUuidExp_t + ] + +############################################################################### +## @brief Function-pointer for zesOverclockGetDomainProperties +if __use_win_types: + _zesOverclockGetDomainProperties_t = WINFUNCTYPE( ze_result_t, zes_overclock_handle_t, POINTER(zes_overclock_properties_t) ) +else: + _zesOverclockGetDomainProperties_t = CFUNCTYPE( ze_result_t, zes_overclock_handle_t, POINTER(zes_overclock_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesOverclockGetDomainVFProperties +if __use_win_types: + _zesOverclockGetDomainVFProperties_t = WINFUNCTYPE( ze_result_t, zes_overclock_handle_t, POINTER(zes_vf_property_t) ) +else: + _zesOverclockGetDomainVFProperties_t = CFUNCTYPE( ze_result_t, zes_overclock_handle_t, POINTER(zes_vf_property_t) ) + +############################################################################### +## @brief Function-pointer for zesOverclockGetDomainControlProperties +if __use_win_types: + _zesOverclockGetDomainControlProperties_t = WINFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_overclock_control_t, POINTER(zes_control_property_t) ) +else: + _zesOverclockGetDomainControlProperties_t = CFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_overclock_control_t, POINTER(zes_control_property_t) ) + +############################################################################### +## @brief Function-pointer for zesOverclockGetControlCurrentValue +if __use_win_types: + _zesOverclockGetControlCurrentValue_t = WINFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_overclock_control_t, POINTER(c_double) ) +else: + _zesOverclockGetControlCurrentValue_t = CFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_overclock_control_t, POINTER(c_double) ) + +############################################################################### +## @brief Function-pointer for zesOverclockGetControlPendingValue +if __use_win_types: + _zesOverclockGetControlPendingValue_t = WINFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_overclock_control_t, POINTER(c_double) ) +else: + _zesOverclockGetControlPendingValue_t = CFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_overclock_control_t, POINTER(c_double) ) + +############################################################################### +## @brief Function-pointer for zesOverclockSetControlUserValue +if __use_win_types: + _zesOverclockSetControlUserValue_t = WINFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_overclock_control_t, c_double, POINTER(zes_pending_action_t) ) +else: + _zesOverclockSetControlUserValue_t = CFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_overclock_control_t, c_double, POINTER(zes_pending_action_t) ) + +############################################################################### +## @brief Function-pointer for zesOverclockGetControlState +if __use_win_types: + _zesOverclockGetControlState_t = WINFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_overclock_control_t, POINTER(zes_control_state_t), POINTER(zes_pending_action_t) ) +else: + _zesOverclockGetControlState_t = CFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_overclock_control_t, POINTER(zes_control_state_t), POINTER(zes_pending_action_t) ) + +############################################################################### +## @brief Function-pointer for zesOverclockGetVFPointValues +if __use_win_types: + _zesOverclockGetVFPointValues_t = WINFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_vf_type_t, zes_vf_array_type_t, c_ulong, POINTER(c_ulong) ) +else: + _zesOverclockGetVFPointValues_t = CFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_vf_type_t, zes_vf_array_type_t, c_ulong, POINTER(c_ulong) ) + +############################################################################### +## @brief Function-pointer for zesOverclockSetVFPointValues +if __use_win_types: + _zesOverclockSetVFPointValues_t = WINFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_vf_type_t, c_ulong, c_ulong ) +else: + _zesOverclockSetVFPointValues_t = CFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_vf_type_t, c_ulong, c_ulong ) + + +############################################################################### +## @brief Table of Overclock functions pointers +class _zes_overclock_dditable_t(Structure): + _fields_ = [ + ("pfnGetDomainProperties", c_void_p), ## _zesOverclockGetDomainProperties_t + ("pfnGetDomainVFProperties", c_void_p), ## _zesOverclockGetDomainVFProperties_t + ("pfnGetDomainControlProperties", c_void_p), ## _zesOverclockGetDomainControlProperties_t + ("pfnGetControlCurrentValue", c_void_p), ## _zesOverclockGetControlCurrentValue_t + ("pfnGetControlPendingValue", c_void_p), ## _zesOverclockGetControlPendingValue_t + ("pfnSetControlUserValue", c_void_p), ## _zesOverclockSetControlUserValue_t + ("pfnGetControlState", c_void_p), ## _zesOverclockGetControlState_t + ("pfnGetVFPointValues", c_void_p), ## _zesOverclockGetVFPointValues_t + ("pfnSetVFPointValues", c_void_p) ## _zesOverclockSetVFPointValues_t + ] + +############################################################################### +## @brief Function-pointer for zesSchedulerGetProperties +if __use_win_types: + _zesSchedulerGetProperties_t = WINFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(zes_sched_properties_t) ) +else: + _zesSchedulerGetProperties_t = CFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(zes_sched_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesSchedulerGetCurrentMode +if __use_win_types: + _zesSchedulerGetCurrentMode_t = WINFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(zes_sched_mode_t) ) +else: + _zesSchedulerGetCurrentMode_t = CFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(zes_sched_mode_t) ) + +############################################################################### +## @brief Function-pointer for zesSchedulerGetTimeoutModeProperties +if __use_win_types: + _zesSchedulerGetTimeoutModeProperties_t = WINFUNCTYPE( ze_result_t, zes_sched_handle_t, ze_bool_t, POINTER(zes_sched_timeout_properties_t) ) +else: + _zesSchedulerGetTimeoutModeProperties_t = CFUNCTYPE( ze_result_t, zes_sched_handle_t, ze_bool_t, POINTER(zes_sched_timeout_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesSchedulerGetTimesliceModeProperties +if __use_win_types: + _zesSchedulerGetTimesliceModeProperties_t = WINFUNCTYPE( ze_result_t, zes_sched_handle_t, ze_bool_t, POINTER(zes_sched_timeslice_properties_t) ) +else: + _zesSchedulerGetTimesliceModeProperties_t = CFUNCTYPE( ze_result_t, zes_sched_handle_t, ze_bool_t, POINTER(zes_sched_timeslice_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesSchedulerSetTimeoutMode +if __use_win_types: + _zesSchedulerSetTimeoutMode_t = WINFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(zes_sched_timeout_properties_t), POINTER(ze_bool_t) ) +else: + _zesSchedulerSetTimeoutMode_t = CFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(zes_sched_timeout_properties_t), POINTER(ze_bool_t) ) + +############################################################################### +## @brief Function-pointer for zesSchedulerSetTimesliceMode +if __use_win_types: + _zesSchedulerSetTimesliceMode_t = WINFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(zes_sched_timeslice_properties_t), POINTER(ze_bool_t) ) +else: + _zesSchedulerSetTimesliceMode_t = CFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(zes_sched_timeslice_properties_t), POINTER(ze_bool_t) ) + +############################################################################### +## @brief Function-pointer for zesSchedulerSetExclusiveMode +if __use_win_types: + _zesSchedulerSetExclusiveMode_t = WINFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(ze_bool_t) ) +else: + _zesSchedulerSetExclusiveMode_t = CFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(ze_bool_t) ) + +############################################################################### +## @brief Function-pointer for zesSchedulerSetComputeUnitDebugMode +if __use_win_types: + _zesSchedulerSetComputeUnitDebugMode_t = WINFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(ze_bool_t) ) +else: + _zesSchedulerSetComputeUnitDebugMode_t = CFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(ze_bool_t) ) + + +############################################################################### +## @brief Table of Scheduler functions pointers +class _zes_scheduler_dditable_t(Structure): + _fields_ = [ + ("pfnGetProperties", c_void_p), ## _zesSchedulerGetProperties_t + ("pfnGetCurrentMode", c_void_p), ## _zesSchedulerGetCurrentMode_t + ("pfnGetTimeoutModeProperties", c_void_p), ## _zesSchedulerGetTimeoutModeProperties_t + ("pfnGetTimesliceModeProperties", c_void_p), ## _zesSchedulerGetTimesliceModeProperties_t + ("pfnSetTimeoutMode", c_void_p), ## _zesSchedulerSetTimeoutMode_t + ("pfnSetTimesliceMode", c_void_p), ## _zesSchedulerSetTimesliceMode_t + ("pfnSetExclusiveMode", c_void_p), ## _zesSchedulerSetExclusiveMode_t + ("pfnSetComputeUnitDebugMode", c_void_p) ## _zesSchedulerSetComputeUnitDebugMode_t + ] + +############################################################################### +## @brief Function-pointer for zesPerformanceFactorGetProperties +if __use_win_types: + _zesPerformanceFactorGetProperties_t = WINFUNCTYPE( ze_result_t, zes_perf_handle_t, POINTER(zes_perf_properties_t) ) +else: + _zesPerformanceFactorGetProperties_t = CFUNCTYPE( ze_result_t, zes_perf_handle_t, POINTER(zes_perf_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesPerformanceFactorGetConfig +if __use_win_types: + _zesPerformanceFactorGetConfig_t = WINFUNCTYPE( ze_result_t, zes_perf_handle_t, POINTER(c_double) ) +else: + _zesPerformanceFactorGetConfig_t = CFUNCTYPE( ze_result_t, zes_perf_handle_t, POINTER(c_double) ) + +############################################################################### +## @brief Function-pointer for zesPerformanceFactorSetConfig +if __use_win_types: + _zesPerformanceFactorSetConfig_t = WINFUNCTYPE( ze_result_t, zes_perf_handle_t, c_double ) +else: + _zesPerformanceFactorSetConfig_t = CFUNCTYPE( ze_result_t, zes_perf_handle_t, c_double ) + + +############################################################################### +## @brief Table of PerformanceFactor functions pointers +class _zes_performance_factor_dditable_t(Structure): + _fields_ = [ + ("pfnGetProperties", c_void_p), ## _zesPerformanceFactorGetProperties_t + ("pfnGetConfig", c_void_p), ## _zesPerformanceFactorGetConfig_t + ("pfnSetConfig", c_void_p) ## _zesPerformanceFactorSetConfig_t + ] + +############################################################################### +## @brief Function-pointer for zesPowerGetProperties +if __use_win_types: + _zesPowerGetProperties_t = WINFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(zes_power_properties_t) ) +else: + _zesPowerGetProperties_t = CFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(zes_power_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesPowerGetEnergyCounter +if __use_win_types: + _zesPowerGetEnergyCounter_t = WINFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(zes_power_energy_counter_t) ) +else: + _zesPowerGetEnergyCounter_t = CFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(zes_power_energy_counter_t) ) + +############################################################################### +## @brief Function-pointer for zesPowerGetLimits +if __use_win_types: + _zesPowerGetLimits_t = WINFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(zes_power_sustained_limit_t), POINTER(zes_power_burst_limit_t), POINTER(zes_power_peak_limit_t) ) +else: + _zesPowerGetLimits_t = CFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(zes_power_sustained_limit_t), POINTER(zes_power_burst_limit_t), POINTER(zes_power_peak_limit_t) ) + +############################################################################### +## @brief Function-pointer for zesPowerSetLimits +if __use_win_types: + _zesPowerSetLimits_t = WINFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(zes_power_sustained_limit_t), POINTER(zes_power_burst_limit_t), POINTER(zes_power_peak_limit_t) ) +else: + _zesPowerSetLimits_t = CFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(zes_power_sustained_limit_t), POINTER(zes_power_burst_limit_t), POINTER(zes_power_peak_limit_t) ) + +############################################################################### +## @brief Function-pointer for zesPowerGetEnergyThreshold +if __use_win_types: + _zesPowerGetEnergyThreshold_t = WINFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(zes_energy_threshold_t) ) +else: + _zesPowerGetEnergyThreshold_t = CFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(zes_energy_threshold_t) ) + +############################################################################### +## @brief Function-pointer for zesPowerSetEnergyThreshold +if __use_win_types: + _zesPowerSetEnergyThreshold_t = WINFUNCTYPE( ze_result_t, zes_pwr_handle_t, c_double ) +else: + _zesPowerSetEnergyThreshold_t = CFUNCTYPE( ze_result_t, zes_pwr_handle_t, c_double ) + +############################################################################### +## @brief Function-pointer for zesPowerGetLimitsExt +if __use_win_types: + _zesPowerGetLimitsExt_t = WINFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(c_ulong), POINTER(zes_power_limit_ext_desc_t) ) +else: + _zesPowerGetLimitsExt_t = CFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(c_ulong), POINTER(zes_power_limit_ext_desc_t) ) + +############################################################################### +## @brief Function-pointer for zesPowerSetLimitsExt +if __use_win_types: + _zesPowerSetLimitsExt_t = WINFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(c_ulong), POINTER(zes_power_limit_ext_desc_t) ) +else: + _zesPowerSetLimitsExt_t = CFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(c_ulong), POINTER(zes_power_limit_ext_desc_t) ) + + +############################################################################### +## @brief Table of Power functions pointers +class _zes_power_dditable_t(Structure): + _fields_ = [ + ("pfnGetProperties", c_void_p), ## _zesPowerGetProperties_t + ("pfnGetEnergyCounter", c_void_p), ## _zesPowerGetEnergyCounter_t + ("pfnGetLimits", c_void_p), ## _zesPowerGetLimits_t + ("pfnSetLimits", c_void_p), ## _zesPowerSetLimits_t + ("pfnGetEnergyThreshold", c_void_p), ## _zesPowerGetEnergyThreshold_t + ("pfnSetEnergyThreshold", c_void_p), ## _zesPowerSetEnergyThreshold_t + ("pfnGetLimitsExt", c_void_p), ## _zesPowerGetLimitsExt_t + ("pfnSetLimitsExt", c_void_p) ## _zesPowerSetLimitsExt_t + ] + +############################################################################### +## @brief Function-pointer for zesFrequencyGetProperties +if __use_win_types: + _zesFrequencyGetProperties_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_freq_properties_t) ) +else: + _zesFrequencyGetProperties_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_freq_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesFrequencyGetAvailableClocks +if __use_win_types: + _zesFrequencyGetAvailableClocks_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(c_ulong), POINTER(c_double) ) +else: + _zesFrequencyGetAvailableClocks_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(c_ulong), POINTER(c_double) ) + +############################################################################### +## @brief Function-pointer for zesFrequencyGetRange +if __use_win_types: + _zesFrequencyGetRange_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_freq_range_t) ) +else: + _zesFrequencyGetRange_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_freq_range_t) ) + +############################################################################### +## @brief Function-pointer for zesFrequencySetRange +if __use_win_types: + _zesFrequencySetRange_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_freq_range_t) ) +else: + _zesFrequencySetRange_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_freq_range_t) ) + +############################################################################### +## @brief Function-pointer for zesFrequencyGetState +if __use_win_types: + _zesFrequencyGetState_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_freq_state_t) ) +else: + _zesFrequencyGetState_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_freq_state_t) ) + +############################################################################### +## @brief Function-pointer for zesFrequencyGetThrottleTime +if __use_win_types: + _zesFrequencyGetThrottleTime_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_freq_throttle_time_t) ) +else: + _zesFrequencyGetThrottleTime_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_freq_throttle_time_t) ) + +############################################################################### +## @brief Function-pointer for zesFrequencyOcGetCapabilities +if __use_win_types: + _zesFrequencyOcGetCapabilities_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_oc_capabilities_t) ) +else: + _zesFrequencyOcGetCapabilities_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_oc_capabilities_t) ) + +############################################################################### +## @brief Function-pointer for zesFrequencyOcGetFrequencyTarget +if __use_win_types: + _zesFrequencyOcGetFrequencyTarget_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(c_double) ) +else: + _zesFrequencyOcGetFrequencyTarget_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(c_double) ) + +############################################################################### +## @brief Function-pointer for zesFrequencyOcSetFrequencyTarget +if __use_win_types: + _zesFrequencyOcSetFrequencyTarget_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, c_double ) +else: + _zesFrequencyOcSetFrequencyTarget_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, c_double ) + +############################################################################### +## @brief Function-pointer for zesFrequencyOcGetVoltageTarget +if __use_win_types: + _zesFrequencyOcGetVoltageTarget_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(c_double), POINTER(c_double) ) +else: + _zesFrequencyOcGetVoltageTarget_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(c_double), POINTER(c_double) ) + +############################################################################### +## @brief Function-pointer for zesFrequencyOcSetVoltageTarget +if __use_win_types: + _zesFrequencyOcSetVoltageTarget_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, c_double, c_double ) +else: + _zesFrequencyOcSetVoltageTarget_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, c_double, c_double ) + +############################################################################### +## @brief Function-pointer for zesFrequencyOcSetMode +if __use_win_types: + _zesFrequencyOcSetMode_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, zes_oc_mode_t ) +else: + _zesFrequencyOcSetMode_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, zes_oc_mode_t ) + +############################################################################### +## @brief Function-pointer for zesFrequencyOcGetMode +if __use_win_types: + _zesFrequencyOcGetMode_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_oc_mode_t) ) +else: + _zesFrequencyOcGetMode_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_oc_mode_t) ) + +############################################################################### +## @brief Function-pointer for zesFrequencyOcGetIccMax +if __use_win_types: + _zesFrequencyOcGetIccMax_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(c_double) ) +else: + _zesFrequencyOcGetIccMax_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(c_double) ) + +############################################################################### +## @brief Function-pointer for zesFrequencyOcSetIccMax +if __use_win_types: + _zesFrequencyOcSetIccMax_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, c_double ) +else: + _zesFrequencyOcSetIccMax_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, c_double ) + +############################################################################### +## @brief Function-pointer for zesFrequencyOcGetTjMax +if __use_win_types: + _zesFrequencyOcGetTjMax_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(c_double) ) +else: + _zesFrequencyOcGetTjMax_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(c_double) ) + +############################################################################### +## @brief Function-pointer for zesFrequencyOcSetTjMax +if __use_win_types: + _zesFrequencyOcSetTjMax_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, c_double ) +else: + _zesFrequencyOcSetTjMax_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, c_double ) + + +############################################################################### +## @brief Table of Frequency functions pointers +class _zes_frequency_dditable_t(Structure): + _fields_ = [ + ("pfnGetProperties", c_void_p), ## _zesFrequencyGetProperties_t + ("pfnGetAvailableClocks", c_void_p), ## _zesFrequencyGetAvailableClocks_t + ("pfnGetRange", c_void_p), ## _zesFrequencyGetRange_t + ("pfnSetRange", c_void_p), ## _zesFrequencySetRange_t + ("pfnGetState", c_void_p), ## _zesFrequencyGetState_t + ("pfnGetThrottleTime", c_void_p), ## _zesFrequencyGetThrottleTime_t + ("pfnOcGetCapabilities", c_void_p), ## _zesFrequencyOcGetCapabilities_t + ("pfnOcGetFrequencyTarget", c_void_p), ## _zesFrequencyOcGetFrequencyTarget_t + ("pfnOcSetFrequencyTarget", c_void_p), ## _zesFrequencyOcSetFrequencyTarget_t + ("pfnOcGetVoltageTarget", c_void_p), ## _zesFrequencyOcGetVoltageTarget_t + ("pfnOcSetVoltageTarget", c_void_p), ## _zesFrequencyOcSetVoltageTarget_t + ("pfnOcSetMode", c_void_p), ## _zesFrequencyOcSetMode_t + ("pfnOcGetMode", c_void_p), ## _zesFrequencyOcGetMode_t + ("pfnOcGetIccMax", c_void_p), ## _zesFrequencyOcGetIccMax_t + ("pfnOcSetIccMax", c_void_p), ## _zesFrequencyOcSetIccMax_t + ("pfnOcGetTjMax", c_void_p), ## _zesFrequencyOcGetTjMax_t + ("pfnOcSetTjMax", c_void_p) ## _zesFrequencyOcSetTjMax_t + ] + +############################################################################### +## @brief Function-pointer for zesEngineGetProperties +if __use_win_types: + _zesEngineGetProperties_t = WINFUNCTYPE( ze_result_t, zes_engine_handle_t, POINTER(zes_engine_properties_t) ) +else: + _zesEngineGetProperties_t = CFUNCTYPE( ze_result_t, zes_engine_handle_t, POINTER(zes_engine_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesEngineGetActivity +if __use_win_types: + _zesEngineGetActivity_t = WINFUNCTYPE( ze_result_t, zes_engine_handle_t, POINTER(zes_engine_stats_t) ) +else: + _zesEngineGetActivity_t = CFUNCTYPE( ze_result_t, zes_engine_handle_t, POINTER(zes_engine_stats_t) ) + +############################################################################### +## @brief Function-pointer for zesEngineGetActivityExt +if __use_win_types: + _zesEngineGetActivityExt_t = WINFUNCTYPE( ze_result_t, zes_engine_handle_t, POINTER(c_ulong), POINTER(zes_engine_stats_t) ) +else: + _zesEngineGetActivityExt_t = CFUNCTYPE( ze_result_t, zes_engine_handle_t, POINTER(c_ulong), POINTER(zes_engine_stats_t) ) + + +############################################################################### +## @brief Table of Engine functions pointers +class _zes_engine_dditable_t(Structure): + _fields_ = [ + ("pfnGetProperties", c_void_p), ## _zesEngineGetProperties_t + ("pfnGetActivity", c_void_p), ## _zesEngineGetActivity_t + ("pfnGetActivityExt", c_void_p) ## _zesEngineGetActivityExt_t + ] + +############################################################################### +## @brief Function-pointer for zesStandbyGetProperties +if __use_win_types: + _zesStandbyGetProperties_t = WINFUNCTYPE( ze_result_t, zes_standby_handle_t, POINTER(zes_standby_properties_t) ) +else: + _zesStandbyGetProperties_t = CFUNCTYPE( ze_result_t, zes_standby_handle_t, POINTER(zes_standby_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesStandbyGetMode +if __use_win_types: + _zesStandbyGetMode_t = WINFUNCTYPE( ze_result_t, zes_standby_handle_t, POINTER(zes_standby_promo_mode_t) ) +else: + _zesStandbyGetMode_t = CFUNCTYPE( ze_result_t, zes_standby_handle_t, POINTER(zes_standby_promo_mode_t) ) + +############################################################################### +## @brief Function-pointer for zesStandbySetMode +if __use_win_types: + _zesStandbySetMode_t = WINFUNCTYPE( ze_result_t, zes_standby_handle_t, zes_standby_promo_mode_t ) +else: + _zesStandbySetMode_t = CFUNCTYPE( ze_result_t, zes_standby_handle_t, zes_standby_promo_mode_t ) + + +############################################################################### +## @brief Table of Standby functions pointers +class _zes_standby_dditable_t(Structure): + _fields_ = [ + ("pfnGetProperties", c_void_p), ## _zesStandbyGetProperties_t + ("pfnGetMode", c_void_p), ## _zesStandbyGetMode_t + ("pfnSetMode", c_void_p) ## _zesStandbySetMode_t + ] + +############################################################################### +## @brief Function-pointer for zesFirmwareGetProperties +if __use_win_types: + _zesFirmwareGetProperties_t = WINFUNCTYPE( ze_result_t, zes_firmware_handle_t, POINTER(zes_firmware_properties_t) ) +else: + _zesFirmwareGetProperties_t = CFUNCTYPE( ze_result_t, zes_firmware_handle_t, POINTER(zes_firmware_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesFirmwareFlash +if __use_win_types: + _zesFirmwareFlash_t = WINFUNCTYPE( ze_result_t, zes_firmware_handle_t, c_void_p, c_ulong ) +else: + _zesFirmwareFlash_t = CFUNCTYPE( ze_result_t, zes_firmware_handle_t, c_void_p, c_ulong ) + +############################################################################### +## @brief Function-pointer for zesFirmwareGetFlashProgress +if __use_win_types: + _zesFirmwareGetFlashProgress_t = WINFUNCTYPE( ze_result_t, zes_firmware_handle_t, POINTER(c_ulong) ) +else: + _zesFirmwareGetFlashProgress_t = CFUNCTYPE( ze_result_t, zes_firmware_handle_t, POINTER(c_ulong) ) + +############################################################################### +## @brief Function-pointer for zesFirmwareGetConsoleLogs +if __use_win_types: + _zesFirmwareGetConsoleLogs_t = WINFUNCTYPE( ze_result_t, zes_firmware_handle_t, POINTER(c_size_t), c_char_p ) +else: + _zesFirmwareGetConsoleLogs_t = CFUNCTYPE( ze_result_t, zes_firmware_handle_t, POINTER(c_size_t), c_char_p ) + + +############################################################################### +## @brief Table of Firmware functions pointers +class _zes_firmware_dditable_t(Structure): + _fields_ = [ + ("pfnGetProperties", c_void_p), ## _zesFirmwareGetProperties_t + ("pfnFlash", c_void_p), ## _zesFirmwareFlash_t + ("pfnGetFlashProgress", c_void_p), ## _zesFirmwareGetFlashProgress_t + ("pfnGetConsoleLogs", c_void_p) ## _zesFirmwareGetConsoleLogs_t + ] + +############################################################################### +## @brief Function-pointer for zesFirmwareGetSecurityVersionExp +if __use_win_types: + _zesFirmwareGetSecurityVersionExp_t = WINFUNCTYPE( ze_result_t, zes_firmware_handle_t, c_char_p ) +else: + _zesFirmwareGetSecurityVersionExp_t = CFUNCTYPE( ze_result_t, zes_firmware_handle_t, c_char_p ) + +############################################################################### +## @brief Function-pointer for zesFirmwareSetSecurityVersionExp +if __use_win_types: + _zesFirmwareSetSecurityVersionExp_t = WINFUNCTYPE( ze_result_t, zes_firmware_handle_t ) +else: + _zesFirmwareSetSecurityVersionExp_t = CFUNCTYPE( ze_result_t, zes_firmware_handle_t ) + + +############################################################################### +## @brief Table of FirmwareExp functions pointers +class _zes_firmware_exp_dditable_t(Structure): + _fields_ = [ + ("pfnGetSecurityVersionExp", c_void_p), ## _zesFirmwareGetSecurityVersionExp_t + ("pfnSetSecurityVersionExp", c_void_p) ## _zesFirmwareSetSecurityVersionExp_t + ] + +############################################################################### +## @brief Function-pointer for zesMemoryGetProperties +if __use_win_types: + _zesMemoryGetProperties_t = WINFUNCTYPE( ze_result_t, zes_mem_handle_t, POINTER(zes_mem_properties_t) ) +else: + _zesMemoryGetProperties_t = CFUNCTYPE( ze_result_t, zes_mem_handle_t, POINTER(zes_mem_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesMemoryGetState +if __use_win_types: + _zesMemoryGetState_t = WINFUNCTYPE( ze_result_t, zes_mem_handle_t, POINTER(zes_mem_state_t) ) +else: + _zesMemoryGetState_t = CFUNCTYPE( ze_result_t, zes_mem_handle_t, POINTER(zes_mem_state_t) ) + +############################################################################### +## @brief Function-pointer for zesMemoryGetBandwidth +if __use_win_types: + _zesMemoryGetBandwidth_t = WINFUNCTYPE( ze_result_t, zes_mem_handle_t, POINTER(zes_mem_bandwidth_t) ) +else: + _zesMemoryGetBandwidth_t = CFUNCTYPE( ze_result_t, zes_mem_handle_t, POINTER(zes_mem_bandwidth_t) ) + + +############################################################################### +## @brief Table of Memory functions pointers +class _zes_memory_dditable_t(Structure): + _fields_ = [ + ("pfnGetProperties", c_void_p), ## _zesMemoryGetProperties_t + ("pfnGetState", c_void_p), ## _zesMemoryGetState_t + ("pfnGetBandwidth", c_void_p) ## _zesMemoryGetBandwidth_t + ] + +############################################################################### +## @brief Function-pointer for zesFabricPortGetProperties +if __use_win_types: + _zesFabricPortGetProperties_t = WINFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_properties_t) ) +else: + _zesFabricPortGetProperties_t = CFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesFabricPortGetLinkType +if __use_win_types: + _zesFabricPortGetLinkType_t = WINFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_link_type_t) ) +else: + _zesFabricPortGetLinkType_t = CFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_link_type_t) ) + +############################################################################### +## @brief Function-pointer for zesFabricPortGetConfig +if __use_win_types: + _zesFabricPortGetConfig_t = WINFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_config_t) ) +else: + _zesFabricPortGetConfig_t = CFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_config_t) ) + +############################################################################### +## @brief Function-pointer for zesFabricPortSetConfig +if __use_win_types: + _zesFabricPortSetConfig_t = WINFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_config_t) ) +else: + _zesFabricPortSetConfig_t = CFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_config_t) ) + +############################################################################### +## @brief Function-pointer for zesFabricPortGetState +if __use_win_types: + _zesFabricPortGetState_t = WINFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_state_t) ) +else: + _zesFabricPortGetState_t = CFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_state_t) ) + +############################################################################### +## @brief Function-pointer for zesFabricPortGetThroughput +if __use_win_types: + _zesFabricPortGetThroughput_t = WINFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_throughput_t) ) +else: + _zesFabricPortGetThroughput_t = CFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_throughput_t) ) + +############################################################################### +## @brief Function-pointer for zesFabricPortGetFabricErrorCounters +if __use_win_types: + _zesFabricPortGetFabricErrorCounters_t = WINFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_error_counters_t) ) +else: + _zesFabricPortGetFabricErrorCounters_t = CFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_error_counters_t) ) + +############################################################################### +## @brief Function-pointer for zesFabricPortGetMultiPortThroughput +if __use_win_types: + _zesFabricPortGetMultiPortThroughput_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, c_ulong, POINTER(zes_fabric_port_handle_t), POINTER(zes_fabric_port_throughput_t*) ) +else: + _zesFabricPortGetMultiPortThroughput_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, c_ulong, POINTER(zes_fabric_port_handle_t), POINTER(zes_fabric_port_throughput_t*) ) + + +############################################################################### +## @brief Table of FabricPort functions pointers +class _zes_fabric_port_dditable_t(Structure): + _fields_ = [ + ("pfnGetProperties", c_void_p), ## _zesFabricPortGetProperties_t + ("pfnGetLinkType", c_void_p), ## _zesFabricPortGetLinkType_t + ("pfnGetConfig", c_void_p), ## _zesFabricPortGetConfig_t + ("pfnSetConfig", c_void_p), ## _zesFabricPortSetConfig_t + ("pfnGetState", c_void_p), ## _zesFabricPortGetState_t + ("pfnGetThroughput", c_void_p), ## _zesFabricPortGetThroughput_t + ("pfnGetFabricErrorCounters", c_void_p), ## _zesFabricPortGetFabricErrorCounters_t + ("pfnGetMultiPortThroughput", c_void_p) ## _zesFabricPortGetMultiPortThroughput_t + ] + +############################################################################### +## @brief Function-pointer for zesTemperatureGetProperties +if __use_win_types: + _zesTemperatureGetProperties_t = WINFUNCTYPE( ze_result_t, zes_temp_handle_t, POINTER(zes_temp_properties_t) ) +else: + _zesTemperatureGetProperties_t = CFUNCTYPE( ze_result_t, zes_temp_handle_t, POINTER(zes_temp_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesTemperatureGetConfig +if __use_win_types: + _zesTemperatureGetConfig_t = WINFUNCTYPE( ze_result_t, zes_temp_handle_t, POINTER(zes_temp_config_t) ) +else: + _zesTemperatureGetConfig_t = CFUNCTYPE( ze_result_t, zes_temp_handle_t, POINTER(zes_temp_config_t) ) + +############################################################################### +## @brief Function-pointer for zesTemperatureSetConfig +if __use_win_types: + _zesTemperatureSetConfig_t = WINFUNCTYPE( ze_result_t, zes_temp_handle_t, POINTER(zes_temp_config_t) ) +else: + _zesTemperatureSetConfig_t = CFUNCTYPE( ze_result_t, zes_temp_handle_t, POINTER(zes_temp_config_t) ) + +############################################################################### +## @brief Function-pointer for zesTemperatureGetState +if __use_win_types: + _zesTemperatureGetState_t = WINFUNCTYPE( ze_result_t, zes_temp_handle_t, POINTER(c_double) ) +else: + _zesTemperatureGetState_t = CFUNCTYPE( ze_result_t, zes_temp_handle_t, POINTER(c_double) ) + + +############################################################################### +## @brief Table of Temperature functions pointers +class _zes_temperature_dditable_t(Structure): + _fields_ = [ + ("pfnGetProperties", c_void_p), ## _zesTemperatureGetProperties_t + ("pfnGetConfig", c_void_p), ## _zesTemperatureGetConfig_t + ("pfnSetConfig", c_void_p), ## _zesTemperatureSetConfig_t + ("pfnGetState", c_void_p) ## _zesTemperatureGetState_t + ] + +############################################################################### +## @brief Function-pointer for zesPsuGetProperties +if __use_win_types: + _zesPsuGetProperties_t = WINFUNCTYPE( ze_result_t, zes_psu_handle_t, POINTER(zes_psu_properties_t) ) +else: + _zesPsuGetProperties_t = CFUNCTYPE( ze_result_t, zes_psu_handle_t, POINTER(zes_psu_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesPsuGetState +if __use_win_types: + _zesPsuGetState_t = WINFUNCTYPE( ze_result_t, zes_psu_handle_t, POINTER(zes_psu_state_t) ) +else: + _zesPsuGetState_t = CFUNCTYPE( ze_result_t, zes_psu_handle_t, POINTER(zes_psu_state_t) ) + + +############################################################################### +## @brief Table of Psu functions pointers +class _zes_psu_dditable_t(Structure): + _fields_ = [ + ("pfnGetProperties", c_void_p), ## _zesPsuGetProperties_t + ("pfnGetState", c_void_p) ## _zesPsuGetState_t + ] + +############################################################################### +## @brief Function-pointer for zesFanGetProperties +if __use_win_types: + _zesFanGetProperties_t = WINFUNCTYPE( ze_result_t, zes_fan_handle_t, POINTER(zes_fan_properties_t) ) +else: + _zesFanGetProperties_t = CFUNCTYPE( ze_result_t, zes_fan_handle_t, POINTER(zes_fan_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesFanGetConfig +if __use_win_types: + _zesFanGetConfig_t = WINFUNCTYPE( ze_result_t, zes_fan_handle_t, POINTER(zes_fan_config_t) ) +else: + _zesFanGetConfig_t = CFUNCTYPE( ze_result_t, zes_fan_handle_t, POINTER(zes_fan_config_t) ) + +############################################################################### +## @brief Function-pointer for zesFanSetDefaultMode +if __use_win_types: + _zesFanSetDefaultMode_t = WINFUNCTYPE( ze_result_t, zes_fan_handle_t ) +else: + _zesFanSetDefaultMode_t = CFUNCTYPE( ze_result_t, zes_fan_handle_t ) + +############################################################################### +## @brief Function-pointer for zesFanSetFixedSpeedMode +if __use_win_types: + _zesFanSetFixedSpeedMode_t = WINFUNCTYPE( ze_result_t, zes_fan_handle_t, POINTER(zes_fan_speed_t) ) +else: + _zesFanSetFixedSpeedMode_t = CFUNCTYPE( ze_result_t, zes_fan_handle_t, POINTER(zes_fan_speed_t) ) + +############################################################################### +## @brief Function-pointer for zesFanSetSpeedTableMode +if __use_win_types: + _zesFanSetSpeedTableMode_t = WINFUNCTYPE( ze_result_t, zes_fan_handle_t, POINTER(zes_fan_speed_table_t) ) +else: + _zesFanSetSpeedTableMode_t = CFUNCTYPE( ze_result_t, zes_fan_handle_t, POINTER(zes_fan_speed_table_t) ) + +############################################################################### +## @brief Function-pointer for zesFanGetState +if __use_win_types: + _zesFanGetState_t = WINFUNCTYPE( ze_result_t, zes_fan_handle_t, zes_fan_speed_units_t, POINTER(c_int32_t) ) +else: + _zesFanGetState_t = CFUNCTYPE( ze_result_t, zes_fan_handle_t, zes_fan_speed_units_t, POINTER(c_int32_t) ) + + +############################################################################### +## @brief Table of Fan functions pointers +class _zes_fan_dditable_t(Structure): + _fields_ = [ + ("pfnGetProperties", c_void_p), ## _zesFanGetProperties_t + ("pfnGetConfig", c_void_p), ## _zesFanGetConfig_t + ("pfnSetDefaultMode", c_void_p), ## _zesFanSetDefaultMode_t + ("pfnSetFixedSpeedMode", c_void_p), ## _zesFanSetFixedSpeedMode_t + ("pfnSetSpeedTableMode", c_void_p), ## _zesFanSetSpeedTableMode_t + ("pfnGetState", c_void_p) ## _zesFanGetState_t + ] + +############################################################################### +## @brief Function-pointer for zesLedGetProperties +if __use_win_types: + _zesLedGetProperties_t = WINFUNCTYPE( ze_result_t, zes_led_handle_t, POINTER(zes_led_properties_t) ) +else: + _zesLedGetProperties_t = CFUNCTYPE( ze_result_t, zes_led_handle_t, POINTER(zes_led_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesLedGetState +if __use_win_types: + _zesLedGetState_t = WINFUNCTYPE( ze_result_t, zes_led_handle_t, POINTER(zes_led_state_t) ) +else: + _zesLedGetState_t = CFUNCTYPE( ze_result_t, zes_led_handle_t, POINTER(zes_led_state_t) ) + +############################################################################### +## @brief Function-pointer for zesLedSetState +if __use_win_types: + _zesLedSetState_t = WINFUNCTYPE( ze_result_t, zes_led_handle_t, ze_bool_t ) +else: + _zesLedSetState_t = CFUNCTYPE( ze_result_t, zes_led_handle_t, ze_bool_t ) + +############################################################################### +## @brief Function-pointer for zesLedSetColor +if __use_win_types: + _zesLedSetColor_t = WINFUNCTYPE( ze_result_t, zes_led_handle_t, POINTER(zes_led_color_t) ) +else: + _zesLedSetColor_t = CFUNCTYPE( ze_result_t, zes_led_handle_t, POINTER(zes_led_color_t) ) + + +############################################################################### +## @brief Table of Led functions pointers +class _zes_led_dditable_t(Structure): + _fields_ = [ + ("pfnGetProperties", c_void_p), ## _zesLedGetProperties_t + ("pfnGetState", c_void_p), ## _zesLedGetState_t + ("pfnSetState", c_void_p), ## _zesLedSetState_t + ("pfnSetColor", c_void_p) ## _zesLedSetColor_t + ] + +############################################################################### +## @brief Function-pointer for zesRasGetProperties +if __use_win_types: + _zesRasGetProperties_t = WINFUNCTYPE( ze_result_t, zes_ras_handle_t, POINTER(zes_ras_properties_t) ) +else: + _zesRasGetProperties_t = CFUNCTYPE( ze_result_t, zes_ras_handle_t, POINTER(zes_ras_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesRasGetConfig +if __use_win_types: + _zesRasGetConfig_t = WINFUNCTYPE( ze_result_t, zes_ras_handle_t, POINTER(zes_ras_config_t) ) +else: + _zesRasGetConfig_t = CFUNCTYPE( ze_result_t, zes_ras_handle_t, POINTER(zes_ras_config_t) ) + +############################################################################### +## @brief Function-pointer for zesRasSetConfig +if __use_win_types: + _zesRasSetConfig_t = WINFUNCTYPE( ze_result_t, zes_ras_handle_t, POINTER(zes_ras_config_t) ) +else: + _zesRasSetConfig_t = CFUNCTYPE( ze_result_t, zes_ras_handle_t, POINTER(zes_ras_config_t) ) + +############################################################################### +## @brief Function-pointer for zesRasGetState +if __use_win_types: + _zesRasGetState_t = WINFUNCTYPE( ze_result_t, zes_ras_handle_t, ze_bool_t, POINTER(zes_ras_state_t) ) +else: + _zesRasGetState_t = CFUNCTYPE( ze_result_t, zes_ras_handle_t, ze_bool_t, POINTER(zes_ras_state_t) ) + + +############################################################################### +## @brief Table of Ras functions pointers +class _zes_ras_dditable_t(Structure): + _fields_ = [ + ("pfnGetProperties", c_void_p), ## _zesRasGetProperties_t + ("pfnGetConfig", c_void_p), ## _zesRasGetConfig_t + ("pfnSetConfig", c_void_p), ## _zesRasSetConfig_t + ("pfnGetState", c_void_p) ## _zesRasGetState_t + ] + +############################################################################### +## @brief Function-pointer for zesRasGetStateExp +if __use_win_types: + _zesRasGetStateExp_t = WINFUNCTYPE( ze_result_t, zes_ras_handle_t, POINTER(c_ulong), POINTER(zes_ras_state_exp_t) ) +else: + _zesRasGetStateExp_t = CFUNCTYPE( ze_result_t, zes_ras_handle_t, POINTER(c_ulong), POINTER(zes_ras_state_exp_t) ) + +############################################################################### +## @brief Function-pointer for zesRasClearStateExp +if __use_win_types: + _zesRasClearStateExp_t = WINFUNCTYPE( ze_result_t, zes_ras_handle_t, zes_ras_error_category_exp_t ) +else: + _zesRasClearStateExp_t = CFUNCTYPE( ze_result_t, zes_ras_handle_t, zes_ras_error_category_exp_t ) + + +############################################################################### +## @brief Table of RasExp functions pointers +class _zes_ras_exp_dditable_t(Structure): + _fields_ = [ + ("pfnGetStateExp", c_void_p), ## _zesRasGetStateExp_t + ("pfnClearStateExp", c_void_p) ## _zesRasClearStateExp_t + ] + +############################################################################### +## @brief Function-pointer for zesDiagnosticsGetProperties +if __use_win_types: + _zesDiagnosticsGetProperties_t = WINFUNCTYPE( ze_result_t, zes_diag_handle_t, POINTER(zes_diag_properties_t) ) +else: + _zesDiagnosticsGetProperties_t = CFUNCTYPE( ze_result_t, zes_diag_handle_t, POINTER(zes_diag_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesDiagnosticsGetTests +if __use_win_types: + _zesDiagnosticsGetTests_t = WINFUNCTYPE( ze_result_t, zes_diag_handle_t, POINTER(c_ulong), POINTER(zes_diag_test_t) ) +else: + _zesDiagnosticsGetTests_t = CFUNCTYPE( ze_result_t, zes_diag_handle_t, POINTER(c_ulong), POINTER(zes_diag_test_t) ) + +############################################################################### +## @brief Function-pointer for zesDiagnosticsRunTests +if __use_win_types: + _zesDiagnosticsRunTests_t = WINFUNCTYPE( ze_result_t, zes_diag_handle_t, c_ulong, c_ulong, POINTER(zes_diag_result_t) ) +else: + _zesDiagnosticsRunTests_t = CFUNCTYPE( ze_result_t, zes_diag_handle_t, c_ulong, c_ulong, POINTER(zes_diag_result_t) ) + + +############################################################################### +## @brief Table of Diagnostics functions pointers +class _zes_diagnostics_dditable_t(Structure): + _fields_ = [ + ("pfnGetProperties", c_void_p), ## _zesDiagnosticsGetProperties_t + ("pfnGetTests", c_void_p), ## _zesDiagnosticsGetTests_t + ("pfnRunTests", c_void_p) ## _zesDiagnosticsRunTests_t + ] + +############################################################################### +## @brief Function-pointer for zesVFManagementGetVFPropertiesExp +if __use_win_types: + _zesVFManagementGetVFPropertiesExp_t = WINFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(zes_vf_exp_properties_t) ) +else: + _zesVFManagementGetVFPropertiesExp_t = CFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(zes_vf_exp_properties_t) ) + +############################################################################### +## @brief Function-pointer for zesVFManagementGetVFMemoryUtilizationExp +if __use_win_types: + _zesVFManagementGetVFMemoryUtilizationExp_t = WINFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(c_ulong), POINTER(zes_vf_util_mem_exp_t) ) +else: + _zesVFManagementGetVFMemoryUtilizationExp_t = CFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(c_ulong), POINTER(zes_vf_util_mem_exp_t) ) + +############################################################################### +## @brief Function-pointer for zesVFManagementGetVFEngineUtilizationExp +if __use_win_types: + _zesVFManagementGetVFEngineUtilizationExp_t = WINFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(c_ulong), POINTER(zes_vf_util_engine_exp_t) ) +else: + _zesVFManagementGetVFEngineUtilizationExp_t = CFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(c_ulong), POINTER(zes_vf_util_engine_exp_t) ) + +############################################################################### +## @brief Function-pointer for zesVFManagementSetVFTelemetryModeExp +if __use_win_types: + _zesVFManagementSetVFTelemetryModeExp_t = WINFUNCTYPE( ze_result_t, zes_vf_handle_t, zes_vf_info_util_exp_flags_t, ze_bool_t ) +else: + _zesVFManagementSetVFTelemetryModeExp_t = CFUNCTYPE( ze_result_t, zes_vf_handle_t, zes_vf_info_util_exp_flags_t, ze_bool_t ) + +############################################################################### +## @brief Function-pointer for zesVFManagementSetVFTelemetrySamplingIntervalExp +if __use_win_types: + _zesVFManagementSetVFTelemetrySamplingIntervalExp_t = WINFUNCTYPE( ze_result_t, zes_vf_handle_t, zes_vf_info_util_exp_flags_t, c_ulonglong ) +else: + _zesVFManagementSetVFTelemetrySamplingIntervalExp_t = CFUNCTYPE( ze_result_t, zes_vf_handle_t, zes_vf_info_util_exp_flags_t, c_ulonglong ) + +############################################################################### +## @brief Function-pointer for zesVFManagementGetVFCapabilitiesExp +if __use_win_types: + _zesVFManagementGetVFCapabilitiesExp_t = WINFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(zes_vf_exp_capabilities_t) ) +else: + _zesVFManagementGetVFCapabilitiesExp_t = CFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(zes_vf_exp_capabilities_t) ) + +############################################################################### +## @brief Function-pointer for zesVFManagementGetVFMemoryUtilizationExp2 +if __use_win_types: + _zesVFManagementGetVFMemoryUtilizationExp2_t = WINFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(c_ulong), POINTER(zes_vf_util_mem_exp2_t) ) +else: + _zesVFManagementGetVFMemoryUtilizationExp2_t = CFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(c_ulong), POINTER(zes_vf_util_mem_exp2_t) ) + +############################################################################### +## @brief Function-pointer for zesVFManagementGetVFEngineUtilizationExp2 +if __use_win_types: + _zesVFManagementGetVFEngineUtilizationExp2_t = WINFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(c_ulong), POINTER(zes_vf_util_engine_exp2_t) ) +else: + _zesVFManagementGetVFEngineUtilizationExp2_t = CFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(c_ulong), POINTER(zes_vf_util_engine_exp2_t) ) + +############################################################################### +## @brief Function-pointer for zesVFManagementGetVFCapabilitiesExp2 +if __use_win_types: + _zesVFManagementGetVFCapabilitiesExp2_t = WINFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(zes_vf_exp2_capabilities_t) ) +else: + _zesVFManagementGetVFCapabilitiesExp2_t = CFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(zes_vf_exp2_capabilities_t) ) + + +############################################################################### +## @brief Table of VFManagementExp functions pointers +class _zes_vf_management_exp_dditable_t(Structure): + _fields_ = [ + ("pfnGetVFPropertiesExp", c_void_p), ## _zesVFManagementGetVFPropertiesExp_t + ("pfnGetVFMemoryUtilizationExp", c_void_p), ## _zesVFManagementGetVFMemoryUtilizationExp_t + ("pfnGetVFEngineUtilizationExp", c_void_p), ## _zesVFManagementGetVFEngineUtilizationExp_t + ("pfnSetVFTelemetryModeExp", c_void_p), ## _zesVFManagementSetVFTelemetryModeExp_t + ("pfnSetVFTelemetrySamplingIntervalExp", c_void_p), ## _zesVFManagementSetVFTelemetrySamplingIntervalExp_t + ("pfnGetVFCapabilitiesExp", c_void_p), ## _zesVFManagementGetVFCapabilitiesExp_t + ("pfnGetVFMemoryUtilizationExp2", c_void_p), ## _zesVFManagementGetVFMemoryUtilizationExp2_t + ("pfnGetVFEngineUtilizationExp2", c_void_p), ## _zesVFManagementGetVFEngineUtilizationExp2_t + ("pfnGetVFCapabilitiesExp2", c_void_p) ## _zesVFManagementGetVFCapabilitiesExp2_t + ] + +############################################################################### +class _zes_dditable_t(Structure): + _fields_ = [ + ("Global", _zes_global_dditable_t), + ("Device", _zes_device_dditable_t), + ("DeviceExp", _zes_device_exp_dditable_t), + ("Driver", _zes_driver_dditable_t), + ("DriverExp", _zes_driver_exp_dditable_t), + ("Overclock", _zes_overclock_dditable_t), + ("Scheduler", _zes_scheduler_dditable_t), + ("PerformanceFactor", _zes_performance_factor_dditable_t), + ("Power", _zes_power_dditable_t), + ("Frequency", _zes_frequency_dditable_t), + ("Engine", _zes_engine_dditable_t), + ("Standby", _zes_standby_dditable_t), + ("Firmware", _zes_firmware_dditable_t), + ("FirmwareExp", _zes_firmware_exp_dditable_t), + ("Memory", _zes_memory_dditable_t), + ("FabricPort", _zes_fabric_port_dditable_t), + ("Temperature", _zes_temperature_dditable_t), + ("Psu", _zes_psu_dditable_t), + ("Fan", _zes_fan_dditable_t), + ("Led", _zes_led_dditable_t), + ("Ras", _zes_ras_dditable_t), + ("RasExp", _zes_ras_exp_dditable_t), + ("Diagnostics", _zes_diagnostics_dditable_t), + ("VFManagementExp", _zes_vf_management_exp_dditable_t) + ] + +############################################################################### +## @brief zes device-driver interfaces +class ZES_DDI: + def __init__(self, version : ze_api_version_t): + # load the ze_loader library + if "Windows" == platform.uname()[0]: + self.__dll = WinDLL("ze_loader.dll") + else: + self.__dll = CDLL("ze_loader.so") + + # fill the ddi tables + self.__dditable = _zes_dditable_t() + + # call driver to get function pointers + _Global = _zes_global_dditable_t() + r = ze_result_v(self.__dll.zesGetGlobalProcAddrTable(version, byref(_Global))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Global = _Global + + # attach function interface to function address + self.zesInit = _zesInit_t(self.__dditable.Global.pfnInit) + + # call driver to get function pointers + _Device = _zes_device_dditable_t() + r = ze_result_v(self.__dll.zesGetDeviceProcAddrTable(version, byref(_Device))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Device = _Device + + # attach function interface to function address + self.zesDeviceGetProperties = _zesDeviceGetProperties_t(self.__dditable.Device.pfnGetProperties) + self.zesDeviceGetState = _zesDeviceGetState_t(self.__dditable.Device.pfnGetState) + self.zesDeviceReset = _zesDeviceReset_t(self.__dditable.Device.pfnReset) + self.zesDeviceProcessesGetState = _zesDeviceProcessesGetState_t(self.__dditable.Device.pfnProcessesGetState) + self.zesDevicePciGetProperties = _zesDevicePciGetProperties_t(self.__dditable.Device.pfnPciGetProperties) + self.zesDevicePciGetState = _zesDevicePciGetState_t(self.__dditable.Device.pfnPciGetState) + self.zesDevicePciGetBars = _zesDevicePciGetBars_t(self.__dditable.Device.pfnPciGetBars) + self.zesDevicePciGetStats = _zesDevicePciGetStats_t(self.__dditable.Device.pfnPciGetStats) + self.zesDeviceEnumDiagnosticTestSuites = _zesDeviceEnumDiagnosticTestSuites_t(self.__dditable.Device.pfnEnumDiagnosticTestSuites) + self.zesDeviceEnumEngineGroups = _zesDeviceEnumEngineGroups_t(self.__dditable.Device.pfnEnumEngineGroups) + self.zesDeviceEventRegister = _zesDeviceEventRegister_t(self.__dditable.Device.pfnEventRegister) + self.zesDeviceEnumFabricPorts = _zesDeviceEnumFabricPorts_t(self.__dditable.Device.pfnEnumFabricPorts) + self.zesDeviceEnumFans = _zesDeviceEnumFans_t(self.__dditable.Device.pfnEnumFans) + self.zesDeviceEnumFirmwares = _zesDeviceEnumFirmwares_t(self.__dditable.Device.pfnEnumFirmwares) + self.zesDeviceEnumFrequencyDomains = _zesDeviceEnumFrequencyDomains_t(self.__dditable.Device.pfnEnumFrequencyDomains) + self.zesDeviceEnumLeds = _zesDeviceEnumLeds_t(self.__dditable.Device.pfnEnumLeds) + self.zesDeviceEnumMemoryModules = _zesDeviceEnumMemoryModules_t(self.__dditable.Device.pfnEnumMemoryModules) + self.zesDeviceEnumPerformanceFactorDomains = _zesDeviceEnumPerformanceFactorDomains_t(self.__dditable.Device.pfnEnumPerformanceFactorDomains) + self.zesDeviceEnumPowerDomains = _zesDeviceEnumPowerDomains_t(self.__dditable.Device.pfnEnumPowerDomains) + self.zesDeviceGetCardPowerDomain = _zesDeviceGetCardPowerDomain_t(self.__dditable.Device.pfnGetCardPowerDomain) + self.zesDeviceEnumPsus = _zesDeviceEnumPsus_t(self.__dditable.Device.pfnEnumPsus) + self.zesDeviceEnumRasErrorSets = _zesDeviceEnumRasErrorSets_t(self.__dditable.Device.pfnEnumRasErrorSets) + self.zesDeviceEnumSchedulers = _zesDeviceEnumSchedulers_t(self.__dditable.Device.pfnEnumSchedulers) + self.zesDeviceEnumStandbyDomains = _zesDeviceEnumStandbyDomains_t(self.__dditable.Device.pfnEnumStandbyDomains) + self.zesDeviceEnumTemperatureSensors = _zesDeviceEnumTemperatureSensors_t(self.__dditable.Device.pfnEnumTemperatureSensors) + self.zesDeviceEccAvailable = _zesDeviceEccAvailable_t(self.__dditable.Device.pfnEccAvailable) + self.zesDeviceEccConfigurable = _zesDeviceEccConfigurable_t(self.__dditable.Device.pfnEccConfigurable) + self.zesDeviceGetEccState = _zesDeviceGetEccState_t(self.__dditable.Device.pfnGetEccState) + self.zesDeviceSetEccState = _zesDeviceSetEccState_t(self.__dditable.Device.pfnSetEccState) + self.zesDeviceGet = _zesDeviceGet_t(self.__dditable.Device.pfnGet) + self.zesDeviceSetOverclockWaiver = _zesDeviceSetOverclockWaiver_t(self.__dditable.Device.pfnSetOverclockWaiver) + self.zesDeviceGetOverclockDomains = _zesDeviceGetOverclockDomains_t(self.__dditable.Device.pfnGetOverclockDomains) + self.zesDeviceGetOverclockControls = _zesDeviceGetOverclockControls_t(self.__dditable.Device.pfnGetOverclockControls) + self.zesDeviceResetOverclockSettings = _zesDeviceResetOverclockSettings_t(self.__dditable.Device.pfnResetOverclockSettings) + self.zesDeviceReadOverclockState = _zesDeviceReadOverclockState_t(self.__dditable.Device.pfnReadOverclockState) + self.zesDeviceEnumOverclockDomains = _zesDeviceEnumOverclockDomains_t(self.__dditable.Device.pfnEnumOverclockDomains) + self.zesDeviceResetExt = _zesDeviceResetExt_t(self.__dditable.Device.pfnResetExt) + self.zesDevicePciLinkSpeedUpdateExt = _zesDevicePciLinkSpeedUpdateExt_t(self.__dditable.Device.pfnPciLinkSpeedUpdateExt) + + # call driver to get function pointers + _DeviceExp = _zes_device_exp_dditable_t() + r = ze_result_v(self.__dll.zesGetDeviceExpProcAddrTable(version, byref(_DeviceExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.DeviceExp = _DeviceExp + + # attach function interface to function address + self.zesDeviceGetSubDevicePropertiesExp = _zesDeviceGetSubDevicePropertiesExp_t(self.__dditable.DeviceExp.pfnGetSubDevicePropertiesExp) + self.zesDeviceEnumActiveVFExp = _zesDeviceEnumActiveVFExp_t(self.__dditable.DeviceExp.pfnEnumActiveVFExp) + self.zesDeviceEnumEnabledVFExp = _zesDeviceEnumEnabledVFExp_t(self.__dditable.DeviceExp.pfnEnumEnabledVFExp) + + # call driver to get function pointers + _Driver = _zes_driver_dditable_t() + r = ze_result_v(self.__dll.zesGetDriverProcAddrTable(version, byref(_Driver))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Driver = _Driver + + # attach function interface to function address + self.zesDriverEventListen = _zesDriverEventListen_t(self.__dditable.Driver.pfnEventListen) + self.zesDriverEventListenEx = _zesDriverEventListenEx_t(self.__dditable.Driver.pfnEventListenEx) + self.zesDriverGet = _zesDriverGet_t(self.__dditable.Driver.pfnGet) + self.zesDriverGetExtensionProperties = _zesDriverGetExtensionProperties_t(self.__dditable.Driver.pfnGetExtensionProperties) + self.zesDriverGetExtensionFunctionAddress = _zesDriverGetExtensionFunctionAddress_t(self.__dditable.Driver.pfnGetExtensionFunctionAddress) + + # call driver to get function pointers + _DriverExp = _zes_driver_exp_dditable_t() + r = ze_result_v(self.__dll.zesGetDriverExpProcAddrTable(version, byref(_DriverExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.DriverExp = _DriverExp + + # attach function interface to function address + self.zesDriverGetDeviceByUuidExp = _zesDriverGetDeviceByUuidExp_t(self.__dditable.DriverExp.pfnGetDeviceByUuidExp) + + # call driver to get function pointers + _Overclock = _zes_overclock_dditable_t() + r = ze_result_v(self.__dll.zesGetOverclockProcAddrTable(version, byref(_Overclock))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Overclock = _Overclock + + # attach function interface to function address + self.zesOverclockGetDomainProperties = _zesOverclockGetDomainProperties_t(self.__dditable.Overclock.pfnGetDomainProperties) + self.zesOverclockGetDomainVFProperties = _zesOverclockGetDomainVFProperties_t(self.__dditable.Overclock.pfnGetDomainVFProperties) + self.zesOverclockGetDomainControlProperties = _zesOverclockGetDomainControlProperties_t(self.__dditable.Overclock.pfnGetDomainControlProperties) + self.zesOverclockGetControlCurrentValue = _zesOverclockGetControlCurrentValue_t(self.__dditable.Overclock.pfnGetControlCurrentValue) + self.zesOverclockGetControlPendingValue = _zesOverclockGetControlPendingValue_t(self.__dditable.Overclock.pfnGetControlPendingValue) + self.zesOverclockSetControlUserValue = _zesOverclockSetControlUserValue_t(self.__dditable.Overclock.pfnSetControlUserValue) + self.zesOverclockGetControlState = _zesOverclockGetControlState_t(self.__dditable.Overclock.pfnGetControlState) + self.zesOverclockGetVFPointValues = _zesOverclockGetVFPointValues_t(self.__dditable.Overclock.pfnGetVFPointValues) + self.zesOverclockSetVFPointValues = _zesOverclockSetVFPointValues_t(self.__dditable.Overclock.pfnSetVFPointValues) + + # call driver to get function pointers + _Scheduler = _zes_scheduler_dditable_t() + r = ze_result_v(self.__dll.zesGetSchedulerProcAddrTable(version, byref(_Scheduler))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Scheduler = _Scheduler + + # attach function interface to function address + self.zesSchedulerGetProperties = _zesSchedulerGetProperties_t(self.__dditable.Scheduler.pfnGetProperties) + self.zesSchedulerGetCurrentMode = _zesSchedulerGetCurrentMode_t(self.__dditable.Scheduler.pfnGetCurrentMode) + self.zesSchedulerGetTimeoutModeProperties = _zesSchedulerGetTimeoutModeProperties_t(self.__dditable.Scheduler.pfnGetTimeoutModeProperties) + self.zesSchedulerGetTimesliceModeProperties = _zesSchedulerGetTimesliceModeProperties_t(self.__dditable.Scheduler.pfnGetTimesliceModeProperties) + self.zesSchedulerSetTimeoutMode = _zesSchedulerSetTimeoutMode_t(self.__dditable.Scheduler.pfnSetTimeoutMode) + self.zesSchedulerSetTimesliceMode = _zesSchedulerSetTimesliceMode_t(self.__dditable.Scheduler.pfnSetTimesliceMode) + self.zesSchedulerSetExclusiveMode = _zesSchedulerSetExclusiveMode_t(self.__dditable.Scheduler.pfnSetExclusiveMode) + self.zesSchedulerSetComputeUnitDebugMode = _zesSchedulerSetComputeUnitDebugMode_t(self.__dditable.Scheduler.pfnSetComputeUnitDebugMode) + + # call driver to get function pointers + _PerformanceFactor = _zes_performance_factor_dditable_t() + r = ze_result_v(self.__dll.zesGetPerformanceFactorProcAddrTable(version, byref(_PerformanceFactor))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.PerformanceFactor = _PerformanceFactor + + # attach function interface to function address + self.zesPerformanceFactorGetProperties = _zesPerformanceFactorGetProperties_t(self.__dditable.PerformanceFactor.pfnGetProperties) + self.zesPerformanceFactorGetConfig = _zesPerformanceFactorGetConfig_t(self.__dditable.PerformanceFactor.pfnGetConfig) + self.zesPerformanceFactorSetConfig = _zesPerformanceFactorSetConfig_t(self.__dditable.PerformanceFactor.pfnSetConfig) + + # call driver to get function pointers + _Power = _zes_power_dditable_t() + r = ze_result_v(self.__dll.zesGetPowerProcAddrTable(version, byref(_Power))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Power = _Power + + # attach function interface to function address + self.zesPowerGetProperties = _zesPowerGetProperties_t(self.__dditable.Power.pfnGetProperties) + self.zesPowerGetEnergyCounter = _zesPowerGetEnergyCounter_t(self.__dditable.Power.pfnGetEnergyCounter) + self.zesPowerGetLimits = _zesPowerGetLimits_t(self.__dditable.Power.pfnGetLimits) + self.zesPowerSetLimits = _zesPowerSetLimits_t(self.__dditable.Power.pfnSetLimits) + self.zesPowerGetEnergyThreshold = _zesPowerGetEnergyThreshold_t(self.__dditable.Power.pfnGetEnergyThreshold) + self.zesPowerSetEnergyThreshold = _zesPowerSetEnergyThreshold_t(self.__dditable.Power.pfnSetEnergyThreshold) + self.zesPowerGetLimitsExt = _zesPowerGetLimitsExt_t(self.__dditable.Power.pfnGetLimitsExt) + self.zesPowerSetLimitsExt = _zesPowerSetLimitsExt_t(self.__dditable.Power.pfnSetLimitsExt) + + # call driver to get function pointers + _Frequency = _zes_frequency_dditable_t() + r = ze_result_v(self.__dll.zesGetFrequencyProcAddrTable(version, byref(_Frequency))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Frequency = _Frequency + + # attach function interface to function address + self.zesFrequencyGetProperties = _zesFrequencyGetProperties_t(self.__dditable.Frequency.pfnGetProperties) + self.zesFrequencyGetAvailableClocks = _zesFrequencyGetAvailableClocks_t(self.__dditable.Frequency.pfnGetAvailableClocks) + self.zesFrequencyGetRange = _zesFrequencyGetRange_t(self.__dditable.Frequency.pfnGetRange) + self.zesFrequencySetRange = _zesFrequencySetRange_t(self.__dditable.Frequency.pfnSetRange) + self.zesFrequencyGetState = _zesFrequencyGetState_t(self.__dditable.Frequency.pfnGetState) + self.zesFrequencyGetThrottleTime = _zesFrequencyGetThrottleTime_t(self.__dditable.Frequency.pfnGetThrottleTime) + self.zesFrequencyOcGetCapabilities = _zesFrequencyOcGetCapabilities_t(self.__dditable.Frequency.pfnOcGetCapabilities) + self.zesFrequencyOcGetFrequencyTarget = _zesFrequencyOcGetFrequencyTarget_t(self.__dditable.Frequency.pfnOcGetFrequencyTarget) + self.zesFrequencyOcSetFrequencyTarget = _zesFrequencyOcSetFrequencyTarget_t(self.__dditable.Frequency.pfnOcSetFrequencyTarget) + self.zesFrequencyOcGetVoltageTarget = _zesFrequencyOcGetVoltageTarget_t(self.__dditable.Frequency.pfnOcGetVoltageTarget) + self.zesFrequencyOcSetVoltageTarget = _zesFrequencyOcSetVoltageTarget_t(self.__dditable.Frequency.pfnOcSetVoltageTarget) + self.zesFrequencyOcSetMode = _zesFrequencyOcSetMode_t(self.__dditable.Frequency.pfnOcSetMode) + self.zesFrequencyOcGetMode = _zesFrequencyOcGetMode_t(self.__dditable.Frequency.pfnOcGetMode) + self.zesFrequencyOcGetIccMax = _zesFrequencyOcGetIccMax_t(self.__dditable.Frequency.pfnOcGetIccMax) + self.zesFrequencyOcSetIccMax = _zesFrequencyOcSetIccMax_t(self.__dditable.Frequency.pfnOcSetIccMax) + self.zesFrequencyOcGetTjMax = _zesFrequencyOcGetTjMax_t(self.__dditable.Frequency.pfnOcGetTjMax) + self.zesFrequencyOcSetTjMax = _zesFrequencyOcSetTjMax_t(self.__dditable.Frequency.pfnOcSetTjMax) + + # call driver to get function pointers + _Engine = _zes_engine_dditable_t() + r = ze_result_v(self.__dll.zesGetEngineProcAddrTable(version, byref(_Engine))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Engine = _Engine + + # attach function interface to function address + self.zesEngineGetProperties = _zesEngineGetProperties_t(self.__dditable.Engine.pfnGetProperties) + self.zesEngineGetActivity = _zesEngineGetActivity_t(self.__dditable.Engine.pfnGetActivity) + self.zesEngineGetActivityExt = _zesEngineGetActivityExt_t(self.__dditable.Engine.pfnGetActivityExt) + + # call driver to get function pointers + _Standby = _zes_standby_dditable_t() + r = ze_result_v(self.__dll.zesGetStandbyProcAddrTable(version, byref(_Standby))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Standby = _Standby + + # attach function interface to function address + self.zesStandbyGetProperties = _zesStandbyGetProperties_t(self.__dditable.Standby.pfnGetProperties) + self.zesStandbyGetMode = _zesStandbyGetMode_t(self.__dditable.Standby.pfnGetMode) + self.zesStandbySetMode = _zesStandbySetMode_t(self.__dditable.Standby.pfnSetMode) + + # call driver to get function pointers + _Firmware = _zes_firmware_dditable_t() + r = ze_result_v(self.__dll.zesGetFirmwareProcAddrTable(version, byref(_Firmware))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Firmware = _Firmware + + # attach function interface to function address + self.zesFirmwareGetProperties = _zesFirmwareGetProperties_t(self.__dditable.Firmware.pfnGetProperties) + self.zesFirmwareFlash = _zesFirmwareFlash_t(self.__dditable.Firmware.pfnFlash) + self.zesFirmwareGetFlashProgress = _zesFirmwareGetFlashProgress_t(self.__dditable.Firmware.pfnGetFlashProgress) + self.zesFirmwareGetConsoleLogs = _zesFirmwareGetConsoleLogs_t(self.__dditable.Firmware.pfnGetConsoleLogs) + + # call driver to get function pointers + _FirmwareExp = _zes_firmware_exp_dditable_t() + r = ze_result_v(self.__dll.zesGetFirmwareExpProcAddrTable(version, byref(_FirmwareExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.FirmwareExp = _FirmwareExp + + # attach function interface to function address + self.zesFirmwareGetSecurityVersionExp = _zesFirmwareGetSecurityVersionExp_t(self.__dditable.FirmwareExp.pfnGetSecurityVersionExp) + self.zesFirmwareSetSecurityVersionExp = _zesFirmwareSetSecurityVersionExp_t(self.__dditable.FirmwareExp.pfnSetSecurityVersionExp) + + # call driver to get function pointers + _Memory = _zes_memory_dditable_t() + r = ze_result_v(self.__dll.zesGetMemoryProcAddrTable(version, byref(_Memory))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Memory = _Memory + + # attach function interface to function address + self.zesMemoryGetProperties = _zesMemoryGetProperties_t(self.__dditable.Memory.pfnGetProperties) + self.zesMemoryGetState = _zesMemoryGetState_t(self.__dditable.Memory.pfnGetState) + self.zesMemoryGetBandwidth = _zesMemoryGetBandwidth_t(self.__dditable.Memory.pfnGetBandwidth) + + # call driver to get function pointers + _FabricPort = _zes_fabric_port_dditable_t() + r = ze_result_v(self.__dll.zesGetFabricPortProcAddrTable(version, byref(_FabricPort))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.FabricPort = _FabricPort + + # attach function interface to function address + self.zesFabricPortGetProperties = _zesFabricPortGetProperties_t(self.__dditable.FabricPort.pfnGetProperties) + self.zesFabricPortGetLinkType = _zesFabricPortGetLinkType_t(self.__dditable.FabricPort.pfnGetLinkType) + self.zesFabricPortGetConfig = _zesFabricPortGetConfig_t(self.__dditable.FabricPort.pfnGetConfig) + self.zesFabricPortSetConfig = _zesFabricPortSetConfig_t(self.__dditable.FabricPort.pfnSetConfig) + self.zesFabricPortGetState = _zesFabricPortGetState_t(self.__dditable.FabricPort.pfnGetState) + self.zesFabricPortGetThroughput = _zesFabricPortGetThroughput_t(self.__dditable.FabricPort.pfnGetThroughput) + self.zesFabricPortGetFabricErrorCounters = _zesFabricPortGetFabricErrorCounters_t(self.__dditable.FabricPort.pfnGetFabricErrorCounters) + self.zesFabricPortGetMultiPortThroughput = _zesFabricPortGetMultiPortThroughput_t(self.__dditable.FabricPort.pfnGetMultiPortThroughput) + + # call driver to get function pointers + _Temperature = _zes_temperature_dditable_t() + r = ze_result_v(self.__dll.zesGetTemperatureProcAddrTable(version, byref(_Temperature))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Temperature = _Temperature + + # attach function interface to function address + self.zesTemperatureGetProperties = _zesTemperatureGetProperties_t(self.__dditable.Temperature.pfnGetProperties) + self.zesTemperatureGetConfig = _zesTemperatureGetConfig_t(self.__dditable.Temperature.pfnGetConfig) + self.zesTemperatureSetConfig = _zesTemperatureSetConfig_t(self.__dditable.Temperature.pfnSetConfig) + self.zesTemperatureGetState = _zesTemperatureGetState_t(self.__dditable.Temperature.pfnGetState) + + # call driver to get function pointers + _Psu = _zes_psu_dditable_t() + r = ze_result_v(self.__dll.zesGetPsuProcAddrTable(version, byref(_Psu))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Psu = _Psu + + # attach function interface to function address + self.zesPsuGetProperties = _zesPsuGetProperties_t(self.__dditable.Psu.pfnGetProperties) + self.zesPsuGetState = _zesPsuGetState_t(self.__dditable.Psu.pfnGetState) + + # call driver to get function pointers + _Fan = _zes_fan_dditable_t() + r = ze_result_v(self.__dll.zesGetFanProcAddrTable(version, byref(_Fan))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Fan = _Fan + + # attach function interface to function address + self.zesFanGetProperties = _zesFanGetProperties_t(self.__dditable.Fan.pfnGetProperties) + self.zesFanGetConfig = _zesFanGetConfig_t(self.__dditable.Fan.pfnGetConfig) + self.zesFanSetDefaultMode = _zesFanSetDefaultMode_t(self.__dditable.Fan.pfnSetDefaultMode) + self.zesFanSetFixedSpeedMode = _zesFanSetFixedSpeedMode_t(self.__dditable.Fan.pfnSetFixedSpeedMode) + self.zesFanSetSpeedTableMode = _zesFanSetSpeedTableMode_t(self.__dditable.Fan.pfnSetSpeedTableMode) + self.zesFanGetState = _zesFanGetState_t(self.__dditable.Fan.pfnGetState) + + # call driver to get function pointers + _Led = _zes_led_dditable_t() + r = ze_result_v(self.__dll.zesGetLedProcAddrTable(version, byref(_Led))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Led = _Led + + # attach function interface to function address + self.zesLedGetProperties = _zesLedGetProperties_t(self.__dditable.Led.pfnGetProperties) + self.zesLedGetState = _zesLedGetState_t(self.__dditable.Led.pfnGetState) + self.zesLedSetState = _zesLedSetState_t(self.__dditable.Led.pfnSetState) + self.zesLedSetColor = _zesLedSetColor_t(self.__dditable.Led.pfnSetColor) + + # call driver to get function pointers + _Ras = _zes_ras_dditable_t() + r = ze_result_v(self.__dll.zesGetRasProcAddrTable(version, byref(_Ras))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Ras = _Ras + + # attach function interface to function address + self.zesRasGetProperties = _zesRasGetProperties_t(self.__dditable.Ras.pfnGetProperties) + self.zesRasGetConfig = _zesRasGetConfig_t(self.__dditable.Ras.pfnGetConfig) + self.zesRasSetConfig = _zesRasSetConfig_t(self.__dditable.Ras.pfnSetConfig) + self.zesRasGetState = _zesRasGetState_t(self.__dditable.Ras.pfnGetState) + + # call driver to get function pointers + _RasExp = _zes_ras_exp_dditable_t() + r = ze_result_v(self.__dll.zesGetRasExpProcAddrTable(version, byref(_RasExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.RasExp = _RasExp + + # attach function interface to function address + self.zesRasGetStateExp = _zesRasGetStateExp_t(self.__dditable.RasExp.pfnGetStateExp) + self.zesRasClearStateExp = _zesRasClearStateExp_t(self.__dditable.RasExp.pfnClearStateExp) + + # call driver to get function pointers + _Diagnostics = _zes_diagnostics_dditable_t() + r = ze_result_v(self.__dll.zesGetDiagnosticsProcAddrTable(version, byref(_Diagnostics))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Diagnostics = _Diagnostics + + # attach function interface to function address + self.zesDiagnosticsGetProperties = _zesDiagnosticsGetProperties_t(self.__dditable.Diagnostics.pfnGetProperties) + self.zesDiagnosticsGetTests = _zesDiagnosticsGetTests_t(self.__dditable.Diagnostics.pfnGetTests) + self.zesDiagnosticsRunTests = _zesDiagnosticsRunTests_t(self.__dditable.Diagnostics.pfnRunTests) + + # call driver to get function pointers + _VFManagementExp = _zes_vf_management_exp_dditable_t() + r = ze_result_v(self.__dll.zesGetVFManagementExpProcAddrTable(version, byref(_VFManagementExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.VFManagementExp = _VFManagementExp + + # attach function interface to function address + self.zesVFManagementGetVFPropertiesExp = _zesVFManagementGetVFPropertiesExp_t(self.__dditable.VFManagementExp.pfnGetVFPropertiesExp) + self.zesVFManagementGetVFMemoryUtilizationExp = _zesVFManagementGetVFMemoryUtilizationExp_t(self.__dditable.VFManagementExp.pfnGetVFMemoryUtilizationExp) + self.zesVFManagementGetVFEngineUtilizationExp = _zesVFManagementGetVFEngineUtilizationExp_t(self.__dditable.VFManagementExp.pfnGetVFEngineUtilizationExp) + self.zesVFManagementSetVFTelemetryModeExp = _zesVFManagementSetVFTelemetryModeExp_t(self.__dditable.VFManagementExp.pfnSetVFTelemetryModeExp) + self.zesVFManagementSetVFTelemetrySamplingIntervalExp = _zesVFManagementSetVFTelemetrySamplingIntervalExp_t(self.__dditable.VFManagementExp.pfnSetVFTelemetrySamplingIntervalExp) + self.zesVFManagementGetVFCapabilitiesExp = _zesVFManagementGetVFCapabilitiesExp_t(self.__dditable.VFManagementExp.pfnGetVFCapabilitiesExp) + self.zesVFManagementGetVFMemoryUtilizationExp2 = _zesVFManagementGetVFMemoryUtilizationExp2_t(self.__dditable.VFManagementExp.pfnGetVFMemoryUtilizationExp2) + self.zesVFManagementGetVFEngineUtilizationExp2 = _zesVFManagementGetVFEngineUtilizationExp2_t(self.__dditable.VFManagementExp.pfnGetVFEngineUtilizationExp2) + self.zesVFManagementGetVFCapabilitiesExp2 = _zesVFManagementGetVFCapabilitiesExp2_t(self.__dditable.VFManagementExp.pfnGetVFCapabilitiesExp2) + + # success! diff --git a/backends/ze/include/zes_api.h b/backends/ze/include/zes_api.h index 2c7c59862..9b058a3bd 100644 --- a/backends/ze/include/zes_api.h +++ b/backends/ze/include/zes_api.h @@ -1,11 +1,11 @@ /* * - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2025 Intel Corporation * * SPDX-License-Identifier: MIT * * @file zes_api.h - * @version v1.9-r1.9.3 + * @version v1.15-r1.13.73 * */ #ifndef _ZES_API_H @@ -158,7 +158,14 @@ typedef enum _zes_structure_type_t ZES_STRUCTURE_TYPE_VF_EXP_PROPERTIES = 0x00020005, ///< ::zes_vf_exp_properties_t ZES_STRUCTURE_TYPE_VF_UTIL_MEM_EXP = 0x00020006, ///< ::zes_vf_util_mem_exp_t ZES_STRUCTURE_TYPE_VF_UTIL_ENGINE_EXP = 0x00020007, ///< ::zes_vf_util_engine_exp_t - ZES_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff + ZES_STRUCTURE_TYPE_VF_EXP_CAPABILITIES = 0x00020008, ///< ::zes_vf_exp_capabilities_t + ZES_STRUCTURE_TYPE_VF_UTIL_MEM_EXP2 = 0x00020009, ///< ::zes_vf_util_mem_exp2_t + ZES_STRUCTURE_TYPE_VF_UTIL_ENGINE_EXP2 = 0x00020010, ///< ::zes_vf_util_engine_exp2_t + ZES_STRUCTURE_TYPE_VF_EXP2_CAPABILITIES = 0x00020011, ///< ::zes_vf_exp2_capabilities_t + ZES_STRUCTURE_TYPE_DEVICE_ECC_DEFAULT_PROPERTIES_EXT = 0x00020012, ///< ::zes_device_ecc_default_properties_ext_t + ZES_STRUCTURE_TYPE_PCI_LINK_SPEED_DOWNGRADE_EXT_STATE = 0x00020013, ///< ::zes_pci_link_speed_downgrade_ext_state_t + ZES_STRUCTURE_TYPE_PCI_LINK_SPEED_DOWNGRADE_EXT_PROPERTIES = 0x00020014,///< ::zes_pci_link_speed_downgrade_ext_properties_t + ZES_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_STRUCTURE_TYPE_* ENUMs } zes_structure_type_t; @@ -504,6 +511,18 @@ typedef struct _zes_temp_threshold_t zes_temp_threshold_t; /// @brief Forward-declare zes_temp_config_t typedef struct _zes_temp_config_t zes_temp_config_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare zes_device_ecc_default_properties_ext_t +typedef struct _zes_device_ecc_default_properties_ext_t zes_device_ecc_default_properties_ext_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare zes_pci_link_speed_downgrade_ext_state_t +typedef struct _zes_pci_link_speed_downgrade_ext_state_t zes_pci_link_speed_downgrade_ext_state_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare zes_pci_link_speed_downgrade_ext_properties_t +typedef struct _zes_pci_link_speed_downgrade_ext_properties_t zes_pci_link_speed_downgrade_ext_properties_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare zes_power_limit_ext_desc_t typedef struct _zes_power_limit_ext_desc_t zes_power_limit_ext_desc_t; @@ -548,6 +567,22 @@ typedef struct _zes_vf_util_mem_exp_t zes_vf_util_mem_exp_t; /// @brief Forward-declare zes_vf_util_engine_exp_t typedef struct _zes_vf_util_engine_exp_t zes_vf_util_engine_exp_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare zes_vf_exp_capabilities_t +typedef struct _zes_vf_exp_capabilities_t zes_vf_exp_capabilities_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare zes_vf_exp2_capabilities_t +typedef struct _zes_vf_exp2_capabilities_t zes_vf_exp2_capabilities_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare zes_vf_util_mem_exp2_t +typedef struct _zes_vf_util_mem_exp2_t zes_vf_util_mem_exp2_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare zes_vf_util_engine_exp2_t +typedef struct _zes_vf_util_engine_exp2_t zes_vf_util_engine_exp2_t; + #if !defined(__GNUC__) #pragma endregion @@ -562,7 +597,7 @@ typedef uint32_t zes_init_flags_t; typedef enum _zes_init_flag_t { ZES_INIT_FLAG_PLACEHOLDER = ZE_BIT(0), ///< placeholder for future use - ZES_INIT_FLAG_FORCE_UINT32 = 0x7fffffff + ZES_INIT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_INIT_FLAG_* ENUMs } zes_init_flag_t; @@ -571,7 +606,7 @@ typedef enum _zes_init_flag_t /// /// @details /// - The application must call this function or ::zeInit with the -/// ::ZES_ENABLE_SYSMAN environment variable set before calling any other +/// `ZES_ENABLE_SYSMAN` environment variable set before calling any other /// sysman function. /// - If this function is not called then all other sysman functions will /// return ::ZE_RESULT_ERROR_UNINITIALIZED. @@ -590,10 +625,18 @@ typedef enum _zes_init_flag_t /// - ::ZE_RESULT_SUCCESS /// - ::ZE_RESULT_ERROR_UNINITIALIZED /// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x1 < flags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY ZE_APIEXPORT ze_result_t ZE_APICALL zesInit( @@ -619,6 +662,14 @@ zesInit( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pCount` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -662,6 +713,14 @@ typedef struct _zes_driver_extension_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -695,6 +754,14 @@ zesDriverGetExtensionProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -721,8 +788,8 @@ zesDriverGetExtensionFunctionAddress( /// - Multiple calls to this function will return identical sysman device /// handles, in the same order. /// - The number and order of handles returned from this function is NOT -/// affected by the ::ZE_AFFINITY_MASK, ::ZE_ENABLE_PCI_ID_DEVICE_ORDER, -/// or ::ZE_FLAT_DEVICE_HIERARCHY environment variables. +/// affected by the `ZE_AFFINITY_MASK`, `ZE_ENABLE_PCI_ID_DEVICE_ORDER`, +/// or `ZE_FLAT_DEVICE_HIERARCHY` environment variables. /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. /// @@ -732,6 +799,14 @@ zesDriverGetExtensionFunctionAddress( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -773,7 +848,7 @@ typedef enum _zes_engine_type_flag_t ZES_ENGINE_TYPE_FLAG_MEDIA = ZE_BIT(3), ///< Engines that process media workloads. ZES_ENGINE_TYPE_FLAG_DMA = ZE_BIT(4), ///< Engines that copy blocks of data. ZES_ENGINE_TYPE_FLAG_RENDER = ZE_BIT(5), ///< Engines that can process both 3D content and compute kernels. - ZES_ENGINE_TYPE_FLAG_FORCE_UINT32 = 0x7fffffff + ZES_ENGINE_TYPE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_ENGINE_TYPE_FLAG_* ENUMs } zes_engine_type_flag_t; @@ -784,7 +859,7 @@ typedef enum _zes_repair_status_t ZES_REPAIR_STATUS_UNSUPPORTED = 0, ///< The device does not support in-field repairs. ZES_REPAIR_STATUS_NOT_PERFORMED = 1, ///< The device has never been repaired. ZES_REPAIR_STATUS_PERFORMED = 2, ///< The device has been repaired. - ZES_REPAIR_STATUS_FORCE_UINT32 = 0x7fffffff + ZES_REPAIR_STATUS_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_REPAIR_STATUS_* ENUMs } zes_repair_status_t; @@ -796,7 +871,7 @@ typedef enum _zes_reset_reason_flag_t ZES_RESET_REASON_FLAG_WEDGED = ZE_BIT(0), ///< The device needs to be reset because one or more parts of the hardware ///< is wedged ZES_RESET_REASON_FLAG_REPAIR = ZE_BIT(1), ///< The device needs to be reset in order to complete in-field repairs - ZES_RESET_REASON_FLAG_FORCE_UINT32 = 0x7fffffff + ZES_RESET_REASON_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_RESET_REASON_FLAG_* ENUMs } zes_reset_reason_flag_t; @@ -807,7 +882,7 @@ typedef enum _zes_reset_type_t ZES_RESET_TYPE_WARM = 0, ///< Apply warm reset ZES_RESET_TYPE_COLD = 1, ///< Apply cold reset ZES_RESET_TYPE_FLR = 2, ///< Apply FLR reset - ZES_RESET_TYPE_FORCE_UINT32 = 0x7fffffff + ZES_RESET_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_RESET_TYPE_* ENUMs } zes_reset_type_t; @@ -854,7 +929,7 @@ typedef enum _zes_device_type_t ZES_DEVICE_TYPE_FPGA = 3, ///< Field Programmable Gate Array ZES_DEVICE_TYPE_MCA = 4, ///< Memory Copy Accelerator ZES_DEVICE_TYPE_VPU = 5, ///< Vision Processing Unit - ZES_DEVICE_TYPE_FORCE_UINT32 = 0x7fffffff + ZES_DEVICE_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_DEVICE_TYPE_* ENUMs } zes_device_type_t; @@ -867,7 +942,7 @@ typedef enum _zes_device_property_flag_t ZES_DEVICE_PROPERTY_FLAG_SUBDEVICE = ZE_BIT(1), ///< Device handle used for query represents a sub-device. ZES_DEVICE_PROPERTY_FLAG_ECC = ZE_BIT(2), ///< Device supports error correction memory access. ZES_DEVICE_PROPERTY_FLAG_ONDEMANDPAGING = ZE_BIT(3), ///< Device supports on-demand page-faulting. - ZES_DEVICE_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff + ZES_DEVICE_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_DEVICE_PROPERTY_FLAG_* ENUMs } zes_device_property_flag_t; @@ -932,6 +1007,14 @@ typedef struct _zes_device_ext_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -956,6 +1039,14 @@ zesDeviceGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -986,6 +1077,12 @@ zesDeviceGetState( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS @@ -1021,6 +1118,12 @@ zesDeviceReset( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1078,6 +1181,14 @@ typedef struct _zes_process_state_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1151,7 +1262,7 @@ typedef enum _zes_pci_link_status_t ZES_PCI_LINK_STATUS_QUALITY_ISSUES = 2, ///< The link is up but has quality and/or bandwidth degradation ZES_PCI_LINK_STATUS_STABILITY_ISSUES = 3, ///< The link has stability issues and preventing workloads making forward ///< progress - ZES_PCI_LINK_STATUS_FORCE_UINT32 = 0x7fffffff + ZES_PCI_LINK_STATUS_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_PCI_LINK_STATUS_* ENUMs } zes_pci_link_status_t; @@ -1162,7 +1273,7 @@ typedef enum _zes_pci_link_qual_issue_flag_t { ZES_PCI_LINK_QUAL_ISSUE_FLAG_REPLAYS = ZE_BIT(0), ///< A significant number of replays are occurring ZES_PCI_LINK_QUAL_ISSUE_FLAG_SPEED = ZE_BIT(1), ///< There is a degradation in the maximum bandwidth of the link - ZES_PCI_LINK_QUAL_ISSUE_FLAG_FORCE_UINT32 = 0x7fffffff + ZES_PCI_LINK_QUAL_ISSUE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_PCI_LINK_QUAL_ISSUE_FLAG_* ENUMs } zes_pci_link_qual_issue_flag_t; @@ -1172,7 +1283,7 @@ typedef uint32_t zes_pci_link_stab_issue_flags_t; typedef enum _zes_pci_link_stab_issue_flag_t { ZES_PCI_LINK_STAB_ISSUE_FLAG_RETRAINING = ZE_BIT(0), ///< Link retraining has occurred to deal with quality issues - ZES_PCI_LINK_STAB_ISSUE_FLAG_FORCE_UINT32 = 0x7fffffff + ZES_PCI_LINK_STAB_ISSUE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_PCI_LINK_STAB_ISSUE_FLAG_* ENUMs } zes_pci_link_stab_issue_flag_t; @@ -1205,7 +1316,7 @@ typedef enum _zes_pci_bar_type_t ZES_PCI_BAR_TYPE_MMIO = 0, ///< MMIO registers ZES_PCI_BAR_TYPE_ROM = 1, ///< ROM aperture ZES_PCI_BAR_TYPE_MEM = 2, ///< Device memory - ZES_PCI_BAR_TYPE_FORCE_UINT32 = 0x7fffffff + ZES_PCI_BAR_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_PCI_BAR_TYPE_* ENUMs } zes_pci_bar_type_t; @@ -1289,6 +1400,14 @@ typedef struct _zes_pci_stats_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1312,6 +1431,14 @@ zesDevicePciGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1335,6 +1462,14 @@ zesDevicePciGetState( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1366,6 +1501,13 @@ zesDevicePciGetBars( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1398,7 +1540,7 @@ typedef enum _zes_overclock_domain_t ZES_OVERCLOCK_DOMAIN_GPU_MEDIA = 64, ///< Overclocking a GPU with media assets on its own PLL/VR. ZES_OVERCLOCK_DOMAIN_VRAM = 128, ///< Overclocking device local memory. ZES_OVERCLOCK_DOMAIN_ADM = 256, ///< Overclocking LLC/L4 cache. - ZES_OVERCLOCK_DOMAIN_FORCE_UINT32 = 0x7fffffff + ZES_OVERCLOCK_DOMAIN_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_OVERCLOCK_DOMAIN_* ENUMs } zes_overclock_domain_t; @@ -1421,7 +1563,7 @@ typedef enum _zes_overclock_control_t ZES_OVERCLOCK_CONTROL_TEMP_LIMIT = 512, ///< This control changes the value of TjMax. ZES_OVERCLOCK_CONTROL_ITD_DISABLE = 1024, ///< This control permits disabling the adaptive voltage feature ITD ZES_OVERCLOCK_CONTROL_ACM_DISABLE = 2048, ///< This control permits disabling the adaptive voltage feature ACM. - ZES_OVERCLOCK_CONTROL_FORCE_UINT32 = 0x7fffffff + ZES_OVERCLOCK_CONTROL_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_OVERCLOCK_CONTROL_* ENUMs } zes_overclock_control_t; @@ -1435,7 +1577,7 @@ typedef enum _zes_overclock_mode_t ZES_OVERCLOCK_MODE_MODE_UNAVAILABLE = 4, ///< Overclocking is unavailable at this time since the system is running ///< on battery. ZES_OVERCLOCK_MODE_MODE_DISABLED = 5, ///< Overclock mode is disabled. - ZES_OVERCLOCK_MODE_FORCE_UINT32 = 0x7fffffff + ZES_OVERCLOCK_MODE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_OVERCLOCK_MODE_* ENUMs } zes_overclock_mode_t; @@ -1448,7 +1590,7 @@ typedef enum _zes_control_state_t ZES_CONTROL_STATE_STATE_ACTIVE = 2, ///< The overclock control has been set and it is active. ZES_CONTROL_STATE_STATE_DISABLED = 3, ///< The overclock control value has been disabled due to the current power ///< configuration (typically when running on DC). - ZES_CONTROL_STATE_FORCE_UINT32 = 0x7fffffff + ZES_CONTROL_STATE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_CONTROL_STATE_* ENUMs } zes_control_state_t; @@ -1461,7 +1603,7 @@ typedef enum _zes_pending_action_t ZES_PENDING_ACTION_PENDING_COLD_RESET = 2, ///< The requested change requires a device cold reset (hotplug, system ///< boot). ZES_PENDING_ACTION_PENDING_WARM_RESET = 3, ///< The requested change requires a device warm reset (PCIe FLR). - ZES_PENDING_ACTION_FORCE_UINT32 = 0x7fffffff + ZES_PENDING_ACTION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_PENDING_ACTION_* ENUMs } zes_pending_action_t; @@ -1476,7 +1618,7 @@ typedef enum _zes_vf_program_type_t ///< the frequency of those points cannot be changed ZES_VF_PROGRAM_TYPE_VF_VOLT_FIXED = 2, ///< Can only program the frequency for the V-F points that is reads back - ///< the voltage of each point cannot be changed. - ZES_VF_PROGRAM_TYPE_FORCE_UINT32 = 0x7fffffff + ZES_VF_PROGRAM_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_VF_PROGRAM_TYPE_* ENUMs } zes_vf_program_type_t; @@ -1486,7 +1628,7 @@ typedef enum _zes_vf_type_t { ZES_VF_TYPE_VOLT = 0, ///< VF Voltage point ZES_VF_TYPE_FREQ = 1, ///< VF Frequency point - ZES_VF_TYPE_FORCE_UINT32 = 0x7fffffff + ZES_VF_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_VF_TYPE_* ENUMs } zes_vf_type_t; @@ -1497,7 +1639,7 @@ typedef enum _zes_vf_array_type_t ZES_VF_ARRAY_TYPE_USER_VF_ARRAY = 0, ///< User V-F array ZES_VF_ARRAY_TYPE_DEFAULT_VF_ARRAY = 1, ///< Default V-F array ZES_VF_ARRAY_TYPE_LIVE_VF_ARRAY = 2, ///< Live V-F array - ZES_VF_ARRAY_TYPE_FORCE_UINT32 = 0x7fffffff + ZES_VF_ARRAY_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_VF_ARRAY_TYPE_* ENUMs } zes_vf_array_type_t; @@ -1580,6 +1722,13 @@ typedef struct _zes_vf_property_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -1602,6 +1751,13 @@ zesDeviceSetOverclockWaiver( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1630,10 +1786,18 @@ zesDeviceGetOverclockDomains( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_OVERCLOCK_DOMAIN_ADM < domainType` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pAvailableControls` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -1661,6 +1825,13 @@ zesDeviceGetOverclockControls( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -1685,6 +1856,13 @@ zesDeviceResetOverclockSettings( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1719,6 +1897,14 @@ zesDeviceReadOverclockState( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1752,6 +1938,13 @@ zesDeviceEnumOverclockDomains( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDomainHandle` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1777,6 +1970,13 @@ zesOverclockGetDomainProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDomainHandle` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1802,10 +2002,18 @@ zesOverclockGetDomainVFProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDomainHandle` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pControlProperties` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -1830,10 +2038,18 @@ zesOverclockGetDomainControlProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDomainHandle` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pValue` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -1858,10 +2074,18 @@ zesOverclockGetControlCurrentValue( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDomainHandle` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pValue` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -1887,10 +2111,18 @@ zesOverclockGetControlPendingValue( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDomainHandle` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pPendingAction` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -1917,10 +2149,18 @@ zesOverclockSetControlUserValue( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDomainHandle` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pControlState` /// + `nullptr == pPendingAction` @@ -1948,11 +2188,19 @@ zesOverclockGetControlState( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDomainHandle` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_VF_TYPE_FREQ < VFType` /// + `::ZES_VF_ARRAY_TYPE_LIVE_VF_ARRAY < VFArrayType` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == PointValue` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -1980,10 +2228,18 @@ zesOverclockGetVFPointValues( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDomainHandle` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_VF_TYPE_FREQ < VFType` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE /// + Overclocking is not supported on this control domain ZE_APIEXPORT ze_result_t ZE_APICALL @@ -2011,7 +2267,7 @@ typedef enum _zes_diag_result_t ZES_DIAG_RESULT_FAIL_CANT_REPAIR = 2, ///< Diagnostic had problems setting up repairs ZES_DIAG_RESULT_REBOOT_FOR_REPAIR = 3, ///< Diagnostics found errors, setup for repair and reboot is required to ///< complete the process - ZES_DIAG_RESULT_FORCE_UINT32 = 0x7fffffff + ZES_DIAG_RESULT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_DIAG_RESULT_* ENUMs } zes_diag_result_t; @@ -2066,6 +2322,14 @@ typedef struct _zes_diag_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2099,6 +2363,14 @@ zesDeviceEnumDiagnosticTestSuites( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDiagnostics` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2127,6 +2399,14 @@ zesDiagnosticsGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDiagnostics` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2167,6 +2447,13 @@ zesDiagnosticsGetTests( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDiagnostics` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2197,7 +2484,7 @@ typedef enum _zes_device_ecc_state_t ZES_DEVICE_ECC_STATE_UNAVAILABLE = 0, ///< None ZES_DEVICE_ECC_STATE_ENABLED = 1, ///< ECC enabled. ZES_DEVICE_ECC_STATE_DISABLED = 2, ///< ECC disabled. - ZES_DEVICE_ECC_STATE_FORCE_UINT32 = 0x7fffffff + ZES_DEVICE_ECC_STATE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_DEVICE_ECC_STATE_* ENUMs } zes_device_ecc_state_t; @@ -2209,7 +2496,7 @@ typedef enum _zes_device_action_t ZES_DEVICE_ACTION_WARM_CARD_RESET = 1, ///< Warm reset of the card. ZES_DEVICE_ACTION_COLD_CARD_RESET = 2, ///< Cold reset of the card. ZES_DEVICE_ACTION_COLD_SYSTEM_REBOOT = 3, ///< Cold reboot of the system. - ZES_DEVICE_ACTION_FORCE_UINT32 = 0x7fffffff + ZES_DEVICE_ACTION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_DEVICE_ACTION_* ENUMs } zes_device_action_t; @@ -2250,6 +2537,14 @@ typedef struct _zes_device_ecc_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2273,6 +2568,14 @@ zesDeviceEccAvailable( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2296,6 +2599,14 @@ zesDeviceEccConfigurable( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2321,6 +2632,14 @@ zesDeviceGetEccState( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2328,6 +2647,7 @@ zesDeviceGetEccState( /// + `nullptr == pState` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_DEVICE_ECC_STATE_DISABLED < newState->state` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_WARNING_ACTION_REQUIRED /// + User must look at the pendingAction attribute of pState & perform the action required to complete the ECC state change. ZE_APIEXPORT ze_result_t ZE_APICALL @@ -2386,7 +2706,7 @@ typedef enum _zes_engine_group_t ///< engines so activity of such an engine may not be indicative of the ///< underlying resource utilization - use ::ZES_ENGINE_GROUP_MEDIA_ALL for ///< that. - ZES_ENGINE_GROUP_FORCE_UINT32 = 0x7fffffff + ZES_ENGINE_GROUP_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_ENGINE_GROUP_* ENUMs } zes_engine_group_t; @@ -2445,6 +2765,14 @@ typedef struct _zes_engine_stats_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2478,6 +2806,14 @@ zesDeviceEnumEngineGroups( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEngine` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2503,6 +2839,14 @@ zesEngineGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEngine` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2554,7 +2898,7 @@ typedef enum _zes_event_type_flag_t ZES_EVENT_TYPE_FLAG_DEVICE_RESET_REQUIRED = ZE_BIT(14), ///< Event is triggered when the device needs to be reset (use ///< ::zesDeviceGetState() to determine the reasons for the reset). ZES_EVENT_TYPE_FLAG_SURVIVABILITY_MODE_DETECTED = ZE_BIT(15), ///< Event is triggered when graphics driver encounter an error condition. - ZES_EVENT_TYPE_FLAG_FORCE_UINT32 = 0x7fffffff + ZES_EVENT_TYPE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_EVENT_TYPE_FLAG_* ENUMs } zes_event_type_flag_t; @@ -2571,10 +2915,19 @@ typedef enum _zes_event_type_flag_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0xffff < events` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zesDeviceEventRegister( zes_device_handle_t hDevice, ///< [in] The device handle. @@ -2594,6 +2947,12 @@ zesDeviceEventRegister( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2639,6 +2998,12 @@ zesDriverEventListen( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2701,7 +3066,7 @@ typedef enum _zes_fabric_port_status_t ZES_FABRIC_PORT_STATUS_FAILED = 3, ///< Port connection instabilities are preventing workloads making forward ///< progress ZES_FABRIC_PORT_STATUS_DISABLED = 4, ///< The port is configured down - ZES_FABRIC_PORT_STATUS_FORCE_UINT32 = 0x7fffffff + ZES_FABRIC_PORT_STATUS_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_FABRIC_PORT_STATUS_* ENUMs } zes_fabric_port_status_t; @@ -2712,7 +3077,7 @@ typedef enum _zes_fabric_port_qual_issue_flag_t { ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_LINK_ERRORS = ZE_BIT(0), ///< Excessive link errors are occurring ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_SPEED = ZE_BIT(1), ///< There is a degradation in the bitrate and/or width of the link - ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_FORCE_UINT32 = 0x7fffffff + ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_* ENUMs } zes_fabric_port_qual_issue_flag_t; @@ -2732,7 +3097,7 @@ typedef enum _zes_fabric_port_failure_flag_t ///< period of time. Driver will allow port to continue to train, but will ///< not enable the port for use until the port has been disabled and ///< subsequently re-enabled using ::zesFabricPortSetConfig(). - ZES_FABRIC_PORT_FAILURE_FLAG_FORCE_UINT32 = 0x7fffffff + ZES_FABRIC_PORT_FAILURE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_FABRIC_PORT_FAILURE_FLAG_* ENUMs } zes_fabric_port_failure_flag_t; @@ -2882,6 +3247,14 @@ typedef struct _zes_fabric_port_error_counters_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2915,6 +3288,14 @@ zesDeviceEnumFabricPorts( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPort` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2938,6 +3319,14 @@ zesFabricPortGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPort` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2962,6 +3351,14 @@ zesFabricPortGetLinkType( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPort` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2985,6 +3382,13 @@ zesFabricPortGetConfig( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPort` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3011,6 +3415,14 @@ zesFabricPortSetConfig( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPort` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3034,6 +3446,13 @@ zesFabricPortGetState( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPort` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3062,6 +3481,13 @@ zesFabricPortGetThroughput( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPort` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3087,6 +3513,14 @@ zesFabricPortGetFabricErrorCounters( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3117,7 +3551,7 @@ typedef enum _zes_fan_speed_mode_t ZES_FAN_SPEED_MODE_FIXED = 1, ///< The fan speed is currently set to a fixed value ZES_FAN_SPEED_MODE_TABLE = 2, ///< The fan speed is currently controlled dynamically by hardware based on ///< a temp/speed table - ZES_FAN_SPEED_MODE_FORCE_UINT32 = 0x7fffffff + ZES_FAN_SPEED_MODE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_FAN_SPEED_MODE_* ENUMs } zes_fan_speed_mode_t; @@ -3127,7 +3561,7 @@ typedef enum _zes_fan_speed_units_t { ZES_FAN_SPEED_UNITS_RPM = 0, ///< The fan speed is in units of revolutions per minute (rpm) ZES_FAN_SPEED_UNITS_PERCENT = 1, ///< The fan speed is a percentage of the maximum speed of the fan - ZES_FAN_SPEED_UNITS_FORCE_UINT32 = 0x7fffffff + ZES_FAN_SPEED_UNITS_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_FAN_SPEED_UNITS_* ENUMs } zes_fan_speed_units_t; @@ -3219,6 +3653,14 @@ typedef struct _zes_fan_config_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3252,9 +3694,17 @@ zesDeviceEnumFans( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFan` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hFan` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pProperties` ZE_APIEXPORT ze_result_t ZE_APICALL zesFanGetProperties( @@ -3276,6 +3726,14 @@ zesFanGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFan` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3300,6 +3758,13 @@ zesFanGetConfig( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFan` /// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS @@ -3323,6 +3788,12 @@ zesFanSetDefaultMode( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFan` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3351,6 +3822,11 @@ zesFanSetFixedSpeedMode( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFan` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3380,10 +3856,18 @@ zesFanSetSpeedTableMode( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFan` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_FAN_SPEED_UNITS_PERCENT < units` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pSpeed` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -3436,6 +3920,14 @@ typedef struct _zes_firmware_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3469,6 +3961,14 @@ zesDeviceEnumFirmwares( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFirmware` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3497,6 +3997,13 @@ zesFirmwareGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFirmware` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3523,6 +4030,14 @@ zesFirmwareFlash( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFirmware` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3549,6 +4064,14 @@ zesFirmwareGetFlashProgress( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFirmware` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3574,7 +4097,7 @@ typedef enum _zes_freq_domain_t ZES_FREQ_DOMAIN_GPU = 0, ///< GPU Core Domain. ZES_FREQ_DOMAIN_MEMORY = 1, ///< Local Memory Domain. ZES_FREQ_DOMAIN_MEDIA = 2, ///< GPU Media Domain. - ZES_FREQ_DOMAIN_FORCE_UINT32 = 0x7fffffff + ZES_FREQ_DOMAIN_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_FREQ_DOMAIN_* ENUMs } zes_freq_domain_t; @@ -3648,7 +4171,10 @@ typedef enum _zes_freq_throttle_reason_flag_t ZES_FREQ_THROTTLE_REASON_FLAG_SW_RANGE = ZE_BIT(5), ///< frequency throttled due to software supplied frequency range ZES_FREQ_THROTTLE_REASON_FLAG_HW_RANGE = ZE_BIT(6), ///< frequency throttled due to a sub block that has a lower frequency ///< range when it receives clocks - ZES_FREQ_THROTTLE_REASON_FLAG_FORCE_UINT32 = 0x7fffffff + ZES_FREQ_THROTTLE_REASON_FLAG_VOLTAGE = ZE_BIT(7), ///< frequency throttled due to voltage excursion + ZES_FREQ_THROTTLE_REASON_FLAG_THERMAL = ZE_BIT(8), ///< frequency throttled due to thermal conditions + ZES_FREQ_THROTTLE_REASON_FLAG_POWER = ZE_BIT(9), ///< frequency throttled due to power constraints + ZES_FREQ_THROTTLE_REASON_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_FREQ_THROTTLE_REASON_FLAG_* ENUMs } zes_freq_throttle_reason_flag_t; @@ -3720,7 +4246,7 @@ typedef enum _zes_oc_mode_t ///< specified overclock values. This mode disables OVERRIDE and ///< INTERPOLATIVE modes. This mode can damage the part, most of the ///< protections are disabled on this mode. - ZES_OC_MODE_FORCE_UINT32 = 0x7fffffff + ZES_OC_MODE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_OC_MODE_* ENUMs } zes_oc_mode_t; @@ -3776,6 +4302,14 @@ typedef struct _zes_oc_capabilities_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3809,6 +4343,14 @@ zesDeviceEnumFrequencyDomains( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3835,6 +4377,14 @@ zesFrequencyGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3866,6 +4416,14 @@ zesFrequencyGetAvailableClocks( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3893,6 +4451,13 @@ zesFrequencyGetRange( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3920,6 +4485,14 @@ zesFrequencySetRange( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3943,6 +4516,14 @@ zesFrequencyGetState( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3968,6 +4549,14 @@ zesFrequencyGetThrottleTime( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3993,6 +4582,11 @@ zesFrequencyOcGetCapabilities( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4029,6 +4623,11 @@ zesFrequencyOcGetFrequencyTarget( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -4062,6 +4661,11 @@ zesFrequencyOcSetFrequencyTarget( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4100,6 +4704,11 @@ zesFrequencyOcGetVoltageTarget( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -4135,10 +4744,16 @@ zesFrequencyOcSetVoltageTarget( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_OC_MODE_FIXED < CurrentOcMode` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE /// + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t). /// + The specified voltage and/or frequency overclock settings exceed the hardware values (see the `maxOcFrequency`, `maxOcVoltage`, `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t). @@ -4167,6 +4782,11 @@ zesFrequencyOcSetMode( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4199,6 +4819,13 @@ zesFrequencyOcGetMode( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4228,6 +4855,10 @@ zesFrequencyOcGetIccMax( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -4259,6 +4890,13 @@ zesFrequencyOcSetIccMax( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4287,6 +4925,10 @@ zesFrequencyOcGetTjMax( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -4365,6 +5007,14 @@ typedef struct _zes_led_state_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4398,6 +5048,14 @@ zesDeviceEnumLeds( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hLed` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4421,6 +5079,14 @@ zesLedGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hLed` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4444,6 +5110,13 @@ zesLedGetState( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hLed` /// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS @@ -4467,6 +5140,12 @@ zesLedSetState( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hLed` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4512,7 +5191,7 @@ typedef enum _zes_mem_type_t ZES_MEM_TYPE_GDDR6 = 17, ///< GDDR6 memory ZES_MEM_TYPE_GDDR6X = 18, ///< GDDR6X memory ZES_MEM_TYPE_GDDR7 = 19, ///< GDDR7 memory - ZES_MEM_TYPE_FORCE_UINT32 = 0x7fffffff + ZES_MEM_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_MEM_TYPE_* ENUMs } zes_mem_type_t; @@ -4522,7 +5201,7 @@ typedef enum _zes_mem_loc_t { ZES_MEM_LOC_SYSTEM = 0, ///< System memory ZES_MEM_LOC_DEVICE = 1, ///< On board local device memory - ZES_MEM_LOC_FORCE_UINT32 = 0x7fffffff + ZES_MEM_LOC_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_MEM_LOC_* ENUMs } zes_mem_loc_t; @@ -4537,7 +5216,7 @@ typedef enum _zes_mem_health_t ZES_MEM_HEALTH_CRITICAL = 3, ///< Operating with reduced memory to cover banks with too many ///< uncorrectable errors. ZES_MEM_HEALTH_REPLACE = 4, ///< Device should be replaced due to excessive uncorrectable errors. - ZES_MEM_HEALTH_FORCE_UINT32 = 0x7fffffff + ZES_MEM_HEALTH_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_MEM_HEALTH_* ENUMs } zes_mem_health_t; @@ -4553,9 +5232,9 @@ typedef struct _zes_mem_properties_t ///< that the resource is on the device of the calling Sysman handle uint32_t subdeviceId; ///< [out] If onSubdevice is true, this gives the ID of the sub-device zes_mem_loc_t location; ///< [out] Location of this memory (system, device) - uint64_t physicalSize; ///< [out] Physical memory size in bytes. A value of 0 indicates that this - ///< property is not known. However, a call to ::zesMemoryGetState() will - ///< correctly return the total size of usable memory. + uint64_t physicalSize; ///< [out] Physical memory capacity in bytes. A value of 0 indicates that + ///< this property is not known. However, a call to zesMemoryGetState() + ///< will return the available free physical memory. int32_t busWidth; ///< [out] Width of the memory bus. A value of -1 means that this property ///< is unknown. int32_t numChannels; ///< [out] The number of memory channels. A value of -1 means that this @@ -4567,17 +5246,21 @@ typedef struct _zes_mem_properties_t /// @brief Memory state - health, allocated /// /// @details -/// - Percent allocation is given by 100 * (size - free / size. -/// - Percent free is given by 100 * free / size. +/// - Percent free is given by 100 * free / pysical mem size. typedef struct _zes_mem_state_t { zes_structure_type_t stype; ///< [in] type of this structure const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific ///< structure (i.e. contains stype and pNext). zes_mem_health_t health; ///< [out] Indicates the health of the memory - uint64_t free; ///< [out] The free memory in bytes + uint64_t free; ///< [out] The free physical memory in bytes uint64_t size; ///< [out] The total allocatable memory in bytes (can be less than the - ///< `physicalSize` member of ::zes_mem_properties_t) + ///< `physicalSize` member of ::zes_mem_properties_t). *DEPRECATED* + ///< This member can no longer track the allocatable memory reliably. + ///< Clients depending on this information can use the + ///< zeDeviceGetMemoryProperties with + ///< ze_device_usablemem_size_ext_properties_t extention to get information + ///< of the available usable memory. } zes_mem_state_t; @@ -4635,6 +5318,14 @@ typedef struct _zes_mem_ext_bandwidth_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4668,6 +5359,14 @@ zesDeviceEnumMemoryModules( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMemory` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4691,6 +5390,14 @@ zesMemoryGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMemory` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4714,6 +5421,13 @@ zesMemoryGetState( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMemory` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4764,6 +5478,14 @@ typedef struct _zes_perf_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4797,6 +5519,14 @@ zesDeviceEnumPerformanceFactorDomains( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPerf` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4821,6 +5551,14 @@ zesPerformanceFactorGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPerf` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4850,6 +5588,14 @@ zesPerformanceFactorGetConfig( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPerf` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -4875,7 +5621,7 @@ typedef enum _zes_power_domain_t ZES_POWER_DOMAIN_STACK = 3, ///< The PUnit power domain is a stack-level power domain. ZES_POWER_DOMAIN_MEMORY = 4, ///< The PUnit power domain is a memory-level power domain. ZES_POWER_DOMAIN_GPU = 5, ///< The PUnit power domain is a GPU-level power domain. - ZES_POWER_DOMAIN_FORCE_UINT32 = 0x7fffffff + ZES_POWER_DOMAIN_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_POWER_DOMAIN_* ENUMs } zes_power_domain_t; @@ -4895,7 +5641,7 @@ typedef enum _zes_power_level_t ZES_POWER_LEVEL_INSTANTANEOUS = 4, ///< The PUnit predicts effective power draw using the current device ///< configuration (frequency, voltage, etc...) & throttles proactively to ///< stay within the specified limit. - ZES_POWER_LEVEL_FORCE_UINT32 = 0x7fffffff + ZES_POWER_LEVEL_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_POWER_LEVEL_* ENUMs } zes_power_level_t; @@ -4907,7 +5653,7 @@ typedef enum _zes_power_source_t ///< battery powered. ZES_POWER_SOURCE_MAINS = 1, ///< Limit active only when the device is mains powered. ZES_POWER_SOURCE_BATTERY = 2, ///< Limit active only when the device is battery powered. - ZES_POWER_SOURCE_FORCE_UINT32 = 0x7fffffff + ZES_POWER_SOURCE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_POWER_SOURCE_* ENUMs } zes_power_source_t; @@ -4918,7 +5664,7 @@ typedef enum _zes_limit_unit_t ZES_LIMIT_UNIT_UNKNOWN = 0, ///< The PUnit power monitoring unit cannot be determined. ZES_LIMIT_UNIT_CURRENT = 1, ///< The limit is specified in milliamperes of current drawn. ZES_LIMIT_UNIT_POWER = 2, ///< The limit is specified in milliwatts of power generated. - ZES_LIMIT_UNIT_FORCE_UINT32 = 0x7fffffff + ZES_LIMIT_UNIT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_LIMIT_UNIT_* ENUMs } zes_limit_unit_t; @@ -5049,6 +5795,14 @@ typedef struct _zes_energy_threshold_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5083,6 +5837,13 @@ zesDeviceEnumPowerDomains( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5108,6 +5869,14 @@ zesDeviceGetCardPowerDomain( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPower` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5131,6 +5900,14 @@ zesPowerGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPower` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5156,6 +5933,14 @@ zesPowerGetEnergyCounter( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPower` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -5183,6 +5968,12 @@ zesPowerGetLimits( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPower` /// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS @@ -5213,6 +6004,12 @@ zesPowerSetLimits( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPower` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5255,6 +6052,11 @@ zesPowerGetEnergyThreshold( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPower` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -5285,7 +6087,7 @@ typedef enum _zes_psu_voltage_status_t ZES_PSU_VOLTAGE_STATUS_NORMAL = 1, ///< No unusual voltages have been detected ZES_PSU_VOLTAGE_STATUS_OVER = 2, ///< Over-voltage has occurred ZES_PSU_VOLTAGE_STATUS_UNDER = 3, ///< Under-voltage has occurred - ZES_PSU_VOLTAGE_STATUS_FORCE_UINT32 = 0x7fffffff + ZES_PSU_VOLTAGE_STATUS_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_PSU_VOLTAGE_STATUS_* ENUMs } zes_psu_voltage_status_t; @@ -5335,6 +6137,14 @@ typedef struct _zes_psu_state_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5368,6 +6178,14 @@ zesDeviceEnumPsus( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPsu` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5391,6 +6209,14 @@ zesPsuGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPsu` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5414,7 +6240,7 @@ typedef enum _zes_ras_error_type_t { ZES_RAS_ERROR_TYPE_CORRECTABLE = 0, ///< Errors were corrected by hardware ZES_RAS_ERROR_TYPE_UNCORRECTABLE = 1, ///< Error were not corrected - ZES_RAS_ERROR_TYPE_FORCE_UINT32 = 0x7fffffff + ZES_RAS_ERROR_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_RAS_ERROR_TYPE_* ENUMs } zes_ras_error_type_t; @@ -5433,7 +6259,7 @@ typedef enum _zes_ras_error_cat_t ZES_RAS_ERROR_CAT_CACHE_ERRORS = 5, ///< The number of errors that have occurred in caches (L1/L3/register ///< file/shared local memory/sampler) ZES_RAS_ERROR_CAT_DISPLAY_ERRORS = 6, ///< The number of errors that have occurred in the display - ZES_RAS_ERROR_CAT_FORCE_UINT32 = 0x7fffffff + ZES_RAS_ERROR_CAT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_RAS_ERROR_CAT_* ENUMs } zes_ras_error_cat_t; @@ -5520,6 +6346,14 @@ typedef struct _zes_ras_config_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5555,6 +6389,14 @@ zesDeviceEnumRasErrorSets( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hRas` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5587,6 +6429,14 @@ zesRasGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hRas` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5622,6 +6472,12 @@ zesRasGetConfig( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hRas` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5652,6 +6508,13 @@ zesRasSetConfig( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hRas` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5688,7 +6551,7 @@ typedef enum _zes_sched_mode_t ///< contexts must wait until the running context completes with no further ///< submitted work. ZES_SCHED_MODE_COMPUTE_UNIT_DEBUG = 3, ///< [DEPRECATED] No longer supported. - ZES_SCHED_MODE_FORCE_UINT32 = 0x7fffffff + ZES_SCHED_MODE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_SCHED_MODE_* ENUMs } zes_sched_mode_t; @@ -5771,6 +6634,14 @@ typedef struct _zes_sched_timeslice_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5804,6 +6675,14 @@ zesDeviceEnumSchedulers( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hScheduler` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5827,6 +6706,13 @@ zesSchedulerGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hScheduler` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5852,7 +6738,14 @@ zesSchedulerGetCurrentMode( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hScheduler` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pConfig` @@ -5879,6 +6772,13 @@ zesSchedulerGetTimeoutModeProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hScheduler` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5911,6 +6811,12 @@ zesSchedulerGetTimesliceModeProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hScheduler` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5945,6 +6851,12 @@ zesSchedulerSetTimeoutMode( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hScheduler` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5979,6 +6891,12 @@ zesSchedulerSetTimesliceMode( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hScheduler` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6013,6 +6931,12 @@ zesSchedulerSetExclusiveMode( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hScheduler` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6040,7 +6964,7 @@ zesSchedulerSetComputeUnitDebugMode( typedef enum _zes_standby_type_t { ZES_STANDBY_TYPE_GLOBAL = 0, ///< Control the overall standby policy of the device/sub-device - ZES_STANDBY_TYPE_FORCE_UINT32 = 0x7fffffff + ZES_STANDBY_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_STANDBY_TYPE_* ENUMs } zes_standby_type_t; @@ -6065,7 +6989,7 @@ typedef enum _zes_standby_promo_mode_t ZES_STANDBY_PROMO_MODE_DEFAULT = 0, ///< Best compromise between performance and energy savings. ZES_STANDBY_PROMO_MODE_NEVER = 1, ///< The device/component will never shutdown. This can improve performance ///< but uses more energy. - ZES_STANDBY_PROMO_MODE_FORCE_UINT32 = 0x7fffffff + ZES_STANDBY_PROMO_MODE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_STANDBY_PROMO_MODE_* ENUMs } zes_standby_promo_mode_t; @@ -6082,6 +7006,14 @@ typedef enum _zes_standby_promo_mode_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6115,6 +7047,14 @@ zesDeviceEnumStandbyDomains( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hStandby` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6138,6 +7078,14 @@ zesStandbyGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hStandby` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6161,10 +7109,18 @@ zesStandbyGetMode( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hStandby` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_STANDBY_PROMO_MODE_NEVER < mode` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS /// + User does not have permissions to make these modifications. ZE_APIEXPORT ze_result_t ZE_APICALL @@ -6192,7 +7148,8 @@ typedef enum _zes_temp_sensors_t ZES_TEMP_SENSORS_MEMORY_MIN = 5, ///< The minimum temperature across all sensors in the local device memory ZES_TEMP_SENSORS_GPU_BOARD = 6, ///< The maximum temperature across all sensors in the GPU Board ZES_TEMP_SENSORS_GPU_BOARD_MIN = 7, ///< The minimum temperature across all sensors in the GPU Board - ZES_TEMP_SENSORS_FORCE_UINT32 = 0x7fffffff + ZES_TEMP_SENSORS_VOLTAGE_REGULATOR = 8, ///< The maximum temperature across all sensors in the Voltage Regulator + ZES_TEMP_SENSORS_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_TEMP_SENSORS_* ENUMs } zes_temp_sensors_t; @@ -6262,6 +7219,14 @@ typedef struct _zes_temp_config_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6295,6 +7260,14 @@ zesDeviceEnumTemperatureSensors( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hTemperature` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6319,6 +7292,12 @@ zesTemperatureGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hTemperature` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6360,6 +7339,10 @@ zesTemperatureGetConfig( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hTemperature` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6393,6 +7376,14 @@ zesTemperatureSetConfig( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hTemperature` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6404,6 +7395,129 @@ zesTemperatureGetState( ///< in degrees Celsius. ); +#if !defined(__GNUC__) +#pragma endregion +#endif +// Intel 'oneAPI' Level-Zero Sysman Extension APIs Device-ECC default properties +#if !defined(__GNUC__) +#pragma region eccState +#endif +/////////////////////////////////////////////////////////////////////////////// +#ifndef ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_NAME +/// @brief Device ECC default properties Extension Name +#define ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_NAME "ZES_extension_device_ecc_default_properties" +#endif // ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_NAME + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Device ECC default properties Extension Version(s) +typedef enum _zes_device_ecc_default_properties_ext_version_t +{ + ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ),///< version 1.0 + ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ),///< latest known version + ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_* ENUMs + +} zes_device_ecc_default_properties_ext_version_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief This structure may be passed to ::zesDeviceGetEccState as pNext member +/// of ::zes_device_ecc_properties_t. +typedef struct _zes_device_ecc_default_properties_ext_t +{ + zes_structure_type_t stype; ///< [in] type of this structure + void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + zes_device_ecc_state_t defaultState; ///< [out] Default ECC state + +} zes_device_ecc_default_properties_ext_t; + +#if !defined(__GNUC__) +#pragma endregion +#endif +// Intel 'oneAPI' Level-Zero Sysman Extension APIs for PCI Link Speed Downgrade +#if !defined(__GNUC__) +#pragma region pciLinkSpeedDowngrade +#endif +/////////////////////////////////////////////////////////////////////////////// +#ifndef ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_NAME +/// @brief PCI Link Speed Downgrade Extension Name +#define ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_NAME "ZES_extension_pci_link_speed_downgrade" +#endif // ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_NAME + +/////////////////////////////////////////////////////////////////////////////// +/// @brief PCI Link Speed Downgrade Extension Version(s) +typedef enum _zes_pci_link_speed_downgrade_ext_version_t +{ + ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 + ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version + ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_* ENUMs + +} zes_pci_link_speed_downgrade_ext_version_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Query PCIe downgrade status. +/// +/// @details +/// - This structure can be passed in the 'pNext' of ::zes_pci_state_t +typedef struct _zes_pci_link_speed_downgrade_ext_state_t +{ + zes_structure_type_t stype; ///< [in] type of this structure + const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + ze_bool_t pciLinkSpeedDowngradeStatus; ///< [out] Returns the current PCIe downgrade status. + +} zes_pci_link_speed_downgrade_ext_state_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Query PCIe downgrade capability. +/// +/// @details +/// - This structure can be passed in the 'pNext' of ::zes_pci_properties_t +typedef struct _zes_pci_link_speed_downgrade_ext_properties_t +{ + zes_structure_type_t stype; ///< [in] type of this structure + void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + ze_bool_t pciLinkSpeedUpdateCapable; ///< [out] Returns if PCIe downgrade capability is available. + int32_t maxPciGenSupported; ///< [out] Returns the max supported PCIe generation of the device. -1 + ///< indicates the information is not available + +} zes_pci_link_speed_downgrade_ext_properties_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Update PCI Link Speed (Downgrade or Upgrade (restore to its default +/// speed)) +/// +/// @details +/// - This function allows updating the PCI link speed to downgrade or +/// upgrade (restore to its default speed) the connection. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hDevice` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == pendingAction` +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// + User does not have permissions to perform this operation. +ZE_APIEXPORT ze_result_t ZE_APICALL +zesDevicePciLinkSpeedUpdateExt( + zes_device_handle_t hDevice, ///< [in] Sysman handle of the device. + ze_bool_t shouldDowngrade, ///< [in] boolean value to decide whether to perform PCIe downgrade(true) + ///< or set to default speed(false) + zes_device_action_t* pendingAction ///< [out] Pending action + ); + #if !defined(__GNUC__) #pragma endregion #endif @@ -6423,7 +7537,7 @@ typedef enum _zes_power_limits_ext_version_t { ZES_POWER_LIMITS_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZES_POWER_LIMITS_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZES_POWER_LIMITS_EXT_VERSION_FORCE_UINT32 = 0x7fffffff + ZES_POWER_LIMITS_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_POWER_LIMITS_EXT_VERSION_* ENUMs } zes_power_limits_ext_version_t; @@ -6490,6 +7604,14 @@ typedef struct _zes_power_ext_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPower` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6529,6 +7651,12 @@ zesPowerGetLimitsExt( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPower` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6563,7 +7691,7 @@ typedef enum _zes_engine_activity_ext_version_t { ZES_ENGINE_ACTIVITY_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZES_ENGINE_ACTIVITY_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZES_ENGINE_ACTIVITY_EXT_VERSION_FORCE_UINT32 = 0x7fffffff + ZES_ENGINE_ACTIVITY_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_ENGINE_ACTIVITY_EXT_VERSION_* ENUMs } zes_engine_activity_ext_version_t; @@ -6604,6 +7732,14 @@ typedef struct _zes_engine_ext_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEngine` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6647,7 +7783,7 @@ typedef enum _zes_ras_state_exp_version_t { ZES_RAS_STATE_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZES_RAS_STATE_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZES_RAS_STATE_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZES_RAS_STATE_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_RAS_STATE_EXP_VERSION_* ENUMs } zes_ras_state_exp_version_t; @@ -6669,7 +7805,7 @@ typedef enum _zes_ras_error_category_exp_t ZES_RAS_ERROR_CATEGORY_EXP_MEMORY_ERRORS = 7, ///< The number of errors that have occurred in Memory ZES_RAS_ERROR_CATEGORY_EXP_SCALE_ERRORS = 8, ///< The number of errors that have occurred in Scale Fabric ZES_RAS_ERROR_CATEGORY_EXP_L3FABRIC_ERRORS = 9, ///< The number of errors that have occurred in L3 Fabric - ZES_RAS_ERROR_CATEGORY_EXP_FORCE_UINT32 = 0x7fffffff + ZES_RAS_ERROR_CATEGORY_EXP_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_RAS_ERROR_CATEGORY_EXP_* ENUMs } zes_ras_error_category_exp_t; @@ -6698,6 +7834,14 @@ typedef struct _zes_ras_state_exp_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hRas` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6734,10 +7878,18 @@ zesRasGetStateExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hRas` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_RAS_ERROR_CATEGORY_EXP_L3FABRIC_ERRORS < category` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS /// + Don't have permissions to clear error counters. ZE_APIEXPORT ze_result_t ZE_APICALL @@ -6765,7 +7917,7 @@ typedef enum _zes_mem_page_offline_state_exp_version_t { ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_* ENUMs } zes_mem_page_offline_state_exp_version_t; @@ -6805,7 +7957,7 @@ typedef enum _zes_mem_bandwidth_counter_bits_exp_version_t { ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_* ENUMs } zes_mem_bandwidth_counter_bits_exp_version_t; @@ -6847,7 +7999,7 @@ typedef enum _zes_power_domain_properties_exp_version_t { ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_* ENUMs } zes_power_domain_properties_exp_version_t; @@ -6887,7 +8039,7 @@ typedef enum _zes_firmware_security_exp_version_t { ZES_FIRMWARE_SECURITY_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZES_FIRMWARE_SECURITY_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZES_FIRMWARE_SECURITY_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZES_FIRMWARE_SECURITY_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_FIRMWARE_SECURITY_EXP_VERSION_* ENUMs } zes_firmware_security_exp_version_t; @@ -6908,6 +8060,14 @@ typedef enum _zes_firmware_security_exp_version_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFirmware` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6932,6 +8092,14 @@ zesFirmwareGetSecurityVersionExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFirmware` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -6958,7 +8126,7 @@ typedef enum _zes_sysman_device_mapping_exp_version_t { ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ),///< latest known version - ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_* ENUMs } zes_sysman_device_mapping_exp_version_t; @@ -6987,6 +8155,14 @@ typedef struct _zes_subdevice_exp_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7019,6 +8195,14 @@ zesDeviceGetSubDevicePropertiesExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7052,25 +8236,27 @@ zesDriverGetDeviceByUuidExp( /// @brief Virtual Function Management Extension Version(s) typedef enum _zes_vf_management_exp_version_t { - ZES_VF_MANAGEMENT_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 - ZES_VF_MANAGEMENT_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZES_VF_MANAGEMENT_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZES_VF_MANAGEMENT_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 (deprecated) + ZES_VF_MANAGEMENT_EXP_VERSION_1_1 = ZE_MAKE_VERSION( 1, 1 ), ///< version 1.1 (deprecated) + ZES_VF_MANAGEMENT_EXP_VERSION_1_2 = ZE_MAKE_VERSION( 1, 2 ), ///< version 1.2 + ZES_VF_MANAGEMENT_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 2 ), ///< latest known version + ZES_VF_MANAGEMENT_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_VF_MANAGEMENT_EXP_VERSION_* ENUMs } zes_vf_management_exp_version_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Virtual function memory types +/// @brief Virtual function memory types (deprecated) typedef uint32_t zes_vf_info_mem_type_exp_flags_t; typedef enum _zes_vf_info_mem_type_exp_flag_t { ZES_VF_INFO_MEM_TYPE_EXP_FLAG_MEM_TYPE_SYSTEM = ZE_BIT(0), ///< System memory ZES_VF_INFO_MEM_TYPE_EXP_FLAG_MEM_TYPE_DEVICE = ZE_BIT(1), ///< Device local memory - ZES_VF_INFO_MEM_TYPE_EXP_FLAG_FORCE_UINT32 = 0x7fffffff + ZES_VF_INFO_MEM_TYPE_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_VF_INFO_MEM_TYPE_EXP_FLAG_* ENUMs } zes_vf_info_mem_type_exp_flag_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Virtual function utilization flag bit fields +/// @brief Virtual function utilization flag bit fields (deprecated) typedef uint32_t zes_vf_info_util_exp_flags_t; typedef enum _zes_vf_info_util_exp_flag_t { @@ -7078,12 +8264,12 @@ typedef enum _zes_vf_info_util_exp_flag_t ZES_VF_INFO_UTIL_EXP_FLAG_INFO_MEM_CPU = ZE_BIT(1), ///< System memory utilization associated with virtual function ZES_VF_INFO_UTIL_EXP_FLAG_INFO_MEM_GPU = ZE_BIT(2), ///< Device memory utilization associated with virtual function ZES_VF_INFO_UTIL_EXP_FLAG_INFO_ENGINE = ZE_BIT(3), ///< Engine utilization associated with virtual function - ZES_VF_INFO_UTIL_EXP_FLAG_FORCE_UINT32 = 0x7fffffff + ZES_VF_INFO_UTIL_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_VF_INFO_UTIL_EXP_FLAG_* ENUMs } zes_vf_info_util_exp_flag_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Virtual function management properties +/// @brief Virtual function management properties (deprecated) typedef struct _zes_vf_exp_properties_t { zes_structure_type_t stype; ///< [in] type of this structure @@ -7097,7 +8283,7 @@ typedef struct _zes_vf_exp_properties_t } zes_vf_exp_properties_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Provides memory utilization values for a virtual function +/// @brief Provides memory utilization values for a virtual function (deprecated) typedef struct _zes_vf_util_mem_exp_t { zes_structure_type_t stype; ///< [in] type of this structure @@ -7111,7 +8297,7 @@ typedef struct _zes_vf_util_mem_exp_t } zes_vf_util_mem_exp_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Provides engine utilization values for a virtual function +/// @brief Provides engine utilization values for a virtual function (deprecated) typedef struct _zes_vf_util_engine_exp_t { zes_structure_type_t stype; ///< [in] type of this structure @@ -7124,10 +8310,69 @@ typedef struct _zes_vf_util_engine_exp_t } zes_vf_util_engine_exp_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Virtual function management capabilities (deprecated) +typedef struct _zes_vf_exp_capabilities_t +{ + zes_structure_type_t stype; ///< [in] type of this structure + void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + zes_pci_address_t address; ///< [out] Virtual function BDF address + uint32_t vfDeviceMemSize; ///< [out] Virtual function memory size in kilo bytes + uint32_t vfID; ///< [out] Virtual Function ID + +} zes_vf_exp_capabilities_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Virtual function management capabilities +typedef struct _zes_vf_exp2_capabilities_t +{ + zes_structure_type_t stype; ///< [in] type of this structure + void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + zes_pci_address_t address; ///< [out] Virtual function BDF address + uint64_t vfDeviceMemSize; ///< [out] Virtual function memory size in bytes + uint32_t vfID; ///< [out] Virtual Function ID + +} zes_vf_exp2_capabilities_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Provides memory utilization values for a virtual function +typedef struct _zes_vf_util_mem_exp2_t +{ + zes_structure_type_t stype; ///< [in] type of this structure + const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + zes_mem_loc_t vfMemLocation; ///< [out] Location of this memory (system, device) + uint64_t vfMemUtilized; ///< [out] Utilized memory size in bytes. + +} zes_vf_util_mem_exp2_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Provides engine utilization values for a virtual function +/// +/// @details +/// - Percent utilization is calculated by taking two snapshots (s1, s2) and +/// using the equation: %util = (s2.activeCounterValue - +/// s1.activeCounterValue) / (s2.samplingCounterValue - +/// s1.samplingCounterValue) +typedef struct _zes_vf_util_engine_exp2_t +{ + zes_structure_type_t stype; ///< [in] type of this structure + const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + zes_engine_group_t vfEngineType; ///< [out] The engine group. + uint64_t activeCounterValue; ///< [out] Represents active counter. + uint64_t samplingCounterValue; ///< [out] Represents counter value when activeCounterValue was sampled. + ///< Refer to the formulae above for calculating the utilization percent + +} zes_vf_util_engine_exp2_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Get handle of virtual function modules /// /// @details +/// - [DEPRECATED] No longer supported. Use ::zesDeviceEnumEnabledVFExp. /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. /// @@ -7137,6 +8382,14 @@ typedef struct _zes_vf_util_engine_exp_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7161,6 +8414,8 @@ zesDeviceEnumActiveVFExp( /// @brief Get virtual function management properties /// /// @details +/// - [DEPRECATED] No longer supported. Use +/// ::zesVFManagementGetVFCapabilitiesExp. /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. /// @@ -7170,6 +8425,14 @@ zesDeviceEnumActiveVFExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hVFhandle` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7185,6 +8448,8 @@ zesVFManagementGetVFPropertiesExp( /// with Virtual Function (VF) /// /// @details +/// - [DEPRECATED] No longer supported. Use +/// ::zesVFManagementGetVFMemoryUtilizationExp2. /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. /// @@ -7194,6 +8459,14 @@ zesVFManagementGetVFPropertiesExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hVFhandle` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7221,6 +8494,8 @@ zesVFManagementGetVFMemoryUtilizationExp( /// with Virtual Function (VF) /// /// @details +/// - [DEPRECATED] No longer supported. Use +/// ::zesVFManagementGetVFEngineUtilizationExp2. /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. /// @@ -7230,6 +8505,14 @@ zesVFManagementGetVFMemoryUtilizationExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hVFhandle` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7257,6 +8540,7 @@ zesVFManagementGetVFEngineUtilizationExp( /// Virtual Function (VF) /// /// @details +/// - [DEPRECATED] No longer supported. /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. /// @@ -7266,10 +8550,19 @@ zesVFManagementGetVFEngineUtilizationExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hVFhandle` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0xf < flags` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zesVFManagementSetVFTelemetryModeExp( zes_vf_handle_t hVFhandle, ///< [in] Sysman handle for the component. @@ -7283,6 +8576,7 @@ zesVFManagementSetVFTelemetryModeExp( /// telemetry associated with Virtual Function (VF) /// /// @details +/// - [DEPRECATED] No longer supported. /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. /// @@ -7292,10 +8586,19 @@ zesVFManagementSetVFTelemetryModeExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hVFhandle` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0xf < flag` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zesVFManagementSetVFTelemetrySamplingIntervalExp( zes_vf_handle_t hVFhandle, ///< [in] Sysman handle for the component. @@ -7304,6 +8607,197 @@ zesVFManagementSetVFTelemetrySamplingIntervalExp( uint64_t samplingInterval ///< [in] Sampling interval value. ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Get handle of virtual function modules +/// +/// @details +/// - The application may call this function from simultaneous threads. +/// - The implementation of this function should be lock-free. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hDevice` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == pCount` +ZE_APIEXPORT ze_result_t ZE_APICALL +zesDeviceEnumEnabledVFExp( + zes_device_handle_t hDevice, ///< [in] Sysman handle of the device. + uint32_t* pCount, ///< [in,out] pointer to the number of components of this type. + ///< if count is zero, then the driver shall update the value with the + ///< total number of components of this type that are available. + ///< if count is greater than the number of components of this type that + ///< are available, then the driver shall update the value with the correct + ///< number of components. + zes_vf_handle_t* phVFhandle ///< [in,out][optional][range(0, *pCount)] array of handle of components of + ///< this type. + ///< if count is less than the number of components of this type that are + ///< available, then the driver shall only retrieve that number of + ///< component handles. + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Get virtual function management capabilities +/// +/// @details +/// - [DEPRECATED] No longer supported. Use +/// ::zesVFManagementGetVFCapabilitiesExp2. +/// - The application may call this function from simultaneous threads. +/// - The implementation of this function should be lock-free. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hVFhandle` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == pCapability` +ZE_APIEXPORT ze_result_t ZE_APICALL +zesVFManagementGetVFCapabilitiesExp( + zes_vf_handle_t hVFhandle, ///< [in] Sysman handle for the VF component. + zes_vf_exp_capabilities_t* pCapability ///< [in,out] Will contain VF capability. + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Get memory activity stats for each available memory types associated +/// with Virtual Function (VF) +/// +/// @details +/// - The application may call this function from simultaneous threads. +/// - The implementation of this function should be lock-free. +/// - If VF is disable/pause/not active, utilization will give zero value. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hVFhandle` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == pCount` +ZE_APIEXPORT ze_result_t ZE_APICALL +zesVFManagementGetVFMemoryUtilizationExp2( + zes_vf_handle_t hVFhandle, ///< [in] Sysman handle for the component. + uint32_t* pCount, ///< [in,out] Pointer to the number of VF memory stats descriptors. + ///< - if count is zero, the driver shall update the value with the total + ///< number of memory stats available. + ///< - if count is greater than the total number of memory stats + ///< available, the driver shall update the value with the correct number + ///< of memory stats available. + zes_vf_util_mem_exp2_t* pMemUtil ///< [in,out][optional][range(0, *pCount)] array of memory group activity counters. + ///< - if count is less than the total number of memory stats available, + ///< then driver shall only retrieve that number of stats. + ///< - the implementation shall populate the vector pCount-1 number of VF + ///< memory stats. + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Get engine activity stats for each available engine group associated +/// with Virtual Function (VF) +/// +/// @details +/// - The application may call this function from simultaneous threads. +/// - The implementation of this function should be lock-free. +/// - If VF is disable/pause/not active, utilization will give zero value. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hVFhandle` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == pCount` +ZE_APIEXPORT ze_result_t ZE_APICALL +zesVFManagementGetVFEngineUtilizationExp2( + zes_vf_handle_t hVFhandle, ///< [in] Sysman handle for the component. + uint32_t* pCount, ///< [in,out] Pointer to the number of VF engine stats descriptors. + ///< - if count is zero, the driver shall update the value with the total + ///< number of engine stats available. + ///< - if count is greater than the total number of engine stats + ///< available, the driver shall update the value with the correct number + ///< of engine stats available. + zes_vf_util_engine_exp2_t* pEngineUtil ///< [in,out][optional][range(0, *pCount)] array of engine group activity counters. + ///< - if count is less than the total number of engine stats available, + ///< then driver shall only retrieve that number of stats. + ///< - the implementation shall populate the vector pCount-1 number of VF + ///< engine stats. + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Get virtual function management capabilities +/// +/// @details +/// - The application may call this function from simultaneous threads. +/// - The implementation of this function should be lock-free. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hVFhandle` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == pCapability` +ZE_APIEXPORT ze_result_t ZE_APICALL +zesVFManagementGetVFCapabilitiesExp2( + zes_vf_handle_t hVFhandle, ///< [in] Sysman handle for the VF component. + zes_vf_exp2_capabilities_t* pCapability ///< [in,out] Will contain VF capability. + ); + #if !defined(__GNUC__) #pragma endregion #endif @@ -7312,4 +8806,4 @@ zesVFManagementSetVFTelemetrySamplingIntervalExp( } // extern "C" #endif -#endif // _ZES_API_H \ No newline at end of file +#endif // _ZES_API_H diff --git a/backends/ze/include/zes_ddi.h b/backends/ze/include/zes_ddi.h index a33e838f1..8b2fc2398 100644 --- a/backends/ze/include/zes_ddi.h +++ b/backends/ze/include/zes_ddi.h @@ -1,11 +1,11 @@ /* * - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2025 Intel Corporation * * SPDX-License-Identifier: MIT * * @file zes_ddi.h - * @version v1.9-r1.9.3 + * @version v1.15-r1.13.73 * */ #ifndef _ZES_DDI_H @@ -337,6 +337,14 @@ typedef ze_result_t (ZE_APICALL *zes_pfnDeviceResetExt_t)( zes_reset_properties_t* ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zesDevicePciLinkSpeedUpdateExt +typedef ze_result_t (ZE_APICALL *zes_pfnDevicePciLinkSpeedUpdateExt_t)( + zes_device_handle_t, + ze_bool_t, + zes_device_action_t* + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Table of Device functions pointers typedef struct _zes_device_dditable_t @@ -378,6 +386,7 @@ typedef struct _zes_device_dditable_t zes_pfnDeviceReadOverclockState_t pfnReadOverclockState; zes_pfnDeviceEnumOverclockDomains_t pfnEnumOverclockDomains; zes_pfnDeviceResetExt_t pfnResetExt; + zes_pfnDevicePciLinkSpeedUpdateExt_t pfnPciLinkSpeedUpdateExt; } zes_device_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -418,12 +427,21 @@ typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEnumActiveVFExp_t)( zes_vf_handle_t* ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zesDeviceEnumEnabledVFExp +typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEnumEnabledVFExp_t)( + zes_device_handle_t, + uint32_t*, + zes_vf_handle_t* + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Table of DeviceExp functions pointers typedef struct _zes_device_exp_dditable_t { zes_pfnDeviceGetSubDevicePropertiesExp_t pfnGetSubDevicePropertiesExp; zes_pfnDeviceEnumActiveVFExp_t pfnEnumActiveVFExp; + zes_pfnDeviceEnumEnabledVFExp_t pfnEnumEnabledVFExp; } zes_device_exp_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -1886,6 +1904,36 @@ typedef ze_result_t (ZE_APICALL *zes_pfnVFManagementSetVFTelemetrySamplingInterv uint64_t ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zesVFManagementGetVFCapabilitiesExp +typedef ze_result_t (ZE_APICALL *zes_pfnVFManagementGetVFCapabilitiesExp_t)( + zes_vf_handle_t, + zes_vf_exp_capabilities_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zesVFManagementGetVFMemoryUtilizationExp2 +typedef ze_result_t (ZE_APICALL *zes_pfnVFManagementGetVFMemoryUtilizationExp2_t)( + zes_vf_handle_t, + uint32_t*, + zes_vf_util_mem_exp2_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zesVFManagementGetVFEngineUtilizationExp2 +typedef ze_result_t (ZE_APICALL *zes_pfnVFManagementGetVFEngineUtilizationExp2_t)( + zes_vf_handle_t, + uint32_t*, + zes_vf_util_engine_exp2_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zesVFManagementGetVFCapabilitiesExp2 +typedef ze_result_t (ZE_APICALL *zes_pfnVFManagementGetVFCapabilitiesExp2_t)( + zes_vf_handle_t, + zes_vf_exp2_capabilities_t* + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Table of VFManagementExp functions pointers typedef struct _zes_vf_management_exp_dditable_t @@ -1895,6 +1943,10 @@ typedef struct _zes_vf_management_exp_dditable_t zes_pfnVFManagementGetVFEngineUtilizationExp_t pfnGetVFEngineUtilizationExp; zes_pfnVFManagementSetVFTelemetryModeExp_t pfnSetVFTelemetryModeExp; zes_pfnVFManagementSetVFTelemetrySamplingIntervalExp_t pfnSetVFTelemetrySamplingIntervalExp; + zes_pfnVFManagementGetVFCapabilitiesExp_t pfnGetVFCapabilitiesExp; + zes_pfnVFManagementGetVFMemoryUtilizationExp2_t pfnGetVFMemoryUtilizationExp2; + zes_pfnVFManagementGetVFEngineUtilizationExp2_t pfnGetVFEngineUtilizationExp2; + zes_pfnVFManagementGetVFCapabilitiesExp2_t pfnGetVFCapabilitiesExp2; } zes_vf_management_exp_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -1948,6 +2000,36 @@ typedef struct _zes_dditable_t zes_diagnostics_dditable_t Diagnostics; zes_vf_management_exp_dditable_t VFManagementExp; } zes_dditable_t; +/// @brief Container for all DDI tables with version and tables set by the Driver +typedef struct _zes_dditable_driver_t +{ + ze_api_version_t version; + uint8_t isValidFlag; + zes_global_dditable_t * Global; + zes_device_dditable_t * Device; + zes_device_exp_dditable_t * DeviceExp; + zes_driver_dditable_t * Driver; + zes_driver_exp_dditable_t * DriverExp; + zes_overclock_dditable_t * Overclock; + zes_scheduler_dditable_t * Scheduler; + zes_performance_factor_dditable_t * PerformanceFactor; + zes_power_dditable_t * Power; + zes_frequency_dditable_t * Frequency; + zes_engine_dditable_t * Engine; + zes_standby_dditable_t * Standby; + zes_firmware_dditable_t * Firmware; + zes_firmware_exp_dditable_t * FirmwareExp; + zes_memory_dditable_t * Memory; + zes_fabric_port_dditable_t * FabricPort; + zes_temperature_dditable_t * Temperature; + zes_psu_dditable_t * Psu; + zes_fan_dditable_t * Fan; + zes_led_dditable_t * Led; + zes_ras_dditable_t * Ras; + zes_ras_exp_dditable_t * RasExp; + zes_diagnostics_dditable_t * Diagnostics; + zes_vf_management_exp_dditable_t * VFManagementExp; +} zes_dditable_driver_t; #if defined(__cplusplus) } // extern "C" diff --git a/backends/ze/include/zes_ddi_ver.h b/backends/ze/include/zes_ddi_ver.h index 0f68736a4..38b88bca4 100644 --- a/backends/ze/include/zes_ddi_ver.h +++ b/backends/ze/include/zes_ddi_ver.h @@ -5,7 +5,7 @@ * SPDX-License-Identifier: MIT * * @file zes_ddi.h - * @version v1.9-r1.9.3 + * @version v1.15-r1.13.73 * */ #ifndef _ZES_DDI_VER_H @@ -28,7 +28,7 @@ typedef struct _zes_global_dditable_t_1_5 } zes_global_dditable_t_1_5; /////////////////////////////////////////////////////////////////////////////// -/// [1.0, 1.4, 1.5, 1.7] +/// [1.0, 1.15, 1.4, 1.5, 1.7] /// @brief Table of Device functions pointers typedef struct _zes_device_dditable_t_1_0 { @@ -59,6 +59,36 @@ typedef struct _zes_device_dditable_t_1_0 zes_pfnDeviceEnumTemperatureSensors_t pfnEnumTemperatureSensors; } zes_device_dditable_t_1_0; +typedef struct _zes_device_dditable_t_1_15 +{ + zes_pfnDeviceGetProperties_t pfnGetProperties; + zes_pfnDeviceGetState_t pfnGetState; + zes_pfnDeviceReset_t pfnReset; + zes_pfnDeviceProcessesGetState_t pfnProcessesGetState; + zes_pfnDevicePciGetProperties_t pfnPciGetProperties; + zes_pfnDevicePciGetState_t pfnPciGetState; + zes_pfnDevicePciGetBars_t pfnPciGetBars; + zes_pfnDevicePciGetStats_t pfnPciGetStats; + zes_pfnDeviceEnumDiagnosticTestSuites_t pfnEnumDiagnosticTestSuites; + zes_pfnDeviceEnumEngineGroups_t pfnEnumEngineGroups; + zes_pfnDeviceEventRegister_t pfnEventRegister; + zes_pfnDeviceEnumFabricPorts_t pfnEnumFabricPorts; + zes_pfnDeviceEnumFans_t pfnEnumFans; + zes_pfnDeviceEnumFirmwares_t pfnEnumFirmwares; + zes_pfnDeviceEnumFrequencyDomains_t pfnEnumFrequencyDomains; + zes_pfnDeviceEnumLeds_t pfnEnumLeds; + zes_pfnDeviceEnumMemoryModules_t pfnEnumMemoryModules; + zes_pfnDeviceEnumPerformanceFactorDomains_t pfnEnumPerformanceFactorDomains; + zes_pfnDeviceEnumPowerDomains_t pfnEnumPowerDomains; + zes_pfnDeviceGetCardPowerDomain_t pfnGetCardPowerDomain; + zes_pfnDeviceEnumPsus_t pfnEnumPsus; + zes_pfnDeviceEnumRasErrorSets_t pfnEnumRasErrorSets; + zes_pfnDeviceEnumSchedulers_t pfnEnumSchedulers; + zes_pfnDeviceEnumStandbyDomains_t pfnEnumStandbyDomains; + zes_pfnDeviceEnumTemperatureSensors_t pfnEnumTemperatureSensors; + zes_pfnDevicePciLinkSpeedUpdateExt_t pfnPciLinkSpeedUpdateExt; +} zes_device_dditable_t_1_15; + typedef struct _zes_device_dditable_t_1_4 { zes_pfnDeviceGetProperties_t pfnGetProperties; @@ -90,6 +120,7 @@ typedef struct _zes_device_dditable_t_1_4 zes_pfnDeviceEccConfigurable_t pfnEccConfigurable; zes_pfnDeviceGetEccState_t pfnGetEccState; zes_pfnDeviceSetEccState_t pfnSetEccState; + zes_pfnDevicePciLinkSpeedUpdateExt_t pfnPciLinkSpeedUpdateExt; } zes_device_dditable_t_1_4; typedef struct _zes_device_dditable_t_1_5 @@ -130,6 +161,7 @@ typedef struct _zes_device_dditable_t_1_5 zes_pfnDeviceResetOverclockSettings_t pfnResetOverclockSettings; zes_pfnDeviceReadOverclockState_t pfnReadOverclockState; zes_pfnDeviceEnumOverclockDomains_t pfnEnumOverclockDomains; + zes_pfnDevicePciLinkSpeedUpdateExt_t pfnPciLinkSpeedUpdateExt; } zes_device_dditable_t_1_5; typedef struct _zes_device_dditable_t_1_7 @@ -171,15 +203,22 @@ typedef struct _zes_device_dditable_t_1_7 zes_pfnDeviceReadOverclockState_t pfnReadOverclockState; zes_pfnDeviceEnumOverclockDomains_t pfnEnumOverclockDomains; zes_pfnDeviceResetExt_t pfnResetExt; + zes_pfnDevicePciLinkSpeedUpdateExt_t pfnPciLinkSpeedUpdateExt; } zes_device_dditable_t_1_7; /////////////////////////////////////////////////////////////////////////////// -/// [1.9] +/// [1.1, 1.9] /// @brief Table of DeviceExp functions pointers +typedef struct _zes_device_exp_dditable_t_1_1 +{ + zes_pfnDeviceEnumEnabledVFExp_t pfnEnumEnabledVFExp; +} zes_device_exp_dditable_t_1_1; + typedef struct _zes_device_exp_dditable_t_1_9 { zes_pfnDeviceGetSubDevicePropertiesExp_t pfnGetSubDevicePropertiesExp; zes_pfnDeviceEnumActiveVFExp_t pfnEnumActiveVFExp; + zes_pfnDeviceEnumEnabledVFExp_t pfnEnumEnabledVFExp; } zes_device_exp_dditable_t_1_9; /////////////////////////////////////////////////////////////////////////////// @@ -468,8 +507,23 @@ typedef struct _zes_diagnostics_dditable_t_1_0 } zes_diagnostics_dditable_t_1_0; /////////////////////////////////////////////////////////////////////////////// -/// [1.9] +/// [1.1, 1.12, 1.9] /// @brief Table of VFManagementExp functions pointers +typedef struct _zes_vf_management_exp_dditable_t_1_1 +{ + zes_pfnVFManagementGetVFCapabilitiesExp_t pfnGetVFCapabilitiesExp; + zes_pfnVFManagementGetVFMemoryUtilizationExp2_t pfnGetVFMemoryUtilizationExp2; + zes_pfnVFManagementGetVFEngineUtilizationExp2_t pfnGetVFEngineUtilizationExp2; +} zes_vf_management_exp_dditable_t_1_1; + +typedef struct _zes_vf_management_exp_dditable_t_1_12 +{ + zes_pfnVFManagementGetVFCapabilitiesExp_t pfnGetVFCapabilitiesExp; + zes_pfnVFManagementGetVFMemoryUtilizationExp2_t pfnGetVFMemoryUtilizationExp2; + zes_pfnVFManagementGetVFEngineUtilizationExp2_t pfnGetVFEngineUtilizationExp2; + zes_pfnVFManagementGetVFCapabilitiesExp2_t pfnGetVFCapabilitiesExp2; +} zes_vf_management_exp_dditable_t_1_12; + typedef struct _zes_vf_management_exp_dditable_t_1_9 { zes_pfnVFManagementGetVFPropertiesExp_t pfnGetVFPropertiesExp; @@ -477,6 +531,10 @@ typedef struct _zes_vf_management_exp_dditable_t_1_9 zes_pfnVFManagementGetVFEngineUtilizationExp_t pfnGetVFEngineUtilizationExp; zes_pfnVFManagementSetVFTelemetryModeExp_t pfnSetVFTelemetryModeExp; zes_pfnVFManagementSetVFTelemetrySamplingIntervalExp_t pfnSetVFTelemetrySamplingIntervalExp; + zes_pfnVFManagementGetVFCapabilitiesExp_t pfnGetVFCapabilitiesExp; + zes_pfnVFManagementGetVFMemoryUtilizationExp2_t pfnGetVFMemoryUtilizationExp2; + zes_pfnVFManagementGetVFEngineUtilizationExp2_t pfnGetVFEngineUtilizationExp2; + zes_pfnVFManagementGetVFCapabilitiesExp2_t pfnGetVFCapabilitiesExp2; } zes_vf_management_exp_dditable_t_1_9; diff --git a/backends/ze/include/zet.py b/backends/ze/include/zet.py new file mode 100644 index 000000000..9bd77585c --- /dev/null +++ b/backends/ze/include/zet.py @@ -0,0 +1,1973 @@ +""" + Copyright (C) 2019-2025 Intel Corporation + + SPDX-License-Identifier: MIT + + @file zet.py + @version v1.15-r1.13.73 + + """ +import platform +from ctypes import * +from enum import * + +############################################################################### +__version__ = "1.0" + +############################################################################### +## @brief Handle to a driver instance +class zet_driver_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of device object +class zet_device_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of context object +class zet_context_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of command list object +class zet_command_list_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of module object +class zet_module_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of function object +class zet_kernel_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of metric group's object +class zet_metric_group_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of metric's object +class zet_metric_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of metric streamer's object +class zet_metric_streamer_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of metric query pool's object +class zet_metric_query_pool_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of metric query's object +class zet_metric_query_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of tracer object +class zet_tracer_exp_handle_t(c_void_p): + pass + +############################################################################### +## @brief Debug session handle +class zet_debug_session_handle_t(c_void_p): + pass + +############################################################################### +## @brief Defines structure types +class zet_structure_type_v(IntEnum): + METRIC_GROUP_PROPERTIES = 0x1 ## ::zet_metric_group_properties_t + METRIC_PROPERTIES = 0x2 ## ::zet_metric_properties_t + METRIC_STREAMER_DESC = 0x3 ## ::zet_metric_streamer_desc_t + METRIC_QUERY_POOL_DESC = 0x4 ## ::zet_metric_query_pool_desc_t + PROFILE_PROPERTIES = 0x5 ## ::zet_profile_properties_t + DEVICE_DEBUG_PROPERTIES = 0x6 ## ::zet_device_debug_properties_t + DEBUG_MEMORY_SPACE_DESC = 0x7 ## ::zet_debug_memory_space_desc_t + DEBUG_REGSET_PROPERTIES = 0x8 ## ::zet_debug_regset_properties_t + GLOBAL_METRICS_TIMESTAMPS_EXP_PROPERTIES = 0x9 ## ::zet_metric_global_timestamps_resolution_exp_t. Deprecated, use + ## ::ZET_STRUCTURE_TYPE_METRIC_GLOBAL_TIMESTAMPS_RESOLUTION_EXP. + METRIC_GLOBAL_TIMESTAMPS_RESOLUTION_EXP = 0x9 ## ::zet_metric_global_timestamps_resolution_exp_t + TRACER_EXP_DESC = 0x00010001 ## ::zet_tracer_exp_desc_t + METRICS_CALCULATE_EXP_DESC = 0x00010002 ## ::zet_metric_calculate_exp_desc_t. Deprecated, use + ## ::ZET_STRUCTURE_TYPE_METRIC_CALCULATE_EXP_DESC. + METRIC_CALCULATE_EXP_DESC = 0x00010002 ## ::zet_metric_calculate_exp_desc_t + METRIC_PROGRAMMABLE_EXP_PROPERTIES = 0x00010003 ## ::zet_metric_programmable_exp_properties_t + METRIC_PROGRAMMABLE_PARAM_INFO_EXP = 0x00010004 ## ::zet_metric_programmable_param_info_exp_t + METRIC_PROGRAMMABLE_PARAM_VALUE_INFO_EXP = 0x00010005 ## ::zet_metric_programmable_param_value_info_exp_t + METRIC_GROUP_TYPE_EXP = 0x00010006 ## ::zet_metric_group_type_exp_t + EXPORT_DMA_EXP_PROPERTIES = 0x00010007 ## ::zet_export_dma_buf_exp_properties_t + METRIC_TRACER_EXP_DESC = 0x00010008 ## ::zet_metric_tracer_exp_desc_t + METRIC_SOURCE_ID_EXP = 0x00010009 ## ::zet_metric_source_id_exp_t + +class zet_structure_type_t(c_int): + def __str__(self): + return str(zet_structure_type_v(self.value)) + + +############################################################################### +## @brief Base for all properties types +class zet_base_properties_t(Structure): + _fields_ = [ + ("stype", zet_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p) ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ] + +############################################################################### +## @brief Base for all descriptor types +class zet_base_desc_t(Structure): + _fields_ = [ + ("stype", zet_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p) ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ] + +############################################################################### +## @brief Supported value types +class zet_value_type_v(IntEnum): + UINT32 = 0 ## 32-bit unsigned-integer + UINT64 = 1 ## 64-bit unsigned-integer + FLOAT32 = 2 ## 32-bit floating-point + FLOAT64 = 3 ## 64-bit floating-point + BOOL8 = 4 ## 8-bit boolean + STRING = 5 ## C string + UINT8 = 6 ## 8-bit unsigned-integer + UINT16 = 7 ## 16-bit unsigned-integer + +class zet_value_type_t(c_int): + def __str__(self): + return str(zet_value_type_v(self.value)) + + +############################################################################### +## @brief Union of values +class zet_value_t(Structure): + _fields_ = [ + ("ui32", c_ulong), ## [out] 32-bit unsigned-integer + ("ui64", c_ulonglong), ## [out] 64-bit unsigned-integer + ("fp32", c_float), ## [out] 32-bit floating-point + ("fp64", c_double), ## [out] 64-bit floating-point + ("b8", ze_bool_t) ## [out] 8-bit boolean + ] + +############################################################################### +## @brief Typed value +class zet_typed_value_t(Structure): + _fields_ = [ + ("type", zet_value_type_t), ## [out] type of value + ("value", zet_value_t) ## [out] value + ] + +############################################################################### +## @brief Enables driver instrumentation and dependencies for device metrics + +############################################################################### +## @brief Enables driver instrumentation and dependencies for program +## instrumentation + +############################################################################### +## @brief Enables driver instrumentation and dependencies for program debugging + +############################################################################### +## @brief Supported module debug info formats. +class zet_module_debug_info_format_v(IntEnum): + ELF_DWARF = 0 ## Format is ELF/DWARF + +class zet_module_debug_info_format_t(c_int): + def __str__(self): + return str(zet_module_debug_info_format_v(self.value)) + + +############################################################################### +## @brief Supported device debug property flags +class zet_device_debug_property_flags_v(IntEnum): + ATTACH = ZE_BIT(0) ## the device supports attaching for debug + +class zet_device_debug_property_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Device debug properties queried using ::zetDeviceGetDebugProperties. +class zet_device_debug_properties_t(Structure): + _fields_ = [ + ("stype", zet_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", zet_device_debug_property_flags_t) ## [out] returns 0 (none) or a valid combination of + ## ::zet_device_debug_property_flag_t + ] + +############################################################################### +## @brief Debug configuration provided to ::zetDebugAttach +class zet_debug_config_t(Structure): + _fields_ = [ + ("pid", c_ulong) ## [in] the host process identifier + ] + +############################################################################### +## @brief Supported debug event flags. +class zet_debug_event_flags_v(IntEnum): + NEED_ACK = ZE_BIT(0) ## The event needs to be acknowledged by calling + ## ::zetDebugAcknowledgeEvent. + +class zet_debug_event_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Supported debug event types. +class zet_debug_event_type_v(IntEnum): + INVALID = 0 ## The event is invalid + DETACHED = 1 ## The tool was detached + PROCESS_ENTRY = 2 ## The debuggee process created command queues on the device + PROCESS_EXIT = 3 ## The debuggee process destroyed all command queues on the device + MODULE_LOAD = 4 ## An in-memory module was loaded onto the device + MODULE_UNLOAD = 5 ## An in-memory module is about to get unloaded from the device + THREAD_STOPPED = 6 ## The thread stopped due to a device exception + THREAD_UNAVAILABLE = 7 ## The thread is not available to be stopped + PAGE_FAULT = 8 ## A page request could not be completed on the device + +class zet_debug_event_type_t(c_int): + def __str__(self): + return str(zet_debug_event_type_v(self.value)) + + +############################################################################### +## @brief Supported debug detach reasons. +class zet_debug_detach_reason_v(IntEnum): + INVALID = 0 ## The detach reason is not valid + HOST_EXIT = 1 ## The host process exited + +class zet_debug_detach_reason_t(c_int): + def __str__(self): + return str(zet_debug_detach_reason_v(self.value)) + + +############################################################################### +## @brief Event information for ::ZET_DEBUG_EVENT_TYPE_DETACHED +class zet_debug_event_info_detached_t(Structure): + _fields_ = [ + ("reason", zet_debug_detach_reason_t) ## [out] the detach reason + ] + +############################################################################### +## @brief Event information for ::ZET_DEBUG_EVENT_TYPE_MODULE_LOAD and +## ::ZET_DEBUG_EVENT_TYPE_MODULE_UNLOAD +class zet_debug_event_info_module_t(Structure): + _fields_ = [ + ("format", zet_module_debug_info_format_t), ## [out] the module format + ("moduleBegin", c_ulonglong), ## [out] the begin address of the in-memory module (inclusive) + ("moduleEnd", c_ulonglong), ## [out] the end address of the in-memory module (exclusive) + ("load", c_ulonglong) ## [out] the load address of the module on the device + ] + +############################################################################### +## @brief Event information for ::ZET_DEBUG_EVENT_TYPE_THREAD_STOPPED and +## ::ZET_DEBUG_EVENT_TYPE_THREAD_UNAVAILABLE +class zet_debug_event_info_thread_stopped_t(Structure): + _fields_ = [ + ("thread", ze_device_thread_t) ## [out] the stopped/unavailable thread + ] + +############################################################################### +## @brief Page fault reasons. +class zet_debug_page_fault_reason_v(IntEnum): + INVALID = 0 ## The page fault reason is not valid + MAPPING_ERROR = 1 ## The address is not mapped + PERMISSION_ERROR = 2 ## Invalid access permissions + +class zet_debug_page_fault_reason_t(c_int): + def __str__(self): + return str(zet_debug_page_fault_reason_v(self.value)) + + +############################################################################### +## @brief Event information for ::ZET_DEBUG_EVENT_TYPE_PAGE_FAULT +class zet_debug_event_info_page_fault_t(Structure): + _fields_ = [ + ("address", c_ulonglong), ## [out] the faulting address + ("mask", c_ulonglong), ## [out] the alignment mask + ("reason", zet_debug_page_fault_reason_t) ## [out] the page fault reason + ] + +############################################################################### +## @brief Event type-specific information +class zet_debug_event_info_t(Structure): + _fields_ = [ + ("detached", zet_debug_event_info_detached_t), ## [out] type == ::ZET_DEBUG_EVENT_TYPE_DETACHED + ("module", zet_debug_event_info_module_t), ## [out] type == ::ZET_DEBUG_EVENT_TYPE_MODULE_LOAD or + ## ::ZET_DEBUG_EVENT_TYPE_MODULE_UNLOAD + ("thread", zet_debug_event_info_thread_stopped_t), ## [out] type == ::ZET_DEBUG_EVENT_TYPE_THREAD_STOPPED or + ## ::ZET_DEBUG_EVENT_TYPE_THREAD_UNAVAILABLE + ("page_fault", zet_debug_event_info_page_fault_t) ## [out] type == ::ZET_DEBUG_EVENT_TYPE_PAGE_FAULT + ] + +############################################################################### +## @brief A debug event on the device. +class zet_debug_event_t(Structure): + _fields_ = [ + ("type", zet_debug_event_type_t), ## [out] the event type + ("flags", zet_debug_event_flags_t), ## [out] returns 0 (none) or a combination of ::zet_debug_event_flag_t + ("info", zet_debug_event_info_t) ## [out] event type specific information + ] + +############################################################################### +## @brief Supported device memory space types. +class zet_debug_memory_space_type_v(IntEnum): + DEFAULT = 0 ## default memory space (attribute may be omitted) + SLM = 1 ## shared local memory space (GPU-only) + ELF = 2 ## ELF file memory space + BARRIER = 3 ## Barrier memory space + +class zet_debug_memory_space_type_t(c_int): + def __str__(self): + return str(zet_debug_memory_space_type_v(self.value)) + + +############################################################################### +## @brief Device memory space descriptor +class zet_debug_memory_space_desc_t(Structure): + _fields_ = [ + ("stype", zet_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("type", zet_debug_memory_space_type_t), ## [in] type of memory space + ("address", c_ulonglong) ## [in] the virtual address within the memory space + ] + +############################################################################### +## @brief Supported general register set flags. +class zet_debug_regset_flags_v(IntEnum): + READABLE = ZE_BIT(0) ## register set is readable + WRITEABLE = ZE_BIT(1) ## register set is writeable + +class zet_debug_regset_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Device register set properties queried using +## ::zetDebugGetRegisterSetProperties. +class zet_debug_regset_properties_t(Structure): + _fields_ = [ + ("stype", zet_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("type", c_ulong), ## [out] device-specific register set type + ("version", c_ulong), ## [out] device-specific version of this register set + ("generalFlags", zet_debug_regset_flags_t), ## [out] general register set flags + ("deviceFlags", c_ulong), ## [out] device-specific register set flags + ("count", c_ulong), ## [out] number of registers in the set + ("bitSize", c_ulong), ## [out] the size of a register in bits + ("byteSize", c_ulong) ## [out] the size required for reading or writing a register in bytes + ] + +############################################################################### +## @brief Maximum metric group name string size +ZET_MAX_METRIC_GROUP_NAME = 256 + +############################################################################### +## @brief Maximum metric group description string size +ZET_MAX_METRIC_GROUP_DESCRIPTION = 256 + +############################################################################### +## @brief Metric group sampling type +class zet_metric_group_sampling_type_flags_v(IntEnum): + EVENT_BASED = ZE_BIT(0) ## Event based sampling + TIME_BASED = ZE_BIT(1) ## Time based sampling + EXP_TRACER_BASED = ZE_BIT(2) ## Experimental Tracer based sampling + +class zet_metric_group_sampling_type_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Metric group properties queried using ::zetMetricGroupGetProperties +class zet_metric_group_properties_t(Structure): + _fields_ = [ + ("stype", zet_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("name", c_char * ZET_MAX_METRIC_GROUP_NAME), ## [out] metric group name + ("description", c_char * ZET_MAX_METRIC_GROUP_DESCRIPTION), ## [out] metric group description + ("samplingType", zet_metric_group_sampling_type_flags_t), ## [out] metric group sampling type. + ## returns a combination of ::zet_metric_group_sampling_type_flag_t. + ("domain", c_ulong), ## [out] metric group domain number. Cannot use multiple, simultaneous + ## metric groups from the same domain. + ("metricCount", c_ulong) ## [out] metric count belonging to this group + ] + +############################################################################### +## @brief Metric types +class zet_metric_type_v(IntEnum): + DURATION = 0 ## Metric type: duration + EVENT = 1 ## Metric type: event + EVENT_WITH_RANGE = 2 ## Metric type: event with range + THROUGHPUT = 3 ## Metric type: throughput + TIMESTAMP = 4 ## Metric type: timestamp + FLAG = 5 ## Metric type: flag + RATIO = 6 ## Metric type: ratio + RAW = 7 ## Metric type: raw + EVENT_EXP_TIMESTAMP = 0x7ffffff9 ## Metric type: event with only timestamp and value has no meaning + EVENT_EXP_START = 0x7ffffffa ## Metric type: the first event of a start/end event pair + EVENT_EXP_END = 0x7ffffffb ## Metric type: the second event of a start/end event pair + EVENT_EXP_MONOTONIC_WRAPS_VALUE = 0x7ffffffc ## Metric type: value of the event is a monotonically increasing value + ## that can wrap around + EXP_EXPORT_DMA_BUF = 0x7ffffffd ## Metric which exports linux dma_buf, which could be imported/mapped to + ## the host process + IP_EXP = 0x7ffffffe ## Metric type: instruction pointer. Deprecated, use + ## ::ZET_METRIC_TYPE_IP. + IP = 0x7ffffffe ## Metric type: instruction pointer + +class zet_metric_type_t(c_int): + def __str__(self): + return str(zet_metric_type_v(self.value)) + + +############################################################################### +## @brief Metric group calculation type +class zet_metric_group_calculation_type_v(IntEnum): + METRIC_VALUES = 0 ## Calculated metric values from raw data. + MAX_METRIC_VALUES = 1 ## Maximum metric values. + +class zet_metric_group_calculation_type_t(c_int): + def __str__(self): + return str(zet_metric_group_calculation_type_v(self.value)) + + +############################################################################### +## @brief Maximum metric name string size +ZET_MAX_METRIC_NAME = 256 + +############################################################################### +## @brief Maximum metric description string size +ZET_MAX_METRIC_DESCRIPTION = 256 + +############################################################################### +## @brief Maximum metric component string size +ZET_MAX_METRIC_COMPONENT = 256 + +############################################################################### +## @brief Maximum metric result units string size +ZET_MAX_METRIC_RESULT_UNITS = 256 + +############################################################################### +## @brief Metric properties queried using ::zetMetricGetProperties +class zet_metric_properties_t(Structure): + _fields_ = [ + ("stype", zet_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("name", c_char * ZET_MAX_METRIC_NAME), ## [out] metric name + ("description", c_char * ZET_MAX_METRIC_DESCRIPTION), ## [out] metric description + ("component", c_char * ZET_MAX_METRIC_COMPONENT), ## [out] metric component + ("tierNumber", c_ulong), ## [out] number of tier + ("metricType", zet_metric_type_t), ## [out] metric type + ("resultType", zet_value_type_t), ## [out] metric result type + ("resultUnits", c_char * ZET_MAX_METRIC_RESULT_UNITS) ## [out] metric result units + ] + +############################################################################### +## @brief Metric streamer descriptor +class zet_metric_streamer_desc_t(Structure): + _fields_ = [ + ("stype", zet_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("notifyEveryNReports", c_ulong), ## [in,out] number of collected reports after which notification event + ## will be signaled. If the requested value is not supported exactly, + ## then the driver may use a value that is the closest supported + ## approximation and shall update this member during ::zetMetricStreamerOpen. + ("samplingPeriod", c_ulong) ## [in,out] streamer sampling period in nanoseconds. If the requested + ## value is not supported exactly, then the driver may use a value that + ## is the closest supported approximation and shall update this member + ## during ::zetMetricStreamerOpen. + ] + +############################################################################### +## @brief Metric query pool types +class zet_metric_query_pool_type_v(IntEnum): + PERFORMANCE = 0 ## Performance metric query pool. + EXECUTION = 1 ## Skips workload execution between begin/end calls. + +class zet_metric_query_pool_type_t(c_int): + def __str__(self): + return str(zet_metric_query_pool_type_v(self.value)) + + +############################################################################### +## @brief Metric query pool description +class zet_metric_query_pool_desc_t(Structure): + _fields_ = [ + ("stype", zet_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("type", zet_metric_query_pool_type_t), ## [in] Query pool type. + ("count", c_ulong) ## [in] Internal slots count within query pool object. + ] + +############################################################################### +## @brief Supportted profile features +class zet_profile_flags_v(IntEnum): + REGISTER_REALLOCATION = ZE_BIT(0) ## request the compiler attempt to minimize register usage as much as + ## possible to allow for instrumentation + FREE_REGISTER_INFO = ZE_BIT(1) ## request the compiler generate free register info + +class zet_profile_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Profiling meta-data for instrumentation +class zet_profile_properties_t(Structure): + _fields_ = [ + ("stype", zet_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", zet_profile_flags_t), ## [out] indicates which flags were enabled during compilation. + ## returns 0 (none) or a combination of ::zet_profile_flag_t + ("numTokens", c_ulong) ## [out] number of tokens immediately following this structure + ] + +############################################################################### +## @brief Supported profile token types +class zet_profile_token_type_v(IntEnum): + FREE_REGISTER = 0 ## GRF info + +class zet_profile_token_type_t(c_int): + def __str__(self): + return str(zet_profile_token_type_v(self.value)) + + +############################################################################### +## @brief Profile free register token detailing unused registers in the current +## function +class zet_profile_free_register_token_t(Structure): + _fields_ = [ + ("type", zet_profile_token_type_t), ## [out] type of token + ("size", c_ulong), ## [out] total size of the token, in bytes + ("count", c_ulong) ## [out] number of register sequences immediately following this + ## structure + ] + +############################################################################### +## @brief Profile register sequence detailing consecutive bytes, all of which +## are unused +class zet_profile_register_sequence_t(Structure): + _fields_ = [ + ("start", c_ulong), ## [out] starting byte in the register table, representing the start of + ## unused bytes in the current function + ("count", c_ulong) ## [out] number of consecutive bytes in the sequence, starting from start + ] + +############################################################################### +## @brief API Tracing Experimental Extension Name +ZET_API_TRACING_EXP_NAME = "ZET_experimental_api_tracing" + +############################################################################### +## @brief API Tracing Experimental Extension Version(s) +class zet_api_tracing_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class zet_api_tracing_exp_version_t(c_int): + def __str__(self): + return str(zet_api_tracing_exp_version_v(self.value)) + + +############################################################################### +## @brief Alias the existing callbacks definition for 'core' callbacks +class zet_core_callbacks_t(ze_callbacks_t): + pass + +############################################################################### +## @brief Tracer descriptor +class zet_tracer_exp_desc_t(Structure): + _fields_ = [ + ("stype", zet_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("pUserData", c_void_p) ## [in] pointer passed to every tracer's callbacks + ] + +############################################################################### +## @brief Concurrent Metric Groups Experimental Extension Name +ZET_CONCURRENT_METRIC_GROUPS_EXP_NAME = "ZET_experimental_concurrent_metric_groups" + +############################################################################### +## @brief Concurrent Metric Groups Experimental Extension Version(s) +class zet_concurrent_metric_groups_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class zet_concurrent_metric_groups_exp_version_t(c_int): + def __str__(self): + return str(zet_concurrent_metric_groups_exp_version_v(self.value)) + + +############################################################################### +## @brief Metric Tracer Experimental Extension Name +ZET_METRICS_TRACER_EXP_NAME = "ZET_experimental_metric_tracer" + +############################################################################### +## @brief Metric Tracer Experimental Extension Version(s) +class zet_metric_tracer_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class zet_metric_tracer_exp_version_t(c_int): + def __str__(self): + return str(zet_metric_tracer_exp_version_v(self.value)) + + +############################################################################### +## @brief Handle of metric tracer's object +class zet_metric_tracer_exp_handle_t(c_void_p): + pass + +############################################################################### +## @brief Handle of metric decoder's object +class zet_metric_decoder_exp_handle_t(c_void_p): + pass + +############################################################################### +## @brief Metric tracer descriptor +class zet_metric_tracer_exp_desc_t(Structure): + _fields_ = [ + ("stype", zet_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("notifyEveryNBytes", c_ulong) ## [in,out] number of collected bytes after which notification event will + ## be signaled. If the requested value is not supported exactly, then the + ## driver may use a value that is the closest supported approximation and + ## shall update this member during ::zetMetricTracerCreateExp. + ] + +############################################################################### +## @brief Decoded metric entry +class zet_metric_entry_exp_t(Structure): + _fields_ = [ + ("value", zet_value_t), ## [out] value of the decodable metric entry or event. Number is + ## meaningful based on the metric type. + ("timeStamp", c_ulonglong), ## [out] timestamp at which the event happened. + ("metricIndex", c_ulong), ## [out] index to the decodable metric handle in the input array + ## (phMetric) in ::zetMetricTracerDecodeExp(). + ("onSubdevice", ze_bool_t), ## [out] True if the event occurred on a sub-device; false means the + ## device on which the metric tracer was opened does not have + ## sub-devices. + ("subdeviceId", c_ulong) ## [out] If onSubdevice is true, this gives the ID of the sub-device. + ] + +############################################################################### +## @brief Metric group type +class zet_metric_group_type_exp_flags_v(IntEnum): + EXPORT_DMA_BUF = ZE_BIT(0) ## Metric group and metrics exports memory using linux dma-buf, which + ## could be imported/mapped to the host process. Properties of the + ## dma_buf could be queried using ::zet_export_dma_buf_exp_properties_t. + USER_CREATED = ZE_BIT(1) ## Metric group created using ::zetDeviceCreateMetricGroupsFromMetricsExp + OTHER = ZE_BIT(2) ## Metric group which has a collection of metrics + MARKER = ZE_BIT(3) ## Metric group is capable of generating Marker metric + +class zet_metric_group_type_exp_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Query the metric group type using `pNext` of +## ::zet_metric_group_properties_t +class zet_metric_group_type_exp_t(Structure): + _fields_ = [ + ("stype", zet_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("type", zet_metric_group_type_exp_flags_t) ## [out] metric group type. + ## returns a combination of ::zet_metric_group_type_exp_flags_t. + ] + +############################################################################### +## @brief Exported dma_buf properties queried using `pNext` of +## ::zet_metric_group_properties_t or ::zet_metric_properties_t +class zet_export_dma_buf_exp_properties_t(Structure): + _fields_ = [ + ("stype", zet_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("fd", c_int), ## [out] the file descriptor handle that could be used to import the + ## memory by the host process. + ("size", c_size_t) ## [out] size in bytes of the dma_buf + ] + +############################################################################### +## @brief Marker Support Using MetricGroup Experimental Extension Name +ZET_METRIC_GROUP_MARKER_EXP_NAME = "ZET_experimental_metric_group_marker" + +############################################################################### +## @brief Marker Support Using MetricGroup Experimental Extension Version(s) +class zet_metric_group_marker_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class zet_metric_group_marker_exp_version_t(c_int): + def __str__(self): + return str(zet_metric_group_marker_exp_version_v(self.value)) + + +############################################################################### +## @brief Query the metric source unique identifier using `pNext` of +## ::zet_metric_group_properties_t +class zet_metric_source_id_exp_t(Structure): + _fields_ = [ + ("stype", zet_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("sourceId", c_ulong) ## [out] unique number representing the Metric Source. + ] + +############################################################################### +## @brief Runtime Enabling and Disabling Metrics Extension Name +ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_NAME = "ZET_experimental_metrics_runtime_enable_disable" + +############################################################################### +## @brief Runtime Enabling and Disabling Metrics Extension Version(s) +class zet_metrics_runtime_enable_disable_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class zet_metrics_runtime_enable_disable_exp_version_t(c_int): + def __str__(self): + return str(zet_metrics_runtime_enable_disable_exp_version_v(self.value)) + + +############################################################################### +## @brief Calculating Multiple Metrics Experimental Extension Name +ZET_MULTI_METRICS_EXP_NAME = "ZET_experimental_calculate_multiple_metrics" + +############################################################################### +## @brief Calculating Multiple Metrics Experimental Extension Version(s) +class ze_calculate_multiple_metrics_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_calculate_multiple_metrics_exp_version_t(c_int): + def __str__(self): + return str(ze_calculate_multiple_metrics_exp_version_v(self.value)) + + +############################################################################### +## @brief Global Metric Timestamps Experimental Extension Name +ZET_GLOBAL_METRICS_TIMESTAMPS_EXP_NAME = "ZET_experimental_global_metric_timestamps" + +############################################################################### +## @brief Global Metric Timestamps Experimental Extension Version(s) +class ze_metric_global_timestamps_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_metric_global_timestamps_exp_version_t(c_int): + def __str__(self): + return str(ze_metric_global_timestamps_exp_version_v(self.value)) + + +############################################################################### +## @brief Metric timestamps resolution +## +## @details +## - This structure may be returned from ::zetMetricGroupGetProperties via +## the `pNext` member of ::zet_metric_group_properties_t. +## - Used for mapping metric timestamps to other timers. +class zet_metric_global_timestamps_resolution_exp_t(Structure): + _fields_ = [ + ("stype", zet_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("timerResolution", c_ulonglong), ## [out] Returns the resolution of metrics timer (used for timestamps) in + ## cycles/sec. + ("timestampValidBits", c_ulonglong) ## [out] Returns the number of valid bits in the timestamp value. + ] + +############################################################################### +## @brief Exporting Metrics Data Experimental Extension Name +ZET_EXPORT_METRICS_DATA_EXP_NAME = "ZET_experimental_metric_export_data" + +############################################################################### +## @brief Exporting Metrics Data Experimental Extension Version(s) +class zet_export_metric_data_exp_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class zet_export_metric_data_exp_version_t(c_int): + def __str__(self): + return str(zet_export_metric_data_exp_version_v(self.value)) + + +############################################################################### +## @brief Maximum count of characters in export data element name +ZET_MAX_METRIC_EXPORT_DATA_ELEMENT_NAME_EXP = 256 + +############################################################################### +## @brief Maximum export data element description string size +ZET_MAX_METRIC_EXPORT_DATA_ELEMENT_DESCRIPTION_EXP = 256 + +############################################################################### +## @brief Metrics calculation descriptor +class zet_metric_calculate_exp_desc_t(Structure): + _fields_ = [ + ("stype", zet_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("rawReportSkipCount", c_ulong) ## [in] number of reports to skip during calculation + ] + +############################################################################### +## @brief Programmable Metrics Experimental Extension Name +ZET_PROGRAMMABLE_METRICS_EXP_NAME = "ZET_experimental_programmable_metrics" + +############################################################################### +## @brief Programmable Metrics Experimental Extension Version(s) +class zet_metric_programmable_exp_version_v(IntEnum): + _1_1 = ZE_MAKE_VERSION( 1, 1 ) ## version 1.1 + CURRENT = ZE_MAKE_VERSION( 1, 1 ) ## latest known version + +class zet_metric_programmable_exp_version_t(c_int): + def __str__(self): + return str(zet_metric_programmable_exp_version_v(self.value)) + + +############################################################################### +## @brief Maximum count of characters in export data element name +ZET_MAX_PROGRAMMABLE_METRICS_ELEMENT_NAME_EXP = 256 + +############################################################################### +## @brief Maximum export data element description string size +ZET_MAX_PROGRAMMABLE_METRICS_ELEMENT_DESCRIPTION_EXP = 256 + +############################################################################### +## @brief Maximum count of characters in metric group name prefix +ZET_MAX_METRIC_GROUP_NAME_PREFIX_EXP = 64 + +############################################################################### +## @brief Maximum metric programmable name string size +ZET_MAX_METRIC_PROGRAMMABLE_NAME_EXP = 128 + +############################################################################### +## @brief Maximum metric programmable description string size +ZET_MAX_METRIC_PROGRAMMABLE_DESCRIPTION_EXP = 128 + +############################################################################### +## @brief Maximum metric programmable component string size +ZET_MAX_METRIC_PROGRAMMABLE_COMPONENT_EXP = 128 + +############################################################################### +## @brief Maximum metric programmable parameter string size +ZET_MAX_METRIC_PROGRAMMABLE_PARAMETER_NAME_EXP = 128 + +############################################################################### +## @brief Maximum value for programmable value description +ZET_MAX_METRIC_PROGRAMMABLE_VALUE_DESCRIPTION_EXP = 128 + +############################################################################### +## @brief Maximum value metric group name prefix +ZE_MAX_METRIC_GROUP_NAME_PREFIX = 64 + +############################################################################### +## @brief Handle of metric programmable's object +class zet_metric_programmable_exp_handle_t(c_void_p): + pass + +############################################################################### +## @brief Metric Programmable properties queried using +## ::zetMetricProgrammableGetPropertiesExp +class zet_metric_programmable_exp_properties_t(Structure): + _fields_ = [ + ("stype", zet_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("name", c_char * ZET_MAX_METRIC_PROGRAMMABLE_NAME_EXP), ## [out] metric programmable name + ("description", c_char * ZET_MAX_METRIC_PROGRAMMABLE_DESCRIPTION_EXP), ## [out] metric programmable description + ("component", c_char * ZET_MAX_METRIC_PROGRAMMABLE_COMPONENT_EXP), ## [out] metric programmable component + ("tierNumber", c_ulong), ## [out] tier number + ("domain", c_ulong), ## [out] metric domain number. + ("parameterCount", c_ulong), ## [out] number of parameters in the programmable + ("samplingType", zet_metric_group_sampling_type_flags_t), ## [out] metric sampling type. + ## returns a combination of ::zet_metric_group_sampling_type_flag_t. + ("sourceId", c_ulong) ## [out] unique metric source identifier(within platform)to identify the + ## HW block where the metric is collected. + ] + +############################################################################### +## @brief Metric Programmable Parameter types +class zet_metric_programmable_param_type_exp_v(IntEnum): + DISAGGREGATION = 0 ## Metric is disaggregated. + LATENCY = 1 ## Metric for latency measurement. + NORMALIZATION_UTILIZATION = 2 ## Produces normalization in percent using raw_metric * 100 / cycles / HW + ## instance_count. + NORMALIZATION_AVERAGE = 3 ## Produces normalization using raw_metric / HW instance_count. + NORMALIZATION_RATE = 4 ## Produces normalization average using raw_metric / timestamp. + NORMALIZATION_BYTES = 5 ## Produces normalization average using raw_metric * n bytes. + GENERIC = 6 ## Generic Parameter type. Please refer the parameter's description. + +class zet_metric_programmable_param_type_exp_t(c_int): + def __str__(self): + return str(zet_metric_programmable_param_type_exp_v(self.value)) + + +############################################################################### +## @brief Supported value info types +class zet_value_info_type_exp_v(IntEnum): + UINT32 = 0 ## 32-bit unsigned-integer + UINT64 = 1 ## 64-bit unsigned-integer + FLOAT32 = 2 ## 32-bit floating-point + FLOAT64 = 3 ## 64-bit floating-point + BOOL8 = 4 ## 8-bit boolean + UINT8 = 5 ## 8-bit unsigned-integer + UINT16 = 6 ## 16-bit unsigned-integer + UINT64_RANGE = 7 ## 64-bit unsigned-integer range (minimum and maximum) + FLOAT64_RANGE = 8 ## 64-bit floating point range (minimum and maximum) + +class zet_value_info_type_exp_t(c_int): + def __str__(self): + return str(zet_value_info_type_exp_v(self.value)) + + +############################################################################### +## @brief Value info of type uint64_t range +class zet_value_uint64_range_exp_t(Structure): + _fields_ = [ + ("ui64Min", c_ulonglong), ## [out] minimum value of the range + ("ui64Max", c_ulonglong) ## [out] maximum value of the range + ] + +############################################################################### +## @brief Value info of type float64 range +class zet_value_fp64_range_exp_t(Structure): + _fields_ = [ + ("fp64Min", c_double), ## [out] minimum value of the range + ("fp64Max", c_double) ## [out] maximum value of the range + ] + +############################################################################### +## @brief Union of value information +class zet_value_info_exp_t(Structure): + _fields_ = [ + ("ui32", c_ulong), ## [out] 32-bit unsigned-integer + ("ui64", c_ulonglong), ## [out] 64-bit unsigned-integer + ("fp32", c_float), ## [out] 32-bit floating-point + ("fp64", c_double), ## [out] 64-bit floating-point + ("b8", ze_bool_t), ## [out] 8-bit boolean + ("ui8", c_ubyte), ## [out] 8-bit unsigned integer + ("ui16", c_ushort), ## [out] 16-bit unsigned integer + ("ui64Range", zet_value_uint64_range_exp_t), ## [out] minimum and maximum value of the range + ("fp64Range", zet_value_fp64_range_exp_t) ## [out] minimum and maximum value of the range + ] + +############################################################################### +## @brief Metric Programmable parameter information +class zet_metric_programmable_param_info_exp_t(Structure): + _fields_ = [ + ("stype", zet_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("type", zet_metric_programmable_param_type_exp_t), ## [out] programmable parameter type + ("name", c_char * ZET_MAX_METRIC_PROGRAMMABLE_PARAMETER_NAME_EXP), ## [out] metric programmable parameter name + ("valueInfoType", zet_value_info_type_exp_t), ## [out] value info type + ("defaultValue", zet_value_t), ## [out] default value for the parameter + ("valueInfoCount", c_ulong) ## [out] count of ::zet_metric_programmable_param_value_info_exp_t + ] + +############################################################################### +## @brief Metric Programmable parameter value information +class zet_metric_programmable_param_value_info_exp_t(Structure): + _fields_ = [ + ("stype", zet_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("valueInfo", zet_value_info_exp_t), ## [out] information about the parameter value + ("description", c_char * ZET_MAX_METRIC_PROGRAMMABLE_VALUE_DESCRIPTION_EXP) ## [out] description about the value + ] + +############################################################################### +## @brief Metric Programmable parameter value +class zet_metric_programmable_param_value_exp_t(Structure): + _fields_ = [ + ("value", zet_value_t) ## [in] parameter value + ] + +############################################################################### +__use_win_types = "Windows" == platform.uname()[0] + +############################################################################### +## @brief Function-pointer for zetMetricProgrammableGetExp +if __use_win_types: + _zetMetricProgrammableGetExp_t = WINFUNCTYPE( ze_result_t, zet_device_handle_t, POINTER(c_ulong), POINTER(zet_metric_programmable_exp_handle_t) ) +else: + _zetMetricProgrammableGetExp_t = CFUNCTYPE( ze_result_t, zet_device_handle_t, POINTER(c_ulong), POINTER(zet_metric_programmable_exp_handle_t) ) + +############################################################################### +## @brief Function-pointer for zetMetricProgrammableGetPropertiesExp +if __use_win_types: + _zetMetricProgrammableGetPropertiesExp_t = WINFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, POINTER(zet_metric_programmable_exp_properties_t) ) +else: + _zetMetricProgrammableGetPropertiesExp_t = CFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, POINTER(zet_metric_programmable_exp_properties_t) ) + +############################################################################### +## @brief Function-pointer for zetMetricProgrammableGetParamInfoExp +if __use_win_types: + _zetMetricProgrammableGetParamInfoExp_t = WINFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, POINTER(c_ulong), POINTER(zet_metric_programmable_param_info_exp_t) ) +else: + _zetMetricProgrammableGetParamInfoExp_t = CFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, POINTER(c_ulong), POINTER(zet_metric_programmable_param_info_exp_t) ) + +############################################################################### +## @brief Function-pointer for zetMetricProgrammableGetParamValueInfoExp +if __use_win_types: + _zetMetricProgrammableGetParamValueInfoExp_t = WINFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, c_ulong, POINTER(c_ulong), POINTER(zet_metric_programmable_param_value_info_exp_t) ) +else: + _zetMetricProgrammableGetParamValueInfoExp_t = CFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, c_ulong, POINTER(c_ulong), POINTER(zet_metric_programmable_param_value_info_exp_t) ) + + +############################################################################### +## @brief Table of MetricProgrammableExp functions pointers +class _zet_metric_programmable_exp_dditable_t(Structure): + _fields_ = [ + ("pfnGetExp", c_void_p), ## _zetMetricProgrammableGetExp_t + ("pfnGetPropertiesExp", c_void_p), ## _zetMetricProgrammableGetPropertiesExp_t + ("pfnGetParamInfoExp", c_void_p), ## _zetMetricProgrammableGetParamInfoExp_t + ("pfnGetParamValueInfoExp", c_void_p) ## _zetMetricProgrammableGetParamValueInfoExp_t + ] + +############################################################################### +## @brief Function-pointer for zetMetricTracerCreateExp +if __use_win_types: + _zetMetricTracerCreateExp_t = WINFUNCTYPE( ze_result_t, zet_context_handle_t, zet_device_handle_t, c_ulong, POINTER(zet_metric_group_handle_t), POINTER(zet_metric_tracer_exp_desc_t), ze_event_handle_t, POINTER(zet_metric_tracer_exp_handle_t) ) +else: + _zetMetricTracerCreateExp_t = CFUNCTYPE( ze_result_t, zet_context_handle_t, zet_device_handle_t, c_ulong, POINTER(zet_metric_group_handle_t), POINTER(zet_metric_tracer_exp_desc_t), ze_event_handle_t, POINTER(zet_metric_tracer_exp_handle_t) ) + +############################################################################### +## @brief Function-pointer for zetMetricTracerDestroyExp +if __use_win_types: + _zetMetricTracerDestroyExp_t = WINFUNCTYPE( ze_result_t, zet_metric_tracer_exp_handle_t ) +else: + _zetMetricTracerDestroyExp_t = CFUNCTYPE( ze_result_t, zet_metric_tracer_exp_handle_t ) + +############################################################################### +## @brief Function-pointer for zetMetricTracerEnableExp +if __use_win_types: + _zetMetricTracerEnableExp_t = WINFUNCTYPE( ze_result_t, zet_metric_tracer_exp_handle_t, ze_bool_t ) +else: + _zetMetricTracerEnableExp_t = CFUNCTYPE( ze_result_t, zet_metric_tracer_exp_handle_t, ze_bool_t ) + +############################################################################### +## @brief Function-pointer for zetMetricTracerDisableExp +if __use_win_types: + _zetMetricTracerDisableExp_t = WINFUNCTYPE( ze_result_t, zet_metric_tracer_exp_handle_t, ze_bool_t ) +else: + _zetMetricTracerDisableExp_t = CFUNCTYPE( ze_result_t, zet_metric_tracer_exp_handle_t, ze_bool_t ) + +############################################################################### +## @brief Function-pointer for zetMetricTracerReadDataExp +if __use_win_types: + _zetMetricTracerReadDataExp_t = WINFUNCTYPE( ze_result_t, zet_metric_tracer_exp_handle_t, POINTER(c_size_t), POINTER(c_ubyte) ) +else: + _zetMetricTracerReadDataExp_t = CFUNCTYPE( ze_result_t, zet_metric_tracer_exp_handle_t, POINTER(c_size_t), POINTER(c_ubyte) ) + +############################################################################### +## @brief Function-pointer for zetMetricTracerDecodeExp +if __use_win_types: + _zetMetricTracerDecodeExp_t = WINFUNCTYPE( ze_result_t, zet_metric_decoder_exp_handle_t, POINTER(c_size_t), POINTER(c_ubyte), c_ulong, POINTER(zet_metric_handle_t), POINTER(c_ulong), POINTER(c_ulong), POINTER(c_ulong), POINTER(zet_metric_entry_exp_t) ) +else: + _zetMetricTracerDecodeExp_t = CFUNCTYPE( ze_result_t, zet_metric_decoder_exp_handle_t, POINTER(c_size_t), POINTER(c_ubyte), c_ulong, POINTER(zet_metric_handle_t), POINTER(c_ulong), POINTER(c_ulong), POINTER(c_ulong), POINTER(zet_metric_entry_exp_t) ) + + +############################################################################### +## @brief Table of MetricTracerExp functions pointers +class _zet_metric_tracer_exp_dditable_t(Structure): + _fields_ = [ + ("pfnCreateExp", c_void_p), ## _zetMetricTracerCreateExp_t + ("pfnDestroyExp", c_void_p), ## _zetMetricTracerDestroyExp_t + ("pfnEnableExp", c_void_p), ## _zetMetricTracerEnableExp_t + ("pfnDisableExp", c_void_p), ## _zetMetricTracerDisableExp_t + ("pfnReadDataExp", c_void_p), ## _zetMetricTracerReadDataExp_t + ("pfnDecodeExp", c_void_p) ## _zetMetricTracerDecodeExp_t + ] + +############################################################################### +## @brief Function-pointer for zetMetricDecoderCreateExp +if __use_win_types: + _zetMetricDecoderCreateExp_t = WINFUNCTYPE( ze_result_t, zet_metric_tracer_exp_handle_t, POINTER(zet_metric_decoder_exp_handle_t) ) +else: + _zetMetricDecoderCreateExp_t = CFUNCTYPE( ze_result_t, zet_metric_tracer_exp_handle_t, POINTER(zet_metric_decoder_exp_handle_t) ) + +############################################################################### +## @brief Function-pointer for zetMetricDecoderDestroyExp +if __use_win_types: + _zetMetricDecoderDestroyExp_t = WINFUNCTYPE( ze_result_t, zet_metric_decoder_exp_handle_t ) +else: + _zetMetricDecoderDestroyExp_t = CFUNCTYPE( ze_result_t, zet_metric_decoder_exp_handle_t ) + +############################################################################### +## @brief Function-pointer for zetMetricDecoderGetDecodableMetricsExp +if __use_win_types: + _zetMetricDecoderGetDecodableMetricsExp_t = WINFUNCTYPE( ze_result_t, zet_metric_decoder_exp_handle_t, POINTER(c_ulong), POINTER(zet_metric_handle_t) ) +else: + _zetMetricDecoderGetDecodableMetricsExp_t = CFUNCTYPE( ze_result_t, zet_metric_decoder_exp_handle_t, POINTER(c_ulong), POINTER(zet_metric_handle_t) ) + + +############################################################################### +## @brief Table of MetricDecoderExp functions pointers +class _zet_metric_decoder_exp_dditable_t(Structure): + _fields_ = [ + ("pfnCreateExp", c_void_p), ## _zetMetricDecoderCreateExp_t + ("pfnDestroyExp", c_void_p), ## _zetMetricDecoderDestroyExp_t + ("pfnGetDecodableMetricsExp", c_void_p) ## _zetMetricDecoderGetDecodableMetricsExp_t + ] + +############################################################################### +## @brief Function-pointer for zetDeviceGetDebugProperties +if __use_win_types: + _zetDeviceGetDebugProperties_t = WINFUNCTYPE( ze_result_t, zet_device_handle_t, POINTER(zet_device_debug_properties_t) ) +else: + _zetDeviceGetDebugProperties_t = CFUNCTYPE( ze_result_t, zet_device_handle_t, POINTER(zet_device_debug_properties_t) ) + + +############################################################################### +## @brief Table of Device functions pointers +class _zet_device_dditable_t(Structure): + _fields_ = [ + ("pfnGetDebugProperties", c_void_p) ## _zetDeviceGetDebugProperties_t + ] + +############################################################################### +## @brief Function-pointer for zetDeviceGetConcurrentMetricGroupsExp +if __use_win_types: + _zetDeviceGetConcurrentMetricGroupsExp_t = WINFUNCTYPE( ze_result_t, zet_device_handle_t, c_ulong, *, *, * ) +else: + _zetDeviceGetConcurrentMetricGroupsExp_t = CFUNCTYPE( ze_result_t, zet_device_handle_t, c_ulong, *, *, * ) + +############################################################################### +## @brief Function-pointer for zetDeviceCreateMetricGroupsFromMetricsExp +if __use_win_types: + _zetDeviceCreateMetricGroupsFromMetricsExp_t = WINFUNCTYPE( ze_result_t, zet_device_handle_t, c_ulong, *, *, *, *, POINTER(zet_metric_group_handle_t) ) +else: + _zetDeviceCreateMetricGroupsFromMetricsExp_t = CFUNCTYPE( ze_result_t, zet_device_handle_t, c_ulong, *, *, *, *, POINTER(zet_metric_group_handle_t) ) + +############################################################################### +## @brief Function-pointer for zetDeviceEnableMetricsExp +if __use_win_types: + _zetDeviceEnableMetricsExp_t = WINFUNCTYPE( ze_result_t, zet_device_handle_t ) +else: + _zetDeviceEnableMetricsExp_t = CFUNCTYPE( ze_result_t, zet_device_handle_t ) + +############################################################################### +## @brief Function-pointer for zetDeviceDisableMetricsExp +if __use_win_types: + _zetDeviceDisableMetricsExp_t = WINFUNCTYPE( ze_result_t, zet_device_handle_t ) +else: + _zetDeviceDisableMetricsExp_t = CFUNCTYPE( ze_result_t, zet_device_handle_t ) + + +############################################################################### +## @brief Table of DeviceExp functions pointers +class _zet_device_exp_dditable_t(Structure): + _fields_ = [ + ("pfnGetConcurrentMetricGroupsExp", c_void_p), ## _zetDeviceGetConcurrentMetricGroupsExp_t + ("pfnCreateMetricGroupsFromMetricsExp", c_void_p), ## _zetDeviceCreateMetricGroupsFromMetricsExp_t + ("pfnEnableMetricsExp", c_void_p), ## _zetDeviceEnableMetricsExp_t + ("pfnDisableMetricsExp", c_void_p) ## _zetDeviceDisableMetricsExp_t + ] + +############################################################################### +## @brief Function-pointer for zetContextActivateMetricGroups +if __use_win_types: + _zetContextActivateMetricGroups_t = WINFUNCTYPE( ze_result_t, zet_context_handle_t, zet_device_handle_t, c_ulong, POINTER(zet_metric_group_handle_t) ) +else: + _zetContextActivateMetricGroups_t = CFUNCTYPE( ze_result_t, zet_context_handle_t, zet_device_handle_t, c_ulong, POINTER(zet_metric_group_handle_t) ) + + +############################################################################### +## @brief Table of Context functions pointers +class _zet_context_dditable_t(Structure): + _fields_ = [ + ("pfnActivateMetricGroups", c_void_p) ## _zetContextActivateMetricGroups_t + ] + +############################################################################### +## @brief Function-pointer for zetCommandListAppendMetricStreamerMarker +if __use_win_types: + _zetCommandListAppendMetricStreamerMarker_t = WINFUNCTYPE( ze_result_t, zet_command_list_handle_t, zet_metric_streamer_handle_t, c_ulong ) +else: + _zetCommandListAppendMetricStreamerMarker_t = CFUNCTYPE( ze_result_t, zet_command_list_handle_t, zet_metric_streamer_handle_t, c_ulong ) + +############################################################################### +## @brief Function-pointer for zetCommandListAppendMetricQueryBegin +if __use_win_types: + _zetCommandListAppendMetricQueryBegin_t = WINFUNCTYPE( ze_result_t, zet_command_list_handle_t, zet_metric_query_handle_t ) +else: + _zetCommandListAppendMetricQueryBegin_t = CFUNCTYPE( ze_result_t, zet_command_list_handle_t, zet_metric_query_handle_t ) + +############################################################################### +## @brief Function-pointer for zetCommandListAppendMetricQueryEnd +if __use_win_types: + _zetCommandListAppendMetricQueryEnd_t = WINFUNCTYPE( ze_result_t, zet_command_list_handle_t, zet_metric_query_handle_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) +else: + _zetCommandListAppendMetricQueryEnd_t = CFUNCTYPE( ze_result_t, zet_command_list_handle_t, zet_metric_query_handle_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) + +############################################################################### +## @brief Function-pointer for zetCommandListAppendMetricMemoryBarrier +if __use_win_types: + _zetCommandListAppendMetricMemoryBarrier_t = WINFUNCTYPE( ze_result_t, zet_command_list_handle_t ) +else: + _zetCommandListAppendMetricMemoryBarrier_t = CFUNCTYPE( ze_result_t, zet_command_list_handle_t ) + + +############################################################################### +## @brief Table of CommandList functions pointers +class _zet_command_list_dditable_t(Structure): + _fields_ = [ + ("pfnAppendMetricStreamerMarker", c_void_p), ## _zetCommandListAppendMetricStreamerMarker_t + ("pfnAppendMetricQueryBegin", c_void_p), ## _zetCommandListAppendMetricQueryBegin_t + ("pfnAppendMetricQueryEnd", c_void_p), ## _zetCommandListAppendMetricQueryEnd_t + ("pfnAppendMetricMemoryBarrier", c_void_p) ## _zetCommandListAppendMetricMemoryBarrier_t + ] + +############################################################################### +## @brief Function-pointer for zetCommandListAppendMarkerExp +if __use_win_types: + _zetCommandListAppendMarkerExp_t = WINFUNCTYPE( ze_result_t, zet_command_list_handle_t, zet_metric_group_handle_t, c_ulong ) +else: + _zetCommandListAppendMarkerExp_t = CFUNCTYPE( ze_result_t, zet_command_list_handle_t, zet_metric_group_handle_t, c_ulong ) + + +############################################################################### +## @brief Table of CommandListExp functions pointers +class _zet_command_list_exp_dditable_t(Structure): + _fields_ = [ + ("pfnAppendMarkerExp", c_void_p) ## _zetCommandListAppendMarkerExp_t + ] + +############################################################################### +## @brief Function-pointer for zetModuleGetDebugInfo +if __use_win_types: + _zetModuleGetDebugInfo_t = WINFUNCTYPE( ze_result_t, zet_module_handle_t, zet_module_debug_info_format_t, POINTER(c_size_t), POINTER(c_ubyte) ) +else: + _zetModuleGetDebugInfo_t = CFUNCTYPE( ze_result_t, zet_module_handle_t, zet_module_debug_info_format_t, POINTER(c_size_t), POINTER(c_ubyte) ) + + +############################################################################### +## @brief Table of Module functions pointers +class _zet_module_dditable_t(Structure): + _fields_ = [ + ("pfnGetDebugInfo", c_void_p) ## _zetModuleGetDebugInfo_t + ] + +############################################################################### +## @brief Function-pointer for zetKernelGetProfileInfo +if __use_win_types: + _zetKernelGetProfileInfo_t = WINFUNCTYPE( ze_result_t, zet_kernel_handle_t, POINTER(zet_profile_properties_t) ) +else: + _zetKernelGetProfileInfo_t = CFUNCTYPE( ze_result_t, zet_kernel_handle_t, POINTER(zet_profile_properties_t) ) + + +############################################################################### +## @brief Table of Kernel functions pointers +class _zet_kernel_dditable_t(Structure): + _fields_ = [ + ("pfnGetProfileInfo", c_void_p) ## _zetKernelGetProfileInfo_t + ] + +############################################################################### +## @brief Function-pointer for zetMetricGet +if __use_win_types: + _zetMetricGet_t = WINFUNCTYPE( ze_result_t, zet_metric_group_handle_t, POINTER(c_ulong), POINTER(zet_metric_handle_t) ) +else: + _zetMetricGet_t = CFUNCTYPE( ze_result_t, zet_metric_group_handle_t, POINTER(c_ulong), POINTER(zet_metric_handle_t) ) + +############################################################################### +## @brief Function-pointer for zetMetricGetProperties +if __use_win_types: + _zetMetricGetProperties_t = WINFUNCTYPE( ze_result_t, zet_metric_handle_t, POINTER(zet_metric_properties_t) ) +else: + _zetMetricGetProperties_t = CFUNCTYPE( ze_result_t, zet_metric_handle_t, POINTER(zet_metric_properties_t) ) + + +############################################################################### +## @brief Table of Metric functions pointers +class _zet_metric_dditable_t(Structure): + _fields_ = [ + ("pfnGet", c_void_p), ## _zetMetricGet_t + ("pfnGetProperties", c_void_p) ## _zetMetricGetProperties_t + ] + +############################################################################### +## @brief Function-pointer for zetMetricCreateFromProgrammableExp +if __use_win_types: + _zetMetricCreateFromProgrammableExp_t = WINFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, POINTER(zet_metric_programmable_param_value_exp_t), c_ulong, c_char_p, c_char_p, POINTER(c_ulong), POINTER(zet_metric_handle_t) ) +else: + _zetMetricCreateFromProgrammableExp_t = CFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, POINTER(zet_metric_programmable_param_value_exp_t), c_ulong, c_char_p, c_char_p, POINTER(c_ulong), POINTER(zet_metric_handle_t) ) + +############################################################################### +## @brief Function-pointer for zetMetricDestroyExp +if __use_win_types: + _zetMetricDestroyExp_t = WINFUNCTYPE( ze_result_t, zet_metric_handle_t ) +else: + _zetMetricDestroyExp_t = CFUNCTYPE( ze_result_t, zet_metric_handle_t ) + +############################################################################### +## @brief Function-pointer for zetMetricCreateFromProgrammableExp2 +if __use_win_types: + _zetMetricCreateFromProgrammableExp2_t = WINFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, c_ulong, POINTER(zet_metric_programmable_param_value_exp_t), c_char_p, c_char_p, POINTER(c_ulong), POINTER(zet_metric_handle_t) ) +else: + _zetMetricCreateFromProgrammableExp2_t = CFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, c_ulong, POINTER(zet_metric_programmable_param_value_exp_t), c_char_p, c_char_p, POINTER(c_ulong), POINTER(zet_metric_handle_t) ) + + +############################################################################### +## @brief Table of MetricExp functions pointers +class _zet_metric_exp_dditable_t(Structure): + _fields_ = [ + ("pfnCreateFromProgrammableExp", c_void_p), ## _zetMetricCreateFromProgrammableExp_t + ("pfnDestroyExp", c_void_p), ## _zetMetricDestroyExp_t + ("pfnCreateFromProgrammableExp2", c_void_p) ## _zetMetricCreateFromProgrammableExp2_t + ] + +############################################################################### +## @brief Function-pointer for zetMetricGroupGet +if __use_win_types: + _zetMetricGroupGet_t = WINFUNCTYPE( ze_result_t, zet_device_handle_t, POINTER(c_ulong), POINTER(zet_metric_group_handle_t) ) +else: + _zetMetricGroupGet_t = CFUNCTYPE( ze_result_t, zet_device_handle_t, POINTER(c_ulong), POINTER(zet_metric_group_handle_t) ) + +############################################################################### +## @brief Function-pointer for zetMetricGroupGetProperties +if __use_win_types: + _zetMetricGroupGetProperties_t = WINFUNCTYPE( ze_result_t, zet_metric_group_handle_t, POINTER(zet_metric_group_properties_t) ) +else: + _zetMetricGroupGetProperties_t = CFUNCTYPE( ze_result_t, zet_metric_group_handle_t, POINTER(zet_metric_group_properties_t) ) + +############################################################################### +## @brief Function-pointer for zetMetricGroupCalculateMetricValues +if __use_win_types: + _zetMetricGroupCalculateMetricValues_t = WINFUNCTYPE( ze_result_t, zet_metric_group_handle_t, zet_metric_group_calculation_type_t, c_size_t, POINTER(c_ubyte), POINTER(c_ulong), POINTER(zet_typed_value_t) ) +else: + _zetMetricGroupCalculateMetricValues_t = CFUNCTYPE( ze_result_t, zet_metric_group_handle_t, zet_metric_group_calculation_type_t, c_size_t, POINTER(c_ubyte), POINTER(c_ulong), POINTER(zet_typed_value_t) ) + + +############################################################################### +## @brief Table of MetricGroup functions pointers +class _zet_metric_group_dditable_t(Structure): + _fields_ = [ + ("pfnGet", c_void_p), ## _zetMetricGroupGet_t + ("pfnGetProperties", c_void_p), ## _zetMetricGroupGetProperties_t + ("pfnCalculateMetricValues", c_void_p) ## _zetMetricGroupCalculateMetricValues_t + ] + +############################################################################### +## @brief Function-pointer for zetMetricGroupCalculateMultipleMetricValuesExp +if __use_win_types: + _zetMetricGroupCalculateMultipleMetricValuesExp_t = WINFUNCTYPE( ze_result_t, zet_metric_group_handle_t, zet_metric_group_calculation_type_t, c_size_t, POINTER(c_ubyte), POINTER(c_ulong), POINTER(c_ulong), POINTER(c_ulong), POINTER(zet_typed_value_t) ) +else: + _zetMetricGroupCalculateMultipleMetricValuesExp_t = CFUNCTYPE( ze_result_t, zet_metric_group_handle_t, zet_metric_group_calculation_type_t, c_size_t, POINTER(c_ubyte), POINTER(c_ulong), POINTER(c_ulong), POINTER(c_ulong), POINTER(zet_typed_value_t) ) + +############################################################################### +## @brief Function-pointer for zetMetricGroupGetGlobalTimestampsExp +if __use_win_types: + _zetMetricGroupGetGlobalTimestampsExp_t = WINFUNCTYPE( ze_result_t, zet_metric_group_handle_t, ze_bool_t, POINTER(c_ulonglong), POINTER(c_ulonglong) ) +else: + _zetMetricGroupGetGlobalTimestampsExp_t = CFUNCTYPE( ze_result_t, zet_metric_group_handle_t, ze_bool_t, POINTER(c_ulonglong), POINTER(c_ulonglong) ) + +############################################################################### +## @brief Function-pointer for zetMetricGroupGetExportDataExp +if __use_win_types: + _zetMetricGroupGetExportDataExp_t = WINFUNCTYPE( ze_result_t, zet_metric_group_handle_t, POINTER(c_ubyte), c_size_t, POINTER(c_size_t), * ) +else: + _zetMetricGroupGetExportDataExp_t = CFUNCTYPE( ze_result_t, zet_metric_group_handle_t, POINTER(c_ubyte), c_size_t, POINTER(c_size_t), * ) + +############################################################################### +## @brief Function-pointer for zetMetricGroupCalculateMetricExportDataExp +if __use_win_types: + _zetMetricGroupCalculateMetricExportDataExp_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, zet_metric_group_calculation_type_t, c_size_t, POINTER(c_ubyte), POINTER(zet_metric_calculate_exp_desc_t), POINTER(c_ulong), POINTER(c_ulong), POINTER(c_ulong), POINTER(zet_typed_value_t) ) +else: + _zetMetricGroupCalculateMetricExportDataExp_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, zet_metric_group_calculation_type_t, c_size_t, POINTER(c_ubyte), POINTER(zet_metric_calculate_exp_desc_t), POINTER(c_ulong), POINTER(c_ulong), POINTER(c_ulong), POINTER(zet_typed_value_t) ) + +############################################################################### +## @brief Function-pointer for zetMetricGroupCreateExp +if __use_win_types: + _zetMetricGroupCreateExp_t = WINFUNCTYPE( ze_result_t, zet_device_handle_t, c_char_p, c_char_p, zet_metric_group_sampling_type_flags_t, POINTER(zet_metric_group_handle_t) ) +else: + _zetMetricGroupCreateExp_t = CFUNCTYPE( ze_result_t, zet_device_handle_t, c_char_p, c_char_p, zet_metric_group_sampling_type_flags_t, POINTER(zet_metric_group_handle_t) ) + +############################################################################### +## @brief Function-pointer for zetMetricGroupAddMetricExp +if __use_win_types: + _zetMetricGroupAddMetricExp_t = WINFUNCTYPE( ze_result_t, zet_metric_group_handle_t, zet_metric_handle_t, *, c_char_p ) +else: + _zetMetricGroupAddMetricExp_t = CFUNCTYPE( ze_result_t, zet_metric_group_handle_t, zet_metric_handle_t, *, c_char_p ) + +############################################################################### +## @brief Function-pointer for zetMetricGroupRemoveMetricExp +if __use_win_types: + _zetMetricGroupRemoveMetricExp_t = WINFUNCTYPE( ze_result_t, zet_metric_group_handle_t, zet_metric_handle_t ) +else: + _zetMetricGroupRemoveMetricExp_t = CFUNCTYPE( ze_result_t, zet_metric_group_handle_t, zet_metric_handle_t ) + +############################################################################### +## @brief Function-pointer for zetMetricGroupCloseExp +if __use_win_types: + _zetMetricGroupCloseExp_t = WINFUNCTYPE( ze_result_t, zet_metric_group_handle_t ) +else: + _zetMetricGroupCloseExp_t = CFUNCTYPE( ze_result_t, zet_metric_group_handle_t ) + +############################################################################### +## @brief Function-pointer for zetMetricGroupDestroyExp +if __use_win_types: + _zetMetricGroupDestroyExp_t = WINFUNCTYPE( ze_result_t, zet_metric_group_handle_t ) +else: + _zetMetricGroupDestroyExp_t = CFUNCTYPE( ze_result_t, zet_metric_group_handle_t ) + + +############################################################################### +## @brief Table of MetricGroupExp functions pointers +class _zet_metric_group_exp_dditable_t(Structure): + _fields_ = [ + ("pfnCalculateMultipleMetricValuesExp", c_void_p), ## _zetMetricGroupCalculateMultipleMetricValuesExp_t + ("pfnGetGlobalTimestampsExp", c_void_p), ## _zetMetricGroupGetGlobalTimestampsExp_t + ("pfnGetExportDataExp", c_void_p), ## _zetMetricGroupGetExportDataExp_t + ("pfnCalculateMetricExportDataExp", c_void_p), ## _zetMetricGroupCalculateMetricExportDataExp_t + ("pfnCreateExp", c_void_p), ## _zetMetricGroupCreateExp_t + ("pfnAddMetricExp", c_void_p), ## _zetMetricGroupAddMetricExp_t + ("pfnRemoveMetricExp", c_void_p), ## _zetMetricGroupRemoveMetricExp_t + ("pfnCloseExp", c_void_p), ## _zetMetricGroupCloseExp_t + ("pfnDestroyExp", c_void_p) ## _zetMetricGroupDestroyExp_t + ] + +############################################################################### +## @brief Function-pointer for zetMetricStreamerOpen +if __use_win_types: + _zetMetricStreamerOpen_t = WINFUNCTYPE( ze_result_t, zet_context_handle_t, zet_device_handle_t, zet_metric_group_handle_t, POINTER(zet_metric_streamer_desc_t), ze_event_handle_t, POINTER(zet_metric_streamer_handle_t) ) +else: + _zetMetricStreamerOpen_t = CFUNCTYPE( ze_result_t, zet_context_handle_t, zet_device_handle_t, zet_metric_group_handle_t, POINTER(zet_metric_streamer_desc_t), ze_event_handle_t, POINTER(zet_metric_streamer_handle_t) ) + +############################################################################### +## @brief Function-pointer for zetMetricStreamerClose +if __use_win_types: + _zetMetricStreamerClose_t = WINFUNCTYPE( ze_result_t, zet_metric_streamer_handle_t ) +else: + _zetMetricStreamerClose_t = CFUNCTYPE( ze_result_t, zet_metric_streamer_handle_t ) + +############################################################################### +## @brief Function-pointer for zetMetricStreamerReadData +if __use_win_types: + _zetMetricStreamerReadData_t = WINFUNCTYPE( ze_result_t, zet_metric_streamer_handle_t, c_ulong, POINTER(c_size_t), POINTER(c_ubyte) ) +else: + _zetMetricStreamerReadData_t = CFUNCTYPE( ze_result_t, zet_metric_streamer_handle_t, c_ulong, POINTER(c_size_t), POINTER(c_ubyte) ) + + +############################################################################### +## @brief Table of MetricStreamer functions pointers +class _zet_metric_streamer_dditable_t(Structure): + _fields_ = [ + ("pfnOpen", c_void_p), ## _zetMetricStreamerOpen_t + ("pfnClose", c_void_p), ## _zetMetricStreamerClose_t + ("pfnReadData", c_void_p) ## _zetMetricStreamerReadData_t + ] + +############################################################################### +## @brief Function-pointer for zetMetricQueryPoolCreate +if __use_win_types: + _zetMetricQueryPoolCreate_t = WINFUNCTYPE( ze_result_t, zet_context_handle_t, zet_device_handle_t, zet_metric_group_handle_t, POINTER(zet_metric_query_pool_desc_t), POINTER(zet_metric_query_pool_handle_t) ) +else: + _zetMetricQueryPoolCreate_t = CFUNCTYPE( ze_result_t, zet_context_handle_t, zet_device_handle_t, zet_metric_group_handle_t, POINTER(zet_metric_query_pool_desc_t), POINTER(zet_metric_query_pool_handle_t) ) + +############################################################################### +## @brief Function-pointer for zetMetricQueryPoolDestroy +if __use_win_types: + _zetMetricQueryPoolDestroy_t = WINFUNCTYPE( ze_result_t, zet_metric_query_pool_handle_t ) +else: + _zetMetricQueryPoolDestroy_t = CFUNCTYPE( ze_result_t, zet_metric_query_pool_handle_t ) + + +############################################################################### +## @brief Table of MetricQueryPool functions pointers +class _zet_metric_query_pool_dditable_t(Structure): + _fields_ = [ + ("pfnCreate", c_void_p), ## _zetMetricQueryPoolCreate_t + ("pfnDestroy", c_void_p) ## _zetMetricQueryPoolDestroy_t + ] + +############################################################################### +## @brief Function-pointer for zetMetricQueryCreate +if __use_win_types: + _zetMetricQueryCreate_t = WINFUNCTYPE( ze_result_t, zet_metric_query_pool_handle_t, c_ulong, POINTER(zet_metric_query_handle_t) ) +else: + _zetMetricQueryCreate_t = CFUNCTYPE( ze_result_t, zet_metric_query_pool_handle_t, c_ulong, POINTER(zet_metric_query_handle_t) ) + +############################################################################### +## @brief Function-pointer for zetMetricQueryDestroy +if __use_win_types: + _zetMetricQueryDestroy_t = WINFUNCTYPE( ze_result_t, zet_metric_query_handle_t ) +else: + _zetMetricQueryDestroy_t = CFUNCTYPE( ze_result_t, zet_metric_query_handle_t ) + +############################################################################### +## @brief Function-pointer for zetMetricQueryReset +if __use_win_types: + _zetMetricQueryReset_t = WINFUNCTYPE( ze_result_t, zet_metric_query_handle_t ) +else: + _zetMetricQueryReset_t = CFUNCTYPE( ze_result_t, zet_metric_query_handle_t ) + +############################################################################### +## @brief Function-pointer for zetMetricQueryGetData +if __use_win_types: + _zetMetricQueryGetData_t = WINFUNCTYPE( ze_result_t, zet_metric_query_handle_t, POINTER(c_size_t), POINTER(c_ubyte) ) +else: + _zetMetricQueryGetData_t = CFUNCTYPE( ze_result_t, zet_metric_query_handle_t, POINTER(c_size_t), POINTER(c_ubyte) ) + + +############################################################################### +## @brief Table of MetricQuery functions pointers +class _zet_metric_query_dditable_t(Structure): + _fields_ = [ + ("pfnCreate", c_void_p), ## _zetMetricQueryCreate_t + ("pfnDestroy", c_void_p), ## _zetMetricQueryDestroy_t + ("pfnReset", c_void_p), ## _zetMetricQueryReset_t + ("pfnGetData", c_void_p) ## _zetMetricQueryGetData_t + ] + +############################################################################### +## @brief Function-pointer for zetTracerExpCreate +if __use_win_types: + _zetTracerExpCreate_t = WINFUNCTYPE( ze_result_t, zet_context_handle_t, POINTER(zet_tracer_exp_desc_t), POINTER(zet_tracer_exp_handle_t) ) +else: + _zetTracerExpCreate_t = CFUNCTYPE( ze_result_t, zet_context_handle_t, POINTER(zet_tracer_exp_desc_t), POINTER(zet_tracer_exp_handle_t) ) + +############################################################################### +## @brief Function-pointer for zetTracerExpDestroy +if __use_win_types: + _zetTracerExpDestroy_t = WINFUNCTYPE( ze_result_t, zet_tracer_exp_handle_t ) +else: + _zetTracerExpDestroy_t = CFUNCTYPE( ze_result_t, zet_tracer_exp_handle_t ) + +############################################################################### +## @brief Function-pointer for zetTracerExpSetPrologues +if __use_win_types: + _zetTracerExpSetPrologues_t = WINFUNCTYPE( ze_result_t, zet_tracer_exp_handle_t, POINTER(zet_core_callbacks_t) ) +else: + _zetTracerExpSetPrologues_t = CFUNCTYPE( ze_result_t, zet_tracer_exp_handle_t, POINTER(zet_core_callbacks_t) ) + +############################################################################### +## @brief Function-pointer for zetTracerExpSetEpilogues +if __use_win_types: + _zetTracerExpSetEpilogues_t = WINFUNCTYPE( ze_result_t, zet_tracer_exp_handle_t, POINTER(zet_core_callbacks_t) ) +else: + _zetTracerExpSetEpilogues_t = CFUNCTYPE( ze_result_t, zet_tracer_exp_handle_t, POINTER(zet_core_callbacks_t) ) + +############################################################################### +## @brief Function-pointer for zetTracerExpSetEnabled +if __use_win_types: + _zetTracerExpSetEnabled_t = WINFUNCTYPE( ze_result_t, zet_tracer_exp_handle_t, ze_bool_t ) +else: + _zetTracerExpSetEnabled_t = CFUNCTYPE( ze_result_t, zet_tracer_exp_handle_t, ze_bool_t ) + + +############################################################################### +## @brief Table of TracerExp functions pointers +class _zet_tracer_exp_dditable_t(Structure): + _fields_ = [ + ("pfnCreate", c_void_p), ## _zetTracerExpCreate_t + ("pfnDestroy", c_void_p), ## _zetTracerExpDestroy_t + ("pfnSetPrologues", c_void_p), ## _zetTracerExpSetPrologues_t + ("pfnSetEpilogues", c_void_p), ## _zetTracerExpSetEpilogues_t + ("pfnSetEnabled", c_void_p) ## _zetTracerExpSetEnabled_t + ] + +############################################################################### +## @brief Function-pointer for zetDebugAttach +if __use_win_types: + _zetDebugAttach_t = WINFUNCTYPE( ze_result_t, zet_device_handle_t, POINTER(zet_debug_config_t), POINTER(zet_debug_session_handle_t) ) +else: + _zetDebugAttach_t = CFUNCTYPE( ze_result_t, zet_device_handle_t, POINTER(zet_debug_config_t), POINTER(zet_debug_session_handle_t) ) + +############################################################################### +## @brief Function-pointer for zetDebugDetach +if __use_win_types: + _zetDebugDetach_t = WINFUNCTYPE( ze_result_t, zet_debug_session_handle_t ) +else: + _zetDebugDetach_t = CFUNCTYPE( ze_result_t, zet_debug_session_handle_t ) + +############################################################################### +## @brief Function-pointer for zetDebugReadEvent +if __use_win_types: + _zetDebugReadEvent_t = WINFUNCTYPE( ze_result_t, zet_debug_session_handle_t, c_ulonglong, POINTER(zet_debug_event_t) ) +else: + _zetDebugReadEvent_t = CFUNCTYPE( ze_result_t, zet_debug_session_handle_t, c_ulonglong, POINTER(zet_debug_event_t) ) + +############################################################################### +## @brief Function-pointer for zetDebugAcknowledgeEvent +if __use_win_types: + _zetDebugAcknowledgeEvent_t = WINFUNCTYPE( ze_result_t, zet_debug_session_handle_t, POINTER(zet_debug_event_t) ) +else: + _zetDebugAcknowledgeEvent_t = CFUNCTYPE( ze_result_t, zet_debug_session_handle_t, POINTER(zet_debug_event_t) ) + +############################################################################### +## @brief Function-pointer for zetDebugInterrupt +if __use_win_types: + _zetDebugInterrupt_t = WINFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t ) +else: + _zetDebugInterrupt_t = CFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t ) + +############################################################################### +## @brief Function-pointer for zetDebugResume +if __use_win_types: + _zetDebugResume_t = WINFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t ) +else: + _zetDebugResume_t = CFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t ) + +############################################################################### +## @brief Function-pointer for zetDebugReadMemory +if __use_win_types: + _zetDebugReadMemory_t = WINFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t, POINTER(zet_debug_memory_space_desc_t), c_size_t, c_void_p ) +else: + _zetDebugReadMemory_t = CFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t, POINTER(zet_debug_memory_space_desc_t), c_size_t, c_void_p ) + +############################################################################### +## @brief Function-pointer for zetDebugWriteMemory +if __use_win_types: + _zetDebugWriteMemory_t = WINFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t, POINTER(zet_debug_memory_space_desc_t), c_size_t, c_void_p ) +else: + _zetDebugWriteMemory_t = CFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t, POINTER(zet_debug_memory_space_desc_t), c_size_t, c_void_p ) + +############################################################################### +## @brief Function-pointer for zetDebugGetRegisterSetProperties +if __use_win_types: + _zetDebugGetRegisterSetProperties_t = WINFUNCTYPE( ze_result_t, zet_device_handle_t, POINTER(c_ulong), POINTER(zet_debug_regset_properties_t) ) +else: + _zetDebugGetRegisterSetProperties_t = CFUNCTYPE( ze_result_t, zet_device_handle_t, POINTER(c_ulong), POINTER(zet_debug_regset_properties_t) ) + +############################################################################### +## @brief Function-pointer for zetDebugReadRegisters +if __use_win_types: + _zetDebugReadRegisters_t = WINFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t, c_ulong, c_ulong, c_ulong, c_void_p ) +else: + _zetDebugReadRegisters_t = CFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t, c_ulong, c_ulong, c_ulong, c_void_p ) + +############################################################################### +## @brief Function-pointer for zetDebugWriteRegisters +if __use_win_types: + _zetDebugWriteRegisters_t = WINFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t, c_ulong, c_ulong, c_ulong, c_void_p ) +else: + _zetDebugWriteRegisters_t = CFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t, c_ulong, c_ulong, c_ulong, c_void_p ) + +############################################################################### +## @brief Function-pointer for zetDebugGetThreadRegisterSetProperties +if __use_win_types: + _zetDebugGetThreadRegisterSetProperties_t = WINFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t, POINTER(c_ulong), POINTER(zet_debug_regset_properties_t) ) +else: + _zetDebugGetThreadRegisterSetProperties_t = CFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t, POINTER(c_ulong), POINTER(zet_debug_regset_properties_t) ) + + +############################################################################### +## @brief Table of Debug functions pointers +class _zet_debug_dditable_t(Structure): + _fields_ = [ + ("pfnAttach", c_void_p), ## _zetDebugAttach_t + ("pfnDetach", c_void_p), ## _zetDebugDetach_t + ("pfnReadEvent", c_void_p), ## _zetDebugReadEvent_t + ("pfnAcknowledgeEvent", c_void_p), ## _zetDebugAcknowledgeEvent_t + ("pfnInterrupt", c_void_p), ## _zetDebugInterrupt_t + ("pfnResume", c_void_p), ## _zetDebugResume_t + ("pfnReadMemory", c_void_p), ## _zetDebugReadMemory_t + ("pfnWriteMemory", c_void_p), ## _zetDebugWriteMemory_t + ("pfnGetRegisterSetProperties", c_void_p), ## _zetDebugGetRegisterSetProperties_t + ("pfnReadRegisters", c_void_p), ## _zetDebugReadRegisters_t + ("pfnWriteRegisters", c_void_p), ## _zetDebugWriteRegisters_t + ("pfnGetThreadRegisterSetProperties", c_void_p) ## _zetDebugGetThreadRegisterSetProperties_t + ] + +############################################################################### +class _zet_dditable_t(Structure): + _fields_ = [ + ("MetricProgrammableExp", _zet_metric_programmable_exp_dditable_t), + ("MetricTracerExp", _zet_metric_tracer_exp_dditable_t), + ("MetricDecoderExp", _zet_metric_decoder_exp_dditable_t), + ("Device", _zet_device_dditable_t), + ("DeviceExp", _zet_device_exp_dditable_t), + ("Context", _zet_context_dditable_t), + ("CommandList", _zet_command_list_dditable_t), + ("CommandListExp", _zet_command_list_exp_dditable_t), + ("Module", _zet_module_dditable_t), + ("Kernel", _zet_kernel_dditable_t), + ("Metric", _zet_metric_dditable_t), + ("MetricExp", _zet_metric_exp_dditable_t), + ("MetricGroup", _zet_metric_group_dditable_t), + ("MetricGroupExp", _zet_metric_group_exp_dditable_t), + ("MetricStreamer", _zet_metric_streamer_dditable_t), + ("MetricQueryPool", _zet_metric_query_pool_dditable_t), + ("MetricQuery", _zet_metric_query_dditable_t), + ("TracerExp", _zet_tracer_exp_dditable_t), + ("Debug", _zet_debug_dditable_t) + ] + +############################################################################### +## @brief zet device-driver interfaces +class ZET_DDI: + def __init__(self, version : ze_api_version_t): + # load the ze_loader library + if "Windows" == platform.uname()[0]: + self.__dll = WinDLL("ze_loader.dll") + else: + self.__dll = CDLL("ze_loader.so") + + # fill the ddi tables + self.__dditable = _zet_dditable_t() + + # call driver to get function pointers + _MetricProgrammableExp = _zet_metric_programmable_exp_dditable_t() + r = ze_result_v(self.__dll.zetGetMetricProgrammableExpProcAddrTable(version, byref(_MetricProgrammableExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.MetricProgrammableExp = _MetricProgrammableExp + + # attach function interface to function address + self.zetMetricProgrammableGetExp = _zetMetricProgrammableGetExp_t(self.__dditable.MetricProgrammableExp.pfnGetExp) + self.zetMetricProgrammableGetPropertiesExp = _zetMetricProgrammableGetPropertiesExp_t(self.__dditable.MetricProgrammableExp.pfnGetPropertiesExp) + self.zetMetricProgrammableGetParamInfoExp = _zetMetricProgrammableGetParamInfoExp_t(self.__dditable.MetricProgrammableExp.pfnGetParamInfoExp) + self.zetMetricProgrammableGetParamValueInfoExp = _zetMetricProgrammableGetParamValueInfoExp_t(self.__dditable.MetricProgrammableExp.pfnGetParamValueInfoExp) + + # call driver to get function pointers + _MetricTracerExp = _zet_metric_tracer_exp_dditable_t() + r = ze_result_v(self.__dll.zetGetMetricTracerExpProcAddrTable(version, byref(_MetricTracerExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.MetricTracerExp = _MetricTracerExp + + # attach function interface to function address + self.zetMetricTracerCreateExp = _zetMetricTracerCreateExp_t(self.__dditable.MetricTracerExp.pfnCreateExp) + self.zetMetricTracerDestroyExp = _zetMetricTracerDestroyExp_t(self.__dditable.MetricTracerExp.pfnDestroyExp) + self.zetMetricTracerEnableExp = _zetMetricTracerEnableExp_t(self.__dditable.MetricTracerExp.pfnEnableExp) + self.zetMetricTracerDisableExp = _zetMetricTracerDisableExp_t(self.__dditable.MetricTracerExp.pfnDisableExp) + self.zetMetricTracerReadDataExp = _zetMetricTracerReadDataExp_t(self.__dditable.MetricTracerExp.pfnReadDataExp) + self.zetMetricTracerDecodeExp = _zetMetricTracerDecodeExp_t(self.__dditable.MetricTracerExp.pfnDecodeExp) + + # call driver to get function pointers + _MetricDecoderExp = _zet_metric_decoder_exp_dditable_t() + r = ze_result_v(self.__dll.zetGetMetricDecoderExpProcAddrTable(version, byref(_MetricDecoderExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.MetricDecoderExp = _MetricDecoderExp + + # attach function interface to function address + self.zetMetricDecoderCreateExp = _zetMetricDecoderCreateExp_t(self.__dditable.MetricDecoderExp.pfnCreateExp) + self.zetMetricDecoderDestroyExp = _zetMetricDecoderDestroyExp_t(self.__dditable.MetricDecoderExp.pfnDestroyExp) + self.zetMetricDecoderGetDecodableMetricsExp = _zetMetricDecoderGetDecodableMetricsExp_t(self.__dditable.MetricDecoderExp.pfnGetDecodableMetricsExp) + + # call driver to get function pointers + _Device = _zet_device_dditable_t() + r = ze_result_v(self.__dll.zetGetDeviceProcAddrTable(version, byref(_Device))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Device = _Device + + # attach function interface to function address + self.zetDeviceGetDebugProperties = _zetDeviceGetDebugProperties_t(self.__dditable.Device.pfnGetDebugProperties) + + # call driver to get function pointers + _DeviceExp = _zet_device_exp_dditable_t() + r = ze_result_v(self.__dll.zetGetDeviceExpProcAddrTable(version, byref(_DeviceExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.DeviceExp = _DeviceExp + + # attach function interface to function address + self.zetDeviceGetConcurrentMetricGroupsExp = _zetDeviceGetConcurrentMetricGroupsExp_t(self.__dditable.DeviceExp.pfnGetConcurrentMetricGroupsExp) + self.zetDeviceCreateMetricGroupsFromMetricsExp = _zetDeviceCreateMetricGroupsFromMetricsExp_t(self.__dditable.DeviceExp.pfnCreateMetricGroupsFromMetricsExp) + self.zetDeviceEnableMetricsExp = _zetDeviceEnableMetricsExp_t(self.__dditable.DeviceExp.pfnEnableMetricsExp) + self.zetDeviceDisableMetricsExp = _zetDeviceDisableMetricsExp_t(self.__dditable.DeviceExp.pfnDisableMetricsExp) + + # call driver to get function pointers + _Context = _zet_context_dditable_t() + r = ze_result_v(self.__dll.zetGetContextProcAddrTable(version, byref(_Context))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Context = _Context + + # attach function interface to function address + self.zetContextActivateMetricGroups = _zetContextActivateMetricGroups_t(self.__dditable.Context.pfnActivateMetricGroups) + + # call driver to get function pointers + _CommandList = _zet_command_list_dditable_t() + r = ze_result_v(self.__dll.zetGetCommandListProcAddrTable(version, byref(_CommandList))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.CommandList = _CommandList + + # attach function interface to function address + self.zetCommandListAppendMetricStreamerMarker = _zetCommandListAppendMetricStreamerMarker_t(self.__dditable.CommandList.pfnAppendMetricStreamerMarker) + self.zetCommandListAppendMetricQueryBegin = _zetCommandListAppendMetricQueryBegin_t(self.__dditable.CommandList.pfnAppendMetricQueryBegin) + self.zetCommandListAppendMetricQueryEnd = _zetCommandListAppendMetricQueryEnd_t(self.__dditable.CommandList.pfnAppendMetricQueryEnd) + self.zetCommandListAppendMetricMemoryBarrier = _zetCommandListAppendMetricMemoryBarrier_t(self.__dditable.CommandList.pfnAppendMetricMemoryBarrier) + + # call driver to get function pointers + _CommandListExp = _zet_command_list_exp_dditable_t() + r = ze_result_v(self.__dll.zetGetCommandListExpProcAddrTable(version, byref(_CommandListExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.CommandListExp = _CommandListExp + + # attach function interface to function address + self.zetCommandListAppendMarkerExp = _zetCommandListAppendMarkerExp_t(self.__dditable.CommandListExp.pfnAppendMarkerExp) + + # call driver to get function pointers + _Module = _zet_module_dditable_t() + r = ze_result_v(self.__dll.zetGetModuleProcAddrTable(version, byref(_Module))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Module = _Module + + # attach function interface to function address + self.zetModuleGetDebugInfo = _zetModuleGetDebugInfo_t(self.__dditable.Module.pfnGetDebugInfo) + + # call driver to get function pointers + _Kernel = _zet_kernel_dditable_t() + r = ze_result_v(self.__dll.zetGetKernelProcAddrTable(version, byref(_Kernel))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Kernel = _Kernel + + # attach function interface to function address + self.zetKernelGetProfileInfo = _zetKernelGetProfileInfo_t(self.__dditable.Kernel.pfnGetProfileInfo) + + # call driver to get function pointers + _Metric = _zet_metric_dditable_t() + r = ze_result_v(self.__dll.zetGetMetricProcAddrTable(version, byref(_Metric))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Metric = _Metric + + # attach function interface to function address + self.zetMetricGet = _zetMetricGet_t(self.__dditable.Metric.pfnGet) + self.zetMetricGetProperties = _zetMetricGetProperties_t(self.__dditable.Metric.pfnGetProperties) + + # call driver to get function pointers + _MetricExp = _zet_metric_exp_dditable_t() + r = ze_result_v(self.__dll.zetGetMetricExpProcAddrTable(version, byref(_MetricExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.MetricExp = _MetricExp + + # attach function interface to function address + self.zetMetricCreateFromProgrammableExp = _zetMetricCreateFromProgrammableExp_t(self.__dditable.MetricExp.pfnCreateFromProgrammableExp) + self.zetMetricDestroyExp = _zetMetricDestroyExp_t(self.__dditable.MetricExp.pfnDestroyExp) + self.zetMetricCreateFromProgrammableExp2 = _zetMetricCreateFromProgrammableExp2_t(self.__dditable.MetricExp.pfnCreateFromProgrammableExp2) + + # call driver to get function pointers + _MetricGroup = _zet_metric_group_dditable_t() + r = ze_result_v(self.__dll.zetGetMetricGroupProcAddrTable(version, byref(_MetricGroup))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.MetricGroup = _MetricGroup + + # attach function interface to function address + self.zetMetricGroupGet = _zetMetricGroupGet_t(self.__dditable.MetricGroup.pfnGet) + self.zetMetricGroupGetProperties = _zetMetricGroupGetProperties_t(self.__dditable.MetricGroup.pfnGetProperties) + self.zetMetricGroupCalculateMetricValues = _zetMetricGroupCalculateMetricValues_t(self.__dditable.MetricGroup.pfnCalculateMetricValues) + + # call driver to get function pointers + _MetricGroupExp = _zet_metric_group_exp_dditable_t() + r = ze_result_v(self.__dll.zetGetMetricGroupExpProcAddrTable(version, byref(_MetricGroupExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.MetricGroupExp = _MetricGroupExp + + # attach function interface to function address + self.zetMetricGroupCalculateMultipleMetricValuesExp = _zetMetricGroupCalculateMultipleMetricValuesExp_t(self.__dditable.MetricGroupExp.pfnCalculateMultipleMetricValuesExp) + self.zetMetricGroupGetGlobalTimestampsExp = _zetMetricGroupGetGlobalTimestampsExp_t(self.__dditable.MetricGroupExp.pfnGetGlobalTimestampsExp) + self.zetMetricGroupGetExportDataExp = _zetMetricGroupGetExportDataExp_t(self.__dditable.MetricGroupExp.pfnGetExportDataExp) + self.zetMetricGroupCalculateMetricExportDataExp = _zetMetricGroupCalculateMetricExportDataExp_t(self.__dditable.MetricGroupExp.pfnCalculateMetricExportDataExp) + self.zetMetricGroupCreateExp = _zetMetricGroupCreateExp_t(self.__dditable.MetricGroupExp.pfnCreateExp) + self.zetMetricGroupAddMetricExp = _zetMetricGroupAddMetricExp_t(self.__dditable.MetricGroupExp.pfnAddMetricExp) + self.zetMetricGroupRemoveMetricExp = _zetMetricGroupRemoveMetricExp_t(self.__dditable.MetricGroupExp.pfnRemoveMetricExp) + self.zetMetricGroupCloseExp = _zetMetricGroupCloseExp_t(self.__dditable.MetricGroupExp.pfnCloseExp) + self.zetMetricGroupDestroyExp = _zetMetricGroupDestroyExp_t(self.__dditable.MetricGroupExp.pfnDestroyExp) + + # call driver to get function pointers + _MetricStreamer = _zet_metric_streamer_dditable_t() + r = ze_result_v(self.__dll.zetGetMetricStreamerProcAddrTable(version, byref(_MetricStreamer))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.MetricStreamer = _MetricStreamer + + # attach function interface to function address + self.zetMetricStreamerOpen = _zetMetricStreamerOpen_t(self.__dditable.MetricStreamer.pfnOpen) + self.zetMetricStreamerClose = _zetMetricStreamerClose_t(self.__dditable.MetricStreamer.pfnClose) + self.zetMetricStreamerReadData = _zetMetricStreamerReadData_t(self.__dditable.MetricStreamer.pfnReadData) + + # call driver to get function pointers + _MetricQueryPool = _zet_metric_query_pool_dditable_t() + r = ze_result_v(self.__dll.zetGetMetricQueryPoolProcAddrTable(version, byref(_MetricQueryPool))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.MetricQueryPool = _MetricQueryPool + + # attach function interface to function address + self.zetMetricQueryPoolCreate = _zetMetricQueryPoolCreate_t(self.__dditable.MetricQueryPool.pfnCreate) + self.zetMetricQueryPoolDestroy = _zetMetricQueryPoolDestroy_t(self.__dditable.MetricQueryPool.pfnDestroy) + + # call driver to get function pointers + _MetricQuery = _zet_metric_query_dditable_t() + r = ze_result_v(self.__dll.zetGetMetricQueryProcAddrTable(version, byref(_MetricQuery))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.MetricQuery = _MetricQuery + + # attach function interface to function address + self.zetMetricQueryCreate = _zetMetricQueryCreate_t(self.__dditable.MetricQuery.pfnCreate) + self.zetMetricQueryDestroy = _zetMetricQueryDestroy_t(self.__dditable.MetricQuery.pfnDestroy) + self.zetMetricQueryReset = _zetMetricQueryReset_t(self.__dditable.MetricQuery.pfnReset) + self.zetMetricQueryGetData = _zetMetricQueryGetData_t(self.__dditable.MetricQuery.pfnGetData) + + # call driver to get function pointers + _TracerExp = _zet_tracer_exp_dditable_t() + r = ze_result_v(self.__dll.zetGetTracerExpProcAddrTable(version, byref(_TracerExp))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.TracerExp = _TracerExp + + # attach function interface to function address + self.zetTracerExpCreate = _zetTracerExpCreate_t(self.__dditable.TracerExp.pfnCreate) + self.zetTracerExpDestroy = _zetTracerExpDestroy_t(self.__dditable.TracerExp.pfnDestroy) + self.zetTracerExpSetPrologues = _zetTracerExpSetPrologues_t(self.__dditable.TracerExp.pfnSetPrologues) + self.zetTracerExpSetEpilogues = _zetTracerExpSetEpilogues_t(self.__dditable.TracerExp.pfnSetEpilogues) + self.zetTracerExpSetEnabled = _zetTracerExpSetEnabled_t(self.__dditable.TracerExp.pfnSetEnabled) + + # call driver to get function pointers + _Debug = _zet_debug_dditable_t() + r = ze_result_v(self.__dll.zetGetDebugProcAddrTable(version, byref(_Debug))) + if r != ze_result_v.SUCCESS: + raise Exception(r) + self.__dditable.Debug = _Debug + + # attach function interface to function address + self.zetDebugAttach = _zetDebugAttach_t(self.__dditable.Debug.pfnAttach) + self.zetDebugDetach = _zetDebugDetach_t(self.__dditable.Debug.pfnDetach) + self.zetDebugReadEvent = _zetDebugReadEvent_t(self.__dditable.Debug.pfnReadEvent) + self.zetDebugAcknowledgeEvent = _zetDebugAcknowledgeEvent_t(self.__dditable.Debug.pfnAcknowledgeEvent) + self.zetDebugInterrupt = _zetDebugInterrupt_t(self.__dditable.Debug.pfnInterrupt) + self.zetDebugResume = _zetDebugResume_t(self.__dditable.Debug.pfnResume) + self.zetDebugReadMemory = _zetDebugReadMemory_t(self.__dditable.Debug.pfnReadMemory) + self.zetDebugWriteMemory = _zetDebugWriteMemory_t(self.__dditable.Debug.pfnWriteMemory) + self.zetDebugGetRegisterSetProperties = _zetDebugGetRegisterSetProperties_t(self.__dditable.Debug.pfnGetRegisterSetProperties) + self.zetDebugReadRegisters = _zetDebugReadRegisters_t(self.__dditable.Debug.pfnReadRegisters) + self.zetDebugWriteRegisters = _zetDebugWriteRegisters_t(self.__dditable.Debug.pfnWriteRegisters) + self.zetDebugGetThreadRegisterSetProperties = _zetDebugGetThreadRegisterSetProperties_t(self.__dditable.Debug.pfnGetThreadRegisterSetProperties) + + # success! diff --git a/backends/ze/include/zet_api.h b/backends/ze/include/zet_api.h index a202fde6c..f7a933fa6 100644 --- a/backends/ze/include/zet_api.h +++ b/backends/ze/include/zet_api.h @@ -1,11 +1,11 @@ /* * - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2025 Intel Corporation * * SPDX-License-Identifier: MIT * * @file zet_api.h - * @version v1.9-r1.9.3 + * @version v1.15-r1.13.73 * */ #ifndef _ZET_API_H @@ -99,7 +99,11 @@ typedef enum _zet_structure_type_t ZET_STRUCTURE_TYPE_METRIC_PROGRAMMABLE_EXP_PROPERTIES = 0x00010003, ///< ::zet_metric_programmable_exp_properties_t ZET_STRUCTURE_TYPE_METRIC_PROGRAMMABLE_PARAM_INFO_EXP = 0x00010004, ///< ::zet_metric_programmable_param_info_exp_t ZET_STRUCTURE_TYPE_METRIC_PROGRAMMABLE_PARAM_VALUE_INFO_EXP = 0x00010005, ///< ::zet_metric_programmable_param_value_info_exp_t - ZET_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff + ZET_STRUCTURE_TYPE_METRIC_GROUP_TYPE_EXP = 0x00010006, ///< ::zet_metric_group_type_exp_t + ZET_STRUCTURE_TYPE_EXPORT_DMA_EXP_PROPERTIES = 0x00010007, ///< ::zet_export_dma_buf_exp_properties_t + ZET_STRUCTURE_TYPE_METRIC_TRACER_EXP_DESC = 0x00010008, ///< ::zet_metric_tracer_exp_desc_t + ZET_STRUCTURE_TYPE_METRIC_SOURCE_ID_EXP = 0x00010009, ///< ::zet_metric_source_id_exp_t + ZET_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_STRUCTURE_TYPE_* ENUMs } zet_structure_type_t; @@ -135,7 +139,7 @@ typedef enum _zet_value_type_t ZET_VALUE_TYPE_STRING = 5, ///< C string ZET_VALUE_TYPE_UINT8 = 6, ///< 8-bit unsigned-integer ZET_VALUE_TYPE_UINT16 = 7, ///< 16-bit unsigned-integer - ZET_VALUE_TYPE_FORCE_UINT32 = 0x7fffffff + ZET_VALUE_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_VALUE_TYPE_* ENUMs } zet_value_type_t; @@ -250,6 +254,26 @@ typedef struct _zet_profile_register_sequence_t zet_profile_register_sequence_t; /// @brief Forward-declare zet_tracer_exp_desc_t typedef struct _zet_tracer_exp_desc_t zet_tracer_exp_desc_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare zet_metric_tracer_exp_desc_t +typedef struct _zet_metric_tracer_exp_desc_t zet_metric_tracer_exp_desc_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare zet_metric_entry_exp_t +typedef struct _zet_metric_entry_exp_t zet_metric_entry_exp_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare zet_metric_group_type_exp_t +typedef struct _zet_metric_group_type_exp_t zet_metric_group_type_exp_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare zet_export_dma_buf_exp_properties_t +typedef struct _zet_export_dma_buf_exp_properties_t zet_export_dma_buf_exp_properties_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare zet_metric_source_id_exp_t +typedef struct _zet_metric_source_id_exp_t zet_metric_source_id_exp_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare zet_metric_global_timestamps_resolution_exp_t typedef struct _zet_metric_global_timestamps_resolution_exp_t zet_metric_global_timestamps_resolution_exp_t; @@ -266,6 +290,10 @@ typedef struct _zet_metric_programmable_exp_properties_t zet_metric_programmable /// @brief Forward-declare zet_value_uint64_range_exp_t typedef struct _zet_value_uint64_range_exp_t zet_value_uint64_range_exp_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare zet_value_fp64_range_exp_t +typedef struct _zet_value_fp64_range_exp_t zet_value_fp64_range_exp_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare zet_metric_programmable_param_info_exp_t typedef struct _zet_metric_programmable_param_info_exp_t zet_metric_programmable_param_info_exp_t; @@ -312,7 +340,7 @@ typedef struct _zet_metric_programmable_param_value_exp_t zet_metric_programmabl typedef enum _zet_module_debug_info_format_t { ZET_MODULE_DEBUG_INFO_FORMAT_ELF_DWARF = 0, ///< Format is ELF/DWARF - ZET_MODULE_DEBUG_INFO_FORMAT_FORCE_UINT32 = 0x7fffffff + ZET_MODULE_DEBUG_INFO_FORMAT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_MODULE_DEBUG_INFO_FORMAT_* ENUMs } zet_module_debug_info_format_t; @@ -333,10 +361,19 @@ typedef enum _zet_module_debug_info_format_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hModule` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZET_MODULE_DEBUG_INFO_FORMAT_ELF_DWARF < format` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pSize` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -360,7 +397,7 @@ typedef uint32_t zet_device_debug_property_flags_t; typedef enum _zet_device_debug_property_flag_t { ZET_DEVICE_DEBUG_PROPERTY_FLAG_ATTACH = ZE_BIT(0), ///< the device supports attaching for debug - ZET_DEVICE_DEBUG_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff + ZET_DEVICE_DEBUG_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_DEVICE_DEBUG_PROPERTY_FLAG_* ENUMs } zet_device_debug_property_flag_t; @@ -385,6 +422,14 @@ typedef struct _zet_device_debug_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -416,6 +461,11 @@ typedef struct _zet_debug_config_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -443,6 +493,14 @@ zetDebugAttach( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDebug` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -457,7 +515,7 @@ typedef enum _zet_debug_event_flag_t { ZET_DEBUG_EVENT_FLAG_NEED_ACK = ZE_BIT(0), ///< The event needs to be acknowledged by calling ///< ::zetDebugAcknowledgeEvent. - ZET_DEBUG_EVENT_FLAG_FORCE_UINT32 = 0x7fffffff + ZET_DEBUG_EVENT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_DEBUG_EVENT_FLAG_* ENUMs } zet_debug_event_flag_t; @@ -474,7 +532,7 @@ typedef enum _zet_debug_event_type_t ZET_DEBUG_EVENT_TYPE_THREAD_STOPPED = 6, ///< The thread stopped due to a device exception ZET_DEBUG_EVENT_TYPE_THREAD_UNAVAILABLE = 7, ///< The thread is not available to be stopped ZET_DEBUG_EVENT_TYPE_PAGE_FAULT = 8, ///< A page request could not be completed on the device - ZET_DEBUG_EVENT_TYPE_FORCE_UINT32 = 0x7fffffff + ZET_DEBUG_EVENT_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_DEBUG_EVENT_TYPE_* ENUMs } zet_debug_event_type_t; @@ -484,7 +542,7 @@ typedef enum _zet_debug_detach_reason_t { ZET_DEBUG_DETACH_REASON_INVALID = 0, ///< The detach reason is not valid ZET_DEBUG_DETACH_REASON_HOST_EXIT = 1, ///< The host process exited - ZET_DEBUG_DETACH_REASON_FORCE_UINT32 = 0x7fffffff + ZET_DEBUG_DETACH_REASON_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_DEBUG_DETACH_REASON_* ENUMs } zet_debug_detach_reason_t; @@ -524,7 +582,7 @@ typedef enum _zet_debug_page_fault_reason_t ZET_DEBUG_PAGE_FAULT_REASON_INVALID = 0, ///< The page fault reason is not valid ZET_DEBUG_PAGE_FAULT_REASON_MAPPING_ERROR = 1, ///< The address is not mapped ZET_DEBUG_PAGE_FAULT_REASON_PERMISSION_ERROR = 2, ///< Invalid access permissions - ZET_DEBUG_PAGE_FAULT_REASON_FORCE_UINT32 = 0x7fffffff + ZET_DEBUG_PAGE_FAULT_REASON_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_DEBUG_PAGE_FAULT_REASON_* ENUMs } zet_debug_page_fault_reason_t; @@ -570,6 +628,14 @@ typedef struct _zet_debug_event_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDebug` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -598,6 +664,14 @@ zetDebugReadEvent( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDebug` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -617,6 +691,13 @@ zetDebugAcknowledgeEvent( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDebug` /// - ::ZE_RESULT_ERROR_NOT_AVAILABLE @@ -636,6 +717,13 @@ zetDebugInterrupt( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDebug` /// - ::ZE_RESULT_ERROR_NOT_AVAILABLE @@ -652,7 +740,9 @@ typedef enum _zet_debug_memory_space_type_t { ZET_DEBUG_MEMORY_SPACE_TYPE_DEFAULT = 0, ///< default memory space (attribute may be omitted) ZET_DEBUG_MEMORY_SPACE_TYPE_SLM = 1, ///< shared local memory space (GPU-only) - ZET_DEBUG_MEMORY_SPACE_TYPE_FORCE_UINT32 = 0x7fffffff + ZET_DEBUG_MEMORY_SPACE_TYPE_ELF = 2, ///< ELF file memory space + ZET_DEBUG_MEMORY_SPACE_TYPE_BARRIER = 3, ///< Barrier memory space + ZET_DEBUG_MEMORY_SPACE_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_DEBUG_MEMORY_SPACE_TYPE_* ENUMs } zet_debug_memory_space_type_t; @@ -681,13 +771,21 @@ typedef struct _zet_debug_memory_space_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDebug` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == desc` /// + `nullptr == buffer` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZET_DEBUG_MEMORY_SPACE_TYPE_SLM < desc->type` +/// + `::ZET_DEBUG_MEMORY_SPACE_TYPE_BARRIER < desc->type` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_NOT_AVAILABLE /// + the thread is running or unavailable /// + the memory cannot be accessed from the supplied thread @@ -713,13 +811,21 @@ zetDebugReadMemory( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDebug` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == desc` /// + `nullptr == buffer` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZET_DEBUG_MEMORY_SPACE_TYPE_SLM < desc->type` +/// + `::ZET_DEBUG_MEMORY_SPACE_TYPE_BARRIER < desc->type` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_NOT_AVAILABLE /// + the thread is running or unavailable /// + the memory cannot be accessed from the supplied thread @@ -739,7 +845,7 @@ typedef enum _zet_debug_regset_flag_t { ZET_DEBUG_REGSET_FLAG_READABLE = ZE_BIT(0), ///< register set is readable ZET_DEBUG_REGSET_FLAG_WRITEABLE = ZE_BIT(1), ///< register set is writeable - ZET_DEBUG_REGSET_FLAG_FORCE_UINT32 = 0x7fffffff + ZET_DEBUG_REGSET_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_DEBUG_REGSET_FLAG_* ENUMs } zet_debug_regset_flag_t; @@ -770,6 +876,14 @@ typedef struct _zet_debug_regset_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -798,6 +912,12 @@ zetDebugGetRegisterSetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDebug` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -831,6 +951,13 @@ zetDebugGetThreadRegisterSetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDebug` /// - ::ZE_RESULT_ERROR_NOT_AVAILABLE @@ -844,8 +971,8 @@ zetDebugReadRegisters( ///< than the `count` member of ::zet_debug_regset_properties_t for the ///< type uint32_t count, ///< [in] the number of registers to read; start+count must be less than or - ///< equal to the `count` member of ::zet_debug_register_group_properties_t - ///< for the type + ///< equal to the `count` member of ::zet_debug_regset_properties_t for the + ///< type void* pRegisterValues ///< [in,out][optional][range(0, count)] buffer of register values ); @@ -858,6 +985,13 @@ zetDebugReadRegisters( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDebug` /// - ::ZE_RESULT_ERROR_NOT_AVAILABLE @@ -871,8 +1005,8 @@ zetDebugWriteRegisters( ///< than the `count` member of ::zet_debug_regset_properties_t for the ///< type uint32_t count, ///< [in] the number of registers to write; start+count must be less than - ///< or equal to the `count` member of - ///< ::zet_debug_register_group_properties_t for the type + ///< or equal to the `count` member of ::zet_debug_regset_properties_t for + ///< the type void* pRegisterValues ///< [in,out][optional][range(0, count)] buffer of register values ); @@ -895,6 +1029,14 @@ zetDebugWriteRegisters( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -932,7 +1074,8 @@ typedef enum _zet_metric_group_sampling_type_flag_t { ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_EVENT_BASED = ZE_BIT(0), ///< Event based sampling ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_TIME_BASED = ZE_BIT(1), ///< Time based sampling - ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_FORCE_UINT32 = 0x7fffffff + ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_EXP_TRACER_BASED = ZE_BIT(2), ///< Experimental Tracer based sampling + ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_* ENUMs } zet_metric_group_sampling_type_flag_t; @@ -965,6 +1108,14 @@ typedef struct _zet_metric_group_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricGroup` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -987,10 +1138,17 @@ typedef enum _zet_metric_type_t ZET_METRIC_TYPE_FLAG = 5, ///< Metric type: flag ZET_METRIC_TYPE_RATIO = 6, ///< Metric type: ratio ZET_METRIC_TYPE_RAW = 7, ///< Metric type: raw + ZET_METRIC_TYPE_EVENT_EXP_TIMESTAMP = 0x7ffffff9, ///< Metric type: event with only timestamp and value has no meaning + ZET_METRIC_TYPE_EVENT_EXP_START = 0x7ffffffa, ///< Metric type: the first event of a start/end event pair + ZET_METRIC_TYPE_EVENT_EXP_END = 0x7ffffffb, ///< Metric type: the second event of a start/end event pair + ZET_METRIC_TYPE_EVENT_EXP_MONOTONIC_WRAPS_VALUE = 0x7ffffffc, ///< Metric type: value of the event is a monotonically increasing value + ///< that can wrap around + ZET_METRIC_TYPE_EXP_EXPORT_DMA_BUF = 0x7ffffffd, ///< Metric which exports linux dma_buf, which could be imported/mapped to + ///< the host process ZET_METRIC_TYPE_IP_EXP = 0x7ffffffe, ///< Metric type: instruction pointer. Deprecated, use ///< ::ZET_METRIC_TYPE_IP. ZET_METRIC_TYPE_IP = 0x7ffffffe, ///< Metric type: instruction pointer - ZET_METRIC_TYPE_FORCE_UINT32 = 0x7fffffff + ZET_METRIC_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_METRIC_TYPE_* ENUMs } zet_metric_type_t; @@ -1000,7 +1158,7 @@ typedef enum _zet_metric_group_calculation_type_t { ZET_METRIC_GROUP_CALCULATION_TYPE_METRIC_VALUES = 0, ///< Calculated metric values from raw data. ZET_METRIC_GROUP_CALCULATION_TYPE_MAX_METRIC_VALUES = 1, ///< Maximum metric values. - ZET_METRIC_GROUP_CALCULATION_TYPE_FORCE_UINT32 = 0x7fffffff + ZET_METRIC_GROUP_CALCULATION_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_METRIC_GROUP_CALCULATION_TYPE_* ENUMs } zet_metric_group_calculation_type_t; @@ -1016,10 +1174,19 @@ typedef enum _zet_metric_group_calculation_type_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricGroup` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZET_METRIC_GROUP_CALCULATION_TYPE_MAX_METRIC_VALUES < type` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pRawData` /// + `nullptr == pMetricValueCount` @@ -1052,6 +1219,14 @@ zetMetricGroupCalculateMetricValues( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricGroup` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1122,6 +1297,14 @@ typedef struct _zet_metric_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetric` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1153,6 +1336,13 @@ zetMetricGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -1209,6 +1399,14 @@ typedef struct _zet_metric_streamer_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -1246,6 +1444,14 @@ zetMetricStreamerOpen( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hMetricStreamer` @@ -1269,6 +1475,14 @@ zetCommandListAppendMetricStreamerMarker( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricStreamer` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -1288,6 +1502,14 @@ zetMetricStreamerClose( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricStreamer` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1316,7 +1538,7 @@ typedef enum _zet_metric_query_pool_type_t { ZET_METRIC_QUERY_POOL_TYPE_PERFORMANCE = 0, ///< Performance metric query pool. ZET_METRIC_QUERY_POOL_TYPE_EXECUTION = 1, ///< Skips workload execution between begin/end calls. - ZET_METRIC_QUERY_POOL_TYPE_FORCE_UINT32 = 0x7fffffff + ZET_METRIC_QUERY_POOL_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_METRIC_QUERY_POOL_TYPE_* ENUMs } zet_metric_query_pool_type_t; @@ -1345,6 +1567,14 @@ typedef struct _zet_metric_query_pool_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -1354,6 +1584,7 @@ typedef struct _zet_metric_query_pool_desc_t /// + `nullptr == phMetricQueryPool` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZET_METRIC_QUERY_POOL_TYPE_EXECUTION < desc->type` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zetMetricQueryPoolCreate( zet_context_handle_t hContext, ///< [in] handle of the context object @@ -1381,6 +1612,14 @@ zetMetricQueryPoolCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricQueryPool` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -1402,6 +1641,14 @@ zetMetricQueryPoolDestroy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricQueryPool` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1429,6 +1676,14 @@ zetMetricQueryCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricQuery` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -1452,6 +1707,14 @@ zetMetricQueryDestroy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricQuery` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -1478,6 +1741,14 @@ zetMetricQueryReset( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hMetricQuery` @@ -1514,6 +1785,14 @@ zetCommandListAppendMetricQueryBegin( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hMetricQuery` @@ -1542,6 +1821,14 @@ zetCommandListAppendMetricQueryEnd( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -1561,6 +1848,14 @@ zetCommandListAppendMetricMemoryBarrier( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricQuery` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1594,7 +1889,7 @@ typedef enum _zet_profile_flag_t ZET_PROFILE_FLAG_REGISTER_REALLOCATION = ZE_BIT(0), ///< request the compiler attempt to minimize register usage as much as ///< possible to allow for instrumentation ZET_PROFILE_FLAG_FREE_REGISTER_INFO = ZE_BIT(1), ///< request the compiler generate free register info - ZET_PROFILE_FLAG_FORCE_UINT32 = 0x7fffffff + ZET_PROFILE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_PROFILE_FLAG_* ENUMs } zet_profile_flag_t; @@ -1616,7 +1911,7 @@ typedef struct _zet_profile_properties_t typedef enum _zet_profile_token_type_t { ZET_PROFILE_TOKEN_TYPE_FREE_REGISTER = 0, ///< GRF info - ZET_PROFILE_TOKEN_TYPE_FORCE_UINT32 = 0x7fffffff + ZET_PROFILE_TOKEN_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_PROFILE_TOKEN_TYPE_* ENUMs } zet_profile_token_type_t; @@ -1660,6 +1955,14 @@ typedef struct _zet_profile_register_sequence_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1689,7 +1992,7 @@ typedef enum _zet_api_tracing_exp_version_t { ZET_API_TRACING_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZET_API_TRACING_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZET_API_TRACING_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZET_API_TRACING_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_API_TRACING_EXP_VERSION_* ENUMs } zet_api_tracing_exp_version_t; @@ -1712,6 +2015,9 @@ typedef struct _zet_tracer_exp_desc_t /// @brief Creates a tracer on the context. /// /// @details +/// - @deprecated This function is not supported in L0 drivers and has been +/// replaced by the Loader Tracing Layer. See the Loader Tracing +/// documentation for more details. /// - The application must only use the tracer for the context which was /// provided during creation. /// - The tracer is created in the disabled state. @@ -1724,6 +2030,14 @@ typedef struct _zet_tracer_exp_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1741,6 +2055,9 @@ zetTracerExpCreate( /// @brief Destroys a tracer. /// /// @details +/// - @deprecated This function is not supported in L0 drivers and has been +/// replaced by the Loader Tracing Layer. See the Loader Tracing +/// documentation for more details. /// - The application must **not** call this function from simultaneous /// threads with the same tracer handle. /// - The implementation of this function must be thread-safe. @@ -1754,6 +2071,14 @@ zetTracerExpCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hTracer` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -1767,6 +2092,9 @@ zetTracerExpDestroy( /// execution. /// /// @details +/// - @deprecated This function is not supported in L0 drivers and has been +/// replaced by the Loader Tracing Layer. See the Loader Tracing +/// documentation for more details. /// - The application only needs to set the function pointers it is /// interested in receiving; all others should be 'nullptr' /// - The application must ensure that no other threads are executing @@ -1780,6 +2108,14 @@ zetTracerExpDestroy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hTracer` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1795,6 +2131,9 @@ zetTracerExpSetPrologues( /// execution. /// /// @details +/// - @deprecated This function is not supported in L0 drivers and has been +/// replaced by the Loader Tracing Layer. See the Loader Tracing +/// documentation for more details. /// - The application only needs to set the function pointers it is /// interested in receiving; all others should be 'nullptr' /// - The application must ensure that no other threads are executing @@ -1808,6 +2147,14 @@ zetTracerExpSetPrologues( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hTracer` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1822,6 +2169,9 @@ zetTracerExpSetEpilogues( /// @brief Enables (or disables) the tracer /// /// @details +/// - @deprecated This function is not supported in L0 drivers and has been +/// replaced by the Loader Tracing Layer. See the Loader Tracing +/// documentation for more details. /// - The application must **not** call this function from simultaneous /// threads with the same tracer handle. /// @@ -1831,6 +2181,14 @@ zetTracerExpSetEpilogues( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hTracer` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -1842,39 +2200,32 @@ zetTracerExpSetEnabled( #if !defined(__GNUC__) #pragma endregion #endif -// Intel 'oneAPI' Level-Zero Tool Experimental Extension for Calculating Multiple Metrics +// Intel 'oneAPI' Level-Zero Tool Experimental Extension to get Concurrent Metric Groups #if !defined(__GNUC__) -#pragma region multiMetricValues +#pragma region concurrentMetricGroup #endif /////////////////////////////////////////////////////////////////////////////// -#ifndef ZET_MULTI_METRICS_EXP_NAME -/// @brief Calculating Multiple Metrics Experimental Extension Name -#define ZET_MULTI_METRICS_EXP_NAME "ZET_experimental_calculate_multiple_metrics" -#endif // ZET_MULTI_METRICS_EXP_NAME +#ifndef ZET_CONCURRENT_METRIC_GROUPS_EXP_NAME +/// @brief Concurrent Metric Groups Experimental Extension Name +#define ZET_CONCURRENT_METRIC_GROUPS_EXP_NAME "ZET_experimental_concurrent_metric_groups" +#endif // ZET_CONCURRENT_METRIC_GROUPS_EXP_NAME /////////////////////////////////////////////////////////////////////////////// -/// @brief Calculating Multiple Metrics Experimental Extension Version(s) -typedef enum _ze_calculate_multiple_metrics_exp_version_t +/// @brief Concurrent Metric Groups Experimental Extension Version(s) +typedef enum _zet_concurrent_metric_groups_exp_version_t { - ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ),///< version 1.0 - ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ),///< latest known version - ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 + ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version + ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_* ENUMs -} ze_calculate_multiple_metrics_exp_version_t; +} zet_concurrent_metric_groups_exp_version_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Calculate one or more sets of metric values from raw data. +/// @brief Get sets of metric groups which could be collected concurrently. /// /// @details -/// - This function is similar to ::zetMetricGroupCalculateMetricValues -/// except it may calculate more than one set of metric values from a -/// single data buffer. There may be one set of metric values for each -/// sub-device, for example. -/// - Each set of metric values may consist of a different number of metric -/// values, returned as the metric value count. -/// - All metric values are calculated into a single buffer; use the metric -/// counts to determine which metric values belong to which set. -/// - The application may call this function from simultaneous threads. +/// - Re-arrange the input metric groups to provide sets of concurrent +/// metric groups. /// /// @returns /// - ::ZE_RESULT_SUCCESS @@ -1882,97 +2233,817 @@ typedef enum _ze_calculate_multiple_metrics_exp_version_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricGroup` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZET_METRIC_GROUP_CALCULATION_TYPE_MAX_METRIC_VALUES < type` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pRawData` -/// + `nullptr == pSetCount` -/// + `nullptr == pTotalMetricValueCount` +/// + `nullptr == hDevice` ZE_APIEXPORT ze_result_t ZE_APICALL -zetMetricGroupCalculateMultipleMetricValuesExp( - zet_metric_group_handle_t hMetricGroup, ///< [in] handle of the metric group - zet_metric_group_calculation_type_t type, ///< [in] calculation type to be applied on raw data - size_t rawDataSize, ///< [in] size in bytes of raw data buffer - const uint8_t* pRawData, ///< [in][range(0, rawDataSize)] buffer of raw data to calculate - uint32_t* pSetCount, ///< [in,out] pointer to number of metric sets. - ///< if count is zero, then the driver shall update the value with the - ///< total number of metric sets to be calculated. - ///< if count is greater than the number available in the raw data buffer, - ///< then the driver shall update the value with the actual number of - ///< metric sets to be calculated. - uint32_t* pTotalMetricValueCount, ///< [in,out] pointer to number of the total number of metric values - ///< calculated, for all metric sets. - ///< if count is zero, then the driver shall update the value with the - ///< total number of metric values to be calculated. - ///< if count is greater than the number available in the raw data buffer, - ///< then the driver shall update the value with the actual number of - ///< metric values to be calculated. - uint32_t* pMetricCounts, ///< [in,out][optional][range(0, *pSetCount)] buffer of metric counts per - ///< metric set. - zet_typed_value_t* pMetricValues ///< [in,out][optional][range(0, *pTotalMetricValueCount)] buffer of - ///< calculated metrics. - ///< if count is less than the number available in the raw data buffer, - ///< then driver shall only calculate that number of metric values. +zetDeviceGetConcurrentMetricGroupsExp( + zet_device_handle_t hDevice, ///< [in] handle of the device + uint32_t metricGroupCount, ///< [in] metric group count + zet_metric_group_handle_t * phMetricGroups, ///< [in,out] metrics groups to be re-arranged to be sets of concurrent + ///< groups + uint32_t * pMetricGroupsCountPerConcurrentGroup, ///< [in,out][optional][*pConcurrentGroupCount] count of metric groups per + ///< concurrent group. + uint32_t * pConcurrentGroupCount ///< [out] number of concurrent groups. + ///< The value of this parameter could be used to determine the number of + ///< replays necessary. ); #if !defined(__GNUC__) #pragma endregion #endif -// Intel 'oneAPI' Level-Zero Tool Experimental Extension for Global Metric Timestamps +// Intel 'oneAPI' Level-Zero Tool Experimental Extension for Metrics Tracer #if !defined(__GNUC__) -#pragma region GlobalTimestamps +#pragma region metricTracer #endif /////////////////////////////////////////////////////////////////////////////// -#ifndef ZET_GLOBAL_METRICS_TIMESTAMPS_EXP_NAME -/// @brief Global Metric Timestamps Experimental Extension Name -#define ZET_GLOBAL_METRICS_TIMESTAMPS_EXP_NAME "ZET_experimental_global_metric_timestamps" -#endif // ZET_GLOBAL_METRICS_TIMESTAMPS_EXP_NAME +#ifndef ZET_METRICS_TRACER_EXP_NAME +/// @brief Metric Tracer Experimental Extension Name +#define ZET_METRICS_TRACER_EXP_NAME "ZET_experimental_metric_tracer" +#endif // ZET_METRICS_TRACER_EXP_NAME /////////////////////////////////////////////////////////////////////////////// -/// @brief Global Metric Timestamps Experimental Extension Version(s) -typedef enum _ze_metric_global_timestamps_exp_version_t +/// @brief Metric Tracer Experimental Extension Version(s) +typedef enum _zet_metric_tracer_exp_version_t { - ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 - ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZET_METRIC_TRACER_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 + ZET_METRIC_TRACER_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version + ZET_METRIC_TRACER_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_METRIC_TRACER_EXP_VERSION_* ENUMs -} ze_metric_global_timestamps_exp_version_t; +} zet_metric_tracer_exp_version_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Metric timestamps resolution -/// -/// @details -/// - This structure may be returned from ::zetMetricGroupGetProperties via -/// the `pNext` member of ::zet_metric_group_properties_t. -/// - Used for mapping metric timestamps to other timers. -typedef struct _zet_metric_global_timestamps_resolution_exp_t +/// @brief Handle of metric tracer's object +typedef struct _zet_metric_tracer_exp_handle_t *zet_metric_tracer_exp_handle_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Handle of metric decoder's object +typedef struct _zet_metric_decoder_exp_handle_t *zet_metric_decoder_exp_handle_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Metric tracer descriptor +typedef struct _zet_metric_tracer_exp_desc_t { zet_structure_type_t stype; ///< [in] type of this structure const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific ///< structure (i.e. contains stype and pNext). - uint64_t timerResolution; ///< [out] Returns the resolution of metrics timer (used for timestamps) in - ///< cycles/sec. - uint64_t timestampValidBits; ///< [out] Returns the number of valid bits in the timestamp value. + uint32_t notifyEveryNBytes; ///< [in,out] number of collected bytes after which notification event will + ///< be signaled. If the requested value is not supported exactly, then the + ///< driver may use a value that is the closest supported approximation and + ///< shall update this member during ::zetMetricTracerCreateExp. -} zet_metric_global_timestamps_resolution_exp_t; +} zet_metric_tracer_exp_desc_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Returns metric timestamps synchronized with global device timestamps, -/// optionally synchronized with host +/// @brief Decoded metric entry +typedef struct _zet_metric_entry_exp_t +{ + zet_value_t value; ///< [out] value of the decodable metric entry or event. Number is + ///< meaningful based on the metric type. + uint64_t timeStamp; ///< [out] timestamp at which the event happened. + uint32_t metricIndex; ///< [out] index to the decodable metric handle in the input array + ///< (phMetric) in ::zetMetricTracerDecodeExp(). + ze_bool_t onSubdevice; ///< [out] True if the event occurred on a sub-device; false means the + ///< device on which the metric tracer was opened does not have + ///< sub-devices. + uint32_t subdeviceId; ///< [out] If onSubdevice is true, this gives the ID of the sub-device. + +} zet_metric_entry_exp_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Create a metric tracer for a device. /// /// @details -/// - The application may call this function from simultaneous threads. -/// - By default, the global and metrics timestamps are synchronized to the -/// device. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - The notification event must have been created from an event pool that +/// was created using ::ZE_EVENT_POOL_FLAG_HOST_VISIBLE flag. +/// - The duration of the signal event created from an event pool that was +/// created using ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP flag is undefined. +/// However, for consistency and orthogonality the event will report +/// correctly as signaled when used by other event API functionality. +/// - The application must **not** call this function from simultaneous +/// threads with the same device handle. +/// - The metric tracer is created in disabled state +/// - Metric groups must support sampling type +/// ZET_METRIC_SAMPLING_TYPE_EXP_FLAG_TRACER_BASED +/// - All metric groups must be first activated +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hContext` +/// + `nullptr == hDevice` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == phMetricGroups` +/// + `nullptr == desc` +/// + `nullptr == phMetricTracer` +/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +ZE_APIEXPORT ze_result_t ZE_APICALL +zetMetricTracerCreateExp( + zet_context_handle_t hContext, ///< [in] handle of the context object + zet_device_handle_t hDevice, ///< [in] handle of the device + uint32_t metricGroupCount, ///< [in] metric group count + zet_metric_group_handle_t* phMetricGroups, ///< [in][range(0, metricGroupCount )] handles of the metric groups to + ///< trace + zet_metric_tracer_exp_desc_t* desc, ///< [in,out] metric tracer descriptor + ze_event_handle_t hNotificationEvent, ///< [in][optional] event used for report availability notification. Note: + ///< If buffer is not drained when the event it flagged, there is a risk of + ///< HW event buffer being overrun + zet_metric_tracer_exp_handle_t* phMetricTracer ///< [out] handle of the metric tracer + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Destroy a metric tracer. +/// +/// @details +/// - The application must **not** call this function from simultaneous +/// threads with the same metric tracer handle. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hMetricTracer` +ZE_APIEXPORT ze_result_t ZE_APICALL +zetMetricTracerDestroyExp( + zet_metric_tracer_exp_handle_t hMetricTracer ///< [in] handle of the metric tracer + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Start events collection +/// +/// @details +/// - Driver implementations must make this API call have as minimal +/// overhead as possible, to allow applications start/stop event +/// collection at any point during execution +/// - The application must **not** call this function from simultaneous +/// threads with the same metric tracer handle. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hMetricTracer` +ZE_APIEXPORT ze_result_t ZE_APICALL +zetMetricTracerEnableExp( + zet_metric_tracer_exp_handle_t hMetricTracer, ///< [in] handle of the metric tracer + ze_bool_t synchronous ///< [in] request synchronous behavior. Confirmation of successful + ///< asynchronous operation is done by calling ::zetMetricTracerReadDataExp() + ///< and checking the return status: ::ZE_RESULT_NOT_READY will be returned + ///< when the tracer is inactive. ::ZE_RESULT_SUCCESS will be returned + ///< when the tracer is active. + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Stop events collection +/// +/// @details +/// - Driver implementations must make this API call have as minimal +/// overhead as possible, to allow applications start/stop event +/// collection at any point during execution +/// - The application must **not** call this function from simultaneous +/// threads with the same metric tracer handle. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hMetricTracer` +ZE_APIEXPORT ze_result_t ZE_APICALL +zetMetricTracerDisableExp( + zet_metric_tracer_exp_handle_t hMetricTracer, ///< [in] handle of the metric tracer + ze_bool_t synchronous ///< [in] request synchronous behavior. Confirmation of successful + ///< asynchronous operation is done by calling ::zetMetricTracerReadDataExp() + ///< and checking the return status: ::ZE_RESULT_SUCCESS will be returned + ///< when the tracer is active or when it is inactive but still has data. + ///< ::ZE_RESULT_NOT_READY will be returned when the tracer is inactive and + ///< has no more data to be retrieved. + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Read data from the metric tracer +/// +/// @details +/// - The application must **not** call this function from simultaneous +/// threads with the same metric tracer handle. +/// - Data can be retrieved after tracer is disabled. When buffers are +/// drained ::ZE_RESULT_NOT_READY will be returned +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hMetricTracer` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == pRawDataSize` +/// - ::ZE_RESULT_WARNING_DROPPED_DATA +/// + Metric tracer data may have been dropped. +/// - ::ZE_RESULT_NOT_READY +/// + Metric tracer is disabled and no data is available to read. +ZE_APIEXPORT ze_result_t ZE_APICALL +zetMetricTracerReadDataExp( + zet_metric_tracer_exp_handle_t hMetricTracer, ///< [in] handle of the metric tracer + size_t* pRawDataSize, ///< [in,out] pointer to size in bytes of raw data requested to read. + ///< if size is zero, then the driver will update the value with the total + ///< size in bytes needed for all data available. + ///< if size is non-zero, then driver will only retrieve that amount of + ///< data. + ///< if size is larger than size needed for all data, then driver will + ///< update the value with the actual size needed. + uint8_t* pRawData ///< [in,out][optional][range(0, *pRawDataSize)] buffer containing tracer + ///< data in raw format + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Create a metric decoder for a given metric tracer. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hMetricTracer` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == phMetricDecoder` +ZE_APIEXPORT ze_result_t ZE_APICALL +zetMetricDecoderCreateExp( + zet_metric_tracer_exp_handle_t hMetricTracer, ///< [in] handle of the metric tracer + zet_metric_decoder_exp_handle_t* phMetricDecoder ///< [out] handle of the metric decoder object + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Destroy a metric decoder. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == phMetricDecoder` +ZE_APIEXPORT ze_result_t ZE_APICALL +zetMetricDecoderDestroyExp( + zet_metric_decoder_exp_handle_t phMetricDecoder ///< [in] handle of the metric decoder object + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Return the list of the decodable metrics from the decoder. +/// +/// @details +/// - The decodable metrics handles returned by this API are defined by the +/// metric groups in the tracer on which the decoder was created. +/// - The decodable metrics handles returned by this API are only valid to +/// decode metrics raw data with ::zetMetricTracerDecodeExp(). Decodable +/// metric handles are not valid to compare with metrics handles included +/// in metric groups. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hMetricDecoder` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == pCount` +/// + `nullptr == phMetrics` +ZE_APIEXPORT ze_result_t ZE_APICALL +zetMetricDecoderGetDecodableMetricsExp( + zet_metric_decoder_exp_handle_t hMetricDecoder, ///< [in] handle of the metric decoder object + uint32_t* pCount, ///< [in,out] pointer to number of decodable metric in the hMetricDecoder + ///< handle. If count is zero, then the driver shall + ///< update the value with the total number of decodable metrics available + ///< in the decoder. if count is greater than zero + ///< but less than the total number of decodable metrics available in the + ///< decoder, then only that number will be returned. + ///< if count is greater than the number of decodable metrics available in + ///< the decoder, then the driver shall update the + ///< value with the actual number of decodable metrics available. + zet_metric_handle_t* phMetrics ///< [in,out] [range(0, *pCount)] array of handles of decodable metrics in + ///< the hMetricDecoder handle provided. + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Decode raw events collected from a tracer. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == phMetricDecoder` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == pRawDataSize` +/// + `nullptr == phMetrics` +/// + `nullptr == pSetCount` +/// + `nullptr == pMetricEntriesCount` +ZE_APIEXPORT ze_result_t ZE_APICALL +zetMetricTracerDecodeExp( + zet_metric_decoder_exp_handle_t phMetricDecoder, ///< [in] handle of the metric decoder object + size_t* pRawDataSize, ///< [in,out] size in bytes of raw data buffer. If pMetricEntriesCount is + ///< greater than zero but less than total number of + ///< decodable metrics available in the raw data buffer, then driver shall + ///< update this value with actual number of raw + ///< data bytes processed. + uint8_t* pRawData, ///< [in,out][optional][range(0, *pRawDataSize)] buffer containing tracer + ///< data in raw format + uint32_t metricsCount, ///< [in] number of decodable metrics in the tracer for which the + ///< hMetricDecoder handle was provided. See + ///< ::zetMetricDecoderGetDecodableMetricsExp(). If metricCount is greater + ///< than zero but less than the number decodable + ///< metrics available in the raw data buffer, then driver shall only + ///< decode those. + zet_metric_handle_t* phMetrics, ///< [in] [range(0, metricsCount)] array of handles of decodable metrics in + ///< the decoder for which the hMetricDecoder handle was + ///< provided. Metrics handles are expected to be for decodable metrics, + ///< see ::zetMetricDecoderGetDecodableMetricsExp() + uint32_t* pSetCount, ///< [in,out] pointer to number of metric sets. If count is zero, then the + ///< driver shall update the value with the total + ///< number of metric sets to be decoded. If count is greater than the + ///< number available in the raw data buffer, then the + ///< driver shall update the value with the actual number of metric sets to + ///< be decoded. There is a 1:1 relation between + ///< the number of sets and sub-devices returned in the decoded entries. + uint32_t* pMetricEntriesCountPerSet, ///< [in,out][optional][range(0, *pSetCount)] buffer of metric entries + ///< counts per metric set, one value per set. + uint32_t* pMetricEntriesCount, ///< [in,out] pointer to the total number of metric entries decoded, for + ///< all metric sets. If count is zero, then the + ///< driver shall update the value with the total number of metric entries + ///< to be decoded. If count is greater than zero + ///< but less than the total number of metric entries available in the raw + ///< data, then user provided number will be decoded. + ///< If count is greater than the number available in the raw data buffer, + ///< then the driver shall update the value with + ///< the actual number of decodable metric entries decoded. If set to null, + ///< then driver will only update the value of + ///< pSetCount. + zet_metric_entry_exp_t* pMetricEntries ///< [in,out][optional][range(0, *pMetricEntriesCount)] buffer containing + ///< decoded metric entries + ); + +#if !defined(__GNUC__) +#pragma endregion +#endif +// Intel 'oneAPI' Level-Zero Tool Experimental Extension for Metrics/Metric Groups which export Memory +#if !defined(__GNUC__) +#pragma region metricExportMemory +#endif +/////////////////////////////////////////////////////////////////////////////// +/// @brief Metric group type +typedef uint32_t zet_metric_group_type_exp_flags_t; +typedef enum _zet_metric_group_type_exp_flag_t +{ + ZET_METRIC_GROUP_TYPE_EXP_FLAG_EXPORT_DMA_BUF = ZE_BIT(0), ///< Metric group and metrics exports memory using linux dma-buf, which + ///< could be imported/mapped to the host process. Properties of the + ///< dma_buf could be queried using ::zet_export_dma_buf_exp_properties_t. + ZET_METRIC_GROUP_TYPE_EXP_FLAG_USER_CREATED = ZE_BIT(1), ///< Metric group created using ::zetDeviceCreateMetricGroupsFromMetricsExp + ZET_METRIC_GROUP_TYPE_EXP_FLAG_OTHER = ZE_BIT(2), ///< Metric group which has a collection of metrics + ZET_METRIC_GROUP_TYPE_EXP_FLAG_MARKER = ZE_BIT(3), ///< Metric group is capable of generating Marker metric + ZET_METRIC_GROUP_TYPE_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_METRIC_GROUP_TYPE_EXP_FLAG_* ENUMs + +} zet_metric_group_type_exp_flag_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Query the metric group type using `pNext` of +/// ::zet_metric_group_properties_t +typedef struct _zet_metric_group_type_exp_t +{ + zet_structure_type_t stype; ///< [in] type of this structure + void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + zet_metric_group_type_exp_flags_t type; ///< [out] metric group type. + ///< returns a combination of ::zet_metric_group_type_exp_flags_t. + +} zet_metric_group_type_exp_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Exported dma_buf properties queried using `pNext` of +/// ::zet_metric_group_properties_t or ::zet_metric_properties_t +typedef struct _zet_export_dma_buf_exp_properties_t +{ + zet_structure_type_t stype; ///< [in] type of this structure + void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + int fd; ///< [out] the file descriptor handle that could be used to import the + ///< memory by the host process. + size_t size; ///< [out] size in bytes of the dma_buf + +} zet_export_dma_buf_exp_properties_t; + +#if !defined(__GNUC__) +#pragma endregion +#endif +// Intel 'oneAPI' Level-Zero Tool Experimental Extension to support Markers using MetricGroup +#if !defined(__GNUC__) +#pragma region metricGroupMarker +#endif +/////////////////////////////////////////////////////////////////////////////// +#ifndef ZET_METRIC_GROUP_MARKER_EXP_NAME +/// @brief Marker Support Using MetricGroup Experimental Extension Name +#define ZET_METRIC_GROUP_MARKER_EXP_NAME "ZET_experimental_metric_group_marker" +#endif // ZET_METRIC_GROUP_MARKER_EXP_NAME + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Marker Support Using MetricGroup Experimental Extension Version(s) +typedef enum _zet_metric_group_marker_exp_version_t +{ + ZET_METRIC_GROUP_MARKER_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 + ZET_METRIC_GROUP_MARKER_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version + ZET_METRIC_GROUP_MARKER_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_METRIC_GROUP_MARKER_EXP_VERSION_* ENUMs + +} zet_metric_group_marker_exp_version_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Query the metric source unique identifier using `pNext` of +/// ::zet_metric_group_properties_t +typedef struct _zet_metric_source_id_exp_t +{ + zet_structure_type_t stype; ///< [in] type of this structure + void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + uint32_t sourceId; ///< [out] unique number representing the Metric Source. + +} zet_metric_source_id_exp_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Append a Marker based on the Metric source of the Metric Group, to a +/// Command List. +/// +/// @details +/// - This function appends a Marker based on the Metric source of the +/// Metric Group, to Command List. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hCommandList` +/// + `nullptr == hMetricGroup` +ZE_APIEXPORT ze_result_t ZE_APICALL +zetCommandListAppendMarkerExp( + zet_command_list_handle_t hCommandList, ///< [in] handle to the command list + zet_metric_group_handle_t hMetricGroup, ///< [in] handle to the marker metric group. + ///< ::zet_metric_group_type_exp_flags_t could be used to check whether + ///< marker is supoported by the metric group. + uint32_t value ///< [in] marker value + ); + +#if !defined(__GNUC__) +#pragma endregion +#endif +// Intel 'oneAPI' Level-Zero Tool Experimental Extension for Runtime Enabling and Disabling metrics +#if !defined(__GNUC__) +#pragma region metricRuntimeEnableDisable +#endif +/////////////////////////////////////////////////////////////////////////////// +#ifndef ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_NAME +/// @brief Runtime Enabling and Disabling Metrics Extension Name +#define ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_NAME "ZET_experimental_metrics_runtime_enable_disable" +#endif // ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_NAME + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Runtime Enabling and Disabling Metrics Extension Version(s) +typedef enum _zet_metrics_runtime_enable_disable_exp_version_t +{ + ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 + ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version + ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_* ENUMs + +} zet_metrics_runtime_enable_disable_exp_version_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Enable Metrics collection during runtime. +/// +/// @details +/// - This API enables metric collection for a device/sub-device if not +/// already enabled. +/// - if ZET_ENABLE_METRICS=1 was already set, then calling this api would +/// be a NOP. +/// - This api should be called after calling zeInit(). +/// - If device is a root-device handle, then its sub-devices are also +/// enabled. +/// - ::zetDeviceDisableMetricsExp need not be called if if this api returns +/// error. +/// - This API can be used as runtime alternative to setting +/// ZET_ENABLE_METRICS=1. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hDevice` +ZE_APIEXPORT ze_result_t ZE_APICALL +zetDeviceEnableMetricsExp( + zet_device_handle_t hDevice ///< [in] handle of the device where metrics collection has to be enabled. + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Disable Metrics collection during runtime, if it was already enabled. +/// +/// @details +/// - This API disables metrics collection for a device/sub-device, if it +/// was previously enabled. +/// - If device is a root-device handle, then its sub-devices are also +/// disabled. +/// - The application has to ensure that all metric operations are complete +/// and all metric resources are released before this API is called. +/// - If there are metric operations in progress or metric resources are not +/// released, then ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE is returned. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hDevice` +ZE_APIEXPORT ze_result_t ZE_APICALL +zetDeviceDisableMetricsExp( + zet_device_handle_t hDevice ///< [in] handle of the device where metrics collection has to be disabled + ); + +#if !defined(__GNUC__) +#pragma endregion +#endif +// Intel 'oneAPI' Level-Zero Tool Experimental Extension for Calculating Multiple Metrics +#if !defined(__GNUC__) +#pragma region multiMetricValues +#endif +/////////////////////////////////////////////////////////////////////////////// +#ifndef ZET_MULTI_METRICS_EXP_NAME +/// @brief Calculating Multiple Metrics Experimental Extension Name +#define ZET_MULTI_METRICS_EXP_NAME "ZET_experimental_calculate_multiple_metrics" +#endif // ZET_MULTI_METRICS_EXP_NAME + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Calculating Multiple Metrics Experimental Extension Version(s) +typedef enum _ze_calculate_multiple_metrics_exp_version_t +{ + ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ),///< version 1.0 + ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ),///< latest known version + ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_* ENUMs + +} ze_calculate_multiple_metrics_exp_version_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Calculate one or more sets of metric values from raw data. +/// +/// @details +/// - This function is similar to ::zetMetricGroupCalculateMetricValues +/// except it may calculate more than one set of metric values from a +/// single data buffer. There may be one set of metric values for each +/// sub-device, for example. +/// - Each set of metric values may consist of a different number of metric +/// values, returned as the metric value count. +/// - All metric values are calculated into a single buffer; use the metric +/// counts to determine which metric values belong to which set. +/// - The application may call this function from simultaneous threads. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hMetricGroup` +/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +/// + `::ZET_METRIC_GROUP_CALCULATION_TYPE_MAX_METRIC_VALUES < type` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == pRawData` +/// + `nullptr == pSetCount` +/// + `nullptr == pTotalMetricValueCount` +ZE_APIEXPORT ze_result_t ZE_APICALL +zetMetricGroupCalculateMultipleMetricValuesExp( + zet_metric_group_handle_t hMetricGroup, ///< [in] handle of the metric group + zet_metric_group_calculation_type_t type, ///< [in] calculation type to be applied on raw data + size_t rawDataSize, ///< [in] size in bytes of raw data buffer + const uint8_t* pRawData, ///< [in][range(0, rawDataSize)] buffer of raw data to calculate + uint32_t* pSetCount, ///< [in,out] pointer to number of metric sets. + ///< if count is zero, then the driver shall update the value with the + ///< total number of metric sets to be calculated. + ///< if count is greater than the number available in the raw data buffer, + ///< then the driver shall update the value with the actual number of + ///< metric sets to be calculated. + uint32_t* pTotalMetricValueCount, ///< [in,out] pointer to number of the total number of metric values + ///< calculated, for all metric sets. + ///< if count is zero, then the driver shall update the value with the + ///< total number of metric values to be calculated. + ///< if count is greater than the number available in the raw data buffer, + ///< then the driver shall update the value with the actual number of + ///< metric values to be calculated. + uint32_t* pMetricCounts, ///< [in,out][optional][range(0, *pSetCount)] buffer of metric counts per + ///< metric set. + zet_typed_value_t* pMetricValues ///< [in,out][optional][range(0, *pTotalMetricValueCount)] buffer of + ///< calculated metrics. + ///< if count is less than the number available in the raw data buffer, + ///< then driver shall only calculate that number of metric values. + ); + +#if !defined(__GNUC__) +#pragma endregion +#endif +// Intel 'oneAPI' Level-Zero Tool Experimental Extension for Global Metric Timestamps +#if !defined(__GNUC__) +#pragma region GlobalTimestamps +#endif +/////////////////////////////////////////////////////////////////////////////// +#ifndef ZET_GLOBAL_METRICS_TIMESTAMPS_EXP_NAME +/// @brief Global Metric Timestamps Experimental Extension Name +#define ZET_GLOBAL_METRICS_TIMESTAMPS_EXP_NAME "ZET_experimental_global_metric_timestamps" +#endif // ZET_GLOBAL_METRICS_TIMESTAMPS_EXP_NAME + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Global Metric Timestamps Experimental Extension Version(s) +typedef enum _ze_metric_global_timestamps_exp_version_t +{ + ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 + ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version + ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_* ENUMs + +} ze_metric_global_timestamps_exp_version_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Metric timestamps resolution +/// +/// @details +/// - This structure may be returned from ::zetMetricGroupGetProperties via +/// the `pNext` member of ::zet_metric_group_properties_t. +/// - Used for mapping metric timestamps to other timers. +typedef struct _zet_metric_global_timestamps_resolution_exp_t +{ + zet_structure_type_t stype; ///< [in] type of this structure + const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + uint64_t timerResolution; ///< [out] Returns the resolution of metrics timer (used for timestamps) in + ///< cycles/sec. + uint64_t timestampValidBits; ///< [out] Returns the number of valid bits in the timestamp value. + +} zet_metric_global_timestamps_resolution_exp_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Returns metric timestamps synchronized with global device timestamps, +/// optionally synchronized with host +/// +/// @details +/// - The application may call this function from simultaneous threads. +/// - By default, the global and metrics timestamps are synchronized to the +/// device. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricGroup` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2005,7 +3076,7 @@ typedef enum _zet_export_metric_data_exp_version_t { ZET_EXPORT_METRIC_DATA_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZET_EXPORT_METRIC_DATA_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZET_EXPORT_METRIC_DATA_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZET_EXPORT_METRIC_DATA_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_EXPORT_METRIC_DATA_EXP_VERSION_* ENUMs } zet_export_metric_data_exp_version_t; @@ -2050,6 +3121,14 @@ typedef struct _zet_metric_calculate_exp_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricGroup` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2087,10 +3166,19 @@ zetMetricGroupGetExportDataExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZET_METRIC_GROUP_CALCULATION_TYPE_MAX_METRIC_VALUES < type` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pExportData` /// + `nullptr == pCalculateDescriptor` @@ -2141,9 +3229,9 @@ zetMetricGroupCalculateMetricExportDataExp( /// @brief Programmable Metrics Experimental Extension Version(s) typedef enum _zet_metric_programmable_exp_version_t { - ZET_METRIC_PROGRAMMABLE_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 - ZET_METRIC_PROGRAMMABLE_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZET_METRIC_PROGRAMMABLE_EXP_VERSION_FORCE_UINT32 = 0x7fffffff + ZET_METRIC_PROGRAMMABLE_EXP_VERSION_1_1 = ZE_MAKE_VERSION( 1, 1 ), ///< version 1.1 + ZET_METRIC_PROGRAMMABLE_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 1 ), ///< latest known version + ZET_METRIC_PROGRAMMABLE_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_METRIC_PROGRAMMABLE_EXP_VERSION_* ENUMs } zet_metric_programmable_exp_version_t; @@ -2159,6 +3247,12 @@ typedef enum _zet_metric_programmable_exp_version_t #define ZET_MAX_PROGRAMMABLE_METRICS_ELEMENT_DESCRIPTION_EXP 256 #endif // ZET_MAX_PROGRAMMABLE_METRICS_ELEMENT_DESCRIPTION_EXP +/////////////////////////////////////////////////////////////////////////////// +#ifndef ZET_MAX_METRIC_GROUP_NAME_PREFIX_EXP +/// @brief Maximum count of characters in metric group name prefix +#define ZET_MAX_METRIC_GROUP_NAME_PREFIX_EXP 64 +#endif // ZET_MAX_METRIC_GROUP_NAME_PREFIX_EXP + /////////////////////////////////////////////////////////////////////////////// #ifndef ZET_MAX_METRIC_PROGRAMMABLE_NAME_EXP /// @brief Maximum metric programmable name string size @@ -2184,10 +3278,16 @@ typedef enum _zet_metric_programmable_exp_version_t #endif // ZET_MAX_METRIC_PROGRAMMABLE_PARAMETER_NAME_EXP /////////////////////////////////////////////////////////////////////////////// -#ifndef ZET_MAX_VALUE_INFO_CSTRING_EXP -/// @brief Maximum value information string size -#define ZET_MAX_VALUE_INFO_CSTRING_EXP 128 -#endif // ZET_MAX_VALUE_INFO_CSTRING_EXP +#ifndef ZET_MAX_METRIC_PROGRAMMABLE_VALUE_DESCRIPTION_EXP +/// @brief Maximum value for programmable value description +#define ZET_MAX_METRIC_PROGRAMMABLE_VALUE_DESCRIPTION_EXP 128 +#endif // ZET_MAX_METRIC_PROGRAMMABLE_VALUE_DESCRIPTION_EXP + +/////////////////////////////////////////////////////////////////////////////// +#ifndef ZE_MAX_METRIC_GROUP_NAME_PREFIX +/// @brief Maximum value metric group name prefix +#define ZE_MAX_METRIC_GROUP_NAME_PREFIX 64 +#endif // ZE_MAX_METRIC_GROUP_NAME_PREFIX /////////////////////////////////////////////////////////////////////////////// /// @brief Handle of metric programmable's object @@ -2224,7 +3324,9 @@ typedef enum _zet_metric_programmable_param_type_exp_t ///< instance_count. ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_AVERAGE = 3, ///< Produces normalization using raw_metric / HW instance_count. ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_RATE = 4, ///< Produces normalization average using raw_metric / timestamp. - ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_FORCE_UINT32 = 0x7fffffff + ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_BYTES = 5, ///< Produces normalization average using raw_metric * n bytes. + ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_GENERIC = 6, ///< Generic Parameter type. Please refer the parameter's description. + ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_* ENUMs } zet_metric_programmable_param_type_exp_t; @@ -2237,11 +3339,11 @@ typedef enum _zet_value_info_type_exp_t ZET_VALUE_INFO_TYPE_EXP_FLOAT32 = 2, ///< 32-bit floating-point ZET_VALUE_INFO_TYPE_EXP_FLOAT64 = 3, ///< 64-bit floating-point ZET_VALUE_INFO_TYPE_EXP_BOOL8 = 4, ///< 8-bit boolean - ZET_VALUE_INFO_TYPE_EXP_CSTRING = 5, ///< C string - ZET_VALUE_INFO_TYPE_EXP_UINT8 = 6, ///< 8-bit unsigned-integer - ZET_VALUE_INFO_TYPE_EXP_UINT16 = 7, ///< 16-bit unsigned-integer - ZET_VALUE_INFO_TYPE_EXP_UINT64_RANGE = 8, ///< 64-bit unsigned-integer range (minimum and maximum) - ZET_VALUE_INFO_TYPE_EXP_FORCE_UINT32 = 0x7fffffff + ZET_VALUE_INFO_TYPE_EXP_UINT8 = 5, ///< 8-bit unsigned-integer + ZET_VALUE_INFO_TYPE_EXP_UINT16 = 6, ///< 16-bit unsigned-integer + ZET_VALUE_INFO_TYPE_EXP_UINT64_RANGE = 7, ///< 64-bit unsigned-integer range (minimum and maximum) + ZET_VALUE_INFO_TYPE_EXP_FLOAT64_RANGE = 8, ///< 64-bit floating point range (minimum and maximum) + ZET_VALUE_INFO_TYPE_EXP_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_VALUE_INFO_TYPE_EXP_* ENUMs } zet_value_info_type_exp_t; @@ -2250,10 +3352,19 @@ typedef enum _zet_value_info_type_exp_t typedef struct _zet_value_uint64_range_exp_t { uint64_t ui64Min; ///< [out] minimum value of the range - uint64_t ui64Max; ///< [out] max value of the range + uint64_t ui64Max; ///< [out] maximum value of the range } zet_value_uint64_range_exp_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Value info of type float64 range +typedef struct _zet_value_fp64_range_exp_t +{ + double fp64Min; ///< [out] minimum value of the range + double fp64Max; ///< [out] maximum value of the range + +} zet_value_fp64_range_exp_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Union of value information typedef union _zet_value_info_exp_t @@ -2265,8 +3376,8 @@ typedef union _zet_value_info_exp_t ze_bool_t b8; ///< [out] 8-bit boolean uint8_t ui8; ///< [out] 8-bit unsigned integer uint16_t ui16; ///< [out] 16-bit unsigned integer - char cString[ZET_MAX_VALUE_INFO_CSTRING_EXP]; ///< [out] cString zet_value_uint64_range_exp_t ui64Range; ///< [out] minimum and maximum value of the range + zet_value_fp64_range_exp_t fp64Range; ///< [out] minimum and maximum value of the range } zet_value_info_exp_t; @@ -2275,7 +3386,7 @@ typedef union _zet_value_info_exp_t typedef struct _zet_metric_programmable_param_info_exp_t { zet_structure_type_t stype; ///< [in] type of this structure - const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific ///< structure (i.e. contains stype and pNext). zet_metric_programmable_param_type_exp_t type; ///< [out] programmable parameter type char name[ZET_MAX_METRIC_PROGRAMMABLE_PARAMETER_NAME_EXP]; ///< [out] metric programmable parameter name @@ -2290,9 +3401,10 @@ typedef struct _zet_metric_programmable_param_info_exp_t typedef struct _zet_metric_programmable_param_value_info_exp_t { zet_structure_type_t stype; ///< [in] type of this structure - const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific ///< structure (i.e. contains stype and pNext). zet_value_info_exp_t valueInfo; ///< [out] information about the parameter value + char description[ZET_MAX_METRIC_PROGRAMMABLE_VALUE_DESCRIPTION_EXP]; ///< [out] description about the value } zet_metric_programmable_param_value_info_exp_t; @@ -2318,6 +3430,14 @@ typedef struct _zet_metric_programmable_param_value_exp_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2348,6 +3468,14 @@ zetMetricProgrammableGetExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricProgrammable` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2371,6 +3499,14 @@ zetMetricProgrammableGetPropertiesExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricProgrammable` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2403,6 +3539,14 @@ zetMetricProgrammableGetParamInfoExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricProgrammable` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2431,7 +3575,7 @@ zetMetricProgrammableGetParamValueInfoExp( /// - If parameterCount = 0, the default value of the metric programmable /// would be used for all parameters. /// - The implementation can post-fix a C string to the metric name and -/// description, based on the parmeter values chosen. +/// description, based on the parameter values chosen. /// - ::zetMetricProgrammableGetParamInfoExp() returns a list of parameters /// in a defined order. /// - Therefore, the list of values passed in to the API should respect the @@ -2443,6 +3587,64 @@ zetMetricProgrammableGetParamValueInfoExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hMetricProgrammable` +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// + `nullptr == pParameterValues` +/// + `nullptr == pName` +/// + `nullptr == pDescription` +/// + `nullptr == pMetricHandleCount` +ZE_APIEXPORT ze_result_t ZE_APICALL +zetMetricCreateFromProgrammableExp2( + zet_metric_programmable_exp_handle_t hMetricProgrammable, ///< [in] handle of the metric programmable + uint32_t parameterCount, ///< [in] Count of parameters to set. + zet_metric_programmable_param_value_exp_t* pParameterValues, ///< [in] list of parameter values to be set. + const char* pName, ///< [in] pointer to metric name to be used. Must point to a + ///< null-terminated character array no longer than ::ZET_MAX_METRIC_NAME. + const char* pDescription, ///< [in] pointer to metric description to be used. Must point to a + ///< null-terminated character array no longer than + ///< ::ZET_MAX_METRIC_DESCRIPTION. + uint32_t* pMetricHandleCount, ///< [in,out] Pointer to the number of metric handles. + ///< if count is zero, then the driver shall update the value with the + ///< number of metric handles available for this programmable. + ///< if count is greater than the number of metric handles available, then + ///< the driver shall update the value with the correct number of metric + ///< handles available. + zet_metric_handle_t* phMetricHandles ///< [in,out][optional][range(0,*pMetricHandleCount)] array of handle of metrics. + ///< if count is less than the number of metrics available, then driver + ///< shall only retrieve that number of metric handles. + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Create metric handles by applying parameter values on the metric +/// programmable handle. +/// +/// @details +/// - This API is deprecated. Please use +/// ::zetMetricCreateFromProgrammableExp2() +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricProgrammable` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2471,12 +3673,65 @@ zetMetricCreateFromProgrammableExp( ///< shall only retrieve that number of metric handles. ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Create multiple metric group handles from metric handles. +/// +/// @details +/// - Creates multiple metric groups from metrics which were created using +/// ::zetMetricCreateFromProgrammableExp2(). +/// - Metrics whose Hardware resources do not overlap are added to same +/// metric group. +/// - The metric groups created using this API are managed by the +/// application and cannot be retrieved using ::zetMetricGroupGet(). +/// - The created metric groups are ready for activation and collection. +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hDevice` +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// + metricGroupCount is lesser than the number of metric group handles that could be created. +ZE_APIEXPORT ze_result_t ZE_APICALL +zetDeviceCreateMetricGroupsFromMetricsExp( + zet_device_handle_t hDevice, ///< [in] handle of the device. + uint32_t metricCount, ///< [in] number of metric handles. + zet_metric_handle_t * phMetrics, ///< [in] metric handles to be added to the metric groups. + const char * pMetricGroupNamePrefix, ///< [in] prefix to the name created for the metric groups. Must point to a + ///< null-terminated character array no longer than + ///< ::ZET_MAX_METRIC_GROUP_NAME_PREFIX_EXP. + const char * pDescription, ///< [in] pointer to description of the metric groups. Must point to a + ///< null-terminated character array no longer than + ///< ::ZET_MAX_METRIC_GROUP_DESCRIPTION. + uint32_t * pMetricGroupCount, ///< [in,out] pointer to the number of metric group handles to be created. + ///< if pMetricGroupCount is zero, then the driver shall update the value + ///< with the maximum possible number of metric group handles that could be created. + ///< if pMetricGroupCount is greater than the number of metric group + ///< handles that could be created, then the driver shall update the value + ///< with the correct number of metric group handles generated. + ///< if pMetricGroupCount is lesser than the number of metric group handles + ///< that could be created, then ::ZE_RESULT_ERROR_INVALID_ARGUMENT is returned. + zet_metric_group_handle_t* phMetricGroup ///< [in,out][optional][range(0, *pMetricGroupCount)] array of handle of + ///< metric group handles. + ///< Created Metric group handles. + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Create metric group handle. /// /// @details -/// - Metrics from ::zetMetricCreateFromProgrammableExp() could be added to -/// the created metric group. +/// - This API is deprecated. Please use +/// ::zetDeviceCreateMetricGroupsFromMetricsExp /// /// @returns /// - ::ZE_RESULT_SUCCESS @@ -2484,6 +3739,14 @@ zetMetricCreateFromProgrammableExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2491,7 +3754,8 @@ zetMetricCreateFromProgrammableExp( /// + `nullptr == pDescription` /// + `nullptr == phMetricGroup` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x3 < samplingType` +/// + `0x7 < samplingType` +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zetMetricGroupCreateExp( zet_device_handle_t hDevice, ///< [in] handle of the device @@ -2506,7 +3770,7 @@ zetMetricGroupCreateExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Add a metric handle to the metric group handle created using -/// ::zetMetricGroupCreateExp. +/// ::zetDeviceCreateMetricGroupsFromMetricsExp. /// /// @details /// - Reasons for failing to add the metric could be queried using @@ -2525,6 +3789,13 @@ zetMetricGroupCreateExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricGroup` /// + `nullptr == hMetric` @@ -2547,7 +3818,7 @@ zetMetricGroupAddMetricExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Remove a metric from the metric group handle created using -/// ::zetMetricGroupCreateExp. +/// ::zetDeviceCreateMetricGroupsFromMetricsExp. /// /// @details /// - Remove an already added metric handle from the metric group. @@ -2558,6 +3829,13 @@ zetMetricGroupAddMetricExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricGroup` /// + `nullptr == hMetric` @@ -2573,8 +3851,9 @@ zetMetricGroupRemoveMetricExp( ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Closes a created metric group using ::zetMetricGroupCreateExp, so that -/// it can be activated. +/// @brief Closes a created metric group using +/// ::zetDeviceCreateMetricGroupsFromMetricsExp, so that it can be +/// activated. /// /// @details /// - Finalizes the ::zetMetricGroupAddMetricExp and @@ -2596,6 +3875,13 @@ zetMetricGroupRemoveMetricExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricGroup` /// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT @@ -2608,14 +3894,17 @@ zetMetricGroupCloseExp( ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Destroy a metric group created using ::zetMetricGroupCreateExp. +/// @brief Destroy a metric group created using +/// ::zetDeviceCreateMetricGroupsFromMetricsExp. /// /// @details -/// - Metric handles created using ::zetMetricCreateFromProgrammableExp and +/// - Metric handles created using ::zetMetricCreateFromProgrammableExp2 and /// are part of the metricGroup are not destroyed. /// - It is necessary to call ::zetMetricDestroyExp for each of the metric -/// handles (created from ::zetMetricCreateFromProgrammableExp) to destroy -/// them. +/// handles (created from ::zetMetricCreateFromProgrammableExp2) to +/// destroy them. +/// - It is not necessary to remove the metrics in the metricGroup before +/// destroying it. /// /// @returns /// - ::ZE_RESULT_SUCCESS @@ -2623,6 +3912,13 @@ zetMetricGroupCloseExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricGroup` /// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT @@ -2635,7 +3931,7 @@ zetMetricGroupDestroyExp( ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Destroy a metric created using ::zetMetricCreateFromProgrammableExp. +/// @brief Destroy a metric created using ::zetMetricCreateFromProgrammableExp2. /// /// @details /// - If a metric is added to a metric group, the metric has to be removed @@ -2647,6 +3943,13 @@ zetMetricGroupDestroyExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE +/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetric` /// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT @@ -2666,4 +3969,4 @@ zetMetricDestroyExp( } // extern "C" #endif -#endif // _ZET_API_H \ No newline at end of file +#endif // _ZET_API_H diff --git a/backends/ze/include/zet_ddi.h b/backends/ze/include/zet_ddi.h index 876df64aa..e538e71e9 100644 --- a/backends/ze/include/zet_ddi.h +++ b/backends/ze/include/zet_ddi.h @@ -1,11 +1,11 @@ /* * - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2025 Intel Corporation * * SPDX-License-Identifier: MIT * * @file zet_ddi.h - * @version v1.9-r1.9.3 + * @version v1.15-r1.13.73 * */ #ifndef _ZET_DDI_H @@ -83,6 +83,146 @@ typedef ze_result_t (ZE_APICALL *zet_pfnGetMetricProgrammableExpProcAddrTable_t) zet_metric_programmable_exp_dditable_t* ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zetMetricTracerCreateExp +typedef ze_result_t (ZE_APICALL *zet_pfnMetricTracerCreateExp_t)( + zet_context_handle_t, + zet_device_handle_t, + uint32_t, + zet_metric_group_handle_t*, + zet_metric_tracer_exp_desc_t*, + ze_event_handle_t, + zet_metric_tracer_exp_handle_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zetMetricTracerDestroyExp +typedef ze_result_t (ZE_APICALL *zet_pfnMetricTracerDestroyExp_t)( + zet_metric_tracer_exp_handle_t + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zetMetricTracerEnableExp +typedef ze_result_t (ZE_APICALL *zet_pfnMetricTracerEnableExp_t)( + zet_metric_tracer_exp_handle_t, + ze_bool_t + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zetMetricTracerDisableExp +typedef ze_result_t (ZE_APICALL *zet_pfnMetricTracerDisableExp_t)( + zet_metric_tracer_exp_handle_t, + ze_bool_t + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zetMetricTracerReadDataExp +typedef ze_result_t (ZE_APICALL *zet_pfnMetricTracerReadDataExp_t)( + zet_metric_tracer_exp_handle_t, + size_t*, + uint8_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zetMetricTracerDecodeExp +typedef ze_result_t (ZE_APICALL *zet_pfnMetricTracerDecodeExp_t)( + zet_metric_decoder_exp_handle_t, + size_t*, + uint8_t*, + uint32_t, + zet_metric_handle_t*, + uint32_t*, + uint32_t*, + uint32_t*, + zet_metric_entry_exp_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Table of MetricTracerExp functions pointers +typedef struct _zet_metric_tracer_exp_dditable_t +{ + zet_pfnMetricTracerCreateExp_t pfnCreateExp; + zet_pfnMetricTracerDestroyExp_t pfnDestroyExp; + zet_pfnMetricTracerEnableExp_t pfnEnableExp; + zet_pfnMetricTracerDisableExp_t pfnDisableExp; + zet_pfnMetricTracerReadDataExp_t pfnReadDataExp; + zet_pfnMetricTracerDecodeExp_t pfnDecodeExp; +} zet_metric_tracer_exp_dditable_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Exported function for filling application's MetricTracerExp table +/// with current process' addresses +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION +ZE_DLLEXPORT ze_result_t ZE_APICALL +zetGetMetricTracerExpProcAddrTable( + ze_api_version_t version, ///< [in] API version requested + zet_metric_tracer_exp_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zetGetMetricTracerExpProcAddrTable +typedef ze_result_t (ZE_APICALL *zet_pfnGetMetricTracerExpProcAddrTable_t)( + ze_api_version_t, + zet_metric_tracer_exp_dditable_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zetMetricDecoderCreateExp +typedef ze_result_t (ZE_APICALL *zet_pfnMetricDecoderCreateExp_t)( + zet_metric_tracer_exp_handle_t, + zet_metric_decoder_exp_handle_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zetMetricDecoderDestroyExp +typedef ze_result_t (ZE_APICALL *zet_pfnMetricDecoderDestroyExp_t)( + zet_metric_decoder_exp_handle_t + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zetMetricDecoderGetDecodableMetricsExp +typedef ze_result_t (ZE_APICALL *zet_pfnMetricDecoderGetDecodableMetricsExp_t)( + zet_metric_decoder_exp_handle_t, + uint32_t*, + zet_metric_handle_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Table of MetricDecoderExp functions pointers +typedef struct _zet_metric_decoder_exp_dditable_t +{ + zet_pfnMetricDecoderCreateExp_t pfnCreateExp; + zet_pfnMetricDecoderDestroyExp_t pfnDestroyExp; + zet_pfnMetricDecoderGetDecodableMetricsExp_t pfnGetDecodableMetricsExp; +} zet_metric_decoder_exp_dditable_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Exported function for filling application's MetricDecoderExp table +/// with current process' addresses +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION +ZE_DLLEXPORT ze_result_t ZE_APICALL +zetGetMetricDecoderExpProcAddrTable( + ze_api_version_t version, ///< [in] API version requested + zet_metric_decoder_exp_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zetGetMetricDecoderExpProcAddrTable +typedef ze_result_t (ZE_APICALL *zet_pfnGetMetricDecoderExpProcAddrTable_t)( + ze_api_version_t, + zet_metric_decoder_exp_dditable_t* + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for zetDeviceGetDebugProperties typedef ze_result_t (ZE_APICALL *zet_pfnDeviceGetDebugProperties_t)( @@ -119,6 +259,72 @@ typedef ze_result_t (ZE_APICALL *zet_pfnGetDeviceProcAddrTable_t)( zet_device_dditable_t* ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zetDeviceGetConcurrentMetricGroupsExp +typedef ze_result_t (ZE_APICALL *zet_pfnDeviceGetConcurrentMetricGroupsExp_t)( + zet_device_handle_t, + uint32_t, + zet_metric_group_handle_t *, + uint32_t *, + uint32_t * + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zetDeviceCreateMetricGroupsFromMetricsExp +typedef ze_result_t (ZE_APICALL *zet_pfnDeviceCreateMetricGroupsFromMetricsExp_t)( + zet_device_handle_t, + uint32_t, + zet_metric_handle_t *, + const char *, + const char *, + uint32_t *, + zet_metric_group_handle_t* + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zetDeviceEnableMetricsExp +typedef ze_result_t (ZE_APICALL *zet_pfnDeviceEnableMetricsExp_t)( + zet_device_handle_t + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zetDeviceDisableMetricsExp +typedef ze_result_t (ZE_APICALL *zet_pfnDeviceDisableMetricsExp_t)( + zet_device_handle_t + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Table of DeviceExp functions pointers +typedef struct _zet_device_exp_dditable_t +{ + zet_pfnDeviceGetConcurrentMetricGroupsExp_t pfnGetConcurrentMetricGroupsExp; + zet_pfnDeviceCreateMetricGroupsFromMetricsExp_t pfnCreateMetricGroupsFromMetricsExp; + zet_pfnDeviceEnableMetricsExp_t pfnEnableMetricsExp; + zet_pfnDeviceDisableMetricsExp_t pfnDisableMetricsExp; +} zet_device_exp_dditable_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Exported function for filling application's DeviceExp table +/// with current process' addresses +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION +ZE_DLLEXPORT ze_result_t ZE_APICALL +zetGetDeviceExpProcAddrTable( + ze_api_version_t version, ///< [in] API version requested + zet_device_exp_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zetGetDeviceExpProcAddrTable +typedef ze_result_t (ZE_APICALL *zet_pfnGetDeviceExpProcAddrTable_t)( + ze_api_version_t, + zet_device_exp_dditable_t* + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for zetContextActivateMetricGroups typedef ze_result_t (ZE_APICALL *zet_pfnContextActivateMetricGroups_t)( @@ -220,6 +426,43 @@ typedef ze_result_t (ZE_APICALL *zet_pfnGetCommandListProcAddrTable_t)( zet_command_list_dditable_t* ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zetCommandListAppendMarkerExp +typedef ze_result_t (ZE_APICALL *zet_pfnCommandListAppendMarkerExp_t)( + zet_command_list_handle_t, + zet_metric_group_handle_t, + uint32_t + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Table of CommandListExp functions pointers +typedef struct _zet_command_list_exp_dditable_t +{ + zet_pfnCommandListAppendMarkerExp_t pfnAppendMarkerExp; +} zet_command_list_exp_dditable_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Exported function for filling application's CommandListExp table +/// with current process' addresses +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +/// - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION +ZE_DLLEXPORT ze_result_t ZE_APICALL +zetGetCommandListExpProcAddrTable( + ze_api_version_t version, ///< [in] API version requested + zet_command_list_exp_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zetGetCommandListExpProcAddrTable +typedef ze_result_t (ZE_APICALL *zet_pfnGetCommandListExpProcAddrTable_t)( + ze_api_version_t, + zet_command_list_exp_dditable_t* + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for zetModuleGetDebugInfo typedef ze_result_t (ZE_APICALL *zet_pfnModuleGetDebugInfo_t)( @@ -357,12 +600,25 @@ typedef ze_result_t (ZE_APICALL *zet_pfnMetricDestroyExp_t)( zet_metric_handle_t ); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for zetMetricCreateFromProgrammableExp2 +typedef ze_result_t (ZE_APICALL *zet_pfnMetricCreateFromProgrammableExp2_t)( + zet_metric_programmable_exp_handle_t, + uint32_t, + zet_metric_programmable_param_value_exp_t*, + const char*, + const char*, + uint32_t*, + zet_metric_handle_t* + ); + /////////////////////////////////////////////////////////////////////////////// /// @brief Table of MetricExp functions pointers typedef struct _zet_metric_exp_dditable_t { zet_pfnMetricCreateFromProgrammableExp_t pfnCreateFromProgrammableExp; zet_pfnMetricDestroyExp_t pfnDestroyExp; + zet_pfnMetricCreateFromProgrammableExp2_t pfnCreateFromProgrammableExp2; } zet_metric_exp_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -943,9 +1199,13 @@ typedef ze_result_t (ZE_APICALL *zet_pfnGetDebugProcAddrTable_t)( typedef struct _zet_dditable_t { zet_metric_programmable_exp_dditable_t MetricProgrammableExp; + zet_metric_tracer_exp_dditable_t MetricTracerExp; + zet_metric_decoder_exp_dditable_t MetricDecoderExp; zet_device_dditable_t Device; + zet_device_exp_dditable_t DeviceExp; zet_context_dditable_t Context; zet_command_list_dditable_t CommandList; + zet_command_list_exp_dditable_t CommandListExp; zet_module_dditable_t Module; zet_kernel_dditable_t Kernel; zet_metric_dditable_t Metric; @@ -958,6 +1218,31 @@ typedef struct _zet_dditable_t zet_tracer_exp_dditable_t TracerExp; zet_debug_dditable_t Debug; } zet_dditable_t; +/// @brief Container for all DDI tables with version and tables set by the Driver +typedef struct _zet_dditable_driver_t +{ + ze_api_version_t version; + uint8_t isValidFlag; + zet_metric_programmable_exp_dditable_t * MetricProgrammableExp; + zet_metric_tracer_exp_dditable_t * MetricTracerExp; + zet_metric_decoder_exp_dditable_t * MetricDecoderExp; + zet_device_dditable_t * Device; + zet_device_exp_dditable_t * DeviceExp; + zet_context_dditable_t * Context; + zet_command_list_dditable_t * CommandList; + zet_command_list_exp_dditable_t * CommandListExp; + zet_module_dditable_t * Module; + zet_kernel_dditable_t * Kernel; + zet_metric_dditable_t * Metric; + zet_metric_exp_dditable_t * MetricExp; + zet_metric_group_dditable_t * MetricGroup; + zet_metric_group_exp_dditable_t * MetricGroupExp; + zet_metric_streamer_dditable_t * MetricStreamer; + zet_metric_query_pool_dditable_t * MetricQueryPool; + zet_metric_query_dditable_t * MetricQuery; + zet_tracer_exp_dditable_t * TracerExp; + zet_debug_dditable_t * Debug; +} zet_dditable_driver_t; #if defined(__cplusplus) } // extern "C" diff --git a/backends/ze/include/zet_ddi_ver.h b/backends/ze/include/zet_ddi_ver.h index a2c0ffac9..894e693c4 100644 --- a/backends/ze/include/zet_ddi_ver.h +++ b/backends/ze/include/zet_ddi_ver.h @@ -5,7 +5,7 @@ * SPDX-License-Identifier: MIT * * @file zet_ddi.h - * @version v1.9-r1.9.3 + * @version v1.15-r1.13.73 * */ #ifndef _ZET_DDI_VER_H @@ -30,6 +30,29 @@ typedef struct _zet_metric_programmable_exp_dditable_t_1_9 zet_pfnMetricProgrammableGetParamValueInfoExp_t pfnGetParamValueInfoExp; } zet_metric_programmable_exp_dditable_t_1_9; +/////////////////////////////////////////////////////////////////////////////// +/// [1.1] +/// @brief Table of MetricTracerExp functions pointers +typedef struct _zet_metric_tracer_exp_dditable_t_1_1 +{ + zet_pfnMetricTracerCreateExp_t pfnCreateExp; + zet_pfnMetricTracerDestroyExp_t pfnDestroyExp; + zet_pfnMetricTracerEnableExp_t pfnEnableExp; + zet_pfnMetricTracerDisableExp_t pfnDisableExp; + zet_pfnMetricTracerReadDataExp_t pfnReadDataExp; + zet_pfnMetricTracerDecodeExp_t pfnDecodeExp; +} zet_metric_tracer_exp_dditable_t_1_1; + +/////////////////////////////////////////////////////////////////////////////// +/// [1.1] +/// @brief Table of MetricDecoderExp functions pointers +typedef struct _zet_metric_decoder_exp_dditable_t_1_1 +{ + zet_pfnMetricDecoderCreateExp_t pfnCreateExp; + zet_pfnMetricDecoderDestroyExp_t pfnDestroyExp; + zet_pfnMetricDecoderGetDecodableMetricsExp_t pfnGetDecodableMetricsExp; +} zet_metric_decoder_exp_dditable_t_1_1; + /////////////////////////////////////////////////////////////////////////////// /// [1.0] /// @brief Table of Device functions pointers @@ -38,6 +61,23 @@ typedef struct _zet_device_dditable_t_1_0 zet_pfnDeviceGetDebugProperties_t pfnGetDebugProperties; } zet_device_dditable_t_1_0; +/////////////////////////////////////////////////////////////////////////////// +/// [1.1, 1.13] +/// @brief Table of DeviceExp functions pointers +typedef struct _zet_device_exp_dditable_t_1_1 +{ + zet_pfnDeviceGetConcurrentMetricGroupsExp_t pfnGetConcurrentMetricGroupsExp; + zet_pfnDeviceCreateMetricGroupsFromMetricsExp_t pfnCreateMetricGroupsFromMetricsExp; +} zet_device_exp_dditable_t_1_1; + +typedef struct _zet_device_exp_dditable_t_1_13 +{ + zet_pfnDeviceGetConcurrentMetricGroupsExp_t pfnGetConcurrentMetricGroupsExp; + zet_pfnDeviceCreateMetricGroupsFromMetricsExp_t pfnCreateMetricGroupsFromMetricsExp; + zet_pfnDeviceEnableMetricsExp_t pfnEnableMetricsExp; + zet_pfnDeviceDisableMetricsExp_t pfnDisableMetricsExp; +} zet_device_exp_dditable_t_1_13; + /////////////////////////////////////////////////////////////////////////////// /// [1.0] /// @brief Table of Context functions pointers @@ -57,6 +97,14 @@ typedef struct _zet_command_list_dditable_t_1_0 zet_pfnCommandListAppendMetricMemoryBarrier_t pfnAppendMetricMemoryBarrier; } zet_command_list_dditable_t_1_0; +/////////////////////////////////////////////////////////////////////////////// +/// [1.13] +/// @brief Table of CommandListExp functions pointers +typedef struct _zet_command_list_exp_dditable_t_1_13 +{ + zet_pfnCommandListAppendMarkerExp_t pfnAppendMarkerExp; +} zet_command_list_exp_dditable_t_1_13; + /////////////////////////////////////////////////////////////////////////////// /// [1.0] /// @brief Table of Module functions pointers @@ -83,12 +131,18 @@ typedef struct _zet_metric_dditable_t_1_0 } zet_metric_dditable_t_1_0; /////////////////////////////////////////////////////////////////////////////// -/// [1.9] +/// [1.11, 1.9] /// @brief Table of MetricExp functions pointers +typedef struct _zet_metric_exp_dditable_t_1_11 +{ + zet_pfnMetricCreateFromProgrammableExp2_t pfnCreateFromProgrammableExp2; +} zet_metric_exp_dditable_t_1_11; + typedef struct _zet_metric_exp_dditable_t_1_9 { zet_pfnMetricCreateFromProgrammableExp_t pfnCreateFromProgrammableExp; zet_pfnMetricDestroyExp_t pfnDestroyExp; + zet_pfnMetricCreateFromProgrammableExp2_t pfnCreateFromProgrammableExp2; } zet_metric_exp_dditable_t_1_9; /////////////////////////////////////////////////////////////////////////////// diff --git a/backends/ze/ze.h.include b/backends/ze/ze.h.include index cf36afc7a..590173119 100644 --- a/backends/ze/ze.h.include +++ b/backends/ze/ze.h.include @@ -7,11 +7,11 @@ #include #include #include +#include +#include #include #include #include #include #include -#define HMODULE void * -#include #endif diff --git a/backends/ze/ze_model.rb b/backends/ze/ze_model.rb index 8fd4e5b12..f27658974 100644 --- a/backends/ze/ze_model.rb +++ b/backends/ze/ze_model.rb @@ -14,22 +14,25 @@ $zet_api_yaml = YAML.load_file('zet_api.yaml') $zes_api_yaml = YAML.load_file('zes_api.yaml') $zel_api_yaml = YAML.load_file('zel_api.yaml') +$zer_api_yaml = YAML.load_file('zer_api.yaml') $zex_api_yaml = YAML.load_file('zex_api.yaml') $ze_api = YAMLCAst.from_yaml_ast($ze_api_yaml) $zet_api = YAMLCAst.from_yaml_ast($zet_api_yaml) $zes_api = YAMLCAst.from_yaml_ast($zes_api_yaml) $zel_api = YAMLCAst.from_yaml_ast($zel_api_yaml) +$zer_api = YAMLCAst.from_yaml_ast($zer_api_yaml) $zex_api = YAMLCAst.from_yaml_ast($zex_api_yaml) ze_funcs_e = $ze_api['functions'] zet_funcs_e = $zet_api['functions'] zes_funcs_e = $zes_api['functions'] zel_funcs_e = $zel_api['functions'] +zer_funcs_e = $zer_api['functions'] zex_funcs_e = $zex_api['functions'] -typedefs = $ze_api['typedefs'] + $zet_api['typedefs'] + $zes_api['typedefs'] + $zel_api['typedefs'] + $zex_api['typedefs'] -structs = $ze_api['structs'] + $zet_api['structs'] + $zes_api['structs'] + $zel_api['structs'] + $zex_api['structs'] +typedefs = $ze_api['typedefs'] + $zet_api['typedefs'] + $zes_api['typedefs'] + $zel_api['typedefs'] + $zer_api['typedefs'] + $zex_api['typedefs'] +structs = $ze_api['structs'] + $zet_api['structs'] + $zes_api['structs'] + $zel_api['structs'] + $zer_api['structs'] + $zex_api['structs'] find_all_types(typedefs) gen_struct_map(typedefs, structs) @@ -47,6 +50,10 @@ 'ZE_STRUCTURE_TYPE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT' => 'ZE_STRUCTURE_TYPE_KERNEL_MAX_GROUP_SIZE_EXT_PROPERTIES', 'ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMPORT_WIN32_HANDLE' => 'ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMPORT_WIN32', 'ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_EXPORT_WIN32_HANDLE' => 'ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_EXPORT_WIN32', + 'ZE_STRUCTURE_TYPE_COMMAND_LIST_APPEND_LAUNCH_KERNEL_PARAM_COOPERATIVE_DESC' => 'ZE_STRUCTURE_TYPE_COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC', + 'ZE_STRUCTURE_TYPE_DEVICE_CACHE_LINE_SIZE_EXT' => 'ZE_STRUCTURE_TYPE_DEVICE_CACHELINE_SIZE_EXT', + 'ZE_STRUCTURE_TYPE_KERNEL_ALLOCATION_EXP_PROPERTIES' => 'ZE_STRUCTURE_TYPE_KERNEL_ALLOCATION_PROPERTIES', + 'ZET_STRUCTURE_TYPE_EXPORT_DMA_BUF_EXP_PROPERTIES' => 'ZET_STRUCTURE_TYPE_EXPORT_DMA_EXP_PROPERTIES', 'ZES_STRUCTURE_TYPE_MEM_PAGE_OFFLINE_STATE_EXP' => 'ZES_STRUCTURE_TYPE_MEMORY_PAGE_OFFLINE_STATE_EXP', } @@ -79,6 +86,13 @@ end end +$zer_meta_parameters = YAML.load_file(File.join(SRC_DIR, 'zer_meta_parameters.yaml')) +$zer_meta_parameters['meta_parameters'].each do |func, list| + list.each do |type, *args| + register_meta_parameter func, Kernel.const_get(type), *args + end +end + $zex_meta_parameters = YAML.load_file(File.join(SRC_DIR, 'zex_meta_parameters.yaml')) $zex_meta_parameters['meta_parameters'].each do |func, list| list.each do |type, *args| @@ -102,6 +116,10 @@ Command.new(func) end +$zer_commands = zer_funcs_e.collect do |func| + Command.new(func) +end + $zex_commands = zex_funcs_e.collect do |func| Command.new(func) end @@ -110,7 +128,7 @@ def upper_snake_case(str) str.gsub(/([A-Z][A-Z0-9]*)/, '_\1').upcase end -ze_pointer_names = ($ze_commands + $zet_commands + $zes_commands + $zel_commands).collect do |c| +ze_pointer_names = ($ze_commands + $zet_commands + $zes_commands + $zel_commands + $zer_commands).collect do |c| [c, upper_snake_case(c.pointer_name)] end ze_pointer_names += $zex_commands.collect do |c| @@ -375,8 +393,8 @@ def upper_snake_case(str) } EOF -($ze_commands + $zet_commands + $zes_commands + $zel_commands).select do |c| - c.name.match(/(ze|zet|zes|zel)Get.*ProcAddrTable/) +($ze_commands + $zet_commands + $zes_commands + $zel_commands + $zer_commands).select do |c| + c.name.match(/(ze|zet|zes|zel|zer)Get.*ProcAddrTable/) end.each do |c| parent_type = c['pDdiTable'].type.type.to_s + '_' child_types = STRUCT_MAP.select { |k, _| k.match(parent_type) } From ab9f679ad37bcef1891aa69294340fb6195879c6 Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Fri, 27 Feb 2026 00:35:14 +0000 Subject: [PATCH 02/30] lol --- backends/ze/zer_meta_parameters.yaml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 backends/ze/zer_meta_parameters.yaml diff --git a/backends/ze/zer_meta_parameters.yaml b/backends/ze/zer_meta_parameters.yaml new file mode 100644 index 000000000..0f7807372 --- /dev/null +++ b/backends/ze/zer_meta_parameters.yaml @@ -0,0 +1,4 @@ +--- +meta_parameters: + zerGetLastErrorDescription: + - [ OutPtrString, ppString] From 5cd027859493cbdf3f7776c3a2d3c839241cf5ce Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Fri, 27 Feb 2026 15:55:47 +0000 Subject: [PATCH 03/30] quick fix clang --- backends/ze/Makefile.am | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backends/ze/Makefile.am b/backends/ze/Makefile.am index f50b2fb5b..bf93d5a55 100644 --- a/backends/ze/Makefile.am +++ b/backends/ze/Makefile.am @@ -10,7 +10,11 @@ if STRICT #2729 | typedef struct _zer_get_default_context_params_t # | ^ #1 error generated. - WERROR = -Werror -Wno-error=nonnull -Wno-error=extern-c-compat + WERROR = -Werror -Wno-error=nonnull + + ifneq ($(CC), gcc) + WERROR += -Wno-error=extern-c-compat + endif else WERROR = endif From 9be695aadbce226f7b58d45e8f2e66c31ed61cee Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Fri, 27 Feb 2026 16:52:15 +0000 Subject: [PATCH 04/30] Try again --- backends/ze/Makefile.am | 17 +- backends/ze/headers.patch | 1402 +------------------------------------ 2 files changed, 14 insertions(+), 1405 deletions(-) diff --git a/backends/ze/Makefile.am b/backends/ze/Makefile.am index bf93d5a55..c2326aa3e 100644 --- a/backends/ze/Makefile.am +++ b/backends/ze/Makefile.am @@ -11,12 +11,6 @@ if STRICT # | ^ #1 error generated. WERROR = -Werror -Wno-error=nonnull - - ifneq ($(CC), gcc) - WERROR += -Wno-error=extern-c-compat - endif -else - WERROR = endif ZE_NAMESPACES = ze zet zes zel zer zex @@ -69,6 +63,7 @@ $(MODIFIED_ZE_HDR) &: $(ZE_HDR) $(srcdir)/headers.patch $(RM) -r modified_include/ cp -r $(srcdir)/include/ modified_include/ chmod -R u+w modified_include/ + cat $(srcdir)/headers.patch | patch -i - -d modified_include/ -s -p1 clean-local: $(RM) -r modified_include @@ -159,7 +154,7 @@ nodist_libZESampling_la_SOURCES = \ $(ZE_PROBES_INCL) \ $(ZE_STATIC_PROBES_INCL) -libZESampling_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(top_srcdir)/sampling -I$(top_srcdir)/backends/ze/include -I./ +libZESampling_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(top_srcdir)/sampling -I./modified_include -I./ libZESampling_la_CFLAGS = -Wall -Wextra $(WERROR) $(LTTNG_UST_CFLAGS) libZESampling_la_LDFLAGS = -avoid-version -module libZESampling_la_LIBADD = $(top_builddir)/sampling/libThapiSampling.la libzetracepoints.la -ldl $(LTTNG_UST_LIBS) @@ -184,7 +179,7 @@ nodist_libzetracepoints_la_SOURCES = \ $(ZE_PROBES_SRC) \ $(ZE_STATIC_PROBES_SRC) -libzetracepoints_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(srcdir)/include -I./ +libzetracepoints_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I./modified_include -I./ libzetracepoints_la_CFLAGS = -fPIC -Wall -Wextra -Wno-unused-parameter -Wno-type-limits -Wno-sign-compare $(WERROR) $(LTTNG_UST_CFLAGS) libzetracepoints_la_LDFLAGS = $(LTTNG_UST_LIBS) @@ -199,7 +194,7 @@ nodist_libze_loader_la_SOURCES = \ $(ZE_STATIC_PROBES_INCL) \ tracer_ze.c -libze_loader_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(srcdir)/include -I$(top_srcdir)/utils -I./ +libze_loader_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I./modified_include -I$(top_srcdir)/utils -I./ libze_loader_la_CFLAGS = -Wall -Wextra $(WERROR) $(LIBFFI_CFLAGS) $(LTTNG_UST_CFLAGS) libze_loader_la_LDFLAGS = $(LTTNG_UST_LIBS) -ldl -lpthread $(LIBFFI_LIBS) libze_loader_la_LDFLAGS += -version-info 1:0:0 @@ -270,7 +265,7 @@ libZEInterval_la_SOURCES = \ btx_zeinterval_callbacks.cpp \ btx_zeinterval_callbacks.hpp -libZEInterval_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(srcdir)/include -I./ -I./btx_filter_ze +libZEInterval_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I./modified_include -I./ -I./btx_filter_ze libZEInterval_la_CFLAGS = -Wall -Wextra -Wno-unused-parameter $(WERROR) $(BABELTRACE2_CFLAGS) libZEInterval_la_CXXFLAGS = -std=c++17 -Wall -Wextra -Wno-unused-parameter $(WERROR) $(BABELTRACE2_CFLAGS) libZEInterval_la_LDFLAGS = $(BABELTRACE2_LIBS) -avoid-version -module @@ -296,7 +291,7 @@ $(BTX_ZE_GENERATED_SOURCE_TEST) &: btx_ze_model.yaml noinst_LTLIBRARIES += libtestzesource.la nodist_libtestzesource_la_SOURCES = $(BTX_ZE_GENERATED_SOURCE_TEST) -libtestzesource_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(srcdir)/include -I./btx_source_ze_test/ +libtestzesource_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I./modified_include -I./btx_source_ze_test/ libtestzesource_la_CFLAGS = -fPIC -Wall -Wextra -Wno-unused-parameter $(WERROR) $(BABELTRACE2_CFLAGS) TRACE_OUT = $(TRACE_COMMON:.thapi_text_pretty=.bt_text_pretty) diff --git a/backends/ze/headers.patch b/backends/ze/headers.patch index edbc6a6a1..add1cc19a 100644 --- a/backends/ze/headers.patch +++ b/backends/ze/headers.patch @@ -1,1399 +1,13 @@ -diff -u4 -r --new-file include/layers/zel_tracing_api.h modified_include/layers/zel_tracing_api.h ---- include/layers/zel_tracing_api.h 2024-04-02 10:40:17.625021869 -0500 -+++ modified_include/layers/zel_tracing_api.h 2024-04-02 13:06:28.056000505 -0500 -@@ -54,9 +54,9 @@ - { - ZEL_STRUCTURE_TYPE_TRACER_DESC = 0x1 ,///< ::zel_tracer_desc_t - // This enumeration value is deprecated. - // Pluse use ZEL_STRUCTURE_TYPE_TRACER_DESC. -- ZEL_STRUCTURE_TYPE_TRACER_EXP_DESC = 0x1 ,///< ::zel_tracer_desc_t -+ //ZEL_STRUCTURE_TYPE_TRACER_EXP_DESC = 0x1 ,///< ::zel_tracer_desc_t - ZEL_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff - - } zel_structure_type_t; - -diff -u4 -r --new-file include/layers/zel_tracing_register_cb.h modified_include/layers/zel_tracing_register_cb.h ---- include/layers/zel_tracing_register_cb.h 2024-04-02 18:30:39.225008820 -0500 -+++ modified_include/layers/zel_tracing_register_cb.h 2024-04-02 18:26:48.488474369 -0500 -@@ -21,9 +21,9 @@ - #endif - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Handle of tracer object --typedef struct _zel_tracer_handle_t *zel_tracer_handle_t; -+//typedef struct _zel_tracer_handle_t *zel_tracer_handle_t; - - /// Callback definitions for all API released in LevelZero spec 1.1 or newer - /// Callbacks for APIs included in spec 1.0 are contained in ze_api.helper - -@@ -3242,10 +3242,10 @@ - ze_pfnCommandListUpdateMutableCommandWaitEventsExpCb_t pfnUpdateMutableCommandWaitEventsExpCb - ); - - --ZE_APIEXPORT ze_result_t ZE_APICALL --zelTracerResetAllCallbacks(zel_tracer_handle_t hTracer); -+//ZE_APIEXPORT ze_result_t ZE_APICALL -+//zelTracerResetAllCallbacks(zel_tracer_handle_t hTracer); - - - #if defined(__cplusplus) - } // extern "C" -diff -u4 -r --new-file include/loader/ze_loader_api.h modified_include/loader/ze_loader_api.h ---- include/loader/ze_loader_api.h 2025-09-24 16:25:46.320158542 -0500 -+++ modified_include/loader/ze_loader_api.h 2025-10-16 17:33:33.069602137 -0500 -@@ -7,10 +7,15 @@ - * @file ze_loader_api.cpp - * - */ - -+#ifndef THAPI_NO_INCLUDE - #include "ze_loader_internal.h" - #include "loader/ze_loader.h" -+#endif -+#include "../ze_api.h" -+#include -+#define HMODULE void * - - #define TRACING_COMP_NAME "loader" - - #if defined(__cplusplus) -@@ -55,27 +60,10 @@ - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Exported function for getting version - /// --ZE_DLLEXPORT ze_result_t ZE_APICALL --zelLoaderGetVersion(zel_component_version_t *version); -- -- --/////////////////////////////////////////////////////////////////////////////// --/// @brief Exported function for getting versions of all components --/// --ZE_DLLEXPORT ze_result_t ZE_APICALL --zelLoaderGetVersionsInternal( -- size_t *num_elems, //Pointer to num versions to get. -- zel_component_version_t *versions); //Pointer to array of versions. If set to NULL, num_elems is returned -- -- --ZE_DLLEXPORT ze_result_t ZE_APICALL --zelLoaderTranslateHandleInternal( -- zel_handle_type_t handleType, //Handle type -- void *handleIn, //Input: handle to translate from loader handle to driver handle -- void **handleOut); //Output: Pointer to handleOut is set to driver handle if successful -- -+//ZE_DLLEXPORT ze_result_t ZE_APICALL -+//zelLoaderGetVersion(zel_component_version_t *version); - - #if defined(__cplusplus) - } - #endif -\ No newline at end of file -diff -u4 -r --new-file include/loader/ze_loader.h modified_include/loader/ze_loader.h ---- include/loader/ze_loader.h 2025-09-24 16:25:46.319212940 -0500 -+++ modified_include/loader/ze_loader.h 2025-10-16 17:33:33.069765006 -0500 -@@ -24,9 +24,11 @@ - int patch; - } zel_version_t; - - //Ex component string "ze_tracing", "ze_validation", etc -+#ifndef ZEL_COMPONENT_STRING_SIZE - #define ZEL_COMPONENT_STRING_SIZE 64 -+#endif - - typedef struct zel_component_version { - char component_name[ZEL_COMPONENT_STRING_SIZE]; - ze_api_version_t spec_version; -@@ -38,8 +40,16 @@ - zelLoaderGetVersions( - size_t *num_elems, //Pointer to num versions to get. - zel_component_version_t *versions); //Pointer to array of versions. If set to NULL, num_elems is returned - -+/////////////////////////////////////////////////////////////////////////////// -+/// @brief Exported function for getting versions of all components -+/// -+ZE_DLLEXPORT ze_result_t ZE_APICALL -+zelLoaderGetVersionsInternal( -+ size_t *num_elems, //Pointer to num versions to get. -+ zel_component_version_t *versions); //Pointer to array of versions. If set to NULL, num_elems is returned -+ - typedef enum _zel_handle_type_t { - ZEL_HANDLE_DRIVER, - ZEL_HANDLE_DEVICE, - ZEL_HANDLE_CONTEXT, -@@ -64,8 +74,17 @@ - void *handleIn, //Input: handle to translate from loader handle to driver handle - void **handleOut); //Output: Pointer to handleOut is set to driver handle if successful - - /////////////////////////////////////////////////////////////////////////////// -+/// @brief Exported function for Enabling the Tracing Layer During Runtime. -+/// -+ZE_DLLEXPORT ze_result_t ZE_APICALL -+zelLoaderTranslateHandleInternal( -+ zel_handle_type_t handleType, //Handle type -+ void *handleIn, //Input: handle to translate from loader handle to driver handle -+ void **handleOut); //Output: Pointer to handleOut is set to driver handle if successful -+ -+/////////////////////////////////////////////////////////////////////////////// - /// @brief Exported function for handling calls to released drivers in teardown. - /// - ZE_DLLEXPORT ze_result_t ZE_APICALL - zelSetDriverTeardown(); -diff -u4 -r --new-file include/ze_api.h modified_include/ze_api.h ---- include/ze_api.h 2025-09-24 16:25:46.320229688 -0500 -+++ modified_include/ze_api.h 2025-10-16 17:33:33.073893223 -0500 -@@ -14,10 +14,12 @@ - #pragma once - #endif - - // standard headers -+#ifndef THAPI_NO_INCLUDE - #include - #include -+#endif - - #if defined(__cplusplus) - extern "C" { - #endif -@@ -447,493 +449,493 @@ - /// implementation - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_ipc_mem_handle_t --typedef struct _ze_ipc_mem_handle_t ze_ipc_mem_handle_t; -+//typedef struct _ze_ipc_mem_handle_t ze_ipc_mem_handle_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_ipc_event_pool_handle_t --typedef struct _ze_ipc_event_pool_handle_t ze_ipc_event_pool_handle_t; -+//typedef struct _ze_ipc_event_pool_handle_t ze_ipc_event_pool_handle_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_uuid_t --typedef struct _ze_uuid_t ze_uuid_t; -+//typedef struct _ze_uuid_t ze_uuid_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_base_cb_params_t --typedef struct _ze_base_cb_params_t ze_base_cb_params_t; -+//typedef struct _ze_base_cb_params_t ze_base_cb_params_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_base_properties_t --typedef struct _ze_base_properties_t ze_base_properties_t; -+//typedef struct _ze_base_properties_t ze_base_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_base_desc_t --typedef struct _ze_base_desc_t ze_base_desc_t; -+//typedef struct _ze_base_desc_t ze_base_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_driver_uuid_t --typedef struct _ze_driver_uuid_t ze_driver_uuid_t; -+//typedef struct _ze_driver_uuid_t ze_driver_uuid_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_driver_properties_t --typedef struct _ze_driver_properties_t ze_driver_properties_t; -+//typedef struct _ze_driver_properties_t ze_driver_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_driver_ipc_properties_t --typedef struct _ze_driver_ipc_properties_t ze_driver_ipc_properties_t; -+//typedef struct _ze_driver_ipc_properties_t ze_driver_ipc_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_driver_extension_properties_t --typedef struct _ze_driver_extension_properties_t ze_driver_extension_properties_t; -+//typedef struct _ze_driver_extension_properties_t ze_driver_extension_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_device_uuid_t --typedef struct _ze_device_uuid_t ze_device_uuid_t; -+//typedef struct _ze_device_uuid_t ze_device_uuid_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_device_properties_t --typedef struct _ze_device_properties_t ze_device_properties_t; -+//typedef struct _ze_device_properties_t ze_device_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_device_thread_t --typedef struct _ze_device_thread_t ze_device_thread_t; -+//typedef struct _ze_device_thread_t ze_device_thread_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_device_compute_properties_t --typedef struct _ze_device_compute_properties_t ze_device_compute_properties_t; -+//typedef struct _ze_device_compute_properties_t ze_device_compute_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_native_kernel_uuid_t --typedef struct _ze_native_kernel_uuid_t ze_native_kernel_uuid_t; -+//typedef struct _ze_native_kernel_uuid_t ze_native_kernel_uuid_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_device_module_properties_t --typedef struct _ze_device_module_properties_t ze_device_module_properties_t; -+//typedef struct _ze_device_module_properties_t ze_device_module_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_command_queue_group_properties_t --typedef struct _ze_command_queue_group_properties_t ze_command_queue_group_properties_t; -+//typedef struct _ze_command_queue_group_properties_t ze_command_queue_group_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_device_memory_properties_t --typedef struct _ze_device_memory_properties_t ze_device_memory_properties_t; -+//typedef struct _ze_device_memory_properties_t ze_device_memory_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_device_memory_access_properties_t --typedef struct _ze_device_memory_access_properties_t ze_device_memory_access_properties_t; -+//typedef struct _ze_device_memory_access_properties_t ze_device_memory_access_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_device_cache_properties_t --typedef struct _ze_device_cache_properties_t ze_device_cache_properties_t; -+//typedef struct _ze_device_cache_properties_t ze_device_cache_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_device_image_properties_t --typedef struct _ze_device_image_properties_t ze_device_image_properties_t; -+//typedef struct _ze_device_image_properties_t ze_device_image_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_device_external_memory_properties_t --typedef struct _ze_device_external_memory_properties_t ze_device_external_memory_properties_t; -+//typedef struct _ze_device_external_memory_properties_t ze_device_external_memory_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_device_p2p_properties_t --typedef struct _ze_device_p2p_properties_t ze_device_p2p_properties_t; -+//typedef struct _ze_device_p2p_properties_t ze_device_p2p_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_context_desc_t --typedef struct _ze_context_desc_t ze_context_desc_t; -+//typedef struct _ze_context_desc_t ze_context_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_command_queue_desc_t --typedef struct _ze_command_queue_desc_t ze_command_queue_desc_t; -+//typedef struct _ze_command_queue_desc_t ze_command_queue_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_command_list_desc_t --typedef struct _ze_command_list_desc_t ze_command_list_desc_t; -+//typedef struct _ze_command_list_desc_t ze_command_list_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_copy_region_t --typedef struct _ze_copy_region_t ze_copy_region_t; -+//typedef struct _ze_copy_region_t ze_copy_region_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_image_region_t --typedef struct _ze_image_region_t ze_image_region_t; -+//typedef struct _ze_image_region_t ze_image_region_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_event_pool_desc_t --typedef struct _ze_event_pool_desc_t ze_event_pool_desc_t; -+//typedef struct _ze_event_pool_desc_t ze_event_pool_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_event_desc_t --typedef struct _ze_event_desc_t ze_event_desc_t; -+//typedef struct _ze_event_desc_t ze_event_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_kernel_timestamp_data_t --typedef struct _ze_kernel_timestamp_data_t ze_kernel_timestamp_data_t; -+//typedef struct _ze_kernel_timestamp_data_t ze_kernel_timestamp_data_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_kernel_timestamp_result_t --typedef struct _ze_kernel_timestamp_result_t ze_kernel_timestamp_result_t; -+//typedef struct _ze_kernel_timestamp_result_t ze_kernel_timestamp_result_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_fence_desc_t --typedef struct _ze_fence_desc_t ze_fence_desc_t; -+//typedef struct _ze_fence_desc_t ze_fence_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_image_format_t --typedef struct _ze_image_format_t ze_image_format_t; -+//typedef struct _ze_image_format_t ze_image_format_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_image_desc_t --typedef struct _ze_image_desc_t ze_image_desc_t; -+//typedef struct _ze_image_desc_t ze_image_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_image_properties_t --typedef struct _ze_image_properties_t ze_image_properties_t; -+//typedef struct _ze_image_properties_t ze_image_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_device_mem_alloc_desc_t --typedef struct _ze_device_mem_alloc_desc_t ze_device_mem_alloc_desc_t; -+//typedef struct _ze_device_mem_alloc_desc_t ze_device_mem_alloc_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_host_mem_alloc_desc_t --typedef struct _ze_host_mem_alloc_desc_t ze_host_mem_alloc_desc_t; -+//typedef struct _ze_host_mem_alloc_desc_t ze_host_mem_alloc_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_memory_allocation_properties_t --typedef struct _ze_memory_allocation_properties_t ze_memory_allocation_properties_t; -+//typedef struct _ze_memory_allocation_properties_t ze_memory_allocation_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_external_memory_export_desc_t --typedef struct _ze_external_memory_export_desc_t ze_external_memory_export_desc_t; -+//typedef struct _ze_external_memory_export_desc_t ze_external_memory_export_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_external_memory_import_fd_t --typedef struct _ze_external_memory_import_fd_t ze_external_memory_import_fd_t; -+//typedef struct _ze_external_memory_import_fd_t ze_external_memory_import_fd_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_external_memory_export_fd_t --typedef struct _ze_external_memory_export_fd_t ze_external_memory_export_fd_t; -+//typedef struct _ze_external_memory_export_fd_t ze_external_memory_export_fd_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_external_memory_import_win32_handle_t --typedef struct _ze_external_memory_import_win32_handle_t ze_external_memory_import_win32_handle_t; -+//typedef struct _ze_external_memory_import_win32_handle_t ze_external_memory_import_win32_handle_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_external_memory_export_win32_handle_t --typedef struct _ze_external_memory_export_win32_handle_t ze_external_memory_export_win32_handle_t; -+//typedef struct _ze_external_memory_export_win32_handle_t ze_external_memory_export_win32_handle_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_module_constants_t --typedef struct _ze_module_constants_t ze_module_constants_t; -+//typedef struct _ze_module_constants_t ze_module_constants_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_module_desc_t --typedef struct _ze_module_desc_t ze_module_desc_t; -+//typedef struct _ze_module_desc_t ze_module_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_module_properties_t --typedef struct _ze_module_properties_t ze_module_properties_t; -+//typedef struct _ze_module_properties_t ze_module_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_kernel_desc_t --typedef struct _ze_kernel_desc_t ze_kernel_desc_t; -+//typedef struct _ze_kernel_desc_t ze_kernel_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_kernel_uuid_t --typedef struct _ze_kernel_uuid_t ze_kernel_uuid_t; -+//typedef struct _ze_kernel_uuid_t ze_kernel_uuid_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_kernel_properties_t --typedef struct _ze_kernel_properties_t ze_kernel_properties_t; -+//typedef struct _ze_kernel_properties_t ze_kernel_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_kernel_preferred_group_size_properties_t --typedef struct _ze_kernel_preferred_group_size_properties_t ze_kernel_preferred_group_size_properties_t; -+//typedef struct _ze_kernel_preferred_group_size_properties_t ze_kernel_preferred_group_size_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_group_count_t --typedef struct _ze_group_count_t ze_group_count_t; -+//typedef struct _ze_group_count_t ze_group_count_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_module_program_exp_desc_t --typedef struct _ze_module_program_exp_desc_t ze_module_program_exp_desc_t; -+//typedef struct _ze_module_program_exp_desc_t ze_module_program_exp_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_device_raytracing_ext_properties_t --typedef struct _ze_device_raytracing_ext_properties_t ze_device_raytracing_ext_properties_t; -+//typedef struct _ze_device_raytracing_ext_properties_t ze_device_raytracing_ext_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_raytracing_mem_alloc_ext_desc_t --typedef struct _ze_raytracing_mem_alloc_ext_desc_t ze_raytracing_mem_alloc_ext_desc_t; -+//typedef struct _ze_raytracing_mem_alloc_ext_desc_t ze_raytracing_mem_alloc_ext_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_sampler_desc_t --typedef struct _ze_sampler_desc_t ze_sampler_desc_t; -+//typedef struct _ze_sampler_desc_t ze_sampler_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_physical_mem_desc_t --typedef struct _ze_physical_mem_desc_t ze_physical_mem_desc_t; -+//typedef struct _ze_physical_mem_desc_t ze_physical_mem_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_float_atomic_ext_properties_t --typedef struct _ze_float_atomic_ext_properties_t ze_float_atomic_ext_properties_t; -+//typedef struct _ze_float_atomic_ext_properties_t ze_float_atomic_ext_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_relaxed_allocation_limits_exp_desc_t --typedef struct _ze_relaxed_allocation_limits_exp_desc_t ze_relaxed_allocation_limits_exp_desc_t; -+//typedef struct _ze_relaxed_allocation_limits_exp_desc_t ze_relaxed_allocation_limits_exp_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_cache_reservation_ext_desc_t --typedef struct _ze_cache_reservation_ext_desc_t ze_cache_reservation_ext_desc_t; -+//typedef struct _ze_cache_reservation_ext_desc_t ze_cache_reservation_ext_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_image_memory_properties_exp_t --typedef struct _ze_image_memory_properties_exp_t ze_image_memory_properties_exp_t; -+//typedef struct _ze_image_memory_properties_exp_t ze_image_memory_properties_exp_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_image_view_planar_ext_desc_t --typedef struct _ze_image_view_planar_ext_desc_t ze_image_view_planar_ext_desc_t; -+//typedef struct _ze_image_view_planar_ext_desc_t ze_image_view_planar_ext_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_image_view_planar_exp_desc_t --typedef struct _ze_image_view_planar_exp_desc_t ze_image_view_planar_exp_desc_t; -+//typedef struct _ze_image_view_planar_exp_desc_t ze_image_view_planar_exp_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_scheduling_hint_exp_properties_t --typedef struct _ze_scheduling_hint_exp_properties_t ze_scheduling_hint_exp_properties_t; -+//typedef struct _ze_scheduling_hint_exp_properties_t ze_scheduling_hint_exp_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_scheduling_hint_exp_desc_t --typedef struct _ze_scheduling_hint_exp_desc_t ze_scheduling_hint_exp_desc_t; -+//typedef struct _ze_scheduling_hint_exp_desc_t ze_scheduling_hint_exp_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_context_power_saving_hint_exp_desc_t --typedef struct _ze_context_power_saving_hint_exp_desc_t ze_context_power_saving_hint_exp_desc_t; -+//typedef struct _ze_context_power_saving_hint_exp_desc_t ze_context_power_saving_hint_exp_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_eu_count_ext_t --typedef struct _ze_eu_count_ext_t ze_eu_count_ext_t; -+//typedef struct _ze_eu_count_ext_t ze_eu_count_ext_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_pci_address_ext_t --typedef struct _ze_pci_address_ext_t ze_pci_address_ext_t; -+//typedef struct _ze_pci_address_ext_t ze_pci_address_ext_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_pci_speed_ext_t --typedef struct _ze_pci_speed_ext_t ze_pci_speed_ext_t; -+//typedef struct _ze_pci_speed_ext_t ze_pci_speed_ext_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_pci_ext_properties_t --typedef struct _ze_pci_ext_properties_t ze_pci_ext_properties_t; -+//typedef struct _ze_pci_ext_properties_t ze_pci_ext_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_srgb_ext_desc_t --typedef struct _ze_srgb_ext_desc_t ze_srgb_ext_desc_t; -+//typedef struct _ze_srgb_ext_desc_t ze_srgb_ext_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_image_allocation_ext_properties_t --typedef struct _ze_image_allocation_ext_properties_t ze_image_allocation_ext_properties_t; -+//typedef struct _ze_image_allocation_ext_properties_t ze_image_allocation_ext_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_linkage_inspection_ext_desc_t --typedef struct _ze_linkage_inspection_ext_desc_t ze_linkage_inspection_ext_desc_t; -+//typedef struct _ze_linkage_inspection_ext_desc_t ze_linkage_inspection_ext_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_memory_compression_hints_ext_desc_t --typedef struct _ze_memory_compression_hints_ext_desc_t ze_memory_compression_hints_ext_desc_t; -+//typedef struct _ze_memory_compression_hints_ext_desc_t ze_memory_compression_hints_ext_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_driver_memory_free_ext_properties_t --typedef struct _ze_driver_memory_free_ext_properties_t ze_driver_memory_free_ext_properties_t; -+//typedef struct _ze_driver_memory_free_ext_properties_t ze_driver_memory_free_ext_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_memory_free_ext_desc_t --typedef struct _ze_memory_free_ext_desc_t ze_memory_free_ext_desc_t; -+//typedef struct _ze_memory_free_ext_desc_t ze_memory_free_ext_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_device_p2p_bandwidth_exp_properties_t --typedef struct _ze_device_p2p_bandwidth_exp_properties_t ze_device_p2p_bandwidth_exp_properties_t; -+//typedef struct _ze_device_p2p_bandwidth_exp_properties_t ze_device_p2p_bandwidth_exp_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_copy_bandwidth_exp_properties_t --typedef struct _ze_copy_bandwidth_exp_properties_t ze_copy_bandwidth_exp_properties_t; -+//typedef struct _ze_copy_bandwidth_exp_properties_t ze_copy_bandwidth_exp_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_device_luid_ext_t --typedef struct _ze_device_luid_ext_t ze_device_luid_ext_t; -+//typedef struct _ze_device_luid_ext_t ze_device_luid_ext_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_device_luid_ext_properties_t --typedef struct _ze_device_luid_ext_properties_t ze_device_luid_ext_properties_t; -+//typedef struct _ze_device_luid_ext_properties_t ze_device_luid_ext_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_fabric_vertex_pci_exp_address_t --typedef struct _ze_fabric_vertex_pci_exp_address_t ze_fabric_vertex_pci_exp_address_t; -+//typedef struct _ze_fabric_vertex_pci_exp_address_t ze_fabric_vertex_pci_exp_address_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_fabric_vertex_exp_properties_t --typedef struct _ze_fabric_vertex_exp_properties_t ze_fabric_vertex_exp_properties_t; -+//typedef struct _ze_fabric_vertex_exp_properties_t ze_fabric_vertex_exp_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_fabric_edge_exp_properties_t --typedef struct _ze_fabric_edge_exp_properties_t ze_fabric_edge_exp_properties_t; -+//typedef struct _ze_fabric_edge_exp_properties_t ze_fabric_edge_exp_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_device_memory_ext_properties_t --typedef struct _ze_device_memory_ext_properties_t ze_device_memory_ext_properties_t; -+//typedef struct _ze_device_memory_ext_properties_t ze_device_memory_ext_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_device_ip_version_ext_t --typedef struct _ze_device_ip_version_ext_t ze_device_ip_version_ext_t; -+//typedef struct _ze_device_ip_version_ext_t ze_device_ip_version_ext_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_kernel_max_group_size_properties_ext_t --typedef struct _ze_kernel_max_group_size_properties_ext_t ze_kernel_max_group_size_properties_ext_t; -+//typedef struct _ze_kernel_max_group_size_properties_ext_t ze_kernel_max_group_size_properties_ext_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_sub_allocation_t --typedef struct _ze_sub_allocation_t ze_sub_allocation_t; -+//typedef struct _ze_sub_allocation_t ze_sub_allocation_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_memory_sub_allocations_exp_properties_t --typedef struct _ze_memory_sub_allocations_exp_properties_t ze_memory_sub_allocations_exp_properties_t; -+//typedef struct _ze_memory_sub_allocations_exp_properties_t ze_memory_sub_allocations_exp_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_event_query_kernel_timestamps_ext_properties_t --typedef struct _ze_event_query_kernel_timestamps_ext_properties_t ze_event_query_kernel_timestamps_ext_properties_t; -+//typedef struct _ze_event_query_kernel_timestamps_ext_properties_t ze_event_query_kernel_timestamps_ext_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_synchronized_timestamp_data_ext_t --typedef struct _ze_synchronized_timestamp_data_ext_t ze_synchronized_timestamp_data_ext_t; -+//typedef struct _ze_synchronized_timestamp_data_ext_t ze_synchronized_timestamp_data_ext_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_synchronized_timestamp_result_ext_t --typedef struct _ze_synchronized_timestamp_result_ext_t ze_synchronized_timestamp_result_ext_t; -+//typedef struct _ze_synchronized_timestamp_result_ext_t ze_synchronized_timestamp_result_ext_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_event_query_kernel_timestamps_results_ext_properties_t --typedef struct _ze_event_query_kernel_timestamps_results_ext_properties_t ze_event_query_kernel_timestamps_results_ext_properties_t; -+//typedef struct _ze_event_query_kernel_timestamps_results_ext_properties_t ze_event_query_kernel_timestamps_results_ext_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_rtas_builder_exp_desc_t --typedef struct _ze_rtas_builder_exp_desc_t ze_rtas_builder_exp_desc_t; -+//typedef struct _ze_rtas_builder_exp_desc_t ze_rtas_builder_exp_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_rtas_builder_exp_properties_t --typedef struct _ze_rtas_builder_exp_properties_t ze_rtas_builder_exp_properties_t; -+//typedef struct _ze_rtas_builder_exp_properties_t ze_rtas_builder_exp_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_rtas_parallel_operation_exp_properties_t --typedef struct _ze_rtas_parallel_operation_exp_properties_t ze_rtas_parallel_operation_exp_properties_t; -+//typedef struct _ze_rtas_parallel_operation_exp_properties_t ze_rtas_parallel_operation_exp_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_rtas_device_exp_properties_t --typedef struct _ze_rtas_device_exp_properties_t ze_rtas_device_exp_properties_t; -+//typedef struct _ze_rtas_device_exp_properties_t ze_rtas_device_exp_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_rtas_float3_exp_t --typedef struct _ze_rtas_float3_exp_t ze_rtas_float3_exp_t; -+//typedef struct _ze_rtas_float3_exp_t ze_rtas_float3_exp_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_rtas_transform_float3x4_column_major_exp_t --typedef struct _ze_rtas_transform_float3x4_column_major_exp_t ze_rtas_transform_float3x4_column_major_exp_t; -+//typedef struct _ze_rtas_transform_float3x4_column_major_exp_t ze_rtas_transform_float3x4_column_major_exp_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_rtas_transform_float3x4_aligned_column_major_exp_t --typedef struct _ze_rtas_transform_float3x4_aligned_column_major_exp_t ze_rtas_transform_float3x4_aligned_column_major_exp_t; -+//typedef struct _ze_rtas_transform_float3x4_aligned_column_major_exp_t ze_rtas_transform_float3x4_aligned_column_major_exp_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_rtas_transform_float3x4_row_major_exp_t --typedef struct _ze_rtas_transform_float3x4_row_major_exp_t ze_rtas_transform_float3x4_row_major_exp_t; -+//typedef struct _ze_rtas_transform_float3x4_row_major_exp_t ze_rtas_transform_float3x4_row_major_exp_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_rtas_aabb_exp_t --typedef struct _ze_rtas_aabb_exp_t ze_rtas_aabb_exp_t; -+//typedef struct _ze_rtas_aabb_exp_t ze_rtas_aabb_exp_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_rtas_triangle_indices_uint32_exp_t --typedef struct _ze_rtas_triangle_indices_uint32_exp_t ze_rtas_triangle_indices_uint32_exp_t; -+//typedef struct _ze_rtas_triangle_indices_uint32_exp_t ze_rtas_triangle_indices_uint32_exp_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_rtas_quad_indices_uint32_exp_t --typedef struct _ze_rtas_quad_indices_uint32_exp_t ze_rtas_quad_indices_uint32_exp_t; -+//typedef struct _ze_rtas_quad_indices_uint32_exp_t ze_rtas_quad_indices_uint32_exp_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_rtas_builder_geometry_info_exp_t --typedef struct _ze_rtas_builder_geometry_info_exp_t ze_rtas_builder_geometry_info_exp_t; -+//typedef struct _ze_rtas_builder_geometry_info_exp_t ze_rtas_builder_geometry_info_exp_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_rtas_builder_triangles_geometry_info_exp_t --typedef struct _ze_rtas_builder_triangles_geometry_info_exp_t ze_rtas_builder_triangles_geometry_info_exp_t; -+//typedef struct _ze_rtas_builder_triangles_geometry_info_exp_t ze_rtas_builder_triangles_geometry_info_exp_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_rtas_builder_quads_geometry_info_exp_t --typedef struct _ze_rtas_builder_quads_geometry_info_exp_t ze_rtas_builder_quads_geometry_info_exp_t; -+//typedef struct _ze_rtas_builder_quads_geometry_info_exp_t ze_rtas_builder_quads_geometry_info_exp_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_rtas_geometry_aabbs_exp_cb_params_t --typedef struct _ze_rtas_geometry_aabbs_exp_cb_params_t ze_rtas_geometry_aabbs_exp_cb_params_t; -+//typedef struct _ze_rtas_geometry_aabbs_exp_cb_params_t ze_rtas_geometry_aabbs_exp_cb_params_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_rtas_builder_procedural_geometry_info_exp_t --typedef struct _ze_rtas_builder_procedural_geometry_info_exp_t ze_rtas_builder_procedural_geometry_info_exp_t; -+//typedef struct _ze_rtas_builder_procedural_geometry_info_exp_t ze_rtas_builder_procedural_geometry_info_exp_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_rtas_builder_instance_geometry_info_exp_t --typedef struct _ze_rtas_builder_instance_geometry_info_exp_t ze_rtas_builder_instance_geometry_info_exp_t; -+//typedef struct _ze_rtas_builder_instance_geometry_info_exp_t ze_rtas_builder_instance_geometry_info_exp_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_rtas_builder_build_op_exp_desc_t --typedef struct _ze_rtas_builder_build_op_exp_desc_t ze_rtas_builder_build_op_exp_desc_t; -+//typedef struct _ze_rtas_builder_build_op_exp_desc_t ze_rtas_builder_build_op_exp_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_event_pool_counter_based_exp_desc_t --typedef struct _ze_event_pool_counter_based_exp_desc_t ze_event_pool_counter_based_exp_desc_t; -+//typedef struct _ze_event_pool_counter_based_exp_desc_t ze_event_pool_counter_based_exp_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_image_bindless_exp_desc_t --typedef struct _ze_image_bindless_exp_desc_t ze_image_bindless_exp_desc_t; -+//typedef struct _ze_image_bindless_exp_desc_t ze_image_bindless_exp_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_image_pitched_exp_desc_t --typedef struct _ze_image_pitched_exp_desc_t ze_image_pitched_exp_desc_t; -+//typedef struct _ze_image_pitched_exp_desc_t ze_image_pitched_exp_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_device_pitched_alloc_exp_properties_t --typedef struct _ze_device_pitched_alloc_exp_properties_t ze_device_pitched_alloc_exp_properties_t; -+//typedef struct _ze_device_pitched_alloc_exp_properties_t ze_device_pitched_alloc_exp_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_mutable_command_id_exp_desc_t --typedef struct _ze_mutable_command_id_exp_desc_t ze_mutable_command_id_exp_desc_t; -+//typedef struct _ze_mutable_command_id_exp_desc_t ze_mutable_command_id_exp_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_mutable_command_list_exp_properties_t --typedef struct _ze_mutable_command_list_exp_properties_t ze_mutable_command_list_exp_properties_t; -+//typedef struct _ze_mutable_command_list_exp_properties_t ze_mutable_command_list_exp_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_mutable_command_list_exp_desc_t --typedef struct _ze_mutable_command_list_exp_desc_t ze_mutable_command_list_exp_desc_t; -+//typedef struct _ze_mutable_command_list_exp_desc_t ze_mutable_command_list_exp_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_mutable_commands_exp_desc_t --typedef struct _ze_mutable_commands_exp_desc_t ze_mutable_commands_exp_desc_t; -+//typedef struct _ze_mutable_commands_exp_desc_t ze_mutable_commands_exp_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_mutable_kernel_argument_exp_desc_t --typedef struct _ze_mutable_kernel_argument_exp_desc_t ze_mutable_kernel_argument_exp_desc_t; -+//typedef struct _ze_mutable_kernel_argument_exp_desc_t ze_mutable_kernel_argument_exp_desc_t; +diff -u4 -r --new-file include/cuda.h modified_include/cuda.h +--- include/layers/zel_tracing_register_cb.h 2026-02-27 16:26:19.000000000 +0000 ++++ modified_include/layers/zel_tracing_register_cb.h 2026-02-27 16:30:52.000000000 +0000 +@@ -2727,8 +2727,9 @@ + /// allowing the callback the ability to modify the parameter's value - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_mutable_group_count_exp_desc_t --typedef struct _ze_mutable_group_count_exp_desc_t ze_mutable_group_count_exp_desc_t; -+//typedef struct _ze_mutable_group_count_exp_desc_t ze_mutable_group_count_exp_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_mutable_group_size_exp_desc_t --typedef struct _ze_mutable_group_size_exp_desc_t ze_mutable_group_size_exp_desc_t; -+//typedef struct _ze_mutable_group_size_exp_desc_t ze_mutable_group_size_exp_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare ze_mutable_global_offset_exp_desc_t --typedef struct _ze_mutable_global_offset_exp_desc_t ze_mutable_global_offset_exp_desc_t; -+//typedef struct _ze_mutable_global_offset_exp_desc_t ze_mutable_global_offset_exp_desc_t; - - - #if !defined(__GNUC__) - #pragma endregion -@@ -7547,14 +7549,14 @@ - /////////////////////////////////////////////////////////////////////////////// - /// @brief Cache Reservation Region - typedef enum _ze_cache_ext_region_t + typedef struct _zer_get_default_context_params_t { -- ZE_CACHE_EXT_REGION_ZE_CACHE_REGION_DEFAULT = 0, ///< [DEPRECATED] utilize driver default scheme. Use -- ///< ::ZE_CACHE_EXT_REGION_DEFAULT. -- ZE_CACHE_EXT_REGION_ZE_CACHE_RESERVE_REGION = 1, ///< [DEPRECATED] utilize reserved region. Use -- ///< ::ZE_CACHE_EXT_REGION_RESERVED. -- ZE_CACHE_EXT_REGION_ZE_CACHE_NON_RESERVED_REGION = 2, ///< [DEPRECATED] utilize non-reserverd region. Use -- ///< ::ZE_CACHE_EXT_REGION_NON_RESERVED. -+// ZE_CACHE_EXT_REGION_ZE_CACHE_REGION_DEFAULT = 0, ///< [DEPRECATED] utilize driver default scheme. Use -+// ///< ::ZE_CACHE_EXT_REGION_DEFAULT. -+// ZE_CACHE_EXT_REGION_ZE_CACHE_RESERVE_REGION = 1, ///< [DEPRECATED] utilize reserved region. Use -+// ///< ::ZE_CACHE_EXT_REGION_RESERVED. -+// ZE_CACHE_EXT_REGION_ZE_CACHE_NON_RESERVED_REGION = 2, ///< [DEPRECATED] utilize non-reserverd region. Use -+// ///< ::ZE_CACHE_EXT_REGION_NON_RESERVED. - ZE_CACHE_EXT_REGION_DEFAULT = 0, ///< utilize driver default scheme - ZE_CACHE_EXT_REGION_RESERVED = 1, ///< utilize reserved region - ZE_CACHE_EXT_REGION_NON_RESERVED = 2, ///< utilize non-reserverd region - ZE_CACHE_EXT_REGION_FORCE_UINT32 = 0x7fffffff -diff -u4 -r --new-file include/zes_api.h modified_include/zes_api.h ---- include/zes_api.h 2024-04-02 18:12:14.546658929 -0500 -+++ modified_include/zes_api.h 2024-04-02 18:28:43.360746334 -0500 -@@ -212,341 +212,341 @@ - } zes_base_capability_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_base_properties_t --typedef struct _zes_base_properties_t zes_base_properties_t; -+//typedef struct _zes_base_properties_t zes_base_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_base_desc_t --typedef struct _zes_base_desc_t zes_base_desc_t; -+//typedef struct _zes_base_desc_t zes_base_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_base_state_t --typedef struct _zes_base_state_t zes_base_state_t; -+//typedef struct _zes_base_state_t zes_base_state_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_base_config_t --typedef struct _zes_base_config_t zes_base_config_t; -+//typedef struct _zes_base_config_t zes_base_config_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_base_capability_t --typedef struct _zes_base_capability_t zes_base_capability_t; -+//typedef struct _zes_base_capability_t zes_base_capability_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_driver_extension_properties_t --typedef struct _zes_driver_extension_properties_t zes_driver_extension_properties_t; -+//typedef struct _zes_driver_extension_properties_t zes_driver_extension_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_device_state_t --typedef struct _zes_device_state_t zes_device_state_t; -+//typedef struct _zes_device_state_t zes_device_state_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_reset_properties_t --typedef struct _zes_reset_properties_t zes_reset_properties_t; -+//typedef struct _zes_reset_properties_t zes_reset_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_uuid_t --typedef struct _zes_uuid_t zes_uuid_t; -+//typedef struct _zes_uuid_t zes_uuid_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_device_properties_t --typedef struct _zes_device_properties_t zes_device_properties_t; -+//typedef struct _zes_device_properties_t zes_device_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_device_ext_properties_t --typedef struct _zes_device_ext_properties_t zes_device_ext_properties_t; -+//typedef struct _zes_device_ext_properties_t zes_device_ext_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_process_state_t --typedef struct _zes_process_state_t zes_process_state_t; -+//typedef struct _zes_process_state_t zes_process_state_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_pci_address_t --typedef struct _zes_pci_address_t zes_pci_address_t; -+//typedef struct _zes_pci_address_t zes_pci_address_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_pci_speed_t --typedef struct _zes_pci_speed_t zes_pci_speed_t; -+//typedef struct _zes_pci_speed_t zes_pci_speed_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_pci_properties_t --typedef struct _zes_pci_properties_t zes_pci_properties_t; -+//typedef struct _zes_pci_properties_t zes_pci_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_pci_state_t --typedef struct _zes_pci_state_t zes_pci_state_t; -+//typedef struct _zes_pci_state_t zes_pci_state_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_pci_bar_properties_t --typedef struct _zes_pci_bar_properties_t zes_pci_bar_properties_t; -+//typedef struct _zes_pci_bar_properties_t zes_pci_bar_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_pci_bar_properties_1_2_t --typedef struct _zes_pci_bar_properties_1_2_t zes_pci_bar_properties_1_2_t; -+//typedef struct _zes_pci_bar_properties_1_2_t zes_pci_bar_properties_1_2_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_pci_stats_t --typedef struct _zes_pci_stats_t zes_pci_stats_t; -+//typedef struct _zes_pci_stats_t zes_pci_stats_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_overclock_properties_t --typedef struct _zes_overclock_properties_t zes_overclock_properties_t; -+//typedef struct _zes_overclock_properties_t zes_overclock_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_control_property_t --typedef struct _zes_control_property_t zes_control_property_t; -+//typedef struct _zes_control_property_t zes_control_property_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_vf_property_t --typedef struct _zes_vf_property_t zes_vf_property_t; -+//typedef struct _zes_vf_property_t zes_vf_property_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_diag_test_t --typedef struct _zes_diag_test_t zes_diag_test_t; -+//typedef struct _zes_diag_test_t zes_diag_test_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_diag_properties_t --typedef struct _zes_diag_properties_t zes_diag_properties_t; -+//typedef struct _zes_diag_properties_t zes_diag_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_device_ecc_desc_t --typedef struct _zes_device_ecc_desc_t zes_device_ecc_desc_t; -+//typedef struct _zes_device_ecc_desc_t zes_device_ecc_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_device_ecc_properties_t --typedef struct _zes_device_ecc_properties_t zes_device_ecc_properties_t; -+//typedef struct _zes_device_ecc_properties_t zes_device_ecc_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_engine_properties_t --typedef struct _zes_engine_properties_t zes_engine_properties_t; -+//typedef struct _zes_engine_properties_t zes_engine_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_engine_stats_t --typedef struct _zes_engine_stats_t zes_engine_stats_t; -+//typedef struct _zes_engine_stats_t zes_engine_stats_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_fabric_port_id_t --typedef struct _zes_fabric_port_id_t zes_fabric_port_id_t; -+//typedef struct _zes_fabric_port_id_t zes_fabric_port_id_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_fabric_port_speed_t --typedef struct _zes_fabric_port_speed_t zes_fabric_port_speed_t; -+//typedef struct _zes_fabric_port_speed_t zes_fabric_port_speed_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_fabric_port_properties_t --typedef struct _zes_fabric_port_properties_t zes_fabric_port_properties_t; -+//typedef struct _zes_fabric_port_properties_t zes_fabric_port_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_fabric_link_type_t --typedef struct _zes_fabric_link_type_t zes_fabric_link_type_t; -+//typedef struct _zes_fabric_link_type_t zes_fabric_link_type_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_fabric_port_config_t --typedef struct _zes_fabric_port_config_t zes_fabric_port_config_t; -+//typedef struct _zes_fabric_port_config_t zes_fabric_port_config_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_fabric_port_state_t --typedef struct _zes_fabric_port_state_t zes_fabric_port_state_t; -+//typedef struct _zes_fabric_port_state_t zes_fabric_port_state_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_fabric_port_throughput_t --typedef struct _zes_fabric_port_throughput_t zes_fabric_port_throughput_t; -+//typedef struct _zes_fabric_port_throughput_t zes_fabric_port_throughput_t; ++ uint8_t _dummy; // padding to ensure ABI compatibility between C and C++ + } zer_get_default_context_params_t; - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_fabric_port_error_counters_t --typedef struct _zes_fabric_port_error_counters_t zes_fabric_port_error_counters_t; -+//typedef struct _zes_fabric_port_error_counters_t zes_fabric_port_error_counters_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_fan_speed_t --typedef struct _zes_fan_speed_t zes_fan_speed_t; -+//typedef struct _zes_fan_speed_t zes_fan_speed_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_fan_temp_speed_t --typedef struct _zes_fan_temp_speed_t zes_fan_temp_speed_t; -+//typedef struct _zes_fan_temp_speed_t zes_fan_temp_speed_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_fan_speed_table_t --typedef struct _zes_fan_speed_table_t zes_fan_speed_table_t; -+//typedef struct _zes_fan_speed_table_t zes_fan_speed_table_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_fan_properties_t --typedef struct _zes_fan_properties_t zes_fan_properties_t; -+//typedef struct _zes_fan_properties_t zes_fan_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_fan_config_t --typedef struct _zes_fan_config_t zes_fan_config_t; -+//typedef struct _zes_fan_config_t zes_fan_config_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_firmware_properties_t --typedef struct _zes_firmware_properties_t zes_firmware_properties_t; -+//typedef struct _zes_firmware_properties_t zes_firmware_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_freq_properties_t --typedef struct _zes_freq_properties_t zes_freq_properties_t; -+//typedef struct _zes_freq_properties_t zes_freq_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_freq_range_t --typedef struct _zes_freq_range_t zes_freq_range_t; -+//typedef struct _zes_freq_range_t zes_freq_range_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_freq_state_t --typedef struct _zes_freq_state_t zes_freq_state_t; -+//typedef struct _zes_freq_state_t zes_freq_state_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_freq_throttle_time_t --typedef struct _zes_freq_throttle_time_t zes_freq_throttle_time_t; -+//typedef struct _zes_freq_throttle_time_t zes_freq_throttle_time_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_oc_capabilities_t --typedef struct _zes_oc_capabilities_t zes_oc_capabilities_t; -+//typedef struct _zes_oc_capabilities_t zes_oc_capabilities_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_led_properties_t --typedef struct _zes_led_properties_t zes_led_properties_t; -+//typedef struct _zes_led_properties_t zes_led_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_led_color_t --typedef struct _zes_led_color_t zes_led_color_t; -+//typedef struct _zes_led_color_t zes_led_color_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_led_state_t --typedef struct _zes_led_state_t zes_led_state_t; -+//typedef struct _zes_led_state_t zes_led_state_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_mem_properties_t --typedef struct _zes_mem_properties_t zes_mem_properties_t; -+//typedef struct _zes_mem_properties_t zes_mem_properties_t; /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_mem_state_t --typedef struct _zes_mem_state_t zes_mem_state_t; -+//typedef struct _zes_mem_state_t zes_mem_state_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_mem_bandwidth_t --typedef struct _zes_mem_bandwidth_t zes_mem_bandwidth_t; -+//typedef struct _zes_mem_bandwidth_t zes_mem_bandwidth_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_mem_ext_bandwidth_t --typedef struct _zes_mem_ext_bandwidth_t zes_mem_ext_bandwidth_t; -+//typedef struct _zes_mem_ext_bandwidth_t zes_mem_ext_bandwidth_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_perf_properties_t --typedef struct _zes_perf_properties_t zes_perf_properties_t; -+//typedef struct _zes_perf_properties_t zes_perf_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_power_properties_t --typedef struct _zes_power_properties_t zes_power_properties_t; -+//typedef struct _zes_power_properties_t zes_power_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_power_energy_counter_t --typedef struct _zes_power_energy_counter_t zes_power_energy_counter_t; -+//typedef struct _zes_power_energy_counter_t zes_power_energy_counter_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_power_sustained_limit_t --typedef struct _zes_power_sustained_limit_t zes_power_sustained_limit_t; -+//typedef struct _zes_power_sustained_limit_t zes_power_sustained_limit_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_power_burst_limit_t --typedef struct _zes_power_burst_limit_t zes_power_burst_limit_t; -+//typedef struct _zes_power_burst_limit_t zes_power_burst_limit_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_power_peak_limit_t --typedef struct _zes_power_peak_limit_t zes_power_peak_limit_t; -+//typedef struct _zes_power_peak_limit_t zes_power_peak_limit_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_energy_threshold_t --typedef struct _zes_energy_threshold_t zes_energy_threshold_t; -+//typedef struct _zes_energy_threshold_t zes_energy_threshold_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_psu_properties_t --typedef struct _zes_psu_properties_t zes_psu_properties_t; -+//typedef struct _zes_psu_properties_t zes_psu_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_psu_state_t --typedef struct _zes_psu_state_t zes_psu_state_t; -+//typedef struct _zes_psu_state_t zes_psu_state_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_ras_properties_t --typedef struct _zes_ras_properties_t zes_ras_properties_t; -+//typedef struct _zes_ras_properties_t zes_ras_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_ras_state_t --typedef struct _zes_ras_state_t zes_ras_state_t; -+//typedef struct _zes_ras_state_t zes_ras_state_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_ras_config_t --typedef struct _zes_ras_config_t zes_ras_config_t; -+//typedef struct _zes_ras_config_t zes_ras_config_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_sched_properties_t --typedef struct _zes_sched_properties_t zes_sched_properties_t; -+//typedef struct _zes_sched_properties_t zes_sched_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_sched_timeout_properties_t --typedef struct _zes_sched_timeout_properties_t zes_sched_timeout_properties_t; -+//typedef struct _zes_sched_timeout_properties_t zes_sched_timeout_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_sched_timeslice_properties_t --typedef struct _zes_sched_timeslice_properties_t zes_sched_timeslice_properties_t; -+//typedef struct _zes_sched_timeslice_properties_t zes_sched_timeslice_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_standby_properties_t --typedef struct _zes_standby_properties_t zes_standby_properties_t; -+//typedef struct _zes_standby_properties_t zes_standby_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_temp_properties_t --typedef struct _zes_temp_properties_t zes_temp_properties_t; -+//typedef struct _zes_temp_properties_t zes_temp_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_temp_threshold_t --typedef struct _zes_temp_threshold_t zes_temp_threshold_t; -+//typedef struct _zes_temp_threshold_t zes_temp_threshold_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_temp_config_t --typedef struct _zes_temp_config_t zes_temp_config_t; -+//typedef struct _zes_temp_config_t zes_temp_config_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_power_limit_ext_desc_t --typedef struct _zes_power_limit_ext_desc_t zes_power_limit_ext_desc_t; -+//typedef struct _zes_power_limit_ext_desc_t zes_power_limit_ext_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_power_ext_properties_t --typedef struct _zes_power_ext_properties_t zes_power_ext_properties_t; -+//typedef struct _zes_power_ext_properties_t zes_power_ext_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_engine_ext_properties_t --typedef struct _zes_engine_ext_properties_t zes_engine_ext_properties_t; -+//typedef struct _zes_engine_ext_properties_t zes_engine_ext_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_ras_state_exp_t --typedef struct _zes_ras_state_exp_t zes_ras_state_exp_t; -+//typedef struct _zes_ras_state_exp_t zes_ras_state_exp_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_mem_page_offline_state_exp_t --typedef struct _zes_mem_page_offline_state_exp_t zes_mem_page_offline_state_exp_t; -+//typedef struct _zes_mem_page_offline_state_exp_t zes_mem_page_offline_state_exp_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_mem_bandwidth_counter_bits_exp_properties_t --typedef struct _zes_mem_bandwidth_counter_bits_exp_properties_t zes_mem_bandwidth_counter_bits_exp_properties_t; -+//typedef struct _zes_mem_bandwidth_counter_bits_exp_properties_t zes_mem_bandwidth_counter_bits_exp_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_power_domain_exp_properties_t --typedef struct _zes_power_domain_exp_properties_t zes_power_domain_exp_properties_t; -+//typedef struct _zes_power_domain_exp_properties_t zes_power_domain_exp_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_subdevice_exp_properties_t --typedef struct _zes_subdevice_exp_properties_t zes_subdevice_exp_properties_t; -+//typedef struct _zes_subdevice_exp_properties_t zes_subdevice_exp_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_vf_exp_properties_t --typedef struct _zes_vf_exp_properties_t zes_vf_exp_properties_t; -+//typedef struct _zes_vf_exp_properties_t zes_vf_exp_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_vf_util_mem_exp_t --typedef struct _zes_vf_util_mem_exp_t zes_vf_util_mem_exp_t; -+//typedef struct _zes_vf_util_mem_exp_t zes_vf_util_mem_exp_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zes_vf_util_engine_exp_t --typedef struct _zes_vf_util_engine_exp_t zes_vf_util_engine_exp_t; -+//typedef struct _zes_vf_util_engine_exp_t zes_vf_util_engine_exp_t; - - - #if !defined(__GNUC__) - #pragma endregion -diff -u4 -r --new-file include/zet_api.h modified_include/zet_api.h ---- include/zet_api.h 2024-04-02 10:39:40.588915290 -0500 -+++ modified_include/zet_api.h 2024-04-02 13:06:28.056000505 -0500 -@@ -88,14 +88,14 @@ - ZET_STRUCTURE_TYPE_PROFILE_PROPERTIES = 0x5, ///< ::zet_profile_properties_t - ZET_STRUCTURE_TYPE_DEVICE_DEBUG_PROPERTIES = 0x6, ///< ::zet_device_debug_properties_t - ZET_STRUCTURE_TYPE_DEBUG_MEMORY_SPACE_DESC = 0x7, ///< ::zet_debug_memory_space_desc_t - ZET_STRUCTURE_TYPE_DEBUG_REGSET_PROPERTIES = 0x8, ///< ::zet_debug_regset_properties_t -- ZET_STRUCTURE_TYPE_GLOBAL_METRICS_TIMESTAMPS_EXP_PROPERTIES = 0x9, ///< ::zet_metric_global_timestamps_resolution_exp_t. Deprecated, use -- ///< ::ZET_STRUCTURE_TYPE_METRIC_GLOBAL_TIMESTAMPS_RESOLUTION_EXP. -+// ZET_STRUCTURE_TYPE_GLOBAL_METRICS_TIMESTAMPS_EXP_PROPERTIES = 0x9, ///< ::zet_metric_global_timestamps_resolution_exp_t. Deprecated, use -+// ///< ::ZET_STRUCTURE_TYPE_METRIC_GLOBAL_TIMESTAMPS_RESOLUTION_EXP. - ZET_STRUCTURE_TYPE_METRIC_GLOBAL_TIMESTAMPS_RESOLUTION_EXP = 0x9, ///< ::zet_metric_global_timestamps_resolution_exp_t - ZET_STRUCTURE_TYPE_TRACER_EXP_DESC = 0x00010001, ///< ::zet_tracer_exp_desc_t -- ZET_STRUCTURE_TYPE_METRICS_CALCULATE_EXP_DESC = 0x00010002, ///< ::zet_metric_calculate_exp_desc_t. Deprecated, use -- ///< ::ZET_STRUCTURE_TYPE_METRIC_CALCULATE_EXP_DESC. -+// ZET_STRUCTURE_TYPE_METRICS_CALCULATE_EXP_DESC = 0x00010002, ///< ::zet_metric_calculate_exp_desc_t. Deprecated, use -+// ///< ::ZET_STRUCTURE_TYPE_METRIC_CALCULATE_EXP_DESC. - ZET_STRUCTURE_TYPE_METRIC_CALCULATE_EXP_DESC = 0x00010002, ///< ::zet_metric_calculate_exp_desc_t - ZET_STRUCTURE_TYPE_METRIC_PROGRAMMABLE_EXP_PROPERTIES = 0x00010003, ///< ::zet_metric_programmable_exp_properties_t - ZET_STRUCTURE_TYPE_METRIC_PROGRAMMABLE_PARAM_INFO_EXP = 0x00010004, ///< ::zet_metric_programmable_param_info_exp_t - ZET_STRUCTURE_TYPE_METRIC_PROGRAMMABLE_PARAM_VALUE_INFO_EXP = 0x00010005, ///< ::zet_metric_programmable_param_value_info_exp_t -@@ -171,113 +171,113 @@ - /// @brief Enables driver instrumentation and dependencies for program debugging - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_base_properties_t --typedef struct _zet_base_properties_t zet_base_properties_t; -+//typedef struct _zet_base_properties_t zet_base_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_base_desc_t --typedef struct _zet_base_desc_t zet_base_desc_t; -+//typedef struct _zet_base_desc_t zet_base_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_typed_value_t --typedef struct _zet_typed_value_t zet_typed_value_t; -+//typedef struct _zet_typed_value_t zet_typed_value_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_device_debug_properties_t --typedef struct _zet_device_debug_properties_t zet_device_debug_properties_t; -+//typedef struct _zet_device_debug_properties_t zet_device_debug_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_debug_config_t --typedef struct _zet_debug_config_t zet_debug_config_t; -+//typedef struct _zet_debug_config_t zet_debug_config_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_debug_event_info_detached_t --typedef struct _zet_debug_event_info_detached_t zet_debug_event_info_detached_t; -+//typedef struct _zet_debug_event_info_detached_t zet_debug_event_info_detached_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_debug_event_info_module_t --typedef struct _zet_debug_event_info_module_t zet_debug_event_info_module_t; -+//typedef struct _zet_debug_event_info_module_t zet_debug_event_info_module_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_debug_event_info_thread_stopped_t --typedef struct _zet_debug_event_info_thread_stopped_t zet_debug_event_info_thread_stopped_t; -+//typedef struct _zet_debug_event_info_thread_stopped_t zet_debug_event_info_thread_stopped_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_debug_event_info_page_fault_t --typedef struct _zet_debug_event_info_page_fault_t zet_debug_event_info_page_fault_t; -+//typedef struct _zet_debug_event_info_page_fault_t zet_debug_event_info_page_fault_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_debug_event_t --typedef struct _zet_debug_event_t zet_debug_event_t; -+//typedef struct _zet_debug_event_t zet_debug_event_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_debug_memory_space_desc_t --typedef struct _zet_debug_memory_space_desc_t zet_debug_memory_space_desc_t; -+//typedef struct _zet_debug_memory_space_desc_t zet_debug_memory_space_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_debug_regset_properties_t --typedef struct _zet_debug_regset_properties_t zet_debug_regset_properties_t; -+//typedef struct _zet_debug_regset_properties_t zet_debug_regset_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_metric_group_properties_t --typedef struct _zet_metric_group_properties_t zet_metric_group_properties_t; -+//typedef struct _zet_metric_group_properties_t zet_metric_group_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_metric_properties_t --typedef struct _zet_metric_properties_t zet_metric_properties_t; -+//typedef struct _zet_metric_properties_t zet_metric_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_metric_streamer_desc_t --typedef struct _zet_metric_streamer_desc_t zet_metric_streamer_desc_t; -+//typedef struct _zet_metric_streamer_desc_t zet_metric_streamer_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_metric_query_pool_desc_t --typedef struct _zet_metric_query_pool_desc_t zet_metric_query_pool_desc_t; -+//typedef struct _zet_metric_query_pool_desc_t zet_metric_query_pool_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_profile_properties_t --typedef struct _zet_profile_properties_t zet_profile_properties_t; -+//typedef struct _zet_profile_properties_t zet_profile_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_profile_free_register_token_t --typedef struct _zet_profile_free_register_token_t zet_profile_free_register_token_t; -+//typedef struct _zet_profile_free_register_token_t zet_profile_free_register_token_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_profile_register_sequence_t --typedef struct _zet_profile_register_sequence_t zet_profile_register_sequence_t; -+//typedef struct _zet_profile_register_sequence_t zet_profile_register_sequence_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_tracer_exp_desc_t --typedef struct _zet_tracer_exp_desc_t zet_tracer_exp_desc_t; -+//typedef struct _zet_tracer_exp_desc_t zet_tracer_exp_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_metric_global_timestamps_resolution_exp_t --typedef struct _zet_metric_global_timestamps_resolution_exp_t zet_metric_global_timestamps_resolution_exp_t; -+//typedef struct _zet_metric_global_timestamps_resolution_exp_t zet_metric_global_timestamps_resolution_exp_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_metric_calculate_exp_desc_t --typedef struct _zet_metric_calculate_exp_desc_t zet_metric_calculate_exp_desc_t; -+//typedef struct _zet_metric_calculate_exp_desc_t zet_metric_calculate_exp_desc_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_metric_programmable_exp_properties_t --typedef struct _zet_metric_programmable_exp_properties_t zet_metric_programmable_exp_properties_t; -+//typedef struct _zet_metric_programmable_exp_properties_t zet_metric_programmable_exp_properties_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_value_uint64_range_exp_t --typedef struct _zet_value_uint64_range_exp_t zet_value_uint64_range_exp_t; -+//typedef struct _zet_value_uint64_range_exp_t zet_value_uint64_range_exp_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_metric_programmable_param_info_exp_t --typedef struct _zet_metric_programmable_param_info_exp_t zet_metric_programmable_param_info_exp_t; -+//typedef struct _zet_metric_programmable_param_info_exp_t zet_metric_programmable_param_info_exp_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_metric_programmable_param_value_info_exp_t --typedef struct _zet_metric_programmable_param_value_info_exp_t zet_metric_programmable_param_value_info_exp_t; -+//typedef struct _zet_metric_programmable_param_value_info_exp_t zet_metric_programmable_param_value_info_exp_t; - - /////////////////////////////////////////////////////////////////////////////// - /// @brief Forward-declare zet_metric_programmable_param_value_exp_t --typedef struct _zet_metric_programmable_param_value_exp_t zet_metric_programmable_param_value_exp_t; -+//typedef struct _zet_metric_programmable_param_value_exp_t zet_metric_programmable_param_value_exp_t; - - - #if !defined(__GNUC__) - #pragma endregion -@@ -986,10 +986,10 @@ - ZET_METRIC_TYPE_TIMESTAMP = 4, ///< Metric type: timestamp - ZET_METRIC_TYPE_FLAG = 5, ///< Metric type: flag - ZET_METRIC_TYPE_RATIO = 6, ///< Metric type: ratio - ZET_METRIC_TYPE_RAW = 7, ///< Metric type: raw -- ZET_METRIC_TYPE_IP_EXP = 0x7ffffffe, ///< Metric type: instruction pointer. Deprecated, use -- ///< ::ZET_METRIC_TYPE_IP. -+// ZET_METRIC_TYPE_IP_EXP = 0x7ffffffe, ///< Metric type: instruction pointer. Deprecated, use -+// ///< ::ZET_METRIC_TYPE_IP. - ZET_METRIC_TYPE_IP = 0x7ffffffe, ///< Metric type: instruction pointer - ZET_METRIC_TYPE_FORCE_UINT32 = 0x7fffffff - - } zet_metric_type_t; From 2c203e8c49c7740d56e6b6696d1a9df0747da163 Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Fri, 27 Feb 2026 17:02:19 +0000 Subject: [PATCH 05/30] Only support h2yaml now --- .github/workflows/presubmit.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index 68af3f1b1..f74cef496 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -40,14 +40,13 @@ jobs: name: Build and Check on ubuntu-24.04 with ${{ matrix.compilers }} strategy: matrix: - config-option: ["", "--disable-clang-parser"] compilers: ["CC=gcc CXX=g++", "CC=clang CXX=clang++ CFLAGS=\"-Wno-gnu-folding-constant\""] steps: - uses: actions/checkout@v6 - uses: ./.github/actions/setup-thapi - run: mkdir -p build - run: ./autogen.sh - - run: ../configure ${{ matrix.config-option }} ${{ matrix.compilers }} + - run: ../configure ${{ matrix.compilers }} working-directory: build - run: make working-directory: build From 71a8975b267a2ce87e285de92ec9a0ffd91d0782 Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Fri, 27 Feb 2026 19:38:33 +0000 Subject: [PATCH 06/30] iprof --- backends/ze/README.md | 9 +++++++++ backends/ze/gen_ze_library.rb | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/backends/ze/README.md b/backends/ze/README.md index 958ee1dfc..e3a33e534 100644 --- a/backends/ze/README.md +++ b/backends/ze/README.md @@ -53,3 +53,12 @@ tracer_ze.c:8456:20: error: unused function 'zelTracerResetAllCallbacks_hid' [-W | ^~~~~~~~~~~~~~~~~ ``` Need to modify the `$zel_commands.each` who generate `#{c.decl_hidden_alias};` in `gen_ze.rb` + +Run time error: When running babeltrace_thapi (`iprof -t`) +``` +ogrammableParamValueInfoExp>': uninitialized constant ZE::ZETMetricProgrammableParamValueInfoExp::ZET_MAX_METRIC_PROGRAMMABLE_VALUE_DESCRIPTION_EXP (NameError) + + :description, [ :char, ZET_MAX_METRIC_PROGRAMMABLE_VALUE_DESCRIPTION_EXP ] +``` +Update in `backends/ze/gen_ze_library.rb` Moduel ZE. +TODO: h2yaml should be able to find all the constant defined diff --git a/backends/ze/gen_ze_library.rb b/backends/ze/gen_ze_library.rb index 7ba1c2300..9df773d8b 100644 --- a/backends/ze/gen_ze_library.rb +++ b/backends/ze/gen_ze_library.rb @@ -77,6 +77,7 @@ module ZE ZET_MAX_METRIC_PROGRAMMABLE_COMPONENT_EXP = 128 ZET_MAX_METRIC_PROGRAMMABLE_PARAMETER_NAME_EXP = 128 ZET_MAX_VALUE_INFO_CSTRING_EXP = 128 + ZET_MAX_METRIC_PROGRAMMABLE_VALUE_DESCRIPTION_EXP = 128 ZEL_COMPONENT_STRING_SIZE = 64 extend FFI::Library @@ -260,7 +261,9 @@ def initialize(*args) EOF end -$all_types.each do |t| +# Sort types so that Enums/Bitmasks are processed first. +# Structs depend on Enums, so Enums must be defined before the Struct layout is generated. +$all_types.sort_by { |t| t.type.is_a?(YAMLCAst::Enum) ? 0 : 1 }.each do |t| if t.type.is_a? YAMLCAst::Enum enum = $all_enums.find { |e| t.type.name == e.name } print_enum(t.name, enum) From 53fb44816fcf5f12aa8d62ae20055a8275d23b95 Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Fri, 27 Feb 2026 20:11:08 +0000 Subject: [PATCH 07/30] Fix rubocopt --- backends/ze/gen_babeltrace_ze_model.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backends/ze/gen_babeltrace_ze_model.rb b/backends/ze/gen_babeltrace_ze_model.rb index 1447b0523..58393acbe 100644 --- a/backends/ze/gen_babeltrace_ze_model.rb +++ b/backends/ze/gen_babeltrace_ze_model.rb @@ -78,8 +78,8 @@ def gen_struct_event_bt_model(provider, struct) [:lttng_ust_zes_structs, get_structs_types(:zes, $zes_api['typedefs'], $zes_api['structs'])], [:lttng_ust_zel_structs, get_structs_types(:zel, $zel_api['typedefs'], $zel_api['structs'])], [:lttng_ust_zer_structs, get_structs_types(:zer, $zer_api['typedefs'], $zer_api['structs'])], - [:lttng_ust_zex_structs, get_structs_types(:zex, $zex_api['typedefs'], $zex_api['structs'])] - ].collect do |provider, structs| + [:lttng_ust_zex_structs, + get_structs_types(:zex, $zex_api['typedefs'], $zex_api['structs'])]].collect do |provider, structs| structs.collect do |struct| gen_struct_event_bt_model(provider, struct) end From ab82a129032a1771ff91cec98bbccc751b56f0a5 Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Fri, 27 Feb 2026 20:12:53 +0000 Subject: [PATCH 08/30] fix clang format --- .github/workflows/lint.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ee355b564..0cfc7d1e6 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -92,6 +92,8 @@ jobs: **.hpp **.c **.h + files_ignore: | + backends/**/include/ - name: Run clang-format if: steps.changed-cpp-files.outputs.any_changed == 'true' run: | From e554e3b77dbcbcdbfe655150119be6d81571a4c1 Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Fri, 27 Feb 2026 20:16:34 +0000 Subject: [PATCH 09/30] one line --- backends/ze/gen_ze.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/backends/ze/gen_ze.rb b/backends/ze/gen_ze.rb index a89595a05..1ec722ae9 100644 --- a/backends/ze/gen_ze.rb +++ b/backends/ze/gen_ze.rb @@ -243,9 +243,7 @@ def gen_struct_printer(namespace, types) } $ze_commands.each do |c| - if c.name.match(/zeGet.*ProcAddrTable/) || c.name.match(/zeLoaderInit/) || c.name.match(/^zel/) - next - end + next if c.name.match(/zeGet.*ProcAddrTable/) || c.name.match(/zeLoaderInit/) || c.name.match(/^zel/) puts <<~EOF #{c.decl_hidden_alias}; @@ -277,7 +275,6 @@ def gen_struct_printer(namespace, types) EOF end - $ze_commands.each do |c| normal_wrapper.call(c, :lttng_ust_ze, ze_struct_types) end From a7d1445d7af7d356ba35df9f49aee2910a4447c7 Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Fri, 27 Feb 2026 22:09:55 +0000 Subject: [PATCH 10/30] Fix Readme --- backends/ze/README.md | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/backends/ze/README.md b/backends/ze/README.md index e3a33e534..4b6a5b639 100644 --- a/backends/ze/README.md +++ b/backends/ze/README.md @@ -1,39 +1,33 @@ # Header Location -github.com/argonne-lcf/level-zero-spec/tree/ddi_ver - -### Note -Different from https://github.com/oneapi-src/level-zero/tree/v1.28.2/include +Standard: `https://github.com/argonne-lcf/level-zero-spec/tree/ddi_ver` +Loader: `https://github.com/oneapi-src/level-zero/tags` +Extension: `https://github.com/intel/compute-runtime/blob/master/level_zero/include/level_zero/driver_experimental/zex_api.h` # Step: -- Sync the fork with reach -- Sync the bran ddi_ver +- Sync the fork (`github.com/argonne-lcf/level-zero-spec`) with original remote +- Sync the branch `ddi_ver` + +Then we will build the header (assume `uv`). ``` git clone -b ddi_ver https://github.com/argonne-lcf/level-zero-spec.git cd level-zero-spec/scripts/ uv pip install -r third_party/requirements.txt cd script -``` -Get version number -``` version=$(grep -oP "version \d+\.\d+" core/driver.yml | tail -1 | awk '{print $2}') echo $version -``` - -use It to generate the spec and verify that everything match -``` python run.py --ver $version --\!debug --\!html grep "define ZE_API_VERSION_CURRENT_M" ../include/ze_api.h ``` -- Now header have been generated in `level-zero-spec/include`. Copy that in `$THAPI_ROOT/backend/ze/include` -(carefull for removed file) - -- This does contain the layers/loader and zex. - - - We got those from `https://github.com/oneapi-src/level-zero/tree/v1.28.2/include` +- Now header have been generated in `level-zero-spec/include`. Copy that in `$THAPI_ROOT/backend/ze/include` (carefull for removed file) +- This does contain the layers/loader: + - We got those from `https://github.com/oneapi-src/level-zero/tags` (find the tags who correspond the spec version. Something like +`API Headers, Loader, & Validation Layer based on oneAPI Level Zero Specification v1.15.31` in the release name +- This does contain the `zex`: + - Found in `https://github.com/intel/compute-runtime/blob/master/level_zero/include/level_zero/driver_experimental/zex_api.h` - Try to compile ## Problem @@ -45,7 +39,7 @@ tracer_ze.c:197:8: error: use of undeclared identifier 'ZE_STRUCTURE_TYPE_DEVICE | ZE_STRUCTURE_TYPE_DEVICE_CACHELINE_SIZE_EXT ``` -- Due to intel lack of naming consistancy, maybe need to update `struct_type_conversion_table` n in `ze_model.rb` +- Due to intel lack of naming consistancy, maybe need to update `struct_type_conversion_table` in `ze_model.rb` ``` tracer_ze.c:8456:20: error: unused function 'zelTracerResetAllCallbacks_hid' [-Werror,-Wunused-function] @@ -54,9 +48,9 @@ tracer_ze.c:8456:20: error: unused function 'zelTracerResetAllCallbacks_hid' [-W ``` Need to modify the `$zel_commands.each` who generate `#{c.decl_hidden_alias};` in `gen_ze.rb` -Run time error: When running babeltrace_thapi (`iprof -t`) +Run time error: When running `babeltrace_thapi` (`iprof -t`) constant error ``` -ogrammableParamValueInfoExp>': uninitialized constant ZE::ZETMetricProgrammableParamValueInfoExp::ZET_MAX_METRIC_PROGRAMMABLE_VALUE_DESCRIPTION_EXP (NameError) +PogrammableParamValueInfoExp>': uninitialized constant ZE::ZETMetricProgrammableParamValueInfoExp::ZET_MAX_METRIC_PROGRAMMABLE_VALUE_DESCRIPTION_EXP (NameError) :description, [ :char, ZET_MAX_METRIC_PROGRAMMABLE_VALUE_DESCRIPTION_EXP ] ``` From 5c96a963cc5c5415129176eb00cf4c368721ceff Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Fri, 27 Feb 2026 23:23:14 +0000 Subject: [PATCH 11/30] Remove python --- backends/ze/include/ze.py | 7745 ------------------------------------ backends/ze/include/zer.py | 102 - backends/ze/include/zes.py | 4423 -------------------- backends/ze/include/zet.py | 1973 --------- 4 files changed, 14243 deletions(-) delete mode 100644 backends/ze/include/ze.py delete mode 100644 backends/ze/include/zer.py delete mode 100644 backends/ze/include/zes.py delete mode 100644 backends/ze/include/zet.py diff --git a/backends/ze/include/ze.py b/backends/ze/include/ze.py deleted file mode 100644 index 33092a932..000000000 --- a/backends/ze/include/ze.py +++ /dev/null @@ -1,7745 +0,0 @@ -""" - Copyright (C) 2019-2025 Intel Corporation - - SPDX-License-Identifier: MIT - - @file ze.py - @version v1.15-r1.13.73 - - """ -import platform -from ctypes import * -from enum import * - -############################################################################### -__version__ = "1.0" - -############################################################################### -## @brief Generates generic 'oneAPI' API versions -def ZE_MAKE_VERSION( _major, _minor ): - return (( _major << 16 )|( _minor & 0x0000ffff)) - -############################################################################### -## @brief Extracts 'oneAPI' API major version -def ZE_MAJOR_VERSION( _ver ): - return ( _ver >> 16 ) - -############################################################################### -## @brief Extracts 'oneAPI' API minor version -def ZE_MINOR_VERSION( _ver ): - return ( _ver & 0x0000ffff ) - -############################################################################### -## @brief Calling convention for all API functions -# ZE_APICALL not required for python - -############################################################################### -## @brief Microsoft-specific dllexport storage-class attribute -# ZE_APIEXPORT not required for python - -############################################################################### -## @brief GCC-specific dllexport storage-class attribute -# ZE_APIEXPORT not required for python - -############################################################################### -## @brief Microsoft-specific dllexport storage-class attribute -# ZE_DLLEXPORT not required for python - -############################################################################### -## @brief GCC-specific dllexport storage-class attribute -# ZE_DLLEXPORT not required for python - -############################################################################### -## @brief compiler-independent type -class ze_bool_t(c_ubyte): - pass - -############################################################################### -## @brief Handle of a driver instance -class ze_driver_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of driver's device object -class ze_device_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of driver's context object -class ze_context_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of driver's command queue object -class ze_command_queue_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of driver's command list object -class ze_command_list_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of driver's fence object -class ze_fence_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of driver's event pool object -class ze_event_pool_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of driver's event object -class ze_event_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of driver's image object -class ze_image_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of driver's module object -class ze_module_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of module's build log object -class ze_module_build_log_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of driver's kernel object -class ze_kernel_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of driver's sampler object -class ze_sampler_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of physical memory object -class ze_physical_mem_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of driver's fabric vertex object -class ze_fabric_vertex_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of driver's fabric edge object -class ze_fabric_edge_handle_t(c_void_p): - pass - -############################################################################### -## @brief Maximum IPC handle size -ZE_MAX_IPC_HANDLE_SIZE = 64 - -############################################################################### -## @brief IPC handle to a memory allocation -class ze_ipc_mem_handle_t(Structure): - _fields_ = [ - ("data", c_char * ZE_MAX_IPC_HANDLE_SIZE) ## [out] Opaque data representing an IPC handle - ] - -############################################################################### -## @brief IPC handle to a event pool allocation -class ze_ipc_event_pool_handle_t(Structure): - _fields_ = [ - ("data", c_char * ZE_MAX_IPC_HANDLE_SIZE) ## [out] Opaque data representing an IPC handle - ] - -############################################################################### -## @brief Generic macro for enumerator bit masks -def ZE_BIT( _i ): - return ( 1 << _i ) - -############################################################################### -## @brief Defines Return/Error codes -class ze_result_v(IntEnum): - SUCCESS = 0 ## [Core] success - NOT_READY = 1 ## [Core] synchronization primitive not signaled - ERROR_DEVICE_LOST = 0x70000001 ## [Core] device hung, reset, was removed, or driver update occurred - ERROR_OUT_OF_HOST_MEMORY = 0x70000002 ## [Core] insufficient host memory to satisfy call - ERROR_OUT_OF_DEVICE_MEMORY = 0x70000003 ## [Core] insufficient device memory to satisfy call - ERROR_MODULE_BUILD_FAILURE = 0x70000004 ## [Core] error occurred when building module, see build log for details - ERROR_MODULE_LINK_FAILURE = 0x70000005 ## [Core] error occurred when linking modules, see build log for details - ERROR_DEVICE_REQUIRES_RESET = 0x70000006 ## [Core] device requires a reset - ERROR_DEVICE_IN_LOW_POWER_STATE = 0x70000007 ## [Core] device currently in low power state - EXP_ERROR_DEVICE_IS_NOT_VERTEX = 0x7ff00001 ## [Core, Experimental] device is not represented by a fabric vertex - EXP_ERROR_VERTEX_IS_NOT_DEVICE = 0x7ff00002 ## [Core, Experimental] fabric vertex does not represent a device - EXP_ERROR_REMOTE_DEVICE = 0x7ff00003 ## [Core, Experimental] fabric vertex represents a remote device or - ## subdevice - EXP_ERROR_OPERANDS_INCOMPATIBLE = 0x7ff00004 ## [Core, Experimental] operands of comparison are not compatible - EXP_RTAS_BUILD_RETRY = 0x7ff00005 ## [Core, Experimental] ray tracing acceleration structure build - ## operation failed due to insufficient resources, retry with a larger - ## acceleration structure buffer allocation - EXP_RTAS_BUILD_DEFERRED = 0x7ff00006 ## [Core, Experimental] ray tracing acceleration structure build - ## operation deferred to parallel operation join - ERROR_INSUFFICIENT_PERMISSIONS = 0x70010000 ## [Sysman] access denied due to permission level - ERROR_NOT_AVAILABLE = 0x70010001 ## [Sysman] resource already in use and simultaneous access not allowed - ## or resource was removed - ERROR_DEPENDENCY_UNAVAILABLE = 0x70020000 ## [Common] external required dependency is unavailable or missing - WARNING_DROPPED_DATA = 0x70020001 ## [Tools] data may have been dropped - ERROR_UNINITIALIZED = 0x78000001 ## [Validation] driver is not initialized - ERROR_UNSUPPORTED_VERSION = 0x78000002 ## [Validation] generic error code for unsupported versions - ERROR_UNSUPPORTED_FEATURE = 0x78000003 ## [Validation] generic error code for unsupported features - ERROR_INVALID_ARGUMENT = 0x78000004 ## [Validation] generic error code for invalid arguments - ERROR_INVALID_NULL_HANDLE = 0x78000005 ## [Validation] handle argument is not valid - ERROR_HANDLE_OBJECT_IN_USE = 0x78000006 ## [Validation] object pointed to by handle still in-use by device - ERROR_INVALID_NULL_POINTER = 0x78000007 ## [Validation] pointer argument may not be nullptr - ERROR_INVALID_SIZE = 0x78000008 ## [Validation] size argument is invalid (e.g., must not be zero) - ERROR_UNSUPPORTED_SIZE = 0x78000009 ## [Validation] size argument is not supported by the device (e.g., too - ## large) - ERROR_UNSUPPORTED_ALIGNMENT = 0x7800000a ## [Validation] alignment argument is not supported by the device (e.g., - ## too small) - ERROR_INVALID_SYNCHRONIZATION_OBJECT = 0x7800000b ## [Validation] synchronization object in invalid state - ERROR_INVALID_ENUMERATION = 0x7800000c ## [Validation] enumerator argument is not valid - ERROR_UNSUPPORTED_ENUMERATION = 0x7800000d ## [Validation] enumerator argument is not supported by the device - ERROR_UNSUPPORTED_IMAGE_FORMAT = 0x7800000e ## [Validation] image format is not supported by the device - ERROR_INVALID_NATIVE_BINARY = 0x7800000f ## [Validation] native binary is not supported by the device - ERROR_INVALID_GLOBAL_NAME = 0x78000010 ## [Validation] global variable is not found in the module - ERROR_INVALID_KERNEL_NAME = 0x78000011 ## [Validation] kernel name is not found in the module - ERROR_INVALID_FUNCTION_NAME = 0x78000012 ## [Validation] function name is not found in the module - ERROR_INVALID_GROUP_SIZE_DIMENSION = 0x78000013 ## [Validation] group size dimension is not valid for the kernel or - ## device - ERROR_INVALID_GLOBAL_WIDTH_DIMENSION = 0x78000014 ## [Validation] global width dimension is not valid for the kernel or - ## device - ERROR_INVALID_KERNEL_ARGUMENT_INDEX = 0x78000015 ## [Validation] kernel argument index is not valid for kernel - ERROR_INVALID_KERNEL_ARGUMENT_SIZE = 0x78000016 ## [Validation] kernel argument size does not match kernel - ERROR_INVALID_KERNEL_ATTRIBUTE_VALUE = 0x78000017 ## [Validation] value of kernel attribute is not valid for the kernel or - ## device - ERROR_INVALID_MODULE_UNLINKED = 0x78000018 ## [Validation] module with imports needs to be linked before kernels can - ## be created from it. - ERROR_INVALID_COMMAND_LIST_TYPE = 0x78000019 ## [Validation] command list type does not match command queue type - ERROR_OVERLAPPING_REGIONS = 0x7800001a ## [Validation] copy operations do not support overlapping regions of - ## memory - WARNING_ACTION_REQUIRED = 0x7800001b ## [Sysman] an action is required to complete the desired operation - ERROR_INVALID_KERNEL_HANDLE = 0x7800001c ## [Core, Validation] kernel handle is invalid for the operation - EXT_RTAS_BUILD_RETRY = 0x7800001d ## [Core, Extension] ray tracing acceleration structure build operation - ## failed due to insufficient resources, retry with a larger acceleration - ## structure buffer allocation - EXT_RTAS_BUILD_DEFERRED = 0x7800001e ## [Core, Extension] ray tracing acceleration structure build operation - ## deferred to parallel operation join - EXT_ERROR_OPERANDS_INCOMPATIBLE = 0x7800001f ## [Core, Extension] operands of comparison are not compatible - ERROR_SURVIVABILITY_MODE_DETECTED = 0x78000020 ## [Sysman] device is in survivability mode, firmware update needed - ERROR_ADDRESS_NOT_FOUND = 0x78000021 ## [Core] address not found within specified or current context - ERROR_UNKNOWN = 0x7ffffffe ## [Core] unknown or internal error - -class ze_result_t(c_int): - def __str__(self): - return str(ze_result_v(self.value)) - - -############################################################################### -## @brief Defines structure types -class ze_structure_type_v(IntEnum): - DRIVER_PROPERTIES = 0x1 ## ::ze_driver_properties_t - DRIVER_IPC_PROPERTIES = 0x2 ## ::ze_driver_ipc_properties_t - DEVICE_PROPERTIES = 0x3 ## ::ze_device_properties_t - DEVICE_COMPUTE_PROPERTIES = 0x4 ## ::ze_device_compute_properties_t - DEVICE_MODULE_PROPERTIES = 0x5 ## ::ze_device_module_properties_t - COMMAND_QUEUE_GROUP_PROPERTIES = 0x6 ## ::ze_command_queue_group_properties_t - DEVICE_MEMORY_PROPERTIES = 0x7 ## ::ze_device_memory_properties_t - DEVICE_MEMORY_ACCESS_PROPERTIES = 0x8 ## ::ze_device_memory_access_properties_t - DEVICE_CACHE_PROPERTIES = 0x9 ## ::ze_device_cache_properties_t - DEVICE_IMAGE_PROPERTIES = 0xa ## ::ze_device_image_properties_t - DEVICE_P2P_PROPERTIES = 0xb ## ::ze_device_p2p_properties_t - DEVICE_EXTERNAL_MEMORY_PROPERTIES = 0xc ## ::ze_device_external_memory_properties_t - CONTEXT_DESC = 0xd ## ::ze_context_desc_t - COMMAND_QUEUE_DESC = 0xe ## ::ze_command_queue_desc_t - COMMAND_LIST_DESC = 0xf ## ::ze_command_list_desc_t - EVENT_POOL_DESC = 0x10 ## ::ze_event_pool_desc_t - EVENT_DESC = 0x11 ## ::ze_event_desc_t - FENCE_DESC = 0x12 ## ::ze_fence_desc_t - IMAGE_DESC = 0x13 ## ::ze_image_desc_t - IMAGE_PROPERTIES = 0x14 ## ::ze_image_properties_t - DEVICE_MEM_ALLOC_DESC = 0x15 ## ::ze_device_mem_alloc_desc_t - HOST_MEM_ALLOC_DESC = 0x16 ## ::ze_host_mem_alloc_desc_t - MEMORY_ALLOCATION_PROPERTIES = 0x17 ## ::ze_memory_allocation_properties_t - EXTERNAL_MEMORY_EXPORT_DESC = 0x18 ## ::ze_external_memory_export_desc_t - EXTERNAL_MEMORY_IMPORT_FD = 0x19 ## ::ze_external_memory_import_fd_t - EXTERNAL_MEMORY_EXPORT_FD = 0x1a ## ::ze_external_memory_export_fd_t - MODULE_DESC = 0x1b ## ::ze_module_desc_t - MODULE_PROPERTIES = 0x1c ## ::ze_module_properties_t - KERNEL_DESC = 0x1d ## ::ze_kernel_desc_t - KERNEL_PROPERTIES = 0x1e ## ::ze_kernel_properties_t - SAMPLER_DESC = 0x1f ## ::ze_sampler_desc_t - PHYSICAL_MEM_DESC = 0x20 ## ::ze_physical_mem_desc_t - KERNEL_PREFERRED_GROUP_SIZE_PROPERTIES = 0x21 ## ::ze_kernel_preferred_group_size_properties_t - EXTERNAL_MEMORY_IMPORT_WIN32 = 0x22 ## ::ze_external_memory_import_win32_handle_t - EXTERNAL_MEMORY_EXPORT_WIN32 = 0x23 ## ::ze_external_memory_export_win32_handle_t - DEVICE_RAYTRACING_EXT_PROPERTIES = 0x00010001 ## ::ze_device_raytracing_ext_properties_t - RAYTRACING_MEM_ALLOC_EXT_DESC = 0x10002 ## ::ze_raytracing_mem_alloc_ext_desc_t - FLOAT_ATOMIC_EXT_PROPERTIES = 0x10003 ## ::ze_float_atomic_ext_properties_t - CACHE_RESERVATION_EXT_DESC = 0x10004 ## ::ze_cache_reservation_ext_desc_t - EU_COUNT_EXT = 0x10005 ## ::ze_eu_count_ext_t - SRGB_EXT_DESC = 0x10006 ## ::ze_srgb_ext_desc_t - LINKAGE_INSPECTION_EXT_DESC = 0x10007 ## ::ze_linkage_inspection_ext_desc_t - PCI_EXT_PROPERTIES = 0x10008 ## ::ze_pci_ext_properties_t - DRIVER_MEMORY_FREE_EXT_PROPERTIES = 0x10009 ## ::ze_driver_memory_free_ext_properties_t - MEMORY_FREE_EXT_DESC = 0x1000a ## ::ze_memory_free_ext_desc_t - MEMORY_COMPRESSION_HINTS_EXT_DESC = 0x1000b ## ::ze_memory_compression_hints_ext_desc_t - IMAGE_ALLOCATION_EXT_PROPERTIES = 0x1000c ## ::ze_image_allocation_ext_properties_t - DEVICE_LUID_EXT_PROPERTIES = 0x1000d ## ::ze_device_luid_ext_properties_t - DEVICE_MEMORY_EXT_PROPERTIES = 0x1000e ## ::ze_device_memory_ext_properties_t - DEVICE_IP_VERSION_EXT = 0x1000f ## ::ze_device_ip_version_ext_t - IMAGE_VIEW_PLANAR_EXT_DESC = 0x10010 ## ::ze_image_view_planar_ext_desc_t - EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_PROPERTIES = 0x10011 ## ::ze_event_query_kernel_timestamps_ext_properties_t - EVENT_QUERY_KERNEL_TIMESTAMPS_RESULTS_EXT_PROPERTIES = 0x10012 ## ::ze_event_query_kernel_timestamps_results_ext_properties_t - KERNEL_MAX_GROUP_SIZE_EXT_PROPERTIES = 0x10013 ## ::ze_kernel_max_group_size_ext_properties_t - IMAGE_FORMAT_SUPPORT_EXT_PROPERTIES = 0x10014 ## ::ze_image_format_support_ext_properties_t - RELAXED_ALLOCATION_LIMITS_EXP_DESC = 0x00020001 ## ::ze_relaxed_allocation_limits_exp_desc_t - MODULE_PROGRAM_EXP_DESC = 0x00020002 ## ::ze_module_program_exp_desc_t - SCHEDULING_HINT_EXP_PROPERTIES = 0x00020003 ## ::ze_scheduling_hint_exp_properties_t - SCHEDULING_HINT_EXP_DESC = 0x00020004 ## ::ze_scheduling_hint_exp_desc_t - IMAGE_VIEW_PLANAR_EXP_DESC = 0x00020005 ## ::ze_image_view_planar_exp_desc_t - DEVICE_PROPERTIES_1_2 = 0x00020006 ## ::ze_device_properties_t - IMAGE_MEMORY_EXP_PROPERTIES = 0x00020007 ## ::ze_image_memory_properties_exp_t - POWER_SAVING_HINT_EXP_DESC = 0x00020008 ## ::ze_context_power_saving_hint_exp_desc_t - COPY_BANDWIDTH_EXP_PROPERTIES = 0x00020009 ## ::ze_copy_bandwidth_exp_properties_t - DEVICE_P2P_BANDWIDTH_EXP_PROPERTIES = 0x0002000A ## ::ze_device_p2p_bandwidth_exp_properties_t - FABRIC_VERTEX_EXP_PROPERTIES = 0x0002000B ## ::ze_fabric_vertex_exp_properties_t - FABRIC_EDGE_EXP_PROPERTIES = 0x0002000C ## ::ze_fabric_edge_exp_properties_t - MEMORY_SUB_ALLOCATIONS_EXP_PROPERTIES = 0x0002000D ## ::ze_memory_sub_allocations_exp_properties_t - RTAS_BUILDER_EXP_DESC = 0x0002000E ## ::ze_rtas_builder_exp_desc_t - RTAS_BUILDER_BUILD_OP_EXP_DESC = 0x0002000F ## ::ze_rtas_builder_build_op_exp_desc_t - RTAS_BUILDER_EXP_PROPERTIES = 0x00020010 ## ::ze_rtas_builder_exp_properties_t - RTAS_PARALLEL_OPERATION_EXP_PROPERTIES = 0x00020011 ## ::ze_rtas_parallel_operation_exp_properties_t - RTAS_DEVICE_EXP_PROPERTIES = 0x00020012 ## ::ze_rtas_device_exp_properties_t - RTAS_GEOMETRY_AABBS_EXP_CB_PARAMS = 0x00020013 ## ::ze_rtas_geometry_aabbs_exp_cb_params_t - COUNTER_BASED_EVENT_POOL_EXP_DESC = 0x00020014 ## ::ze_event_pool_counter_based_exp_desc_t - MUTABLE_COMMAND_LIST_EXP_PROPERTIES = 0x00020015 ## ::ze_mutable_command_list_exp_properties_t - MUTABLE_COMMAND_LIST_EXP_DESC = 0x00020016 ## ::ze_mutable_command_list_exp_desc_t - MUTABLE_COMMAND_ID_EXP_DESC = 0x00020017 ## ::ze_mutable_command_id_exp_desc_t - MUTABLE_COMMANDS_EXP_DESC = 0x00020018 ## ::ze_mutable_commands_exp_desc_t - MUTABLE_KERNEL_ARGUMENT_EXP_DESC = 0x00020019 ## ::ze_mutable_kernel_argument_exp_desc_t - MUTABLE_GROUP_COUNT_EXP_DESC = 0x0002001A ## ::ze_mutable_group_count_exp_desc_t - MUTABLE_GROUP_SIZE_EXP_DESC = 0x0002001B ## ::ze_mutable_group_size_exp_desc_t - MUTABLE_GLOBAL_OFFSET_EXP_DESC = 0x0002001C ## ::ze_mutable_global_offset_exp_desc_t - PITCHED_ALLOC_DEVICE_EXP_PROPERTIES = 0x0002001D ## ::ze_device_pitched_alloc_exp_properties_t - BINDLESS_IMAGE_EXP_DESC = 0x0002001E ## ::ze_image_bindless_exp_desc_t - PITCHED_IMAGE_EXP_DESC = 0x0002001F ## ::ze_image_pitched_exp_desc_t - MUTABLE_GRAPH_ARGUMENT_EXP_DESC = 0x00020020 ## ::ze_mutable_graph_argument_exp_desc_t - INIT_DRIVER_TYPE_DESC = 0x00020021 ## ::ze_init_driver_type_desc_t - EXTERNAL_SEMAPHORE_EXT_DESC = 0x00020022 ## ::ze_external_semaphore_ext_desc_t - EXTERNAL_SEMAPHORE_WIN32_EXT_DESC = 0x00020023 ## ::ze_external_semaphore_win32_ext_desc_t - EXTERNAL_SEMAPHORE_FD_EXT_DESC = 0x00020024 ## ::ze_external_semaphore_fd_ext_desc_t - EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_EXT = 0x00020025 ## ::ze_external_semaphore_signal_params_ext_t - EXTERNAL_SEMAPHORE_WAIT_PARAMS_EXT = 0x00020026 ## ::ze_external_semaphore_wait_params_ext_t - DRIVER_DDI_HANDLES_EXT_PROPERTIES = 0x00020027 ## ::ze_driver_ddi_handles_ext_properties_t - DEVICE_CACHELINE_SIZE_EXT = 0x00020028 ## ::ze_device_cache_line_size_ext_t - DEVICE_VECTOR_WIDTH_PROPERTIES_EXT = 0x00020029 ## ::ze_device_vector_width_properties_ext_t - RTAS_BUILDER_EXT_DESC = 0x00020030 ## ::ze_rtas_builder_ext_desc_t - RTAS_BUILDER_BUILD_OP_EXT_DESC = 0x00020031 ## ::ze_rtas_builder_build_op_ext_desc_t - RTAS_BUILDER_EXT_PROPERTIES = 0x00020032 ## ::ze_rtas_builder_ext_properties_t - RTAS_PARALLEL_OPERATION_EXT_PROPERTIES = 0x00020033 ## ::ze_rtas_parallel_operation_ext_properties_t - RTAS_DEVICE_EXT_PROPERTIES = 0x00020034 ## ::ze_rtas_device_ext_properties_t - RTAS_GEOMETRY_AABBS_EXT_CB_PARAMS = 0x00020035 ## ::ze_rtas_geometry_aabbs_ext_cb_params_t - COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC = 0x00020036 ## ::ze_command_list_append_launch_kernel_param_cooperative_desc_t - EXTERNAL_MEMMAP_SYSMEM_EXT_DESC = 0x00020037 ## ::ze_external_memmap_sysmem_ext_desc_t - PITCHED_ALLOC_2DIMAGE_LINEAR_PITCH_EXP_INFO = 0x00020038 ## ::ze_pitched_alloc_2dimage_linear_pitch_exp_info_t - KERNEL_ALLOCATION_PROPERTIES = 0x00020039 ## ::ze_kernel_allocation_exp_properties_t - EVENT_COUNTER_BASED_DESC = 0x0002003A ## ::ze_event_counter_based_desc_t - EVENT_COUNTER_BASED_EXTERNAL_SYNC_ALLOCATION_DESC = 0x0002003B ## ::ze_event_counter_based_external_sync_allocation_desc_t - EVENT_SYNC_MODE_DESC = 0x0002003C ## ::ze_event_sync_mode_desc_t - IPC_MEM_HANDLE_TYPE_EXT_DESC = 0x0002003D ## ::ze_ipc_mem_handle_type_ext_desc_t - DEVICE_EVENT_PROPERTIES = 0x0002003E ## ::ze_device_event_properties_t - EVENT_COUNTER_BASED_EXTERNAL_AGGREGATE_STORAGE_DESC = 0x0002003F ## ::ze_event_counter_based_external_aggregate_storage_desc_t - PHYSICAL_MEM_PROPERTIES = 0x00020040 ## ::ze_physical_mem_properties_t - DEVICE_USABLEMEM_SIZE_EXT_PROPERTIES = 0x00020041 ## ::ze_device_usablemem_size_ext_properties_t - CUSTOM_PITCH_EXP_DESC = 0x00020042 ## ::ze_custom_pitch_exp_desc_t - -class ze_structure_type_t(c_int): - def __str__(self): - return str(ze_structure_type_v(self.value)) - - -############################################################################### -## @brief External memory type flags -class ze_external_memory_type_flags_v(IntEnum): - OPAQUE_FD = ZE_BIT(0) ## an opaque POSIX file descriptor handle - DMA_BUF = ZE_BIT(1) ## a file descriptor handle for a Linux dma_buf - OPAQUE_WIN32 = ZE_BIT(2) ## an NT handle - OPAQUE_WIN32_KMT = ZE_BIT(3) ## a global share (KMT) handle - D3D11_TEXTURE = ZE_BIT(4) ## an NT handle referring to a Direct3D 10 or 11 texture resource - D3D11_TEXTURE_KMT = ZE_BIT(5) ## a global share (KMT) handle referring to a Direct3D 10 or 11 texture - ## resource - D3D12_HEAP = ZE_BIT(6) ## an NT handle referring to a Direct3D 12 heap resource - D3D12_RESOURCE = ZE_BIT(7) ## an NT handle referring to a Direct3D 12 committed resource - -class ze_external_memory_type_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Bandwidth unit -class ze_bandwidth_unit_v(IntEnum): - UNKNOWN = 0 ## The unit used for bandwidth is unknown - BYTES_PER_NANOSEC = 1 ## Bandwidth is provided in bytes/nanosec - BYTES_PER_CLOCK = 2 ## Bandwidth is provided in bytes/clock - -class ze_bandwidth_unit_t(c_int): - def __str__(self): - return str(ze_bandwidth_unit_v(self.value)) - - -############################################################################### -## @brief Latency unit -class ze_latency_unit_v(IntEnum): - UNKNOWN = 0 ## The unit used for latency is unknown - NANOSEC = 1 ## Latency is provided in nanosecs - CLOCK = 2 ## Latency is provided in clocks - HOP = 3 ## Latency is provided in hops (normalized so that the lowest latency - ## link has a latency of 1 hop) - -class ze_latency_unit_t(c_int): - def __str__(self): - return str(ze_latency_unit_v(self.value)) - - -############################################################################### -## @brief Maximum universal unique id (UUID) size in bytes -ZE_MAX_UUID_SIZE = 16 - -############################################################################### -## @brief Universal unique id (UUID) -class ze_uuid_t(Structure): - _fields_ = [ - ("id", c_ubyte * ZE_MAX_UUID_SIZE) ## [out] opaque data representing a UUID - ] - -############################################################################### -## @brief Base for all callback function parameter types -class ze_base_cb_params_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p) ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ] - -############################################################################### -## @brief Base for all properties types -class ze_base_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p) ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ] - -############################################################################### -## @brief Base for all descriptor types -class ze_base_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p) ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ] - -############################################################################### -## @brief IPC handle to counter based event -class ze_ipc_event_counter_based_handle_t(Structure): - _fields_ = [ - ("data", c_char * ZE_MAX_IPC_HANDLE_SIZE) ## [out] Opaque data representing an IPC handle - ] - -############################################################################### -## @brief Forces driver to only report devices (and sub-devices) as specified by -## values - -############################################################################### -## @brief Forces driver to report devices from lowest to highest PCI bus ID - -############################################################################### -## @brief Forces all shared allocations into device memory - -############################################################################### -## @brief Defines the device hierarchy model exposed by Level Zero driver -## implementation - -############################################################################### -## @brief Defines/Refines ordering of drivers reported to user - -############################################################################### -## @brief Supported initialization flags -class ze_init_flags_v(IntEnum): - GPU_ONLY = ZE_BIT(0) ## only initialize GPU drivers - VPU_ONLY = ZE_BIT(1) ## only initialize VPU drivers - -class ze_init_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Supported driver initialization type flags -## -## @details -## - Bit Field which details the driver types to be initialized and -## returned to the user. -## - Value Definition: -## - 0, do not init or retrieve any drivers. -## - ZE_INIT_DRIVER_TYPE_FLAG_GPU, GPU Drivers are Init and driver handles -## retrieved. -## - ZE_INIT_DRIVER_TYPE_FLAG_NPU, NPU Drivers are Init and driver handles -## retrieved. -## - ZE_INIT_DRIVER_TYPE_FLAG_GPU | ZE_INIT_DRIVER_TYPE_FLAG_NPU, NPU & GPU -## Drivers are Init and driver handles retrieved. -## - UINT32_MAX All Drivers of any type are Init and driver handles -## retrieved. -class ze_init_driver_type_flags_v(IntEnum): - GPU = ZE_BIT(0) ## initialize and retrieve GPU drivers - NPU = ZE_BIT(1) ## initialize and retrieve NPU drivers - -class ze_init_driver_type_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Init Driver Type descriptor -class ze_init_driver_type_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_init_driver_type_flags_t) ## [in] driver type init flags. - ## must be a valid combination of ::ze_init_driver_type_flag_t or UINT32_MAX; - ## driver types are init and retrieved based on these init flags in zeInitDrivers(). - ] - -############################################################################### -## @brief Supported API versions -## -## @details -## - API versions contain major and minor attributes, use -## ::ZE_MAJOR_VERSION and ::ZE_MINOR_VERSION -class ze_api_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - _1_1 = ZE_MAKE_VERSION( 1, 1 ) ## version 1.1 - _1_2 = ZE_MAKE_VERSION( 1, 2 ) ## version 1.2 - _1_3 = ZE_MAKE_VERSION( 1, 3 ) ## version 1.3 - _1_4 = ZE_MAKE_VERSION( 1, 4 ) ## version 1.4 - _1_5 = ZE_MAKE_VERSION( 1, 5 ) ## version 1.5 - _1_6 = ZE_MAKE_VERSION( 1, 6 ) ## version 1.6 - _1_7 = ZE_MAKE_VERSION( 1, 7 ) ## version 1.7 - _1_8 = ZE_MAKE_VERSION( 1, 8 ) ## version 1.8 - _1_9 = ZE_MAKE_VERSION( 1, 9 ) ## version 1.9 - _1_10 = ZE_MAKE_VERSION( 1, 10 ) ## version 1.10 - _1_11 = ZE_MAKE_VERSION( 1, 11 ) ## version 1.11 - _1_12 = ZE_MAKE_VERSION( 1, 12 ) ## version 1.12 - _1_13 = ZE_MAKE_VERSION( 1, 13 ) ## version 1.13 - _1_14 = ZE_MAKE_VERSION( 1, 14 ) ## version 1.14 - _1_15 = ZE_MAKE_VERSION( 1, 15 ) ## version 1.15 - CURRENT = ZE_MAKE_VERSION( 1, 15 ) ## latest known version - -class ze_api_version_t(c_int): - def __str__(self): - return str(ze_api_version_v(self.value)) - - -############################################################################### -## @brief Current API version as a macro -ZE_API_VERSION_CURRENT_M = ZE_MAKE_VERSION( 1, 15 ) - -############################################################################### -## @brief Maximum driver universal unique id (UUID) size in bytes -ZE_MAX_DRIVER_UUID_SIZE = 16 - -############################################################################### -## @brief Driver universal unique id (UUID) -class ze_driver_uuid_t(Structure): - _fields_ = [ - ("id", c_ubyte * ZE_MAX_DRIVER_UUID_SIZE) ## [out] opaque data representing a driver UUID - ] - -############################################################################### -## @brief Driver properties queried using ::zeDriverGetProperties -class ze_driver_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("uuid", ze_driver_uuid_t), ## [out] universal unique identifier. - ("driverVersion", c_ulong) ## [out] driver version - ## The driver version is a non-zero, monotonically increasing value where - ## higher values always indicate a more recent version. - ] - -############################################################################### -## @brief Supported IPC property flags -class ze_ipc_property_flags_v(IntEnum): - MEMORY = ZE_BIT(0) ## Supports passing memory allocations between processes. See - ## ::zeMemGetIpcHandle. - EVENT_POOL = ZE_BIT(1) ## Supports passing event pools between processes. See - ## ::zeEventPoolGetIpcHandle. - -class ze_ipc_property_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief IPC properties queried using ::zeDriverGetIpcProperties -class ze_driver_ipc_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_ipc_property_flags_t) ## [out] 0 (none) or a valid combination of ::ze_ipc_property_flag_t - ] - -############################################################################### -## @brief Maximum extension name string size -ZE_MAX_EXTENSION_NAME = 256 - -############################################################################### -## @brief Extension properties queried using ::zeDriverGetExtensionProperties -class ze_driver_extension_properties_t(Structure): - _fields_ = [ - ("name", c_char * ZE_MAX_EXTENSION_NAME), ## [out] extension name - ("version", c_ulong) ## [out] extension version using ::ZE_MAKE_VERSION - ] - -############################################################################### -## @brief Supported device types -class ze_device_type_v(IntEnum): - GPU = 1 ## Graphics Processing Unit - CPU = 2 ## Central Processing Unit - FPGA = 3 ## Field Programmable Gate Array - MCA = 4 ## Memory Copy Accelerator - VPU = 5 ## Vision Processing Unit - -class ze_device_type_t(c_int): - def __str__(self): - return str(ze_device_type_v(self.value)) - - -############################################################################### -## @brief Maximum device universal unique id (UUID) size in bytes -ZE_MAX_DEVICE_UUID_SIZE = 16 - -############################################################################### -## @brief Device universal unique id (UUID) -class ze_device_uuid_t(Structure): - _fields_ = [ - ("id", c_ubyte * ZE_MAX_DEVICE_UUID_SIZE) ## [out] opaque data representing a device UUID - ] - -############################################################################### -## @brief Maximum device name string size -ZE_MAX_DEVICE_NAME = 256 - -############################################################################### -## @brief Supported device property flags -class ze_device_property_flags_v(IntEnum): - INTEGRATED = ZE_BIT(0) ## Device is integrated with the Host. - SUBDEVICE = ZE_BIT(1) ## Device handle used for query represents a sub-device. - ECC = ZE_BIT(2) ## Device supports error correction memory access. - ONDEMANDPAGING = ZE_BIT(3) ## Device supports on-demand page-faulting. - -class ze_device_property_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Device properties queried using ::zeDeviceGetProperties -class ze_device_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("type", ze_device_type_t), ## [out] generic device type - ("vendorId", c_ulong), ## [out] vendor id from PCI configuration - ("deviceId", c_ulong), ## [out] device id from PCI configuration. - ## Note, the device id uses little-endian format. - ("flags", ze_device_property_flags_t), ## [out] 0 (none) or a valid combination of ::ze_device_property_flag_t - ("subdeviceId", c_ulong), ## [out] sub-device id. Only valid if ::ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE - ## is set. - ("coreClockRate", c_ulong), ## [out] Clock rate for device core. - ("maxMemAllocSize", c_ulonglong), ## [out] Maximum memory allocation size. - ("maxHardwareContexts", c_ulong), ## [out] Maximum number of logical hardware contexts. - ("maxCommandQueuePriority", c_ulong), ## [out] Maximum priority for command queues. Higher value is higher - ## priority. - ("numThreadsPerEU", c_ulong), ## [out] Maximum number of threads per EU. - ("physicalEUSimdWidth", c_ulong), ## [out] The physical EU simd width. - ("numEUsPerSubslice", c_ulong), ## [out] Maximum number of EUs per sub-slice. - ("numSubslicesPerSlice", c_ulong), ## [out] Maximum number of sub-slices per slice. - ("numSlices", c_ulong), ## [out] Maximum number of slices. - ("timerResolution", c_ulonglong), ## [out] Returns the resolution of device timer used for profiling, - ## timestamps, etc. When stype==::ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES the - ## units are in nanoseconds. When - ## stype==::ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES_1_2 units are in - ## cycles/sec - ("timestampValidBits", c_ulong), ## [out] Returns the number of valid bits in the timestamp value. - ("kernelTimestampValidBits", c_ulong), ## [out] Returns the number of valid bits in the kernel timestamp values - ("uuid", ze_device_uuid_t), ## [out] universal unique identifier. Note: Subdevices will have their - ## own uuid. - ("name", c_char * ZE_MAX_DEVICE_NAME) ## [out] Device name - ] - -############################################################################### -## @brief Device thread identifier. -class ze_device_thread_t(Structure): - _fields_ = [ - ("slice", c_ulong), ## [in,out] the slice number. - ## Must be `UINT32_MAX` (all) or less than the `numSlices` member of ::ze_device_properties_t. - ("subslice", c_ulong), ## [in,out] the sub-slice number within its slice. - ## Must be `UINT32_MAX` (all) or less than the `numSubslicesPerSlice` - ## member of ::ze_device_properties_t. - ("eu", c_ulong), ## [in,out] the EU number within its sub-slice. - ## Must be `UINT32_MAX` (all) or less than the `numEUsPerSubslice` member - ## of ::ze_device_properties_t. - ("thread", c_ulong) ## [in,out] the thread number within its EU. - ## Must be `UINT32_MAX` (all) or less than the `numThreadsPerEU` member - ## of ::ze_device_properties_t. - ] - -############################################################################### -## @brief Maximum number of subgroup sizes supported. -ZE_SUBGROUPSIZE_COUNT = 8 - -############################################################################### -## @brief Device compute properties queried using ::zeDeviceGetComputeProperties -class ze_device_compute_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("maxTotalGroupSize", c_ulong), ## [out] Maximum items per compute group. (groupSizeX * groupSizeY * - ## groupSizeZ) <= maxTotalGroupSize - ("maxGroupSizeX", c_ulong), ## [out] Maximum items for X dimension in group - ("maxGroupSizeY", c_ulong), ## [out] Maximum items for Y dimension in group - ("maxGroupSizeZ", c_ulong), ## [out] Maximum items for Z dimension in group - ("maxGroupCountX", c_ulong), ## [out] Maximum groups that can be launched for x dimension - ("maxGroupCountY", c_ulong), ## [out] Maximum groups that can be launched for y dimension - ("maxGroupCountZ", c_ulong), ## [out] Maximum groups that can be launched for z dimension - ("maxSharedLocalMemory", c_ulong), ## [out] Maximum shared local memory per group. - ("numSubGroupSizes", c_ulong), ## [out] Number of subgroup sizes supported. This indicates number of - ## entries in subGroupSizes. - ("subGroupSizes", c_ulong * ZE_SUBGROUPSIZE_COUNT) ## [out] Size group sizes supported. - ] - -############################################################################### -## @brief Maximum native kernel universal unique id (UUID) size in bytes -ZE_MAX_NATIVE_KERNEL_UUID_SIZE = 16 - -############################################################################### -## @brief Native kernel universal unique id (UUID) -class ze_native_kernel_uuid_t(Structure): - _fields_ = [ - ("id", c_ubyte * ZE_MAX_NATIVE_KERNEL_UUID_SIZE) ## [out] opaque data representing a native kernel UUID - ] - -############################################################################### -## @brief Supported device module flags -class ze_device_module_flags_v(IntEnum): - FP16 = ZE_BIT(0) ## Device supports 16-bit floating-point operations - FP64 = ZE_BIT(1) ## Device supports 64-bit floating-point operations - INT64_ATOMICS = ZE_BIT(2) ## Device supports 64-bit atomic operations - DP4A = ZE_BIT(3) ## Device supports four component dot product and accumulate operations - -class ze_device_module_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Supported floating-Point capability flags -class ze_device_fp_flags_v(IntEnum): - DENORM = ZE_BIT(0) ## Supports denorms - INF_NAN = ZE_BIT(1) ## Supports INF and quiet NaNs - ROUND_TO_NEAREST = ZE_BIT(2) ## Supports rounding to nearest even rounding mode - ROUND_TO_ZERO = ZE_BIT(3) ## Supports rounding to zero. - ROUND_TO_INF = ZE_BIT(4) ## Supports rounding to both positive and negative INF. - FMA = ZE_BIT(5) ## Supports IEEE754-2008 fused multiply-add. - ROUNDED_DIVIDE_SQRT = ZE_BIT(6) ## Supports rounding as defined by IEEE754 for divide and sqrt - ## operations. - SOFT_FLOAT = ZE_BIT(7) ## Uses software implementation for basic floating-point operations. - -class ze_device_fp_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Device module properties queried using ::zeDeviceGetModuleProperties -class ze_device_module_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("spirvVersionSupported", c_ulong), ## [out] Maximum supported SPIR-V version. - ## Returns zero if SPIR-V is not supported. - ## Contains major and minor attributes, use ::ZE_MAJOR_VERSION and ::ZE_MINOR_VERSION. - ("flags", ze_device_module_flags_t), ## [out] 0 or a valid combination of ::ze_device_module_flag_t - ("fp16flags", ze_device_fp_flags_t), ## [out] Capabilities for half-precision floating-point operations. - ## returns 0 (if ::ZE_DEVICE_MODULE_FLAG_FP16 is not set) or a - ## combination of ::ze_device_fp_flag_t. - ("fp32flags", ze_device_fp_flags_t), ## [out] Capabilities for single-precision floating-point operations. - ## returns a combination of ::ze_device_fp_flag_t. - ("fp64flags", ze_device_fp_flags_t), ## [out] Capabilities for double-precision floating-point operations. - ## returns 0 (if ::ZE_DEVICE_MODULE_FLAG_FP64 is not set) or a - ## combination of ::ze_device_fp_flag_t. - ("maxArgumentsSize", c_ulong), ## [out] Maximum kernel argument size that is supported. - ("printfBufferSize", c_ulong), ## [out] Maximum size of internal buffer that holds output of printf - ## calls from kernel. - ("nativeKernelSupported", ze_native_kernel_uuid_t) ## [out] Compatibility UUID of supported native kernel. - ## UUID may or may not be the same across driver release, devices, or - ## operating systems. - ## Application is responsible for ensuring UUID matches before creating - ## module using - ## previously created native kernel. - ] - -############################################################################### -## @brief Supported command queue group property flags -class ze_command_queue_group_property_flags_v(IntEnum): - COMPUTE = ZE_BIT(0) ## Command queue group supports enqueing compute commands. - COPY = ZE_BIT(1) ## Command queue group supports enqueing copy commands. - COOPERATIVE_KERNELS = ZE_BIT(2) ## Command queue group supports cooperative kernels. - ## See ::zeCommandListAppendLaunchCooperativeKernel for more details. - METRICS = ZE_BIT(3) ## Command queue groups supports metric queries. - -class ze_command_queue_group_property_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Command queue group properties queried using -## ::zeDeviceGetCommandQueueGroupProperties -class ze_command_queue_group_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_command_queue_group_property_flags_t), ## [out] 0 (none) or a valid combination of - ## ::ze_command_queue_group_property_flag_t - ("maxMemoryFillPatternSize", c_size_t), ## [out] maximum `pattern_size` supported by command queue group. - ## See ::zeCommandListAppendMemoryFill for more details. - ("numQueues", c_ulong) ## [out] the number of physical engines within the group. - ] - -############################################################################### -## @brief Supported device memory property flags -class ze_device_memory_property_flags_v(IntEnum): - TBD = ZE_BIT(0) ## reserved for future use - -class ze_device_memory_property_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Device local memory properties queried using -## ::zeDeviceGetMemoryProperties -class ze_device_memory_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_device_memory_property_flags_t), ## [out] 0 (none) or a valid combination of - ## ::ze_device_memory_property_flag_t - ("maxClockRate", c_ulong), ## [out] Maximum clock rate for device memory. - ("maxBusWidth", c_ulong), ## [out] Maximum bus width between device and memory. - ("totalSize", c_ulonglong), ## [out] Total memory size in bytes that is available to the device. - ("name", c_char * ZE_MAX_DEVICE_NAME) ## [out] Memory name - ] - -############################################################################### -## @brief Memory access capability flags -## -## @details -## - Supported access capabilities for different types of memory -## allocations -class ze_memory_access_cap_flags_v(IntEnum): - RW = ZE_BIT(0) ## Supports load/store access - ATOMIC = ZE_BIT(1) ## Supports atomic access - CONCURRENT = ZE_BIT(2) ## Supports concurrent access - CONCURRENT_ATOMIC = ZE_BIT(3) ## Supports concurrent atomic access - -class ze_memory_access_cap_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Device memory access properties queried using -## ::zeDeviceGetMemoryAccessProperties -class ze_device_memory_access_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("hostAllocCapabilities", ze_memory_access_cap_flags_t), ## [out] host memory capabilities. - ## returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t. - ("deviceAllocCapabilities", ze_memory_access_cap_flags_t), ## [out] device memory capabilities. - ## returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t. - ("sharedSingleDeviceAllocCapabilities", ze_memory_access_cap_flags_t), ## [out] shared, single-device memory capabilities. - ## returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t. - ("sharedCrossDeviceAllocCapabilities", ze_memory_access_cap_flags_t), ## [out] shared, cross-device memory capabilities. - ## returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t. - ("sharedSystemAllocCapabilities", ze_memory_access_cap_flags_t) ## [out] shared, system memory capabilities. - ## returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t. - ] - -############################################################################### -## @brief Supported cache control property flags -class ze_device_cache_property_flags_v(IntEnum): - USER_CONTROL = ZE_BIT(0) ## Device support User Cache Control (i.e. SLM section vs Generic Cache) - -class ze_device_cache_property_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Device cache properties queried using ::zeDeviceGetCacheProperties -class ze_device_cache_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_device_cache_property_flags_t), ## [out] 0 (none) or a valid combination of - ## ::ze_device_cache_property_flag_t - ("cacheSize", c_size_t) ## [out] Per-cache size, in bytes - ] - -############################################################################### -## @brief Device image properties queried using ::zeDeviceGetImageProperties -class ze_device_image_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("maxImageDims1D", c_ulong), ## [out] Maximum image dimensions for 1D resources. if 0, then 1D images - ## are unsupported. - ("maxImageDims2D", c_ulong), ## [out] Maximum image dimensions for 2D resources. if 0, then 2D images - ## are unsupported. - ("maxImageDims3D", c_ulong), ## [out] Maximum image dimensions for 3D resources. if 0, then 3D images - ## are unsupported. - ("maxImageBufferSize", c_ulonglong), ## [out] Maximum image buffer size in bytes. if 0, then buffer images are - ## unsupported. - ("maxImageArraySlices", c_ulong), ## [out] Maximum image array slices. if 0, then image arrays are - ## unsupported. - ("maxSamplers", c_ulong), ## [out] Max samplers that can be used in kernel. if 0, then sampling is - ## unsupported. - ("maxReadImageArgs", c_ulong), ## [out] Returns the maximum number of simultaneous image objects that - ## can be read from by a kernel. if 0, then reading images is - ## unsupported. - ("maxWriteImageArgs", c_ulong) ## [out] Returns the maximum number of simultaneous image objects that - ## can be written to by a kernel. if 0, then writing images is - ## unsupported. - ] - -############################################################################### -## @brief Device external memory import and export properties -class ze_device_external_memory_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("memoryAllocationImportTypes", ze_external_memory_type_flags_t), ## [out] Supported external memory import types for memory allocations. - ("memoryAllocationExportTypes", ze_external_memory_type_flags_t), ## [out] Supported external memory export types for memory allocations. - ("imageImportTypes", ze_external_memory_type_flags_t), ## [out] Supported external memory import types for images. - ("imageExportTypes", ze_external_memory_type_flags_t) ## [out] Supported external memory export types for images. - ] - -############################################################################### -## @brief Supported device peer-to-peer property flags -class ze_device_p2p_property_flags_v(IntEnum): - ACCESS = ZE_BIT(0) ## Device supports access between peer devices. - ATOMICS = ZE_BIT(1) ## Device supports atomics between peer devices. - -class ze_device_p2p_property_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Device peer-to-peer properties queried using -## ::zeDeviceGetP2PProperties -class ze_device_p2p_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_device_p2p_property_flags_t) ## [out] 0 (none) or a valid combination of - ## ::ze_device_p2p_property_flag_t - ] - -############################################################################### -## @brief Supported Event properties flags -class ze_device_event_properties_flags_v(IntEnum): - COUNTER_BASED_EXTERNAL_AGGREGATE_STORAGE = ZE_BIT(0) ## Counter-based Event with external aggregate storage supported - COUNTER_BASED_IPC = ZE_BIT(1) ## Counter-based Event IPC sharing supported - COUNTER_BASED_EXTERNAL_SYNC_ALLOCATION = ZE_BIT(2) ## Counter-based Event with external sync allocation supported - COUNTER_BASED_EXTERNAL_INTERRUPT_WAIT = ZE_BIT(3) ## Counter-based Event waiting for external interrupt id supported - -class ze_device_event_properties_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Device Event properties struct. Can be passed as pNext to -## ::ze_device_properties_t to obtain properties -class ze_device_event_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_device_event_properties_flags_t) ## [out] Supported Event properties. Valid combination of - ## ::ze_device_event_properties_flag_t. - ] - -############################################################################### -## @brief Supported context creation flags -class ze_context_flags_v(IntEnum): - TBD = ZE_BIT(0) ## reserved for future use - -class ze_context_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Context descriptor -class ze_context_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_context_flags_t) ## [in] creation flags. - ## must be 0 (default) or a valid combination of ::ze_context_flag_t; - ## default behavior may use implicit driver-based heuristics. - ] - -############################################################################### -## @brief Supported command queue flags -class ze_command_queue_flags_v(IntEnum): - EXPLICIT_ONLY = ZE_BIT(0) ## command queue should be optimized for submission to a single device engine. - ## driver **must** disable any implicit optimizations for distributing - ## work across multiple engines. - ## this flag should be used when applications want full control over - ## multi-engine submission and scheduling. - ## This flag is **DEPRECATED** as flag - ## ${X}_COMMAND_LIST_FLAG_EXPLICIT_ONLY is **DEPRECATED**. - IN_ORDER = ZE_BIT(1) ## To be used only when creating immediate command lists. Commands - ## appended to the immediate command - ## list are executed in-order, with driver implementation enforcing - ## dependencies between them. - ## Application is not required to have the signal event of a given - ## command being the wait event of - ## the next to define an in-order list, and application is allowed to - ## pass signal and wait events - ## to each appended command to implement more complex dependency graphs. - COPY_OFFLOAD_HINT = ZE_BIT(2) ## To be used only when creating immediate command lists and only for - ## compute queues. - ## Try to offload copy operations to different engines. This is only a hint. - ## Driver may ignore it per append call, based on platform capabilities - ## or internal heuristics. - -class ze_command_queue_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Supported command queue modes -class ze_command_queue_mode_v(IntEnum): - DEFAULT = 0 ## implicit default behavior; uses driver-based heuristics - SYNCHRONOUS = 1 ## Device execution always completes immediately on execute; - ## Host thread is blocked using wait on implicit synchronization object - ASYNCHRONOUS = 2 ## Device execution is scheduled and will complete in future; - ## explicit synchronization object must be used to determine completeness - -class ze_command_queue_mode_t(c_int): - def __str__(self): - return str(ze_command_queue_mode_v(self.value)) - - -############################################################################### -## @brief Supported command queue priorities -class ze_command_queue_priority_v(IntEnum): - NORMAL = 0 ## [default] normal priority - PRIORITY_LOW = 1 ## lower priority than normal - PRIORITY_HIGH = 2 ## higher priority than normal - -class ze_command_queue_priority_t(c_int): - def __str__(self): - return str(ze_command_queue_priority_v(self.value)) - - -############################################################################### -## @brief Command Queue descriptor -class ze_command_queue_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("ordinal", c_ulong), ## [in] command queue group ordinal - ("index", c_ulong), ## [in] command queue index within the group; - ## must be zero. - ("flags", ze_command_queue_flags_t), ## [in] usage flags. - ## must be 0 (default) or a valid combination of ::ze_command_queue_flag_t; - ## default behavior may use implicit driver-based heuristics to balance - ## latency and throughput. - ("mode", ze_command_queue_mode_t), ## [in] operation mode - ("priority", ze_command_queue_priority_t) ## [in] priority - ] - -############################################################################### -## @brief Supported command list creation flags -class ze_command_list_flags_v(IntEnum): - RELAXED_ORDERING = ZE_BIT(0) ## driver may reorder commands (e.g., kernels, copies) between barriers - ## and synchronization primitives. - ## using this flag may increase Host overhead of ::zeCommandListClose. - ## therefore, this flag should **not** be set for low-latency usage-models. - MAXIMIZE_THROUGHPUT = ZE_BIT(1) ## driver may perform additional optimizations that increase execution - ## throughput. - ## using this flag may increase Host overhead of ::zeCommandListClose and ::zeCommandQueueExecuteCommandLists. - ## therefore, this flag should **not** be set for low-latency usage-models. - EXPLICIT_ONLY = ZE_BIT(2) ## command list should be optimized for submission to a single command - ## queue and device engine. - ## driver **must** disable any implicit optimizations for distributing - ## work across multiple engines. - ## this flag should be used when applications want full control over - ## multi-engine submission and scheduling. - ## This flag is **DEPRECATED** and implementations are not expected to - ## support this feature. - IN_ORDER = ZE_BIT(3) ## commands appended to this command list are executed in-order, with - ## driver implementation - ## enforcing dependencies between them. Application is not required to - ## have the signal event - ## of a given command being the wait event of the next to define an - ## in-order list, and - ## application is allowed to pass signal and wait events to each appended - ## command to implement - ## more complex dependency graphs. Cannot be combined with ::ZE_COMMAND_LIST_FLAG_RELAXED_ORDERING. - EXP_CLONEABLE = ZE_BIT(4) ## this command list may be cloned using ::zeCommandListCreateCloneExp - ## after ::zeCommandListClose. - COPY_OFFLOAD_HINT = ZE_BIT(5) ## Try to offload copy operations to different engines. Applicable only - ## for compute queues. - ## This is only a hint. Driver may ignore it per append call, based on - ## platform capabilities or internal heuristics. - -class ze_command_list_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Command List descriptor -class ze_command_list_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("commandQueueGroupOrdinal", c_ulong), ## [in] command queue group ordinal to which this command list will be - ## submitted - ("flags", ze_command_list_flags_t) ## [in] usage flags. - ## must be 0 (default) or a valid combination of ::ze_command_list_flag_t; - ## default behavior may use implicit driver-based heuristics to balance - ## latency and throughput. - ] - -############################################################################### -## @brief Copy region descriptor -class ze_copy_region_t(Structure): - _fields_ = [ - ("originX", c_ulong), ## [in] The origin x offset for region in bytes - ("originY", c_ulong), ## [in] The origin y offset for region in rows - ("originZ", c_ulong), ## [in] The origin z offset for region in slices - ("width", c_ulong), ## [in] The region width relative to origin in bytes - ("height", c_ulong), ## [in] The region height relative to origin in rows - ("depth", c_ulong) ## [in] The region depth relative to origin in slices. Set this to 0 for - ## 2D copy. - ] - -############################################################################### -## @brief Region descriptor -class ze_image_region_t(Structure): - _fields_ = [ - ("originX", c_ulong), ## [in] The origin x offset for region in pixels - ("originY", c_ulong), ## [in] The origin y offset for region in pixels - ("originZ", c_ulong), ## [in] The origin z offset for region in pixels - ("width", c_ulong), ## [in] The region width relative to origin in pixels - ("height", c_ulong), ## [in] The region height relative to origin in pixels - ("depth", c_ulong) ## [in] The region depth relative to origin. For 1D or 2D images, set - ## this to 1. - ] - -############################################################################### -## @brief Supported memory advice hints -class ze_memory_advice_v(IntEnum): - SET_READ_MOSTLY = 0 ## hint that memory will be read from frequently and written to rarely - CLEAR_READ_MOSTLY = 1 ## removes the effect of ::ZE_MEMORY_ADVICE_SET_READ_MOSTLY - SET_PREFERRED_LOCATION = 2 ## hint that the preferred memory location is the specified device - CLEAR_PREFERRED_LOCATION = 3 ## removes the effect of ::ZE_MEMORY_ADVICE_SET_PREFERRED_LOCATION - SET_NON_ATOMIC_MOSTLY = 4 ## hints that memory will mostly be accessed non-atomically - CLEAR_NON_ATOMIC_MOSTLY = 5 ## removes the effect of ::ZE_MEMORY_ADVICE_SET_NON_ATOMIC_MOSTLY - BIAS_CACHED = 6 ## hints that memory should be cached - BIAS_UNCACHED = 7 ## hints that memory should be not be cached - SET_SYSTEM_MEMORY_PREFERRED_LOCATION = 8 ## hint that the preferred memory location is host memory - CLEAR_SYSTEM_MEMORY_PREFERRED_LOCATION = 9 ## removes the effect of - ## ::ZE_MEMORY_ADVICE_SET_SYSTEM_MEMORY_PREFERRED_LOCATION - -class ze_memory_advice_t(c_int): - def __str__(self): - return str(ze_memory_advice_v(self.value)) - - -############################################################################### -## @brief Supported event pool creation flags -class ze_event_pool_flags_v(IntEnum): - HOST_VISIBLE = ZE_BIT(0) ## signals and waits are also visible to host - IPC = ZE_BIT(1) ## signals and waits may be shared across processes - KERNEL_TIMESTAMP = ZE_BIT(2) ## Indicates all events in pool will contain kernel timestamps - KERNEL_MAPPED_TIMESTAMP = ZE_BIT(3) ## Indicates all events in pool will contain kernel timestamps - ## synchronized to host time domain; cannot be combined with - ## ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP - -class ze_event_pool_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Event pool descriptor -class ze_event_pool_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_event_pool_flags_t), ## [in] creation flags. - ## must be 0 (default) or a valid combination of ::ze_event_pool_flag_t; - ## default behavior is signals and waits are visible to the entire device - ## and peer devices. - ("count", c_ulong) ## [in] number of events within the pool; must be greater than 0 - ] - -############################################################################### -## @brief Supported event scope flags -class ze_event_scope_flags_v(IntEnum): - SUBDEVICE = ZE_BIT(0) ## cache hierarchies are flushed or invalidated sufficient for local - ## sub-device access - DEVICE = ZE_BIT(1) ## cache hierarchies are flushed or invalidated sufficient for global - ## device access and peer device access - HOST = ZE_BIT(2) ## cache hierarchies are flushed or invalidated sufficient for device and - ## host access - -class ze_event_scope_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Supported flags for defining counter based event -class ze_event_counter_based_flags_v(IntEnum): - IMMEDIATE = ZE_BIT(0) ## Counter-based event is used for immediate command lists (default) - NON_IMMEDIATE = ZE_BIT(1) ## Counter-based event is used for non-immediate command lists - HOST_VISIBLE = ZE_BIT(2) ## Signals and waits are also visible to host - IPC = ZE_BIT(3) ## Event can be shared across processes for waiting - DEVICE_TIMESTAMP = ZE_BIT(4) ## Event contains timestamps populated in the device time domain. - ## Implementation of this can be vendor specific, but typically pulled - ## from timers on the offload device and not the host. - ## Cannot be combined with ::ZE_EVENT_COUNTER_BASED_FLAG_HOST_TIMESTAMP - HOST_TIMESTAMP = ZE_BIT(5) ## Indicates that event will contain timestamps converted to the host - ## time domain - ## Cannot be combined with ::ZE_EVENT_COUNTER_BASED_FLAG_DEVICE_TIMESTAMP - ## It is recommended to use this flag for most users that want to - ## correlate timestamps from the host and device into a single timeline. - ## For host timestamps see ::zeDeviceGetGlobalTimestamps. - -class ze_event_counter_based_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Supported event sync mode flags -class ze_event_sync_mode_flags_v(IntEnum): - LOW_POWER_WAIT = ZE_BIT(0) ## Low power host synchronization mode, for better CPU utilization - SIGNAL_INTERRUPT = ZE_BIT(1) ## Generate interrupt when Event is signalled on Device. It may be used - ## to optimize low power CPU synchronization - EXTERNAL_INTERRUPT_WAIT = ZE_BIT(2) ## Host synchronization APIs wait for external interrupt id. Can be used - ## only for Counter Based Events - -class ze_event_sync_mode_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Event sync mode descriptor -class ze_event_sync_mode_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("syncModeFlags", ze_event_sync_mode_flags_t), ## [in] valid combination of ::ze_event_sync_mode_flag_t - ("externalInterruptId", c_ulong) ## [in] External interrupt id. Used only when - ## ::ZE_EVENT_SYNC_MODE_FLAG_EXTERNAL_INTERRUPT_WAIT flag is set - ] - -############################################################################### -## @brief Event descriptor -class ze_event_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("index", c_ulong), ## [in] index of the event within the pool; must be less than the count - ## specified during pool creation - ("signal", ze_event_scope_flags_t), ## [in] defines the scope of relevant cache hierarchies to flush on a - ## signal action before the event is triggered. - ## must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; - ## default behavior is synchronization within the command list only, no - ## additional cache hierarchies are flushed. - ("wait", ze_event_scope_flags_t) ## [in] defines the scope of relevant cache hierarchies to invalidate on - ## a wait action after the event is complete. - ## must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; - ## default behavior is synchronization within the command list only, no - ## additional cache hierarchies are invalidated. - ] - -############################################################################### -## @brief Counter Based Event descriptor -class ze_event_counter_based_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_event_counter_based_flags_t), ## [in] counter based event flags. - ## Must be 0 (default) or a valid combination of ::ze_event_counter_based_flag_t - ("signal", ze_event_scope_flags_t), ## [in] defines the scope of relevant cache hierarchies to flush on a - ## signal action before the event is triggered. - ## must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; - ## default behavior is synchronization within the command list only, no - ## additional cache hierarchies are flushed. - ("wait", ze_event_scope_flags_t) ## [in] defines the scope of relevant cache hierarchies to invalidate on - ## a wait action after the event is complete. - ## must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; - ## default behavior is synchronization within the command list only, no - ## additional cache hierarchies are invalidated. - ] - -############################################################################### -## @brief Counter Based Event external sync allocation descriptor. Passed as -## pNext to ::ze_event_counter_based_desc_t -class ze_event_counter_based_external_sync_allocation_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("deviceAddress", POINTER(c_ulonglong)), ## [in] device address for external synchronization allocation - ("hostAddress", POINTER(c_ulonglong)), ## [in] host address for external synchronization allocation - ("completionValue", c_ulonglong) ## [in] completion value for external synchronization allocation - ] - -############################################################################### -## @brief Counter Based Event external aggregate storage. Passed as pNext to -## ::ze_event_counter_based_desc_t -class ze_event_counter_based_external_aggregate_storage_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("deviceAddress", POINTER(c_ulonglong)), ## [in] device address that would be updated with atomic_add upon - ## signaling of this event, must be device USM memory - ("incrementValue", c_ulonglong), ## [in] value which would by atomically added upon each completion - ("completionValue", c_ulonglong) ## [in] final completion value, when value under deviceAddress is equal - ## or greater then this value then event is considered as completed - ] - -############################################################################### -## @brief Kernel timestamp clock data -## -## @details -## - The timestamp frequency can be queried from the `timerResolution` -## member of ::ze_device_properties_t. -## - The number of valid bits in the timestamp value can be queried from -## the `kernelTimestampValidBits` member of ::ze_device_properties_t. -class ze_kernel_timestamp_data_t(Structure): - _fields_ = [ - ("kernelStart", c_ulonglong), ## [out] device clock at start of kernel execution - ("kernelEnd", c_ulonglong) ## [out] device clock at end of kernel execution - ] - -############################################################################### -## @brief Kernel timestamp result -class ze_kernel_timestamp_result_t(Structure): - _fields_ = [ - ("global", ze_kernel_timestamp_data_t), ## [out] wall-clock data - ("context", ze_kernel_timestamp_data_t) ## [out] context-active data; only includes clocks while device context - ## was actively executing. - ] - -############################################################################### -## @brief Supported fence creation flags -class ze_fence_flags_v(IntEnum): - SIGNALED = ZE_BIT(0) ## fence is created in the signaled state, otherwise not signaled. - -class ze_fence_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Fence descriptor -class ze_fence_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_fence_flags_t) ## [in] creation flags. - ## must be 0 (default) or a valid combination of ::ze_fence_flag_t. - ] - -############################################################################### -## @brief Supported image creation flags -class ze_image_flags_v(IntEnum): - KERNEL_WRITE = ZE_BIT(0) ## kernels will write contents - BIAS_UNCACHED = ZE_BIT(1) ## device should not cache contents - -class ze_image_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Supported image types -class ze_image_type_v(IntEnum): - _1D = 0 ## 1D - _1DARRAY = 1 ## 1D array - _2D = 2 ## 2D - _2DARRAY = 3 ## 2D array - _3D = 4 ## 3D - BUFFER = 5 ## Buffer - -class ze_image_type_t(c_int): - def __str__(self): - return str(ze_image_type_v(self.value)) - - -############################################################################### -## @brief Supported image format layouts -class ze_image_format_layout_v(IntEnum): - _8 = 0 ## 8-bit single component layout - _16 = 1 ## 16-bit single component layout - _32 = 2 ## 32-bit single component layout - _8_8 = 3 ## 2-component 8-bit layout - _8_8_8_8 = 4 ## 4-component 8-bit layout - _16_16 = 5 ## 2-component 16-bit layout - _16_16_16_16 = 6 ## 4-component 16-bit layout - _32_32 = 7 ## 2-component 32-bit layout - _32_32_32_32 = 8 ## 4-component 32-bit layout - _10_10_10_2 = 9 ## 4-component 10_10_10_2 layout - _11_11_10 = 10 ## 3-component 11_11_10 layout - _5_6_5 = 11 ## 3-component 5_6_5 layout - _5_5_5_1 = 12 ## 4-component 5_5_5_1 layout - _4_4_4_4 = 13 ## 4-component 4_4_4_4 layout - Y8 = 14 ## Media Format: Y8. Format type and swizzle is ignored for this. - NV12 = 15 ## Media Format: NV12. Format type and swizzle is ignored for this. - YUYV = 16 ## Media Format: YUYV. Format type and swizzle is ignored for this. - VYUY = 17 ## Media Format: VYUY. Format type and swizzle is ignored for this. - YVYU = 18 ## Media Format: YVYU. Format type and swizzle is ignored for this. - UYVY = 19 ## Media Format: UYVY. Format type and swizzle is ignored for this. - AYUV = 20 ## Media Format: AYUV. Format type and swizzle is ignored for this. - P010 = 21 ## Media Format: P010. Format type and swizzle is ignored for this. - Y410 = 22 ## Media Format: Y410. Format type and swizzle is ignored for this. - P012 = 23 ## Media Format: P012. Format type and swizzle is ignored for this. - Y16 = 24 ## Media Format: Y16. Format type and swizzle is ignored for this. - P016 = 25 ## Media Format: P016. Format type and swizzle is ignored for this. - Y216 = 26 ## Media Format: Y216. Format type and swizzle is ignored for this. - P216 = 27 ## Media Format: P216. Format type and swizzle is ignored for this. - P8 = 28 ## Media Format: P8. Format type and swizzle is ignored for this. - YUY2 = 29 ## Media Format: YUY2. Format type and swizzle is ignored for this. - A8P8 = 30 ## Media Format: A8P8. Format type and swizzle is ignored for this. - IA44 = 31 ## Media Format: IA44. Format type and swizzle is ignored for this. - AI44 = 32 ## Media Format: AI44. Format type and swizzle is ignored for this. - Y416 = 33 ## Media Format: Y416. Format type and swizzle is ignored for this. - Y210 = 34 ## Media Format: Y210. Format type and swizzle is ignored for this. - I420 = 35 ## Media Format: I420. Format type and swizzle is ignored for this. - YV12 = 36 ## Media Format: YV12. Format type and swizzle is ignored for this. - _400P = 37 ## Media Format: 400P. Format type and swizzle is ignored for this. - _422H = 38 ## Media Format: 422H. Format type and swizzle is ignored for this. - _422V = 39 ## Media Format: 422V. Format type and swizzle is ignored for this. - _444P = 40 ## Media Format: 444P. Format type and swizzle is ignored for this. - RGBP = 41 ## Media Format: RGBP. Format type and swizzle is ignored for this. - BRGP = 42 ## Media Format: BRGP. Format type and swizzle is ignored for this. - _8_8_8 = 43 ## 3-component 8-bit layout - _16_16_16 = 44 ## 3-component 16-bit layout - _32_32_32 = 45 ## 3-component 32-bit layout - -class ze_image_format_layout_t(c_int): - def __str__(self): - return str(ze_image_format_layout_v(self.value)) - - -############################################################################### -## @brief Supported image format types -class ze_image_format_type_v(IntEnum): - UINT = 0 ## Unsigned integer - SINT = 1 ## Signed integer - UNORM = 2 ## Unsigned normalized integer - SNORM = 3 ## Signed normalized integer - FLOAT = 4 ## Float - -class ze_image_format_type_t(c_int): - def __str__(self): - return str(ze_image_format_type_v(self.value)) - - -############################################################################### -## @brief Supported image format component swizzle into channel -class ze_image_format_swizzle_v(IntEnum): - R = 0 ## Red component - G = 1 ## Green component - B = 2 ## Blue component - A = 3 ## Alpha component - _0 = 4 ## Zero - _1 = 5 ## One - X = 6 ## Don't care - D = 7 ## Depth Component - -class ze_image_format_swizzle_t(c_int): - def __str__(self): - return str(ze_image_format_swizzle_v(self.value)) - - -############################################################################### -## @brief Image format -class ze_image_format_t(Structure): - _fields_ = [ - ("layout", ze_image_format_layout_t), ## [in] image format component layout (e.g. N-component layouts and media - ## formats) - ("type", ze_image_format_type_t), ## [in] image format type - ("x", ze_image_format_swizzle_t), ## [in] image component swizzle into channel x - ("y", ze_image_format_swizzle_t), ## [in] image component swizzle into channel y - ("z", ze_image_format_swizzle_t), ## [in] image component swizzle into channel z - ("w", ze_image_format_swizzle_t) ## [in] image component swizzle into channel w - ] - -############################################################################### -## @brief Image descriptor -class ze_image_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_image_flags_t), ## [in] creation flags. - ## must be 0 (default) or a valid combination of ::ze_image_flag_t; - ## default is read-only, cached access. - ("type", ze_image_type_t), ## [in] image type. Media format layouts are unsupported for - ## ::ZE_IMAGE_TYPE_BUFFER - ("format", ze_image_format_t), ## [in] image format - ("width", c_ulonglong), ## [in] width dimension. - ## ::ZE_IMAGE_TYPE_BUFFER: size in bytes; see the `maxImageBufferSize` - ## member of ::ze_device_image_properties_t for limits. - ## ::ZE_IMAGE_TYPE_1D, ::ZE_IMAGE_TYPE_1DARRAY: width in pixels; see the - ## `maxImageDims1D` member of ::ze_device_image_properties_t for limits. - ## ::ZE_IMAGE_TYPE_2D, ::ZE_IMAGE_TYPE_2DARRAY: width in pixels; see the - ## `maxImageDims2D` member of ::ze_device_image_properties_t for limits. - ## ::ZE_IMAGE_TYPE_3D: width in pixels; see the `maxImageDims3D` member - ## of ::ze_device_image_properties_t for limits. - ("height", c_ulong), ## [in] height dimension. - ## ::ZE_IMAGE_TYPE_2D, ::ZE_IMAGE_TYPE_2DARRAY: height in pixels; see the - ## `maxImageDims2D` member of ::ze_device_image_properties_t for limits. - ## ::ZE_IMAGE_TYPE_3D: height in pixels; see the `maxImageDims3D` member - ## of ::ze_device_image_properties_t for limits. - ## other: ignored. - ("depth", c_ulong), ## [in] depth dimension. - ## ::ZE_IMAGE_TYPE_3D: depth in pixels; see the `maxImageDims3D` member - ## of ::ze_device_image_properties_t for limits. - ## other: ignored. - ("arraylevels", c_ulong), ## [in] array levels. - ## ::ZE_IMAGE_TYPE_1DARRAY, ::ZE_IMAGE_TYPE_2DARRAY: see the - ## `maxImageArraySlices` member of ::ze_device_image_properties_t for limits. - ## other: ignored. - ("miplevels", c_ulong) ## [in] mipmap levels (must be 0) - ] - -############################################################################### -## @brief Supported sampler filtering flags -class ze_image_sampler_filter_flags_v(IntEnum): - POINT = ZE_BIT(0) ## device supports point filtering - LINEAR = ZE_BIT(1) ## device supports linear filtering - -class ze_image_sampler_filter_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Image properties -class ze_image_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("samplerFilterFlags", ze_image_sampler_filter_flags_t) ## [out] supported sampler filtering. - ## returns 0 (unsupported) or a combination of ::ze_image_sampler_filter_flag_t. - ] - -############################################################################### -## @brief Supported memory allocation flags -class ze_device_mem_alloc_flags_v(IntEnum): - BIAS_CACHED = ZE_BIT(0) ## device should cache allocation - BIAS_UNCACHED = ZE_BIT(1) ## device should not cache allocation (UC) - BIAS_INITIAL_PLACEMENT = ZE_BIT(2) ## optimize shared allocation for first access on the device - -class ze_device_mem_alloc_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Device memory allocation descriptor -class ze_device_mem_alloc_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_device_mem_alloc_flags_t), ## [in] flags specifying additional allocation controls. - ## must be 0 (default) or a valid combination of ::ze_device_mem_alloc_flag_t; - ## default behavior may use implicit driver-based heuristics. - ("ordinal", c_ulong) ## [in] ordinal of the device's local memory to allocate from. - ## must be less than the count returned from ::zeDeviceGetMemoryProperties. - ] - -############################################################################### -## @brief Supported host memory allocation flags -class ze_host_mem_alloc_flags_v(IntEnum): - BIAS_CACHED = ZE_BIT(0) ## host should cache allocation - BIAS_UNCACHED = ZE_BIT(1) ## host should not cache allocation (UC) - BIAS_WRITE_COMBINED = ZE_BIT(2) ## host memory should be allocated write-combined (WC) - BIAS_INITIAL_PLACEMENT = ZE_BIT(3) ## optimize shared allocation for first access on the host - -class ze_host_mem_alloc_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Host memory allocation descriptor -class ze_host_mem_alloc_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_host_mem_alloc_flags_t) ## [in] flags specifying additional allocation controls. - ## must be 0 (default) or a valid combination of ::ze_host_mem_alloc_flag_t; - ## default behavior may use implicit driver-based heuristics. - ] - -############################################################################### -## @brief Memory allocation type -class ze_memory_type_v(IntEnum): - UNKNOWN = 0 ## the memory pointed to is of unknown type - HOST = 1 ## the memory pointed to is a host allocation - DEVICE = 2 ## the memory pointed to is a device allocation - SHARED = 3 ## the memory pointed to is a shared ownership allocation - HOST_IMPORTED = 4 ## the memory pointed to is a host allocation created from external - ## system memory - -class ze_memory_type_t(c_int): - def __str__(self): - return str(ze_memory_type_v(self.value)) - - -############################################################################### -## @brief Memory allocation properties queried using ::zeMemGetAllocProperties -class ze_memory_allocation_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("type", ze_memory_type_t), ## [out] type of allocated memory - ("id", c_ulonglong), ## [out] identifier for this allocation - ("pageSize", c_ulonglong) ## [out] page size used for allocation - ] - -############################################################################### -## @brief Supported IPC memory flags -class ze_ipc_memory_flags_v(IntEnum): - BIAS_CACHED = ZE_BIT(0) ## device should cache allocation - BIAS_UNCACHED = ZE_BIT(1) ## device should not cache allocation (UC) - -class ze_ipc_memory_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Additional allocation descriptor for exporting external memory -## -## @details -## - This structure may be passed to ::zeMemAllocDevice, ::zeMemAllocHost, -## or ::zePhysicalMemCreate, via the `pNext` member of -## ::ze_device_mem_alloc_desc_t or ::ze_host_mem_alloc_desc_t, or -## ::ze_physical_mem_desc_t, respectively, to indicate an exportable -## memory allocation. -## - This structure may be passed to ::zeImageCreate, via the `pNext` -## member of ::ze_image_desc_t, to indicate an exportable image. -class ze_external_memory_export_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_external_memory_type_flags_t) ## [in] flags specifying memory export types for this allocation. - ## must be 0 (default) or a valid combination of ::ze_external_memory_type_flags_t - ] - -############################################################################### -## @brief Additional allocation descriptor for importing external memory as a -## file descriptor -## -## @details -## - This structure may be passed to ::zeMemAllocDevice, ::zeMemAllocHost, -## or ::zePhysicalMemCreate, via the `pNext` member of -## ::ze_device_mem_alloc_desc_t or ::ze_host_mem_alloc_desc_t, or -## ::ze_physical_mem_desc_t, respectively, to import memory from a file -## descriptor. -## - This structure may be passed to ::zeImageCreate, via the `pNext` -## member of ::ze_image_desc_t, to import memory from a file descriptor. -class ze_external_memory_import_fd_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_external_memory_type_flags_t), ## [in] flags specifying the memory import type for the file descriptor. - ## must be 0 (default) or a valid combination of ::ze_external_memory_type_flags_t - ("fd", c_int) ## [in] the file descriptor handle to import - ] - -############################################################################### -## @brief Exports an allocation as a file descriptor -## -## @details -## - This structure may be passed to ::zeMemGetAllocProperties, via the -## `pNext` member of ::ze_memory_allocation_properties_t, to export a -## memory allocation as a file descriptor. -## - This structure may be passed to ::zeImageGetAllocPropertiesExt, via -## the `pNext` member of ::ze_image_allocation_ext_properties_t, to -## export an image as a file descriptor. -## - This structure may be passed to ::zePhysicalMemGetProperties, via the -## `pNext` member of ::ze_physical_mem_properties_t, to export physical -## memory as a file descriptor. -## - The requested memory export type must have been specified when the -## allocation was made. -class ze_external_memory_export_fd_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_external_memory_type_flags_t), ## [in] flags specifying the memory export type for the file descriptor. - ## must be 0 (default) or a valid combination of ::ze_external_memory_type_flags_t - ("fd", c_int) ## [out] the exported file descriptor handle representing the allocation. - ] - -############################################################################### -## @brief Additional allocation descriptor for importing external memory as a -## Win32 handle -## -## @details -## - When `handle` is `nullptr`, `name` must not be `nullptr`. -## - When `name` is `nullptr`, `handle` must not be `nullptr`. -## - When `flags` is ::ZE_EXTERNAL_MEMORY_TYPE_FLAG_OPAQUE_WIN32_KMT, -## `name` must be `nullptr`. -## - This structure may be passed to ::zeMemAllocDevice, ::zeMemAllocHost, -## or ::zePhysicalMemCreate, via the `pNext` member of -## ::ze_device_mem_alloc_desc_t or ::ze_host_mem_alloc_desc_t, or -## ::ze_physical_mem_desc_t, respectively, to import memory from a Win32 -## handle. -## - This structure may be passed to ::zeImageCreate, via the `pNext` -## member of ::ze_image_desc_t, to import memory from a Win32 handle. -class ze_external_memory_import_win32_handle_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_external_memory_type_flags_t), ## [in] flags specifying the memory import type for the Win32 handle. - ## must be 0 (default) or a valid combination of ::ze_external_memory_type_flags_t - ("handle", c_void_p), ## [in][optional] the Win32 handle to import - ("name", c_void_p) ## [in][optional] name of a memory object to import - ] - -############################################################################### -## @brief Exports an allocation as a Win32 handle -## -## @details -## - This structure may be passed to ::zeMemGetAllocProperties, via the -## `pNext` member of ::ze_memory_allocation_properties_t, to export a -## memory allocation as a Win32 handle. -## - This structure may be passed to ::zeImageGetAllocPropertiesExt, via -## the `pNext` member of ::ze_image_allocation_ext_properties_t, to -## export an image as a Win32 handle. -## - This structure may be passed to ::zePhysicalMemGetProperties, via the -## `pNext` member of ::ze_physical_mem_properties_t, to export physical -## memory as a Win32 handle. -## - The requested memory export type must have been specified when the -## allocation was made. -class ze_external_memory_export_win32_handle_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_external_memory_type_flags_t), ## [in] flags specifying the memory export type for the Win32 handle. - ## must be 0 (default) or a valid combination of ::ze_external_memory_type_flags_t - ("handle", c_void_p) ## [out] the exported Win32 handle representing the allocation. - ] - -############################################################################### -## @brief atomic access attribute flags -class ze_memory_atomic_attr_exp_flags_v(IntEnum): - NO_ATOMICS = ZE_BIT(0) ## Atomics on the pointer are not allowed - NO_HOST_ATOMICS = ZE_BIT(1) ## Host atomics on the pointer are not allowed - HOST_ATOMICS = ZE_BIT(2) ## Host atomics on the pointer are allowed. Requires - ## ::ZE_MEMORY_ACCESS_CAP_FLAG_ATOMIC returned by - ## ::zeDeviceGetMemoryAccessProperties. - NO_DEVICE_ATOMICS = ZE_BIT(3) ## Device atomics on the pointer are not allowed - DEVICE_ATOMICS = ZE_BIT(4) ## Device atomics on the pointer are allowed. Requires - ## ::ZE_MEMORY_ACCESS_CAP_FLAG_ATOMIC returned by - ## ::zeDeviceGetMemoryAccessProperties. - NO_SYSTEM_ATOMICS = ZE_BIT(5) ## Concurrent atomics on the pointer from both host and device are not - ## allowed - SYSTEM_ATOMICS = ZE_BIT(6) ## Concurrent atomics on the pointer from both host and device are - ## allowed. Requires ::ZE_MEMORY_ACCESS_CAP_FLAG_CONCURRENT_ATOMIC - ## returned by ::zeDeviceGetMemoryAccessProperties. - -class ze_memory_atomic_attr_exp_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Supported module creation input formats -class ze_module_format_v(IntEnum): - IL_SPIRV = 0 ## Format is SPIRV IL format - NATIVE = 1 ## Format is device native format - -class ze_module_format_t(c_int): - def __str__(self): - return str(ze_module_format_v(self.value)) - - -############################################################################### -## @brief Specialization constants - User defined constants -class ze_module_constants_t(Structure): - _fields_ = [ - ("numConstants", c_ulong), ## [in] Number of specialization constants. - ("pConstantIds", POINTER(c_ulong)), ## [in][range(0, numConstants)] Array of IDs that is sized to - ## numConstants. - ("pConstantValues", POINTER(c_void_p)) ## [in][range(0, numConstants)] Array of pointers to values that is sized - ## to numConstants. - ] - -############################################################################### -## @brief Module descriptor -class ze_module_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("format", ze_module_format_t), ## [in] Module format passed in with pInputModule - ("inputSize", c_size_t), ## [in] size of input IL or ISA from pInputModule. - ("pInputModule", POINTER(c_ubyte)), ## [in] pointer to IL or ISA - ("pBuildFlags", c_char_p), ## [in][optional] string containing one or more (comma-separated) - ## compiler flags. If unsupported, flag is ignored with a warning. - ## - "-ze-opt-disable" - ## - Disable optimizations - ## - "-ze-opt-level" - ## - Specifies optimization level for compiler. Levels are - ## implementation specific. - ## - 0 is no optimizations (equivalent to -ze-opt-disable) - ## - 1 is optimize minimally (may be the same as 2) - ## - 2 is optimize more (default) - ## - "-ze-opt-greater-than-4GB-buffer-required" - ## - Use 64-bit offset calculations for buffers. - ## - "-ze-opt-large-register-file" - ## - Increase number of registers available to threads. - ## - "-ze-opt-has-buffer-offset-arg" - ## - Extend stateless to stateful optimization to more - ## cases with the use of additional offset (e.g. 64-bit - ## pointer to binding table with 32-bit offset). - ## - "-g" - ## - Include debugging information. - ("pConstants", POINTER(ze_module_constants_t)) ## [in][optional] pointer to specialization constants. Valid only for - ## SPIR-V input. This must be set to nullptr if no specialization - ## constants are provided. - ] - -############################################################################### -## @brief Append launch kernel with parameters cooperative descriptor -class ze_command_list_append_launch_kernel_param_cooperative_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("isCooperative", ze_bool_t) ## [in] When true, kernel is treated as cooperative. - ] - -############################################################################### -## @brief Supported module property flags -class ze_module_property_flags_v(IntEnum): - IMPORTS = ZE_BIT(0) ## Module has imports (i.e. imported global variables and/or kernels). - ## See ::zeModuleDynamicLink. - -class ze_module_property_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Module properties -class ze_module_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_module_property_flags_t) ## [out] 0 (none) or a valid combination of ::ze_module_property_flag_t - ] - -############################################################################### -## @brief Supported kernel creation flags -class ze_kernel_flags_v(IntEnum): - FORCE_RESIDENCY = ZE_BIT(0) ## force all device allocations to be resident during execution - EXPLICIT_RESIDENCY = ZE_BIT(1) ## application is responsible for all residency of device allocations. - ## driver may disable implicit residency management. - -class ze_kernel_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Kernel descriptor -class ze_kernel_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_kernel_flags_t), ## [in] creation flags. - ## must be 0 (default) or a valid combination of ::ze_kernel_flag_t; - ## default behavior may use driver-based residency. - ("pKernelName", c_char_p) ## [in] null-terminated name of kernel in module - ] - -############################################################################### -## @brief Kernel indirect access flags -class ze_kernel_indirect_access_flags_v(IntEnum): - HOST = ZE_BIT(0) ## Indicates that the kernel accesses host allocations indirectly. - DEVICE = ZE_BIT(1) ## Indicates that the kernel accesses device allocations indirectly. - SHARED = ZE_BIT(2) ## Indicates that the kernel accesses shared allocations indirectly. - -class ze_kernel_indirect_access_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Supported Cache Config flags -class ze_cache_config_flags_v(IntEnum): - LARGE_SLM = ZE_BIT(0) ## Large SLM size - LARGE_DATA = ZE_BIT(1) ## Large General Data size - -class ze_cache_config_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Maximum kernel universal unique id (UUID) size in bytes -ZE_MAX_KERNEL_UUID_SIZE = 16 - -############################################################################### -## @brief Maximum module universal unique id (UUID) size in bytes -ZE_MAX_MODULE_UUID_SIZE = 16 - -############################################################################### -## @brief Kernel universal unique id (UUID) -class ze_kernel_uuid_t(Structure): - _fields_ = [ - ("kid", c_ubyte * ZE_MAX_KERNEL_UUID_SIZE), ## [out] opaque data representing a kernel UUID - ("mid", c_ubyte * ZE_MAX_MODULE_UUID_SIZE) ## [out] opaque data representing the kernel's module UUID - ] - -############################################################################### -## @brief Kernel properties -class ze_kernel_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("numKernelArgs", c_ulong), ## [out] number of kernel arguments. - ("requiredGroupSizeX", c_ulong), ## [out] required group size in the X dimension, - ## or zero if there is no required group size - ("requiredGroupSizeY", c_ulong), ## [out] required group size in the Y dimension, - ## or zero if there is no required group size - ("requiredGroupSizeZ", c_ulong), ## [out] required group size in the Z dimension, - ## or zero if there is no required group size - ("requiredNumSubGroups", c_ulong), ## [out] required number of subgroups per thread group, - ## or zero if there is no required number of subgroups - ("requiredSubgroupSize", c_ulong), ## [out] required subgroup size, - ## or zero if there is no required subgroup size - ("maxSubgroupSize", c_ulong), ## [out] maximum subgroup size - ("maxNumSubgroups", c_ulong), ## [out] maximum number of subgroups per thread group - ("localMemSize", c_ulong), ## [out] local memory size used by each thread group - ("privateMemSize", c_ulong), ## [out] private memory size allocated by compiler used by each thread - ("spillMemSize", c_ulong), ## [out] spill memory size allocated by compiler - ("uuid", ze_kernel_uuid_t) ## [out] universal unique identifier. - ] - -############################################################################### -## @brief Additional kernel preferred group size properties -## -## @details -## - This structure may be passed to ::zeKernelGetProperties, via the -## `pNext` member of ::ze_kernel_properties_t, to query additional kernel -## preferred group size properties. -class ze_kernel_preferred_group_size_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("preferredMultiple", c_ulong) ## [out] preferred group size multiple - ] - -############################################################################### -## @brief Kernel dispatch group count. -class ze_group_count_t(Structure): - _fields_ = [ - ("groupCountX", c_ulong), ## [in] number of thread groups in X dimension - ("groupCountY", c_ulong), ## [in] number of thread groups in Y dimension - ("groupCountZ", c_ulong) ## [in] number of thread groups in Z dimension - ] - -############################################################################### -## @brief Kernel dispatch group sizes. -class ze_group_size_t(Structure): - _fields_ = [ - ("groupSizeX", c_ulong), ## [in] size of thread group in X dimension - ("groupSizeY", c_ulong), ## [in] size of thread group in Y dimension - ("groupSizeZ", c_ulong) ## [in] size of thread group in Z dimension - ] - -############################################################################### -## @brief Module Program Extension Name -ZE_MODULE_PROGRAM_EXP_NAME = "ZE_experimental_module_program" - -############################################################################### -## @brief Module Program Extension Version(s) -class ze_module_program_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_module_program_exp_version_t(c_int): - def __str__(self): - return str(ze_module_program_exp_version_v(self.value)) - - -############################################################################### -## @brief Module extended descriptor to support multiple input modules. -## -## @details -## - Implementation must support ::ZE_MODULE_PROGRAM_EXP_NAME extension -## - Modules support import and export linkage for functions and global -## variables. -## - pInputModules, pBuildFlags, and pConstants from ::ze_module_desc_t is -## ignored. -## - Format in ::ze_module_desc_t needs to be set to -## ::ZE_MODULE_FORMAT_IL_SPIRV or ::ZE_MODULE_FORMAT_NATIVE. -## - All modules in the list must be of the same format and match the -## format specified in ::ze_module_desc_t. -class ze_module_program_exp_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("count", c_ulong), ## [in] Count of input modules - ("inputSizes", POINTER(c_size_t)), ## [in][range(0, count)] sizes of each input module in pInputModules. - ("pInputModules", POINTER(c_ubyte*)), ## [in][range(0, count)] pointer to an array of binary modules in format - ## specified as part of ::ze_module_desc_t. - ("pBuildFlags", POINTER(c_char_p)), ## [in][optional][range(0, count)] array of strings containing build - ## flags. See pBuildFlags in ::ze_module_desc_t. - ("pConstants", POINTER(ze_module_constants_t*)) ## [in][optional][range(0, count)] pointer to array of specialization - ## constant strings. Valid only for SPIR-V input. This must be set to - ## nullptr if no specialization constants are provided. - ] - -############################################################################### -## @brief Raytracing Extension Name -ZE_RAYTRACING_EXT_NAME = "ZE_extension_raytracing" - -############################################################################### -## @brief Raytracing Extension Version(s) -class ze_raytracing_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_raytracing_ext_version_t(c_int): - def __str__(self): - return str(ze_raytracing_ext_version_v(self.value)) - - -############################################################################### -## @brief Supported raytracing capability flags -class ze_device_raytracing_ext_flags_v(IntEnum): - RAYQUERY = ZE_BIT(0) ## Supports rayquery - -class ze_device_raytracing_ext_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Raytracing properties queried using ::zeDeviceGetModuleProperties -## -## @details -## - This structure may be returned from ::zeDeviceGetModuleProperties, via -## the `pNext` member of ::ze_device_module_properties_t. -class ze_device_raytracing_ext_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_device_raytracing_ext_flags_t), ## [out] 0 or a valid combination of ::ze_device_raytracing_ext_flags_t - ("maxBVHLevels", c_ulong) ## [out] Maximum number of BVH levels supported - ] - -############################################################################### -## @brief Supported raytracing memory allocation flags -class ze_raytracing_mem_alloc_ext_flags_v(IntEnum): - TBD = ZE_BIT(0) ## reserved for future use - -class ze_raytracing_mem_alloc_ext_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Raytracing memory allocation descriptor -## -## @details -## - This structure must be passed to ::zeMemAllocShared or -## ::zeMemAllocDevice, via the `pNext` member of -## ::ze_device_mem_alloc_desc_t, for any memory allocation that is to be -## accessed by raytracing fixed-function of the device. -class ze_raytracing_mem_alloc_ext_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_raytracing_mem_alloc_ext_flags_t) ## [in] flags specifying additional allocation controls. - ## must be 0 (default) or a valid combination of ::ze_raytracing_mem_alloc_ext_flag_t; - ## default behavior may use implicit driver-based heuristics. - ] - -############################################################################### -## @brief Sampler addressing modes -class ze_sampler_address_mode_v(IntEnum): - NONE = 0 ## No coordinate modifications for out-of-bounds image access. - REPEAT = 1 ## Out-of-bounds coordinates are wrapped back around. - CLAMP = 2 ## Out-of-bounds coordinates are clamped to edge. - CLAMP_TO_BORDER = 3 ## Out-of-bounds coordinates are clamped to border color which is (0.0f, - ## 0.0f, 0.0f, 0.0f) if image format swizzle contains alpha, otherwise - ## (0.0f, 0.0f, 0.0f, 1.0f). - MIRROR = 4 ## Out-of-bounds coordinates are mirrored starting from edge. - -class ze_sampler_address_mode_t(c_int): - def __str__(self): - return str(ze_sampler_address_mode_v(self.value)) - - -############################################################################### -## @brief Sampler filtering modes -class ze_sampler_filter_mode_v(IntEnum): - NEAREST = 0 ## No coordinate modifications for out of bounds image access. - LINEAR = 1 ## Out-of-bounds coordinates are wrapped back around. - -class ze_sampler_filter_mode_t(c_int): - def __str__(self): - return str(ze_sampler_filter_mode_v(self.value)) - - -############################################################################### -## @brief Sampler descriptor -class ze_sampler_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("addressMode", ze_sampler_address_mode_t), ## [in] Sampler addressing mode to determine how out-of-bounds - ## coordinates are handled. - ("filterMode", ze_sampler_filter_mode_t), ## [in] Sampler filter mode to determine how samples are filtered. - ("isNormalized", ze_bool_t) ## [in] Are coordinates normalized [0, 1] or not. - ] - -############################################################################### -## @brief Virtual memory page access attributes -class ze_memory_access_attribute_v(IntEnum): - NONE = 0 ## Indicates the memory page is inaccessible. - READWRITE = 1 ## Indicates the memory page supports read write access. - READONLY = 2 ## Indicates the memory page supports read-only access. - -class ze_memory_access_attribute_t(c_int): - def __str__(self): - return str(ze_memory_access_attribute_v(self.value)) - - -############################################################################### -## @brief Supported physical memory creation flags -class ze_physical_mem_flags_v(IntEnum): - ALLOCATE_ON_DEVICE = ZE_BIT(0) ## [default] allocate physical device memory. - ALLOCATE_ON_HOST = ZE_BIT(1) ## Allocate physical host memory instead. - -class ze_physical_mem_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Physical memory descriptor -class ze_physical_mem_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_physical_mem_flags_t), ## [in] creation flags. - ## must be 0 (default) or a valid combination of - ## ::ze_physical_mem_flag_t; default is to create physical device memory. - ("size", c_size_t) ## [in] size in bytes to reserve; must be page aligned. - ] - -############################################################################### -## @brief Physical memory properties queried using ::zePhysicalMemGetProperties -class ze_physical_mem_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("id", c_ulonglong), ## [out] unique identifier for the physical memory object - ("size", c_ulonglong) ## [out] size of the physical memory object in bytes - ] - -############################################################################### -## @brief Floating-Point Atomics Extension Name -ZE_FLOAT_ATOMICS_EXT_NAME = "ZE_extension_float_atomics" - -############################################################################### -## @brief Floating-Point Atomics Extension Version(s) -class ze_float_atomics_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_float_atomics_ext_version_t(c_int): - def __str__(self): - return str(ze_float_atomics_ext_version_v(self.value)) - - -############################################################################### -## @brief Supported floating-point atomic capability flags -class ze_device_fp_atomic_ext_flags_v(IntEnum): - GLOBAL_LOAD_STORE = ZE_BIT(0) ## Supports atomic load, store, and exchange - GLOBAL_ADD = ZE_BIT(1) ## Supports atomic add and subtract - GLOBAL_MIN_MAX = ZE_BIT(2) ## Supports atomic min and max - LOCAL_LOAD_STORE = ZE_BIT(16) ## Supports atomic load, store, and exchange - LOCAL_ADD = ZE_BIT(17) ## Supports atomic add and subtract - LOCAL_MIN_MAX = ZE_BIT(18) ## Supports atomic min and max - -class ze_device_fp_atomic_ext_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Device floating-point atomic properties queried using -## ::zeDeviceGetModuleProperties -## -## @details -## - This structure may be returned from ::zeDeviceGetModuleProperties, via -## the `pNext` member of ::ze_device_module_properties_t. -class ze_float_atomic_ext_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("fp16Flags", ze_device_fp_atomic_ext_flags_t), ## [out] Capabilities for half-precision floating-point atomic operations - ("fp32Flags", ze_device_fp_atomic_ext_flags_t), ## [out] Capabilities for single-precision floating-point atomic - ## operations - ("fp64Flags", ze_device_fp_atomic_ext_flags_t) ## [out] Capabilities for double-precision floating-point atomic - ## operations - ] - -############################################################################### -## @brief Global Offset Extension Name -ZE_GLOBAL_OFFSET_EXP_NAME = "ZE_experimental_global_offset" - -############################################################################### -## @brief Global Offset Extension Version(s) -class ze_global_offset_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_global_offset_exp_version_t(c_int): - def __str__(self): - return str(ze_global_offset_exp_version_v(self.value)) - - -############################################################################### -## @brief Relaxed Allocation Limits Extension Name -ZE_RELAXED_ALLOCATION_LIMITS_EXP_NAME = "ZE_experimental_relaxed_allocation_limits" - -############################################################################### -## @brief Relaxed Allocation Limits Extension Version(s) -class ze_relaxed_allocation_limits_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_relaxed_allocation_limits_exp_version_t(c_int): - def __str__(self): - return str(ze_relaxed_allocation_limits_exp_version_v(self.value)) - - -############################################################################### -## @brief Supported relaxed memory allocation flags -class ze_relaxed_allocation_limits_exp_flags_v(IntEnum): - MAX_SIZE = ZE_BIT(0) ## Allocation size may exceed the `maxMemAllocSize` member of - ## ::ze_device_properties_t. - -class ze_relaxed_allocation_limits_exp_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Relaxed limits memory allocation descriptor -## -## @details -## - This structure may be passed to ::zeMemAllocShared or -## ::zeMemAllocDevice, via the `pNext` member of -## ::ze_device_mem_alloc_desc_t. -## - This structure may also be passed to ::zeMemAllocHost, via the `pNext` -## member of ::ze_host_mem_alloc_desc_t. -class ze_relaxed_allocation_limits_exp_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_relaxed_allocation_limits_exp_flags_t) ## [in] flags specifying allocation limits to relax. - ## must be 0 (default) or a valid combination of ::ze_relaxed_allocation_limits_exp_flag_t; - ] - -############################################################################### -## @brief Get Kernel Binary Extension Name -ZE_GET_KERNEL_BINARY_EXP_NAME = "ZE_extension_kernel_binary_exp" - -############################################################################### -## @brief Get Kernel Binary Extension Version(s) -class ze_kernel_get_binary_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_kernel_get_binary_exp_version_t(c_int): - def __str__(self): - return str(ze_kernel_get_binary_exp_version_v(self.value)) - - -############################################################################### -## @brief Driver Direct Device Interface (DDI) Handles Extension Name -ZE_DRIVER_DDI_HANDLES_EXT_NAME = "ZE_extension_driver_ddi_handles" - -############################################################################### -## @brief Driver Direct Device Interface (DDI) Handles Extension Version(s) -class ze_driver_ddi_handles_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - _1_1 = ZE_MAKE_VERSION( 1, 1 ) ## version 1.1 - CURRENT = ZE_MAKE_VERSION( 1, 1 ) ## latest known version - -class ze_driver_ddi_handles_ext_version_t(c_int): - def __str__(self): - return str(ze_driver_ddi_handles_ext_version_v(self.value)) - - -############################################################################### -## @brief Driver Direct Device Interface (DDI) Handle Extension Flags -class ze_driver_ddi_handle_ext_flags_v(IntEnum): - DDI_HANDLE_EXT_SUPPORTED = ZE_BIT(0) ## Driver Supports DDI Handles Extension - -class ze_driver_ddi_handle_ext_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Driver DDI Handles properties queried using ::zeDriverGetProperties -## -## @details -## - This structure may be returned from ::zeDriverGetProperties, via the -## `pNext` member of ::ze_driver_properties_t. -class ze_driver_ddi_handles_ext_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_driver_ddi_handle_ext_flags_t) ## [out] 0 (none) or a valid combination of ::ze_driver_ddi_handle_ext_flags_t - ] - -############################################################################### -## @brief External Semaphores Extension Name -ZE_EXTERNAL_SEMAPHORES_EXTENSION_NAME = "ZE_extension_external_semaphores" - -############################################################################### -## @brief External Semaphores Extension Version -class ze_external_semaphore_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_external_semaphore_ext_version_t(c_int): - def __str__(self): - return str(ze_external_semaphore_ext_version_v(self.value)) - - -############################################################################### -## @brief Handle of external semaphore object -class ze_external_semaphore_ext_handle_t(c_void_p): - pass - -############################################################################### -## @brief External Semaphores Type Flags -class ze_external_semaphore_ext_flags_v(IntEnum): - OPAQUE_FD = ZE_BIT(0) ## Semaphore is an Linux opaque file descriptor - OPAQUE_WIN32 = ZE_BIT(1) ## Semaphore is an opaque Win32 handle for monitored fence - OPAQUE_WIN32_KMT = ZE_BIT(2) ## Semaphore is an opaque Win32 KMT handle for monitored fence - D3D12_FENCE = ZE_BIT(3) ## Semaphore is a D3D12 fence - D3D11_FENCE = ZE_BIT(4) ## Semaphore is a D3D11 fence - KEYED_MUTEX = ZE_BIT(5) ## Semaphore is a keyed mutex for Win32 - KEYED_MUTEX_KMT = ZE_BIT(6) ## Semaphore is a keyed mutex for Win32 KMT - VK_TIMELINE_SEMAPHORE_FD = ZE_BIT(7) ## Semaphore is a Vulkan Timeline semaphore for Linux - VK_TIMELINE_SEMAPHORE_WIN32 = ZE_BIT(8) ## Semaphore is a Vulkan Timeline semaphore for Win32 - -class ze_external_semaphore_ext_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief External Semaphore Descriptor -class ze_external_semaphore_ext_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_external_semaphore_ext_flags_t) ## [in] The flags describing the type of the semaphore. - ## must be 0 (default) or a valid combination of ::ze_external_semaphore_ext_flag_t. - ## When importing a semaphore, pNext should be pointing to one of the - ## following structures: ::ze_external_semaphore_win32_ext_desc_t or ::ze_external_semaphore_fd_ext_desc_t. - ] - -############################################################################### -## @brief External Semaphore Win32 Descriptor -class ze_external_semaphore_win32_ext_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("handle", c_void_p), ## [in] Win32 handle of the semaphore. - ## Must be a valid Win32 handle. - ("name", c_char_p) ## [in] Name of the semaphore. - ## Must be a valid null-terminated string. - ] - -############################################################################### -## @brief External Semaphore FD Descriptor -class ze_external_semaphore_fd_ext_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("fd", c_int) ## [in] File descriptor of the semaphore. - ## Must be a valid file descriptor. - ] - -############################################################################### -## @brief External Semaphore Signal parameters -class ze_external_semaphore_signal_params_ext_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("value", c_ulonglong) ## [in] [optional] Value to signal. - ## Specified by user as an expected value with some of semaphore types, - ## such as ::ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_D3D12_FENCE. - ] - -############################################################################### -## @brief External Semaphore Wait parameters -class ze_external_semaphore_wait_params_ext_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("value", c_ulonglong) ## [in] [optional] Value to wait for. - ## Specified by user as an expected value with some of semaphore types, - ## such as ::ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_D3D12_FENCE. - ] - -############################################################################### -## @brief CacheLine Size Extension Name -ZE_CACHELINE_SIZE_EXT_NAME = "ZE_extension_device_cache_line_size" - -############################################################################### -## @brief CacheLine Size Extension Version(s) -class ze_device_cache_line_size_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_device_cache_line_size_ext_version_t(c_int): - def __str__(self): - return str(ze_device_cache_line_size_ext_version_v(self.value)) - - -############################################################################### -## @brief CacheLine Size queried using ::zeDeviceGetCacheProperties -## -## @details -## - This structure may be returned from ::zeDeviceGetCacheProperties via -## the `pNext` member of ::ze_device_cache_properties_t. -## - Used for determining the cache line size supported on a device. -class ze_device_cache_line_size_ext_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("cacheLineSize", c_size_t) ## [out] The cache line size in bytes. - ] - -############################################################################### -## @brief Ray Tracing Acceleration Structure Extension Name -ZE_RTAS_EXT_NAME = "ZE_extension_rtas" - -############################################################################### -## @brief Ray Tracing Acceleration Structure Builder Extension Version(s) -class ze_rtas_builder_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_rtas_builder_ext_version_t(c_int): - def __str__(self): - return str(ze_rtas_builder_ext_version_v(self.value)) - - -############################################################################### -## @brief Ray tracing acceleration structure device flags -class ze_rtas_device_ext_flags_v(IntEnum): - RESERVED = ZE_BIT(0) ## reserved for future use - -class ze_rtas_device_ext_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Ray tracing acceleration structure format -## -## @details -## - This is an opaque ray tracing acceleration structure format -## identifier. -class ze_rtas_format_ext_v(IntEnum): - INVALID = 0x0 ## Invalid acceleration structure format code - MAX = 0x7ffffffe ## Maximum acceleration structure format code - -class ze_rtas_format_ext_t(c_int): - def __str__(self): - return str(ze_rtas_format_ext_v(self.value)) - - -############################################################################### -## @brief Ray tracing acceleration structure builder flags -class ze_rtas_builder_ext_flags_v(IntEnum): - RESERVED = ZE_BIT(0) ## Reserved for future use - -class ze_rtas_builder_ext_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Ray tracing acceleration structure builder parallel operation flags -class ze_rtas_parallel_operation_ext_flags_v(IntEnum): - RESERVED = ZE_BIT(0) ## Reserved for future use - -class ze_rtas_parallel_operation_ext_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Ray tracing acceleration structure builder geometry flags -class ze_rtas_builder_geometry_ext_flags_v(IntEnum): - NON_OPAQUE = ZE_BIT(0) ## non-opaque geometries invoke an any-hit shader - -class ze_rtas_builder_geometry_ext_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Packed ray tracing acceleration structure builder geometry flags (see -## ::ze_rtas_builder_geometry_ext_flags_t) -class ze_rtas_builder_packed_geometry_ext_flags_t(c_ubyte): - pass - -############################################################################### -## @brief Ray tracing acceleration structure builder instance flags -class ze_rtas_builder_instance_ext_flags_v(IntEnum): - TRIANGLE_CULL_DISABLE = ZE_BIT(0) ## disables culling of front-facing and back-facing triangles - TRIANGLE_FRONT_COUNTERCLOCKWISE = ZE_BIT(1) ## reverses front and back face of triangles - TRIANGLE_FORCE_OPAQUE = ZE_BIT(2) ## forces instanced geometry to be opaque, unless ray flag forces it to - ## be non-opaque - TRIANGLE_FORCE_NON_OPAQUE = ZE_BIT(3) ## forces instanced geometry to be non-opaque, unless ray flag forces it - ## to be opaque - -class ze_rtas_builder_instance_ext_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Packed ray tracing acceleration structure builder instance flags (see -## ::ze_rtas_builder_instance_ext_flags_t) -class ze_rtas_builder_packed_instance_ext_flags_t(c_ubyte): - pass - -############################################################################### -## @brief Ray tracing acceleration structure builder build operation flags -## -## @details -## - These flags allow the application to tune the acceleration structure -## build operation. -## - The acceleration structure builder implementation might choose to use -## spatial splitting to split large or long primitives into smaller -## pieces. This may result in any-hit shaders being invoked multiple -## times for non-opaque primitives, unless -## ::ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION is specified. -## - Usage of any of these flags may reduce ray tracing performance. -class ze_rtas_builder_build_op_ext_flags_v(IntEnum): - COMPACT = ZE_BIT(0) ## build more compact acceleration structure - NO_DUPLICATE_ANYHIT_INVOCATION = ZE_BIT(1) ## guarantees single any-hit shader invocation per primitive - -class ze_rtas_builder_build_op_ext_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Ray tracing acceleration structure builder build quality hint -## -## @details -## - Depending on use case different quality modes for acceleration -## structure build are supported. -## - A low-quality build builds an acceleration structure fast, but at the -## cost of some reduction in ray tracing performance. This mode is -## recommended for dynamic content, such as animated characters. -## - A medium-quality build uses a compromise between build quality and ray -## tracing performance. This mode should be used by default. -## - Higher ray tracing performance can be achieved by using a high-quality -## build, but acceleration structure build performance might be -## significantly reduced. -class ze_rtas_builder_build_quality_hint_ext_v(IntEnum): - LOW = 0 ## build low-quality acceleration structure (fast) - MEDIUM = 1 ## build medium-quality acceleration structure (slower) - HIGH = 2 ## build high-quality acceleration structure (slow) - -class ze_rtas_builder_build_quality_hint_ext_t(c_int): - def __str__(self): - return str(ze_rtas_builder_build_quality_hint_ext_v(self.value)) - - -############################################################################### -## @brief Ray tracing acceleration structure builder geometry type -class ze_rtas_builder_geometry_type_ext_v(IntEnum): - TRIANGLES = 0 ## triangle mesh geometry type - QUADS = 1 ## quad mesh geometry type - PROCEDURAL = 2 ## procedural geometry type - INSTANCE = 3 ## instance geometry type - -class ze_rtas_builder_geometry_type_ext_t(c_int): - def __str__(self): - return str(ze_rtas_builder_geometry_type_ext_v(self.value)) - - -############################################################################### -## @brief Packed ray tracing acceleration structure builder geometry type (see -## ::ze_rtas_builder_geometry_type_ext_t) -class ze_rtas_builder_packed_geometry_type_ext_t(c_ubyte): - pass - -############################################################################### -## @brief Ray tracing acceleration structure data buffer element format -## -## @details -## - Specifies the format of data buffer elements. -## - Data buffers may contain instancing transform matrices, triangle/quad -## vertex indices, etc... -class ze_rtas_builder_input_data_format_ext_v(IntEnum): - FLOAT3 = 0 ## 3-component float vector (see ::ze_rtas_float3_ext_t) - FLOAT3X4_COLUMN_MAJOR = 1 ## 3x4 affine transformation in column-major format (see - ## ::ze_rtas_transform_float3x4_column_major_ext_t) - FLOAT3X4_ALIGNED_COLUMN_MAJOR = 2 ## 3x4 affine transformation in column-major format (see - ## ::ze_rtas_transform_float3x4_aligned_column_major_ext_t) - FLOAT3X4_ROW_MAJOR = 3 ## 3x4 affine transformation in row-major format (see - ## ::ze_rtas_transform_float3x4_row_major_ext_t) - AABB = 4 ## 3-dimensional axis-aligned bounding-box (see ::ze_rtas_aabb_ext_t) - TRIANGLE_INDICES_UINT32 = 5 ## Unsigned 32-bit triangle indices (see - ## ::ze_rtas_triangle_indices_uint32_ext_t) - QUAD_INDICES_UINT32 = 6 ## Unsigned 32-bit quad indices (see ::ze_rtas_quad_indices_uint32_ext_t) - -class ze_rtas_builder_input_data_format_ext_t(c_int): - def __str__(self): - return str(ze_rtas_builder_input_data_format_ext_v(self.value)) - - -############################################################################### -## @brief Packed ray tracing acceleration structure data buffer element format -## (see ::ze_rtas_builder_input_data_format_ext_t) -class ze_rtas_builder_packed_input_data_format_ext_t(c_ubyte): - pass - -############################################################################### -## @brief Handle of ray tracing acceleration structure builder object -class ze_rtas_builder_ext_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of ray tracing acceleration structure builder parallel -## operation object -class ze_rtas_parallel_operation_ext_handle_t(c_void_p): - pass - -############################################################################### -## @brief Ray tracing acceleration structure builder descriptor -class ze_rtas_builder_ext_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("builderVersion", ze_rtas_builder_ext_version_t) ## [in] ray tracing acceleration structure builder version - ] - -############################################################################### -## @brief Ray tracing acceleration structure builder properties -class ze_rtas_builder_ext_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_rtas_builder_ext_flags_t), ## [out] ray tracing acceleration structure builder flags - ("rtasBufferSizeBytesExpected", c_size_t), ## [out] expected size (in bytes) required for acceleration structure buffer - ## - When using an acceleration structure buffer of this size, the - ## build is expected to succeed; however, it is possible that the build - ## may fail with ::ZE_RESULT_EXT_RTAS_BUILD_RETRY - ("rtasBufferSizeBytesMaxRequired", c_size_t), ## [out] worst-case size (in bytes) required for acceleration structure buffer - ## - When using an acceleration structure buffer of this size, the - ## build is guaranteed to not run out of memory. - ("scratchBufferSizeBytes", c_size_t) ## [out] scratch buffer size (in bytes) required for acceleration - ## structure build. - ] - -############################################################################### -## @brief Ray tracing acceleration structure builder parallel operation -## properties -class ze_rtas_parallel_operation_ext_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_rtas_parallel_operation_ext_flags_t), ## [out] ray tracing acceleration structure builder parallel operation - ## flags - ("maxConcurrency", c_ulong) ## [out] maximum number of threads that may join the parallel operation - ] - -############################################################################### -## @brief Ray tracing acceleration structure device properties -## -## @details -## - This structure may be passed to ::zeDeviceGetProperties, via `pNext` -## member of ::ze_device_properties_t. -## - The implementation shall populate `format` with a value other than -## ::ZE_RTAS_FORMAT_EXT_INVALID when the device supports ray tracing. -class ze_rtas_device_ext_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_rtas_device_ext_flags_t), ## [out] ray tracing acceleration structure device flags - ("rtasFormat", ze_rtas_format_ext_t), ## [out] ray tracing acceleration structure format - ("rtasBufferAlignment", c_ulong) ## [out] required alignment of acceleration structure buffer - ] - -############################################################################### -## @brief A 3-component vector type -class ze_rtas_float3_ext_t(Structure): - _fields_ = [ - ("x", c_float), ## [in] x-coordinate of float3 vector - ("y", c_float), ## [in] y-coordinate of float3 vector - ("z", c_float) ## [in] z-coordinate of float3 vector - ] - -############################################################################### -## @brief 3x4 affine transformation in column-major layout -## -## @details -## - A 3x4 affine transformation in column major layout, consisting of vectors -## - vx=(vx_x, vx_y, vx_z), -## - vy=(vy_x, vy_y, vy_z), -## - vz=(vz_x, vz_y, vz_z), and -## - p=(p_x, p_y, p_z) -## - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + -## z*vz + p`. -class ze_rtas_transform_float3x4_column_major_ext_t(Structure): - _fields_ = [ - ("vx_x", c_float), ## [in] element 0 of column 0 of 3x4 matrix - ("vx_y", c_float), ## [in] element 1 of column 0 of 3x4 matrix - ("vx_z", c_float), ## [in] element 2 of column 0 of 3x4 matrix - ("vy_x", c_float), ## [in] element 0 of column 1 of 3x4 matrix - ("vy_y", c_float), ## [in] element 1 of column 1 of 3x4 matrix - ("vy_z", c_float), ## [in] element 2 of column 1 of 3x4 matrix - ("vz_x", c_float), ## [in] element 0 of column 2 of 3x4 matrix - ("vz_y", c_float), ## [in] element 1 of column 2 of 3x4 matrix - ("vz_z", c_float), ## [in] element 2 of column 2 of 3x4 matrix - ("p_x", c_float), ## [in] element 0 of column 3 of 3x4 matrix - ("p_y", c_float), ## [in] element 1 of column 3 of 3x4 matrix - ("p_z", c_float) ## [in] element 2 of column 3 of 3x4 matrix - ] - -############################################################################### -## @brief 3x4 affine transformation in column-major layout with aligned column -## vectors -## -## @details -## - A 3x4 affine transformation in column major layout, consisting of vectors -## - vx=(vx_x, vx_y, vx_z), -## - vy=(vy_x, vy_y, vy_z), -## - vz=(vz_x, vz_y, vz_z), and -## - p=(p_x, p_y, p_z) -## - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + -## z*vz + p`. -## - The column vectors are aligned to 16-bytes and pad members are -## ignored. -class ze_rtas_transform_float3x4_aligned_column_major_ext_t(Structure): - _fields_ = [ - ("vx_x", c_float), ## [in] element 0 of column 0 of 3x4 matrix - ("vx_y", c_float), ## [in] element 1 of column 0 of 3x4 matrix - ("vx_z", c_float), ## [in] element 2 of column 0 of 3x4 matrix - ("pad0", c_float), ## [in] ignored padding - ("vy_x", c_float), ## [in] element 0 of column 1 of 3x4 matrix - ("vy_y", c_float), ## [in] element 1 of column 1 of 3x4 matrix - ("vy_z", c_float), ## [in] element 2 of column 1 of 3x4 matrix - ("pad1", c_float), ## [in] ignored padding - ("vz_x", c_float), ## [in] element 0 of column 2 of 3x4 matrix - ("vz_y", c_float), ## [in] element 1 of column 2 of 3x4 matrix - ("vz_z", c_float), ## [in] element 2 of column 2 of 3x4 matrix - ("pad2", c_float), ## [in] ignored padding - ("p_x", c_float), ## [in] element 0 of column 3 of 3x4 matrix - ("p_y", c_float), ## [in] element 1 of column 3 of 3x4 matrix - ("p_z", c_float), ## [in] element 2 of column 3 of 3x4 matrix - ("pad3", c_float) ## [in] ignored padding - ] - -############################################################################### -## @brief 3x4 affine transformation in row-major layout -## -## @details -## - A 3x4 affine transformation in row-major layout, consisting of vectors -## - vx=(vx_x, vx_y, vx_z), -## - vy=(vy_x, vy_y, vy_z), -## - vz=(vz_x, vz_y, vz_z), and -## - p=(p_x, p_y, p_z) -## - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + -## z*vz + p`. -class ze_rtas_transform_float3x4_row_major_ext_t(Structure): - _fields_ = [ - ("vx_x", c_float), ## [in] element 0 of row 0 of 3x4 matrix - ("vy_x", c_float), ## [in] element 1 of row 0 of 3x4 matrix - ("vz_x", c_float), ## [in] element 2 of row 0 of 3x4 matrix - ("p_x", c_float), ## [in] element 3 of row 0 of 3x4 matrix - ("vx_y", c_float), ## [in] element 0 of row 1 of 3x4 matrix - ("vy_y", c_float), ## [in] element 1 of row 1 of 3x4 matrix - ("vz_y", c_float), ## [in] element 2 of row 1 of 3x4 matrix - ("p_y", c_float), ## [in] element 3 of row 1 of 3x4 matrix - ("vx_z", c_float), ## [in] element 0 of row 2 of 3x4 matrix - ("vy_z", c_float), ## [in] element 1 of row 2 of 3x4 matrix - ("vz_z", c_float), ## [in] element 2 of row 2 of 3x4 matrix - ("p_z", c_float) ## [in] element 3 of row 2 of 3x4 matrix - ] - -############################################################################### -## @brief A 3-dimensional axis-aligned bounding-box with lower and upper bounds -## in each dimension -class ze_rtas_aabb_ext_t(Structure): - _fields_ = [ - ("lower", ze_rtas_c_float3_ext_t), ## [in] lower bounds of AABB - ("upper", ze_rtas_c_float3_ext_t) ## [in] upper bounds of AABB - ] - -############################################################################### -## @brief Triangle represented using 3 vertex indices -## -## @details -## - Represents a triangle using 3 vertex indices that index into a vertex -## array that needs to be provided together with the index array. -## - The linear barycentric u/v parametrization of the triangle is defined as: -## - (u=0, v=0) at v0, -## - (u=1, v=0) at v1, and -## - (u=0, v=1) at v2 -class ze_rtas_triangle_indices_uint32_ext_t(Structure): - _fields_ = [ - ("v0", c_ulong), ## [in] first index pointing to the first triangle vertex in vertex array - ("v1", c_ulong), ## [in] second index pointing to the second triangle vertex in vertex - ## array - ("v2", c_ulong) ## [in] third index pointing to the third triangle vertex in vertex array - ] - -############################################################################### -## @brief Quad represented using 4 vertex indices -## -## @details -## - Represents a quad composed of 4 indices that index into a vertex array -## that needs to be provided together with the index array. -## - A quad is a triangle pair represented using 4 vertex indices v0, v1, -## v2, v3. -## The first triangle is made out of indices v0, v1, v3 and the second triangle -## from indices v2, v3, v1. The piecewise linear barycentric u/v parametrization -## of the quad is defined as: -## - (u=0, v=0) at v0, -## - (u=1, v=0) at v1, -## - (u=0, v=1) at v3, and -## - (u=1, v=1) at v2 -## This is achieved by correcting the u'/v' coordinates of the second -## triangle by -## *u = 1-u'* and *v = 1-v'*, yielding a piecewise linear parametrization. -class ze_rtas_quad_indices_uint32_ext_t(Structure): - _fields_ = [ - ("v0", c_ulong), ## [in] first index pointing to the first quad vertex in vertex array - ("v1", c_ulong), ## [in] second index pointing to the second quad vertex in vertex array - ("v2", c_ulong), ## [in] third index pointing to the third quad vertex in vertex array - ("v3", c_ulong) ## [in] fourth index pointing to the fourth quad vertex in vertex array - ] - -############################################################################### -## @brief Ray tracing acceleration structure builder geometry info -class ze_rtas_builder_geometry_info_ext_t(Structure): - _fields_ = [ - ("geometryType", ze_rtas_builder_packed_geometry_type_ext_t) ## [in] geometry type - ] - -############################################################################### -## @brief Ray tracing acceleration structure builder triangle mesh geometry info -## -## @details -## - The linear barycentric u/v parametrization of the triangle is defined as: -## - (u=0, v=0) at v0, -## - (u=1, v=0) at v1, and -## - (u=0, v=1) at v2 -class ze_rtas_builder_triangles_geometry_info_ext_t(Structure): - _fields_ = [ - ("geometryType", ze_rtas_builder_packed_geometry_type_ext_t), ## [in] geometry type, must be - ## ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_TRIANGLES - ("geometryFlags", ze_rtas_builder_packed_geometry_ext_flags_t), ## [in] 0 or some combination of ::ze_rtas_builder_geometry_ext_flag_t - ## bits representing the geometry flags for all primitives of this - ## geometry - ("geometryMask", c_ubyte), ## [in] 8-bit geometry mask for ray masking - ("triangleFormat", ze_rtas_builder_packed_input_data_format_ext_t), ## [in] format of triangle buffer data, must be - ## ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_TRIANGLE_INDICES_UINT32 - ("vertexFormat", ze_rtas_builder_packed_input_data_format_ext_t), ## [in] format of vertex buffer data, must be - ## ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3 - ("triangleCount", c_ulong), ## [in] number of triangles in triangle buffer - ("vertexCount", c_ulong), ## [in] number of vertices in vertex buffer - ("triangleStride", c_ulong), ## [in] stride (in bytes) of triangles in triangle buffer - ("vertexStride", c_ulong), ## [in] stride (in bytes) of vertices in vertex buffer - ("pTriangleBuffer", c_void_p), ## [in] pointer to array of triangle indices in specified format - ("pVertexBuffer", c_void_p) ## [in] pointer to array of triangle vertices in specified format - ] - -############################################################################### -## @brief Ray tracing acceleration structure builder quad mesh geometry info -## -## @details -## - A quad is a triangle pair represented using 4 vertex indices v0, v1, -## v2, v3. -## The first triangle is made out of indices v0, v1, v3 and the second triangle -## from indices v2, v3, v1. The piecewise linear barycentric u/v parametrization -## of the quad is defined as: -## - (u=0, v=0) at v0, -## - (u=1, v=0) at v1, -## - (u=0, v=1) at v3, and -## - (u=1, v=1) at v2 -## This is achieved by correcting the u'/v' coordinates of the second -## triangle by -## *u = 1-u'* and *v = 1-v'*, yielding a piecewise linear parametrization. -class ze_rtas_builder_quads_geometry_info_ext_t(Structure): - _fields_ = [ - ("geometryType", ze_rtas_builder_packed_geometry_type_ext_t), ## [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_QUADS - ("geometryFlags", ze_rtas_builder_packed_geometry_ext_flags_t), ## [in] 0 or some combination of ::ze_rtas_builder_geometry_ext_flag_t - ## bits representing the geometry flags for all primitives of this - ## geometry - ("geometryMask", c_ubyte), ## [in] 8-bit geometry mask for ray masking - ("quadFormat", ze_rtas_builder_packed_input_data_format_ext_t), ## [in] format of quad buffer data, must be - ## ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_QUAD_INDICES_UINT32 - ("vertexFormat", ze_rtas_builder_packed_input_data_format_ext_t), ## [in] format of vertex buffer data, must be - ## ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3 - ("quadCount", c_ulong), ## [in] number of quads in quad buffer - ("vertexCount", c_ulong), ## [in] number of vertices in vertex buffer - ("quadStride", c_ulong), ## [in] stride (in bytes) of quads in quad buffer - ("vertexStride", c_ulong), ## [in] stride (in bytes) of vertices in vertex buffer - ("pQuadBuffer", c_void_p), ## [in] pointer to array of quad indices in specified format - ("pVertexBuffer", c_void_p) ## [in] pointer to array of quad vertices in specified format - ] - -############################################################################### -## @brief AABB callback function parameters -class ze_rtas_geometry_aabbs_ext_cb_params_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("primID", c_ulong), ## [in] first primitive to return bounds for - ("primIDCount", c_ulong), ## [in] number of primitives to return bounds for - ("pGeomUserPtr", c_void_p), ## [in] pointer provided through geometry descriptor - ("pBuildUserPtr", c_void_p), ## [in] pointer provided through ::zeRTASBuilderBuildExt function - ("pBoundsOut", POINTER(ze_rtas_aabb_ext_t)) ## [out] destination buffer to write AABB bounds to - ] - -############################################################################### -## @brief Callback function pointer type to return AABBs for a range of -## procedural primitives - -############################################################################### -## @brief Ray tracing acceleration structure builder procedural primitives -## geometry info -## -## @details -## - A host-side bounds callback function is invoked by the acceleration -## structure builder to query the bounds of procedural primitives on -## demand. The callback is passed some `pGeomUserPtr` that can point to -## an application-side representation of the procedural primitives. -## Further, a second `pBuildUserPtr`, which is set by a parameter to -## ::zeRTASBuilderBuildExt, is passed to the callback. This allows the -## build to change the bounds of the procedural geometry, for example, to -## build a BVH only over a short time range to implement multi-segment -## motion blur. -class ze_rtas_builder_procedural_geometry_info_ext_t(Structure): - _fields_ = [ - ("geometryType", ze_rtas_builder_packed_geometry_type_ext_t), ## [in] geometry type, must be - ## ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_PROCEDURAL - ("geometryFlags", ze_rtas_builder_packed_geometry_ext_flags_t), ## [in] 0 or some combination of ::ze_rtas_builder_geometry_ext_flag_t - ## bits representing the geometry flags for all primitives of this - ## geometry - ("geometryMask", c_ubyte), ## [in] 8-bit geometry mask for ray masking - ("reserved", c_ubyte), ## [in] reserved for future use - ("primCount", c_ulong), ## [in] number of primitives in geometry - ("pfnGetBoundsCb", ze_rtas_geometry_aabbs_cb_ext_t), ## [in] pointer to callback function to get the axis-aligned bounding-box - ## for a range of primitives - ("pGeomUserPtr", c_void_p) ## [in] user data pointer passed to callback - ] - -############################################################################### -## @brief Ray tracing acceleration structure builder instance geometry info -class ze_rtas_builder_instance_geometry_info_ext_t(Structure): - _fields_ = [ - ("geometryType", ze_rtas_builder_packed_geometry_type_ext_t), ## [in] geometry type, must be - ## ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_INSTANCE - ("instanceFlags", ze_rtas_builder_packed_instance_ext_flags_t), ## [in] 0 or some combination of ::ze_rtas_builder_geometry_ext_flag_t - ## bits representing the geometry flags for all primitives of this - ## geometry - ("geometryMask", c_ubyte), ## [in] 8-bit geometry mask for ray masking - ("transformFormat", ze_rtas_builder_packed_input_data_format_ext_t),## [in] format of the specified transformation - ("instanceUserID", c_ulong), ## [in] user-specified identifier for the instance - ("pTransform", c_void_p), ## [in] object-to-world instance transformation in specified format - ("pBounds", POINTER(ze_rtas_aabb_ext_t)), ## [in] object-space axis-aligned bounding-box of the instanced - ## acceleration structure - ("pAccelerationStructure", c_void_p) ## [in] device pointer to acceleration structure to instantiate - ] - -############################################################################### -## @brief -class ze_rtas_builder_build_op_ext_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("rtasFormat", ze_rtas_format_ext_t), ## [in] ray tracing acceleration structure format - ("buildQuality", ze_rtas_builder_build_quality_hint_ext_t), ## [in] acceleration structure build quality hint - ("buildFlags", ze_rtas_builder_build_op_ext_flags_t), ## [in] 0 or some combination of ::ze_rtas_builder_build_op_ext_flag_t - ## flags - ("ppGeometries", POINTER(ze_rtas_builder_geometry_info_ext_t*)),## [in][optional][range(0, `numGeometries`)] NULL or a valid array of - ## pointers to geometry infos - ("numGeometries", c_ulong) ## [in] number of geometries in geometry infos array, can be zero when - ## `ppGeometries` is NULL - ] - -############################################################################### -## @brief Device Vector Sizes Query Extension Name -ZE_DEVICE_VECTOR_SIZES_EXT_NAME = "ZE_extension_device_vector_sizes" - -############################################################################### -## @brief Device Vector Sizes Query Extension Version(s) -class ze_device_vector_sizes_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_device_vector_sizes_ext_version_t(c_int): - def __str__(self): - return str(ze_device_vector_sizes_ext_version_v(self.value)) - - -############################################################################### -## @brief Device Vector Width Properties queried using -## $DeviceGetVectorWidthPropertiesExt -class ze_device_vector_width_properties_ext_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("vector_width_size", c_ulong), ## [out] The associated vector width size supported by the device. - ("preferred_vector_width_char", c_ulong), ## [out] The preferred vector width size for char type supported by the device. - ("preferred_vector_width_short", c_ulong), ## [out] The preferred vector width size for short type supported by the device. - ("preferred_vector_width_int", c_ulong), ## [out] The preferred vector width size for int type supported by the device. - ("preferred_vector_width_long", c_ulong), ## [out] The preferred vector width size for long type supported by the device. - ("preferred_vector_width_float", c_ulong), ## [out] The preferred vector width size for float type supported by the device. - ("preferred_vector_width_double", c_ulong), ## [out] The preferred vector width size for double type supported by the device. - ("preferred_vector_width_half", c_ulong), ## [out] The preferred vector width size for half type supported by the device. - ("native_vector_width_char", c_ulong), ## [out] The native vector width size for char type supported by the device. - ("native_vector_width_short", c_ulong), ## [out] The native vector width size for short type supported by the device. - ("native_vector_width_int", c_ulong), ## [out] The native vector width size for int type supported by the device. - ("native_vector_width_long", c_ulong), ## [out] The native vector width size for long type supported by the device. - ("native_vector_width_float", c_ulong), ## [out] The native vector width size for float type supported by the device. - ("native_vector_width_double", c_ulong), ## [out] The native vector width size for double type supported by the device. - ("native_vector_width_half", c_ulong) ## [out] The native vector width size for half type supported by the device. - ] - -############################################################################### -## @brief External Memory Mapping Extension Name -ZE_EXTERNAL_MEMORY_MAPPING_EXT_NAME = "ZE_extension_external_memmap_sysmem" - -############################################################################### -## @brief External Memory Mapping Extension Version(s) -class ze_external_memmap_sysmem_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_external_memmap_sysmem_ext_version_t(c_int): - def __str__(self): - return str(ze_external_memmap_sysmem_ext_version_v(self.value)) - - -############################################################################### -## @brief Maps external system memory for an allocation -## -## @details -## - This structure may be passed to ::zeMemAllocHost, via the `pNext` -## member of ::ze_host_mem_alloc_desc_t to map system memory for a host -## allocation. -## - The system memory pointer and size being mapped must be page aligned -## based on the supported page sizes on the device. -class ze_external_memmap_sysmem_ext_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("pSystemMemory", c_void_p), ## [in] system memory pointer to map; must be page-aligned. - ("size", c_ulonglong) ## [in] size of the system memory to map; must be page-aligned. - ] - -############################################################################### -## @brief Get Kernel Allocation Properties Extension Name -ZE_GET_KERNEL_ALLOCATION_PROPERTIES_EXP_NAME = "ZE_experimental_kernel_allocation_properties" - -############################################################################### -## @brief Get Kernel Allocation Properties Extension Version(s) -class ze_kernel_get_allocation_properties_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_kernel_get_allocation_properties_exp_version_t(c_int): - def __str__(self): - return str(ze_kernel_get_allocation_properties_exp_version_v(self.value)) - - -############################################################################### -## @brief Kernel allocation properties -class ze_kernel_allocation_exp_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("base", c_ulonglong), ## [out] base address of the allocation - ("size", c_size_t), ## [out] size of allocation - ("type", ze_memory_type_t), ## [out] type of allocation - ("argIndex", c_ulong) ## [out] kernel argument index for current allocation, -1 for driver - ## internal (not kernel argument) allocations - ] - -############################################################################### -## @brief Device Usable Memory Size Properties Extension Name -ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_NAME = "ZE_extension_device_usablemem_size_properties" - -############################################################################### -## @brief Device Usable Mem Size Extension Version(s) -class ze_device_usablemem_size_properties_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_device_usablemem_size_properties_ext_version_t(c_int): - def __str__(self): - return str(ze_device_usablemem_size_properties_ext_version_v(self.value)) - - -############################################################################### -## @brief Memory access property to discover current status of usable memory -## -## @details -## - This structure may be returned from ::zeDeviceGetProperties via the -## `pNext` member of ::ze_device_properties_t -class ze_device_usablemem_size_ext_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("currUsableMemSize", c_ulonglong) ## [out] Returns the available usable memory at the device level. This is - ## typically less than or equal to the available physical memory on the - ## device. It important to note that usable memory size reported is - ## transient in nature and cannot be used to reliably guarentee success - ## of future allocations. The usable memory includes all the memory that - ## the clients can allocate for their use and by L0 Core for its internal - ## allocations. - ] - -############################################################################### -## @brief Image Format Support Extension Name -ZE_IMAGE_FORMAT_SUPPORT_EXT_NAME = "ZE_extension_image_format_support" - -############################################################################### -## @brief Image Format Support Extension Version(s) -class ze_image_format_support_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_image_format_support_ext_version_t(c_int): - def __str__(self): - return str(ze_image_format_support_ext_version_v(self.value)) - - -############################################################################### -## @brief Image format support query properties -## -## @details -## - This structure may be passed to ::zeImageGetProperties via the pNext -## member of ::ze_image_properties_t. -## - The implementation shall populate the supported field based on the -## ::ze_image_desc_t and ::ze_device_handle_t passed to -## ::zeImageGetProperties. -## - This provides a mechanism to query format support without requiring -## image creation. -class ze_image_format_support_ext_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("supported", ze_bool_t) ## [out] boolean flag indicating whether the image format is supported on - ## the queried device - ] - -############################################################################### -## @brief IPC Memory Handle Type Extension Name -ZE_IPC_MEM_HANDLE_TYPE_EXT_NAME = "ZE_extension_ipc_mem_handle_type" - -############################################################################### -## @brief IPC Memory Handle Type Extension Version(s) -class ze_ipc_mem_handle_type_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_ipc_mem_handle_type_ext_version_t(c_int): - def __str__(self): - return str(ze_ipc_mem_handle_type_ext_version_v(self.value)) - - -############################################################################### -## @brief Supported IPC memory handle type flags -class ze_ipc_mem_handle_type_flags_v(IntEnum): - DEFAULT = ZE_BIT(0) ## Local IPC memory handle type for use within the same machine. - FABRIC_ACCESSIBLE = ZE_BIT(1) ## Fabric accessible IPC memory handle type for use across machines via a - ## supported fabric. - -class ze_ipc_mem_handle_type_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief ['IPC Memory Handle Type Extension Descriptor', 'Used in -## ::zeMemGetIpcHandleWithProperties, ::zeMemAllocDevice, and -## ::zeMemAllocHost, ::zePhysicalMemCreate to specify the IPC memory -## handle type to create for this allocation.'] -class ze_ipc_mem_handle_type_ext_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("typeFlags", ze_ipc_mem_handle_type_flags_t) ## [in] valid combination of ::ze_ipc_mem_handle_type_flag_t - ] - -############################################################################### -## @brief Cache_Reservation Extension Name -ZE_CACHE_RESERVATION_EXT_NAME = "ZE_extension_cache_reservation" - -############################################################################### -## @brief Cache_Reservation Extension Version(s) -class ze_cache_reservation_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_cache_reservation_ext_version_t(c_int): - def __str__(self): - return str(ze_cache_reservation_ext_version_v(self.value)) - - -############################################################################### -## @brief Cache Reservation Region -class ze_cache_ext_region_v(IntEnum): - ZE_CACHE_REGION_DEFAULT = 0 ## [DEPRECATED] utilize driver default scheme. Use - ## ::ZE_CACHE_EXT_REGION_DEFAULT. - ZE_CACHE_RESERVE_REGION = 1 ## [DEPRECATED] utilize reserved region. Use - ## ::ZE_CACHE_EXT_REGION_RESERVED. - ZE_CACHE_NON_RESERVED_REGION = 2 ## [DEPRECATED] utilize non-reserverd region. Use - ## ::ZE_CACHE_EXT_REGION_NON_RESERVED. - DEFAULT = 0 ## utilize driver default scheme - RESERVED = 1 ## utilize reserved region - NON_RESERVED = 2 ## utilize non-reserverd region - -class ze_cache_ext_region_t(c_int): - def __str__(self): - return str(ze_cache_ext_region_v(self.value)) - - -############################################################################### -## @brief CacheReservation structure -## -## @details -## - This structure must be passed to ::zeDeviceGetCacheProperties via the -## `pNext` member of ::ze_device_cache_properties_t -## - Used for determining the max cache reservation allowed on device. Size -## of zero means no reservation available. -class ze_cache_reservation_ext_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("maxCacheReservationSize", c_size_t) ## [out] max cache reservation size - ] - -############################################################################### -## @brief Event Query Timestamps Extension Name -ZE_EVENT_QUERY_TIMESTAMPS_EXP_NAME = "ZE_experimental_event_query_timestamps" - -############################################################################### -## @brief Event Query Timestamps Extension Version(s) -class ze_event_query_timestamps_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_event_query_timestamps_exp_version_t(c_int): - def __str__(self): - return str(ze_event_query_timestamps_exp_version_v(self.value)) - - -############################################################################### -## @brief Image Memory Properties Extension Name -ZE_IMAGE_MEMORY_PROPERTIES_EXP_NAME = "ZE_experimental_image_memory_properties" - -############################################################################### -## @brief Image Memory Properties Extension Version(s) -class ze_image_memory_properties_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_image_memory_properties_exp_version_t(c_int): - def __str__(self): - return str(ze_image_memory_properties_exp_version_v(self.value)) - - -############################################################################### -## @brief Image memory properties -class ze_image_memory_properties_exp_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("size", c_ulonglong), ## [out] size of image allocation in bytes. - ("rowPitch", c_ulonglong), ## [out] size of image row in bytes. - ("slicePitch", c_ulonglong) ## [out] size of image slice in bytes. - ] - -############################################################################### -## @brief Image View Extension Name -ZE_IMAGE_VIEW_EXT_NAME = "ZE_extension_image_view" - -############################################################################### -## @brief Image View Extension Version(s) -class ze_image_view_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_image_view_ext_version_t(c_int): - def __str__(self): - return str(ze_image_view_ext_version_v(self.value)) - - -############################################################################### -## @brief Image View Extension Name -ZE_IMAGE_VIEW_EXP_NAME = "ZE_experimental_image_view" - -############################################################################### -## @brief Image View Extension Version(s) -class ze_image_view_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_image_view_exp_version_t(c_int): - def __str__(self): - return str(ze_image_view_exp_version_v(self.value)) - - -############################################################################### -## @brief Image View Planar Extension Name -ZE_IMAGE_VIEW_PLANAR_EXT_NAME = "ZE_extension_image_view_planar" - -############################################################################### -## @brief Image View Planar Extension Version(s) -class ze_image_view_planar_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_image_view_planar_ext_version_t(c_int): - def __str__(self): - return str(ze_image_view_planar_ext_version_v(self.value)) - - -############################################################################### -## @brief Image view planar descriptor -class ze_image_view_planar_ext_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("planeIndex", c_ulong) ## [in] the 0-based plane index (e.g. NV12 is 0 = Y plane, 1 UV plane) - ] - -############################################################################### -## @brief Image View Planar Extension Name -ZE_IMAGE_VIEW_PLANAR_EXP_NAME = "ZE_experimental_image_view_planar" - -############################################################################### -## @brief Image View Planar Extension Version(s) -class ze_image_view_planar_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_image_view_planar_exp_version_t(c_int): - def __str__(self): - return str(ze_image_view_planar_exp_version_v(self.value)) - - -############################################################################### -## @brief Image view planar descriptor -class ze_image_view_planar_exp_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("planeIndex", c_ulong) ## [DEPRECATED] no longer supported, use - ## ::ze_image_view_planar_ext_desc_t instead - ] - -############################################################################### -## @brief Kernel Scheduling Hints Extension Name -ZE_KERNEL_SCHEDULING_HINTS_EXP_NAME = "ZE_experimental_scheduling_hints" - -############################################################################### -## @brief Kernel Scheduling Hints Extension Version(s) -class ze_scheduling_hints_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_scheduling_hints_exp_version_t(c_int): - def __str__(self): - return str(ze_scheduling_hints_exp_version_v(self.value)) - - -############################################################################### -## @brief Supported kernel scheduling hint flags -class ze_scheduling_hint_exp_flags_v(IntEnum): - OLDEST_FIRST = ZE_BIT(0) ## Hint that the kernel prefers oldest-first scheduling - ROUND_ROBIN = ZE_BIT(1) ## Hint that the kernel prefers round-robin scheduling - STALL_BASED_ROUND_ROBIN = ZE_BIT(2) ## Hint that the kernel prefers stall-based round-robin scheduling - -class ze_scheduling_hint_exp_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Device kernel scheduling hint properties queried using -## ::zeDeviceGetModuleProperties -## -## @details -## - This structure may be returned from ::zeDeviceGetModuleProperties, via -## the `pNext` member of ::ze_device_module_properties_t. -class ze_scheduling_hint_exp_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("schedulingHintFlags", ze_scheduling_hint_exp_flags_t) ## [out] Supported kernel scheduling hints. - ## May be 0 (none) or a valid combination of ::ze_scheduling_hint_exp_flag_t. - ] - -############################################################################### -## @brief Kernel scheduling hint descriptor -## -## @details -## - This structure may be passed to ::zeKernelSchedulingHintExp. -class ze_scheduling_hint_exp_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_scheduling_hint_exp_flags_t) ## [in] flags specifying kernel scheduling hints. - ## must be 0 (default) or a valid combination of ::ze_scheduling_hint_exp_flag_t. - ] - -############################################################################### -## @brief Linkonce ODR Extension Name -ZE_LINKONCE_ODR_EXT_NAME = "ZE_extension_linkonce_odr" - -############################################################################### -## @brief Linkonce ODR Extension Version(s) -class ze_linkonce_odr_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_linkonce_odr_ext_version_t(c_int): - def __str__(self): - return str(ze_linkonce_odr_ext_version_v(self.value)) - - -############################################################################### -## @brief Power Saving Hint Extension Name -ZE_CONTEXT_POWER_SAVING_HINT_EXP_NAME = "ZE_experimental_power_saving_hint" - -############################################################################### -## @brief Power Saving Hint Extension Version(s) -class ze_power_saving_hint_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_power_saving_hint_exp_version_t(c_int): - def __str__(self): - return str(ze_power_saving_hint_exp_version_v(self.value)) - - -############################################################################### -## @brief Supported device types -class ze_power_saving_hint_type_v(IntEnum): - MIN = 0 ## Minumum power savings. The device will make no attempt to save power - ## while executing work submitted to this context. - MAX = 100 ## Maximum power savings. The device will do everything to bring power to - ## a minimum while executing work submitted to this context. - -class ze_power_saving_hint_type_t(c_int): - def __str__(self): - return str(ze_power_saving_hint_type_v(self.value)) - - -############################################################################### -## @brief Extended context descriptor containing power saving hint. -class ze_context_power_saving_hint_exp_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("hint", c_ulong) ## [in] power saving hint (default value = 0). This is value from [0,100] - ## and can use pre-defined settings from ::ze_power_saving_hint_type_t. - ] - -############################################################################### -## @brief Subgroups Extension Name -ZE_SUBGROUPS_EXT_NAME = "ZE_extension_subgroups" - -############################################################################### -## @brief Subgroups Extension Version(s) -class ze_subgroup_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_subgroup_ext_version_t(c_int): - def __str__(self): - return str(ze_subgroup_ext_version_v(self.value)) - - -############################################################################### -## @brief EU Count Extension Name -ZE_EU_COUNT_EXT_NAME = "ZE_extension_eu_count" - -############################################################################### -## @brief EU Count Extension Version(s) -class ze_eu_count_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_eu_count_ext_version_t(c_int): - def __str__(self): - return str(ze_eu_count_ext_version_v(self.value)) - - -############################################################################### -## @brief EU count queried using ::zeDeviceGetProperties -## -## @details -## - This structure may be returned from ::zeDeviceGetProperties via the -## `pNext` member of ::ze_device_properties_t. -## - Used for determining the total number of EUs available on device. -class ze_eu_count_ext_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("numTotalEUs", c_ulong) ## [out] Total number of EUs available - ] - -############################################################################### -## @brief PCI Properties Extension Name -ZE_PCI_PROPERTIES_EXT_NAME = "ZE_extension_pci_properties" - -############################################################################### -## @brief PCI Properties Extension Version(s) -class ze_pci_properties_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_pci_properties_ext_version_t(c_int): - def __str__(self): - return str(ze_pci_properties_ext_version_v(self.value)) - - -############################################################################### -## @brief Device PCI address -## -## @details -## - This structure may be passed to ::zeDevicePciGetPropertiesExt as an -## attribute of ::ze_pci_ext_properties_t. -## - A PCI BDF address is the bus:device:function address of the device and -## is useful for locating the device in the PCI switch fabric. -class ze_pci_address_ext_t(Structure): - _fields_ = [ - ("domain", c_ulong), ## [out] PCI domain number - ("bus", c_ulong), ## [out] PCI BDF bus number - ("device", c_ulong), ## [out] PCI BDF device number - ("function", c_ulong) ## [out] PCI BDF function number - ] - -############################################################################### -## @brief Device PCI speed -class ze_pci_speed_ext_t(Structure): - _fields_ = [ - ("genVersion", c_int32_t), ## [out] The link generation. A value of -1 means that this property is - ## unknown. - ("width", c_int32_t), ## [out] The number of lanes. A value of -1 means that this property is - ## unknown. - ("maxBandwidth", c_int64_t) ## [out] The theoretical maximum bandwidth in bytes/sec (sum of all - ## lanes). A value of -1 means that this property is unknown. - ] - -############################################################################### -## @brief Static PCI properties -class ze_pci_ext_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("address", ze_pci_address_ext_t), ## [out] The BDF address - ("maxSpeed", ze_pci_speed_ext_t) ## [out] Fastest port configuration supported by the device (sum of all - ## lanes) - ] - -############################################################################### -## @brief sRGB Extension Name -ZE_SRGB_EXT_NAME = "ZE_extension_srgb" - -############################################################################### -## @brief sRGB Extension Version(s) -class ze_srgb_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_srgb_ext_version_t(c_int): - def __str__(self): - return str(ze_srgb_ext_version_v(self.value)) - - -############################################################################### -## @brief sRGB image descriptor -## -## @details -## - This structure may be passed to ::zeImageCreate via the `pNext` member -## of ::ze_image_desc_t -## - Used for specifying that the image is in sRGB format. -class ze_srgb_ext_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("sRGB", ze_bool_t) ## [in] Is sRGB. - ] - -############################################################################### -## @brief Image Copy Extension Name -ZE_IMAGE_COPY_EXT_NAME = "ZE_extension_image_copy" - -############################################################################### -## @brief Image Copy Extension Version(s) -class ze_image_copy_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_image_copy_ext_version_t(c_int): - def __str__(self): - return str(ze_image_copy_ext_version_v(self.value)) - - -############################################################################### -## @brief Image Query Allocation Properties Extension Name -ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_NAME = "ZE_extension_image_query_alloc_properties" - -############################################################################### -## @brief Image Query Allocation Properties Extension Version(s) -class ze_image_query_alloc_properties_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_image_query_alloc_properties_ext_version_t(c_int): - def __str__(self): - return str(ze_image_query_alloc_properties_ext_version_v(self.value)) - - -############################################################################### -## @brief Image allocation properties queried using -## ::zeImageGetAllocPropertiesExt -class ze_image_allocation_ext_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("id", c_ulonglong) ## [out] identifier for this allocation - ] - -############################################################################### -## @brief Linkage Inspection Extension Name -ZE_LINKAGE_INSPECTION_EXT_NAME = "ZE_extension_linkage_inspection" - -############################################################################### -## @brief Linkage Inspection Extension Version(s) -class ze_linkage_inspection_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_linkage_inspection_ext_version_t(c_int): - def __str__(self): - return str(ze_linkage_inspection_ext_version_v(self.value)) - - -############################################################################### -## @brief Supported module linkage inspection flags -class ze_linkage_inspection_ext_flags_v(IntEnum): - IMPORTS = ZE_BIT(0) ## List all imports of modules - UNRESOLVABLE_IMPORTS = ZE_BIT(1) ## List all imports of modules that do not have a corresponding export - EXPORTS = ZE_BIT(2) ## List all exports of modules - -class ze_linkage_inspection_ext_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Module linkage inspection descriptor -## -## @details -## - This structure may be passed to ::zeModuleInspectLinkageExt. -class ze_linkage_inspection_ext_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_linkage_inspection_ext_flags_t) ## [in] flags specifying module linkage inspection. - ## must be 0 (default) or a valid combination of ::ze_linkage_inspection_ext_flag_t. - ] - -############################################################################### -## @brief Memory Compression Hints Extension Name -ZE_MEMORY_COMPRESSION_HINTS_EXT_NAME = "ZE_extension_memory_compression_hints" - -############################################################################### -## @brief Memory Compression Hints Extension Version(s) -class ze_memory_compression_hints_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_memory_compression_hints_ext_version_t(c_int): - def __str__(self): - return str(ze_memory_compression_hints_ext_version_v(self.value)) - - -############################################################################### -## @brief Supported memory compression hints flags -class ze_memory_compression_hints_ext_flags_v(IntEnum): - COMPRESSED = ZE_BIT(0) ## Hint Driver implementation to make allocation compressible - UNCOMPRESSED = ZE_BIT(1) ## Hint Driver implementation to make allocation not compressible - -class ze_memory_compression_hints_ext_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Compression hints memory allocation descriptor -## -## @details -## - This structure may be passed to ::zeMemAllocShared or -## ::zeMemAllocDevice, via the `pNext` member of -## ::ze_device_mem_alloc_desc_t. -## - This structure may be passed to ::zeMemAllocHost, via the `pNext` -## member of ::ze_host_mem_alloc_desc_t. -## - This structure may be passed to ::zeImageCreate, via the `pNext` -## member of ::ze_image_desc_t. -class ze_memory_compression_hints_ext_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_memory_compression_hints_ext_flags_t) ## [in] flags specifying if allocation should be compressible or not. - ## Must be set to one of the ::ze_memory_compression_hints_ext_flag_t; - ] - -############################################################################### -## @brief Memory Free Policies Extension Name -ZE_MEMORY_FREE_POLICIES_EXT_NAME = "ZE_extension_memory_free_policies" - -############################################################################### -## @brief Memory Free Policies Extension Version(s) -class ze_memory_free_policies_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_memory_free_policies_ext_version_t(c_int): - def __str__(self): - return str(ze_memory_free_policies_ext_version_v(self.value)) - - -############################################################################### -## @brief Supported memory free policy capability flags -class ze_driver_memory_free_policy_ext_flags_v(IntEnum): - BLOCKING_FREE = ZE_BIT(0) ## Blocks until all commands using the memory are complete before - ## scheduling memory to be freed. Does not guarantee memory is freed upon - ## return, only that it is safe and is scheduled to be freed. Actual - ## freeing of memory is specific to user mode driver and kernel mode - ## driver implementation and may be done asynchronously. - DEFER_FREE = ZE_BIT(1) ## Immediately schedules the memory to be freed and returns without - ## blocking. Memory may be freed after all commands using the memory are - ## complete. Actual freeing of memory is specific to user mode driver and - ## kernel mode driver implementation and may be done asynchronously. - -class ze_driver_memory_free_policy_ext_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Driver memory free properties queried using ::zeDriverGetProperties -## -## @details -## - All drivers must support an immediate free policy, which is the -## default free policy. -## - This structure may be returned from ::zeDriverGetProperties, via the -## `pNext` member of ::ze_driver_properties_t. -class ze_driver_memory_free_ext_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("freePolicies", ze_driver_memory_free_policy_ext_flags_t) ## [out] Supported memory free policies. - ## must be 0 or a combination of ::ze_driver_memory_free_policy_ext_flag_t. - ] - -############################################################################### -## @brief Memory free descriptor with free policy -class ze_memory_free_ext_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("freePolicy", ze_driver_memory_free_policy_ext_flags_t) ## [in] flags specifying the memory free policy. - ## must be 0 (default) or a supported ::ze_driver_memory_free_policy_ext_flag_t; - ## default behavior is to free immediately. - ] - -############################################################################### -## @brief Bandwidth Extension Name -ZE_BANDWIDTH_PROPERTIES_EXP_NAME = "ZE_experimental_bandwidth_properties" - -############################################################################### -## @brief Bandwidth Extension Version(s) -class ze_bandwidth_properties_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_bandwidth_properties_exp_version_t(c_int): - def __str__(self): - return str(ze_bandwidth_properties_exp_version_v(self.value)) - - -############################################################################### -## @brief P2P Bandwidth Properties -## -## @details -## - This structure may be passed to ::zeDeviceGetP2PProperties by having -## the pNext member of ::ze_device_p2p_properties_t point at this struct. -class ze_device_p2p_bandwidth_exp_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("logicalBandwidth", c_ulong), ## [out] total logical design bandwidth for all links connecting the two - ## devices - ("physicalBandwidth", c_ulong), ## [out] total physical design bandwidth for all links connecting the two - ## devices - ("bandwidthUnit", ze_bandwidth_unit_t), ## [out] bandwidth unit - ("logicalLatency", c_ulong), ## [out] average logical design latency for all links connecting the two - ## devices - ("physicalLatency", c_ulong), ## [out] average physical design latency for all links connecting the two - ## devices - ("latencyUnit", ze_latency_unit_t) ## [out] latency unit - ] - -############################################################################### -## @brief Copy Bandwidth Properties -## -## @details -## - This structure may be passed to -## ::zeDeviceGetCommandQueueGroupProperties by having the pNext member of -## ::ze_command_queue_group_properties_t point at this struct. -## - [DEPRECATED] -class ze_copy_bandwidth_exp_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("copyBandwidth", c_ulong), ## [out] design bandwidth supported by this engine type for copy - ## operations - ("copyBandwidthUnit", ze_bandwidth_unit_t) ## [out] copy bandwidth unit - ] - -############################################################################### -## @brief Device Local Identifier (LUID) Extension Name -ZE_DEVICE_LUID_EXT_NAME = "ZE_extension_device_luid" - -############################################################################### -## @brief Device Local Identifier (LUID) Extension Version(s) -class ze_device_luid_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_device_luid_ext_version_t(c_int): - def __str__(self): - return str(ze_device_luid_ext_version_v(self.value)) - - -############################################################################### -## @brief Maximum device local identifier (LUID) size in bytes -ZE_MAX_DEVICE_LUID_SIZE_EXT = 8 - -############################################################################### -## @brief Device local identifier (LUID) -class ze_device_luid_ext_t(Structure): - _fields_ = [ - ("id", c_ubyte * ZE_MAX_DEVICE_LUID_SIZE_EXT) ## [out] opaque data representing a device LUID - ] - -############################################################################### -## @brief Device LUID properties queried using ::zeDeviceGetProperties -## -## @details -## - This structure may be returned from ::zeDeviceGetProperties, via the -## `pNext` member of ::ze_device_properties_t. -class ze_device_luid_ext_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("luid", ze_device_luid_ext_t), ## [out] locally unique identifier (LUID). - ## The returned LUID can be cast to a LUID object and must be equal to - ## the locally - ## unique identifier of an IDXGIAdapter1 object that corresponds to the device. - ("nodeMask", c_ulong) ## [out] node mask. - ## The returned node mask must contain exactly one bit. - ## If the device is running on an operating system that supports the - ## Direct3D 12 API - ## and the device corresponds to an individual device in a linked device - ## adapter, the - ## returned node mask identifies the Direct3D 12 node corresponding to - ## the device. - ## Otherwise, the returned node mask must be 1. - ] - -############################################################################### -## @brief Fabric Topology Discovery Extension Name -ZE_FABRIC_EXP_NAME = "ZE_experimental_fabric" - -############################################################################### -## @brief Fabric Topology Discovery Extension Version(s) -class ze_fabric_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_fabric_exp_version_t(c_int): - def __str__(self): - return str(ze_fabric_exp_version_v(self.value)) - - -############################################################################### -## @brief Maximum fabric edge model string size -ZE_MAX_FABRIC_EDGE_MODEL_EXP_SIZE = 256 - -############################################################################### -## @brief Fabric Vertex types -class ze_fabric_vertex_exp_type_v(IntEnum): - UNKNOWN = 0 ## Fabric vertex type is unknown - DEVICE = 1 ## Fabric vertex represents a device - SUBDEVICE = 2 ## Fabric vertex represents a subdevice - SWITCH = 3 ## Fabric vertex represents a switch - -class ze_fabric_vertex_exp_type_t(c_int): - def __str__(self): - return str(ze_fabric_vertex_exp_type_v(self.value)) - - -############################################################################### -## @brief Fabric edge duplexity -class ze_fabric_edge_exp_duplexity_v(IntEnum): - UNKNOWN = 0 ## Fabric edge duplexity is unknown - HALF_DUPLEX = 1 ## Fabric edge is half duplex, i.e. stated bandwidth is obtained in only - ## one direction at time - FULL_DUPLEX = 2 ## Fabric edge is full duplex, i.e. stated bandwidth is supported in both - ## directions simultaneously - -class ze_fabric_edge_exp_duplexity_t(c_int): - def __str__(self): - return str(ze_fabric_edge_exp_duplexity_v(self.value)) - - -############################################################################### -## @brief PCI address -## -## @details -## - A PCI BDF address is the bus:device:function address of the device and -## is useful for locating the device in the PCI switch fabric. -class ze_fabric_vertex_pci_exp_address_t(Structure): - _fields_ = [ - ("domain", c_ulong), ## [out] PCI domain number - ("bus", c_ulong), ## [out] PCI BDF bus number - ("device", c_ulong), ## [out] PCI BDF device number - ("function", c_ulong) ## [out] PCI BDF function number - ] - -############################################################################### -## @brief Fabric Vertex properties -class ze_fabric_vertex_exp_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("uuid", ze_uuid_t), ## [out] universal unique identifier. If the vertex is co-located with a - ## device/subdevice, then this uuid will match that of the corresponding - ## device/subdevice - ("type", ze_fabric_vertex_exp_type_t), ## [out] does the fabric vertex represent a device, subdevice, or switch? - ("remote", ze_bool_t), ## [out] does the fabric vertex live on the local node or on a remote - ## node? - ("address", ze_fabric_vertex_pci_exp_address_t) ## [out] B/D/F address of fabric vertex & associated device/subdevice if - ## available - ] - -############################################################################### -## @brief Fabric Edge properties -class ze_fabric_edge_exp_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("uuid", ze_uuid_t), ## [out] universal unique identifier. - ("model", c_char * ZE_MAX_FABRIC_EDGE_MODEL_EXP_SIZE), ## [out] Description of fabric edge technology. Will be set to the string - ## "unkown" if this cannot be determined for this edge - ("bandwidth", c_ulong), ## [out] design bandwidth - ("bandwidthUnit", ze_bandwidth_unit_t), ## [out] bandwidth unit - ("latency", c_ulong), ## [out] design latency - ("latencyUnit", ze_latency_unit_t), ## [out] latency unit - ("duplexity", ze_fabric_edge_exp_duplexity_t) ## [out] Duplexity of the fabric edge - ] - -############################################################################### -## @brief Device Memory Properties Extension Name -ZE_DEVICE_MEMORY_PROPERTIES_EXT_NAME = "ZE_extension_device_memory_properties" - -############################################################################### -## @brief Device Memory Properties Extension Version(s) -class ze_device_memory_properties_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_device_memory_properties_ext_version_t(c_int): - def __str__(self): - return str(ze_device_memory_properties_ext_version_v(self.value)) - - -############################################################################### -## @brief Memory module types -class ze_device_memory_ext_type_v(IntEnum): - HBM = 0 ## HBM memory - HBM2 = 1 ## HBM2 memory - DDR = 2 ## DDR memory - DDR2 = 3 ## DDR2 memory - DDR3 = 4 ## DDR3 memory - DDR4 = 5 ## DDR4 memory - DDR5 = 6 ## DDR5 memory - LPDDR = 7 ## LPDDR memory - LPDDR3 = 8 ## LPDDR3 memory - LPDDR4 = 9 ## LPDDR4 memory - LPDDR5 = 10 ## LPDDR5 memory - SRAM = 11 ## SRAM memory - L1 = 12 ## L1 cache - L3 = 13 ## L3 cache - GRF = 14 ## Execution unit register file - SLM = 15 ## Execution unit shared local memory - GDDR4 = 16 ## GDDR4 memory - GDDR5 = 17 ## GDDR5 memory - GDDR5X = 18 ## GDDR5X memory - GDDR6 = 19 ## GDDR6 memory - GDDR6X = 20 ## GDDR6X memory - GDDR7 = 21 ## GDDR7 memory - HBM2E = 22 ## HBM2E memory - HBM3 = 23 ## HBM3 memory - HBM3E = 24 ## HBM3E memory - HBM4 = 25 ## HBM4 memory - -class ze_device_memory_ext_type_t(c_int): - def __str__(self): - return str(ze_device_memory_ext_type_v(self.value)) - - -############################################################################### -## @brief Memory properties -## -## @details -## - This structure may be returned from ::zeDeviceGetMemoryProperties via -## the `pNext` member of ::ze_device_memory_properties_t -class ze_device_memory_ext_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("type", ze_device_memory_ext_type_t), ## [out] The memory type - ("physicalSize", c_ulonglong), ## [out] Physical memory size in bytes. A value of 0 indicates that this - ## property is not known. However, a call to ::zesMemoryGetState() will - ## correctly return the total size of usable memory. - ("readBandwidth", c_ulong), ## [out] Design bandwidth for reads - ("writeBandwidth", c_ulong), ## [out] Design bandwidth for writes - ("bandwidthUnit", ze_bandwidth_unit_t) ## [out] bandwidth unit - ] - -############################################################################### -## @brief Bfloat16 Conversions Extension Name -ZE_BFLOAT16_CONVERSIONS_EXT_NAME = "ZE_extension_bfloat16_conversions" - -############################################################################### -## @brief Bfloat16 Conversions Extension Version(s) -class ze_bfloat16_conversions_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_bfloat16_conversions_ext_version_t(c_int): - def __str__(self): - return str(ze_bfloat16_conversions_ext_version_v(self.value)) - - -############################################################################### -## @brief Device IP Version Extension Name -ZE_DEVICE_IP_VERSION_EXT_NAME = "ZE_extension_device_ip_version" - -############################################################################### -## @brief Device IP Version Extension Version(s) -class ze_device_ip_version_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_device_ip_version_version_t(c_int): - def __str__(self): - return str(ze_device_ip_version_version_v(self.value)) - - -############################################################################### -## @brief Device IP version queried using ::zeDeviceGetProperties -## -## @details -## - This structure may be returned from ::zeDeviceGetProperties via the -## `pNext` member of ::ze_device_properties_t -class ze_device_ip_version_ext_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("ipVersion", c_ulong) ## [out] Device IP version. The meaning of the device IP version is - ## implementation-defined, but newer devices should have a higher - ## version than older devices. - ] - -############################################################################### -## @brief Kernel Max Group Size Properties Extension Name -ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_NAME = "ZE_extension_kernel_max_group_size_properties" - -############################################################################### -## @brief Kernel Max Group Size Properties Extension Version(s) -class ze_kernel_max_group_size_properties_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_kernel_max_group_size_properties_ext_version_t(c_int): - def __str__(self): - return str(ze_kernel_max_group_size_properties_ext_version_v(self.value)) - - -############################################################################### -## @brief Additional kernel max group size properties -## -## @details -## - This structure may be passed to ::zeKernelGetProperties, via the -## `pNext` member of ::ze_kernel_properties_t, to query additional kernel -## max group size properties. -class ze_kernel_max_group_size_properties_ext_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("maxGroupSize", c_ulong) ## [out] maximum group size that can be used to execute the kernel. This - ## value may be less than or equal to the `maxTotalGroupSize` member of - ## ::ze_device_compute_properties_t. - ] - -############################################################################### -## @brief compiler-independent type -class ze_kernel_max_group_size_ext_properties_t(ze_kernel_max_group_size_properties_ext_t): - pass - -############################################################################### -## @brief Sub-Allocations Properties Extension Name -ZE_SUB_ALLOCATIONS_EXP_NAME = "ZE_experimental_sub_allocations" - -############################################################################### -## @brief Sub-Allocations Properties Extension Version(s) -class ze_sub_allocations_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_sub_allocations_exp_version_t(c_int): - def __str__(self): - return str(ze_sub_allocations_exp_version_v(self.value)) - - -############################################################################### -## @brief Properties returned for a sub-allocation -class ze_sub_allocation_t(Structure): - _fields_ = [ - ("base", c_void_p), ## [in,out][optional] base address of the sub-allocation - ("size", c_size_t) ## [in,out][optional] size of the allocation - ] - -############################################################################### -## @brief Sub-Allocations Properties -## -## @details -## - This structure may be passed to ::zeMemGetAllocProperties, via the -## `pNext` member of ::ze_memory_allocation_properties_t. -class ze_memory_sub_allocations_exp_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("pCount", POINTER(c_ulong)), ## [in,out] pointer to the number of sub-allocations. - ## if count is zero, then the driver shall update the value with the - ## total number of sub-allocations on which the allocation has been divided. - ## if count is greater than the number of sub-allocations, then the - ## driver shall update the value with the correct number of sub-allocations. - ("pSubAllocations", POINTER(ze_sub_allocation_t)) ## [in,out][optional][range(0, *pCount)] array of properties for sub-allocations. - ## if count is less than the number of sub-allocations available, then - ## driver shall only retrieve properties for that number of sub-allocations. - ] - -############################################################################### -## @brief Event Query Kernel Timestamps Extension Name -ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_NAME = "ZE_extension_event_query_kernel_timestamps" - -############################################################################### -## @brief Event Query Kernel Timestamps Extension Version(s) -class ze_event_query_kernel_timestamps_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_event_query_kernel_timestamps_ext_version_t(c_int): - def __str__(self): - return str(ze_event_query_kernel_timestamps_ext_version_v(self.value)) - - -############################################################################### -## @brief Event query kernel timestamps flags -class ze_event_query_kernel_timestamps_ext_flags_v(IntEnum): - KERNEL = ZE_BIT(0) ## Kernel timestamp results - SYNCHRONIZED = ZE_BIT(1) ## Device event timestamps synchronized to the host time domain - -class ze_event_query_kernel_timestamps_ext_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Event query kernel timestamps properties -## -## @details -## - This structure may be returned from ::zeDeviceGetProperties, via the -## `pNext` member of ::ze_device_properties_t. -class ze_event_query_kernel_timestamps_ext_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_event_query_kernel_timestamps_ext_flags_t) ## [out] 0 or some combination of - ## ::ze_event_query_kernel_timestamps_ext_flag_t flags - ] - -############################################################################### -## @brief Kernel timestamp clock data synchronized to the host time domain -class ze_synchronized_timestamp_data_ext_t(Structure): - _fields_ = [ - ("kernelStart", c_ulonglong), ## [out] synchronized clock at start of kernel execution - ("kernelEnd", c_ulonglong) ## [out] synchronized clock at end of kernel execution - ] - -############################################################################### -## @brief Synchronized kernel timestamp result -class ze_synchronized_timestamp_result_ext_t(Structure): - _fields_ = [ - ("global", ze_synchronized_timestamp_data_ext_t), ## [out] wall-clock data - ("context", ze_synchronized_timestamp_data_ext_t) ## [out] context-active data; only includes clocks while device context - ## was actively executing. - ] - -############################################################################### -## @brief Event query kernel timestamps results properties -class ze_event_query_kernel_timestamps_results_ext_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("pKernelTimestampsBuffer", POINTER(ze_kernel_timestamp_result_t)), ## [in,out][optional][range(0, *pCount)] pointer to destination buffer of - ## kernel timestamp results - ("pSynchronizedTimestampsBuffer", POINTER(ze_synchronized_timestamp_result_ext_t)) ## [in,out][optional][range(0, *pCount)] pointer to destination buffer of - ## synchronized timestamp results - ] - -############################################################################### -## @brief Ray Tracing Acceleration Structure Builder Extension Name -ZE_RTAS_BUILDER_EXP_NAME = "ZE_experimental_rtas_builder" - -############################################################################### -## @brief Ray Tracing Acceleration Structure Builder Extension Version(s) -class ze_rtas_builder_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_rtas_builder_exp_version_t(c_int): - def __str__(self): - return str(ze_rtas_builder_exp_version_v(self.value)) - - -############################################################################### -## @brief Ray tracing acceleration structure device flags -class ze_rtas_device_exp_flags_v(IntEnum): - RESERVED = ZE_BIT(0) ## reserved for future use - -class ze_rtas_device_exp_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Ray tracing acceleration structure format -## -## @details -## - This is an opaque ray tracing acceleration structure format -## identifier. -class ze_rtas_format_exp_v(IntEnum): - INVALID = 0 ## Invalid acceleration structure format - MAX = 0x7ffffffe ## Maximum acceleration structure format code - -class ze_rtas_format_exp_t(c_int): - def __str__(self): - return str(ze_rtas_format_exp_v(self.value)) - - -############################################################################### -## @brief Ray tracing acceleration structure builder flags -class ze_rtas_builder_exp_flags_v(IntEnum): - RESERVED = ZE_BIT(0) ## Reserved for future use - -class ze_rtas_builder_exp_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Ray tracing acceleration structure builder parallel operation flags -class ze_rtas_parallel_operation_exp_flags_v(IntEnum): - RESERVED = ZE_BIT(0) ## Reserved for future use - -class ze_rtas_parallel_operation_exp_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Ray tracing acceleration structure builder geometry flags -class ze_rtas_builder_geometry_exp_flags_v(IntEnum): - NON_OPAQUE = ZE_BIT(0) ## non-opaque geometries invoke an any-hit shader - -class ze_rtas_builder_geometry_exp_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Packed ray tracing acceleration structure builder geometry flags (see -## ::ze_rtas_builder_geometry_exp_flags_t) -class ze_rtas_builder_packed_geometry_exp_flags_t(c_ubyte): - pass - -############################################################################### -## @brief Ray tracing acceleration structure builder instance flags -class ze_rtas_builder_instance_exp_flags_v(IntEnum): - TRIANGLE_CULL_DISABLE = ZE_BIT(0) ## disables culling of front-facing and back-facing triangles - TRIANGLE_FRONT_COUNTERCLOCKWISE = ZE_BIT(1) ## reverses front and back face of triangles - TRIANGLE_FORCE_OPAQUE = ZE_BIT(2) ## forces instanced geometry to be opaque, unless ray flag forces it to - ## be non-opaque - TRIANGLE_FORCE_NON_OPAQUE = ZE_BIT(3) ## forces instanced geometry to be non-opaque, unless ray flag forces it - ## to be opaque - -class ze_rtas_builder_instance_exp_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Packed ray tracing acceleration structure builder instance flags (see -## ::ze_rtas_builder_instance_exp_flags_t) -class ze_rtas_builder_packed_instance_exp_flags_t(c_ubyte): - pass - -############################################################################### -## @brief Ray tracing acceleration structure builder build operation flags -## -## @details -## - These flags allow the application to tune the acceleration structure -## build operation. -## - The acceleration structure builder implementation might choose to use -## spatial splitting to split large or long primitives into smaller -## pieces. This may result in any-hit shaders being invoked multiple -## times for non-opaque primitives, unless -## ::ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION is specified. -## - Usage of any of these flags may reduce ray tracing performance. -class ze_rtas_builder_build_op_exp_flags_v(IntEnum): - COMPACT = ZE_BIT(0) ## build more compact acceleration structure - NO_DUPLICATE_ANYHIT_INVOCATION = ZE_BIT(1) ## guarantees single any-hit shader invocation per primitive - -class ze_rtas_builder_build_op_exp_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Ray tracing acceleration structure builder build quality hint -## -## @details -## - Depending on use case different quality modes for acceleration -## structure build are supported. -## - A low-quality build builds an acceleration structure fast, but at the -## cost of some reduction in ray tracing performance. This mode is -## recommended for dynamic content, such as animated characters. -## - A medium-quality build uses a compromise between build quality and ray -## tracing performance. This mode should be used by default. -## - Higher ray tracing performance can be achieved by using a high-quality -## build, but acceleration structure build performance might be -## significantly reduced. -class ze_rtas_builder_build_quality_hint_exp_v(IntEnum): - LOW = 0 ## build low-quality acceleration structure (fast) - MEDIUM = 1 ## build medium-quality acceleration structure (slower) - HIGH = 2 ## build high-quality acceleration structure (slow) - -class ze_rtas_builder_build_quality_hint_exp_t(c_int): - def __str__(self): - return str(ze_rtas_builder_build_quality_hint_exp_v(self.value)) - - -############################################################################### -## @brief Ray tracing acceleration structure builder geometry type -class ze_rtas_builder_geometry_type_exp_v(IntEnum): - TRIANGLES = 0 ## triangle mesh geometry type - QUADS = 1 ## quad mesh geometry type - PROCEDURAL = 2 ## procedural geometry type - INSTANCE = 3 ## instance geometry type - -class ze_rtas_builder_geometry_type_exp_t(c_int): - def __str__(self): - return str(ze_rtas_builder_geometry_type_exp_v(self.value)) - - -############################################################################### -## @brief Packed ray tracing acceleration structure builder geometry type (see -## ::ze_rtas_builder_geometry_type_exp_t) -class ze_rtas_builder_packed_geometry_type_exp_t(c_ubyte): - pass - -############################################################################### -## @brief Ray tracing acceleration structure data buffer element format -## -## @details -## - Specifies the format of data buffer elements. -## - Data buffers may contain instancing transform matrices, triangle/quad -## vertex indices, etc... -class ze_rtas_builder_input_data_format_exp_v(IntEnum): - FLOAT3 = 0 ## 3-component float vector (see ::ze_rtas_float3_exp_t) - FLOAT3X4_COLUMN_MAJOR = 1 ## 3x4 affine transformation in column-major format (see - ## ::ze_rtas_transform_float3x4_column_major_exp_t) - FLOAT3X4_ALIGNED_COLUMN_MAJOR = 2 ## 3x4 affine transformation in column-major format (see - ## ::ze_rtas_transform_float3x4_aligned_column_major_exp_t) - FLOAT3X4_ROW_MAJOR = 3 ## 3x4 affine transformation in row-major format (see - ## ::ze_rtas_transform_float3x4_row_major_exp_t) - AABB = 4 ## 3-dimensional axis-aligned bounding-box (see ::ze_rtas_aabb_exp_t) - TRIANGLE_INDICES_UINT32 = 5 ## Unsigned 32-bit triangle indices (see - ## ::ze_rtas_triangle_indices_uint32_exp_t) - QUAD_INDICES_UINT32 = 6 ## Unsigned 32-bit quad indices (see ::ze_rtas_quad_indices_uint32_exp_t) - -class ze_rtas_builder_input_data_format_exp_t(c_int): - def __str__(self): - return str(ze_rtas_builder_input_data_format_exp_v(self.value)) - - -############################################################################### -## @brief Packed ray tracing acceleration structure data buffer element format -## (see ::ze_rtas_builder_input_data_format_exp_t) -class ze_rtas_builder_packed_input_data_format_exp_t(c_ubyte): - pass - -############################################################################### -## @brief Handle of ray tracing acceleration structure builder object -class ze_rtas_builder_exp_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of ray tracing acceleration structure builder parallel -## operation object -class ze_rtas_parallel_operation_exp_handle_t(c_void_p): - pass - -############################################################################### -## @brief Ray tracing acceleration structure builder descriptor -class ze_rtas_builder_exp_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("builderVersion", ze_rtas_builder_exp_version_t) ## [in] ray tracing acceleration structure builder version - ] - -############################################################################### -## @brief Ray tracing acceleration structure builder properties -class ze_rtas_builder_exp_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_rtas_builder_exp_flags_t), ## [out] ray tracing acceleration structure builder flags - ("rtasBufferSizeBytesExpected", c_size_t), ## [out] expected size (in bytes) required for acceleration structure buffer - ## - When using an acceleration structure buffer of this size, the - ## build is expected to succeed; however, it is possible that the build - ## may fail with ::ZE_RESULT_EXP_RTAS_BUILD_RETRY - ("rtasBufferSizeBytesMaxRequired", c_size_t), ## [out] worst-case size (in bytes) required for acceleration structure buffer - ## - When using an acceleration structure buffer of this size, the - ## build is guaranteed to not run out of memory. - ("scratchBufferSizeBytes", c_size_t) ## [out] scratch buffer size (in bytes) required for acceleration - ## structure build. - ] - -############################################################################### -## @brief Ray tracing acceleration structure builder parallel operation -## properties -class ze_rtas_parallel_operation_exp_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_rtas_parallel_operation_exp_flags_t), ## [out] ray tracing acceleration structure builder parallel operation - ## flags - ("maxConcurrency", c_ulong) ## [out] maximum number of threads that may join the parallel operation - ] - -############################################################################### -## @brief Ray tracing acceleration structure device properties -## -## @details -## - This structure may be passed to ::zeDeviceGetProperties, via `pNext` -## member of ::ze_device_properties_t. -## - The implementation shall populate `format` with a value other than -## ::ZE_RTAS_FORMAT_EXP_INVALID when the device supports ray tracing. -class ze_rtas_device_exp_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_rtas_device_exp_flags_t), ## [out] ray tracing acceleration structure device flags - ("rtasFormat", ze_rtas_format_exp_t), ## [out] ray tracing acceleration structure format - ("rtasBufferAlignment", c_ulong) ## [out] required alignment of acceleration structure buffer - ] - -############################################################################### -## @brief A 3-component vector type -class ze_rtas_float3_exp_t(Structure): - _fields_ = [ - ("x", c_float), ## [in] x-coordinate of float3 vector - ("y", c_float), ## [in] y-coordinate of float3 vector - ("z", c_float) ## [in] z-coordinate of float3 vector - ] - -############################################################################### -## @brief 3x4 affine transformation in column-major layout -## -## @details -## - A 3x4 affine transformation in column major layout, consisting of vectors -## - vx=(vx_x, vx_y, vx_z), -## - vy=(vy_x, vy_y, vy_z), -## - vz=(vz_x, vz_y, vz_z), and -## - p=(p_x, p_y, p_z) -## - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + -## z*vz + p`. -class ze_rtas_transform_float3x4_column_major_exp_t(Structure): - _fields_ = [ - ("vx_x", c_float), ## [in] element 0 of column 0 of 3x4 matrix - ("vx_y", c_float), ## [in] element 1 of column 0 of 3x4 matrix - ("vx_z", c_float), ## [in] element 2 of column 0 of 3x4 matrix - ("vy_x", c_float), ## [in] element 0 of column 1 of 3x4 matrix - ("vy_y", c_float), ## [in] element 1 of column 1 of 3x4 matrix - ("vy_z", c_float), ## [in] element 2 of column 1 of 3x4 matrix - ("vz_x", c_float), ## [in] element 0 of column 2 of 3x4 matrix - ("vz_y", c_float), ## [in] element 1 of column 2 of 3x4 matrix - ("vz_z", c_float), ## [in] element 2 of column 2 of 3x4 matrix - ("p_x", c_float), ## [in] element 0 of column 3 of 3x4 matrix - ("p_y", c_float), ## [in] element 1 of column 3 of 3x4 matrix - ("p_z", c_float) ## [in] element 2 of column 3 of 3x4 matrix - ] - -############################################################################### -## @brief 3x4 affine transformation in column-major layout with aligned column -## vectors -## -## @details -## - A 3x4 affine transformation in column major layout, consisting of vectors -## - vx=(vx_x, vx_y, vx_z), -## - vy=(vy_x, vy_y, vy_z), -## - vz=(vz_x, vz_y, vz_z), and -## - p=(p_x, p_y, p_z) -## - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + -## z*vz + p`. -## - The column vectors are aligned to 16-bytes and pad members are -## ignored. -class ze_rtas_transform_float3x4_aligned_column_major_exp_t(Structure): - _fields_ = [ - ("vx_x", c_float), ## [in] element 0 of column 0 of 3x4 matrix - ("vx_y", c_float), ## [in] element 1 of column 0 of 3x4 matrix - ("vx_z", c_float), ## [in] element 2 of column 0 of 3x4 matrix - ("pad0", c_float), ## [in] ignored padding - ("vy_x", c_float), ## [in] element 0 of column 1 of 3x4 matrix - ("vy_y", c_float), ## [in] element 1 of column 1 of 3x4 matrix - ("vy_z", c_float), ## [in] element 2 of column 1 of 3x4 matrix - ("pad1", c_float), ## [in] ignored padding - ("vz_x", c_float), ## [in] element 0 of column 2 of 3x4 matrix - ("vz_y", c_float), ## [in] element 1 of column 2 of 3x4 matrix - ("vz_z", c_float), ## [in] element 2 of column 2 of 3x4 matrix - ("pad2", c_float), ## [in] ignored padding - ("p_x", c_float), ## [in] element 0 of column 3 of 3x4 matrix - ("p_y", c_float), ## [in] element 1 of column 3 of 3x4 matrix - ("p_z", c_float), ## [in] element 2 of column 3 of 3x4 matrix - ("pad3", c_float) ## [in] ignored padding - ] - -############################################################################### -## @brief 3x4 affine transformation in row-major layout -## -## @details -## - A 3x4 affine transformation in row-major layout, consisting of vectors -## - vx=(vx_x, vx_y, vx_z), -## - vy=(vy_x, vy_y, vy_z), -## - vz=(vz_x, vz_y, vz_z), and -## - p=(p_x, p_y, p_z) -## - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + -## z*vz + p`. -class ze_rtas_transform_float3x4_row_major_exp_t(Structure): - _fields_ = [ - ("vx_x", c_float), ## [in] element 0 of row 0 of 3x4 matrix - ("vy_x", c_float), ## [in] element 1 of row 0 of 3x4 matrix - ("vz_x", c_float), ## [in] element 2 of row 0 of 3x4 matrix - ("p_x", c_float), ## [in] element 3 of row 0 of 3x4 matrix - ("vx_y", c_float), ## [in] element 0 of row 1 of 3x4 matrix - ("vy_y", c_float), ## [in] element 1 of row 1 of 3x4 matrix - ("vz_y", c_float), ## [in] element 2 of row 1 of 3x4 matrix - ("p_y", c_float), ## [in] element 3 of row 1 of 3x4 matrix - ("vx_z", c_float), ## [in] element 0 of row 2 of 3x4 matrix - ("vy_z", c_float), ## [in] element 1 of row 2 of 3x4 matrix - ("vz_z", c_float), ## [in] element 2 of row 2 of 3x4 matrix - ("p_z", c_float) ## [in] element 3 of row 2 of 3x4 matrix - ] - -############################################################################### -## @brief A 3-dimensional axis-aligned bounding-box with lower and upper bounds -## in each dimension -class ze_rtas_aabb_exp_t(Structure): - _fields_ = [ - ("lower", ze_rtas_c_float3_exp_t), ## [in] lower bounds of AABB - ("upper", ze_rtas_c_float3_exp_t) ## [in] upper bounds of AABB - ] - -############################################################################### -## @brief Triangle represented using 3 vertex indices -## -## @details -## - Represents a triangle using 3 vertex indices that index into a vertex -## array that needs to be provided together with the index array. -## - The linear barycentric u/v parametrization of the triangle is defined as: -## - (u=0, v=0) at v0, -## - (u=1, v=0) at v1, and -## - (u=0, v=1) at v2 -class ze_rtas_triangle_indices_uint32_exp_t(Structure): - _fields_ = [ - ("v0", c_ulong), ## [in] first index pointing to the first triangle vertex in vertex array - ("v1", c_ulong), ## [in] second index pointing to the second triangle vertex in vertex - ## array - ("v2", c_ulong) ## [in] third index pointing to the third triangle vertex in vertex array - ] - -############################################################################### -## @brief Quad represented using 4 vertex indices -## -## @details -## - Represents a quad composed of 4 indices that index into a vertex array -## that needs to be provided together with the index array. -## - A quad is a triangle pair represented using 4 vertex indices v0, v1, -## v2, v3. -## The first triangle is made out of indices v0, v1, v3 and the second triangle -## from indices v2, v3, v1. The piecewise linear barycentric u/v parametrization -## of the quad is defined as: -## - (u=0, v=0) at v0, -## - (u=1, v=0) at v1, -## - (u=0, v=1) at v3, and -## - (u=1, v=1) at v2 -## This is achieved by correcting the u'/v' coordinates of the second -## triangle by -## *u = 1-u'* and *v = 1-v'*, yielding a piecewise linear parametrization. -class ze_rtas_quad_indices_uint32_exp_t(Structure): - _fields_ = [ - ("v0", c_ulong), ## [in] first index pointing to the first quad vertex in vertex array - ("v1", c_ulong), ## [in] second index pointing to the second quad vertex in vertex array - ("v2", c_ulong), ## [in] third index pointing to the third quad vertex in vertex array - ("v3", c_ulong) ## [in] fourth index pointing to the fourth quad vertex in vertex array - ] - -############################################################################### -## @brief Ray tracing acceleration structure builder geometry info -class ze_rtas_builder_geometry_info_exp_t(Structure): - _fields_ = [ - ("geometryType", ze_rtas_builder_packed_geometry_type_exp_t) ## [in] geometry type - ] - -############################################################################### -## @brief Ray tracing acceleration structure builder triangle mesh geometry info -## -## @details -## - The linear barycentric u/v parametrization of the triangle is defined as: -## - (u=0, v=0) at v0, -## - (u=1, v=0) at v1, and -## - (u=0, v=1) at v2 -class ze_rtas_builder_triangles_geometry_info_exp_t(Structure): - _fields_ = [ - ("geometryType", ze_rtas_builder_packed_geometry_type_exp_t), ## [in] geometry type, must be - ## ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_TRIANGLES - ("geometryFlags", ze_rtas_builder_packed_geometry_exp_flags_t), ## [in] 0 or some combination of ::ze_rtas_builder_geometry_exp_flag_t - ## bits representing the geometry flags for all primitives of this - ## geometry - ("geometryMask", c_ubyte), ## [in] 8-bit geometry mask for ray masking - ("triangleFormat", ze_rtas_builder_packed_input_data_format_exp_t), ## [in] format of triangle buffer data, must be - ## ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_TRIANGLE_INDICES_UINT32 - ("vertexFormat", ze_rtas_builder_packed_input_data_format_exp_t), ## [in] format of vertex buffer data, must be - ## ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3 - ("triangleCount", c_ulong), ## [in] number of triangles in triangle buffer - ("vertexCount", c_ulong), ## [in] number of vertices in vertex buffer - ("triangleStride", c_ulong), ## [in] stride (in bytes) of triangles in triangle buffer - ("vertexStride", c_ulong), ## [in] stride (in bytes) of vertices in vertex buffer - ("pTriangleBuffer", c_void_p), ## [in] pointer to array of triangle indices in specified format - ("pVertexBuffer", c_void_p) ## [in] pointer to array of triangle vertices in specified format - ] - -############################################################################### -## @brief Ray tracing acceleration structure builder quad mesh geometry info -## -## @details -## - A quad is a triangle pair represented using 4 vertex indices v0, v1, -## v2, v3. -## The first triangle is made out of indices v0, v1, v3 and the second triangle -## from indices v2, v3, v1. The piecewise linear barycentric u/v parametrization -## of the quad is defined as: -## - (u=0, v=0) at v0, -## - (u=1, v=0) at v1, -## - (u=0, v=1) at v3, and -## - (u=1, v=1) at v2 -## This is achieved by correcting the u'/v' coordinates of the second -## triangle by -## *u = 1-u'* and *v = 1-v'*, yielding a piecewise linear parametrization. -class ze_rtas_builder_quads_geometry_info_exp_t(Structure): - _fields_ = [ - ("geometryType", ze_rtas_builder_packed_geometry_type_exp_t), ## [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_QUADS - ("geometryFlags", ze_rtas_builder_packed_geometry_exp_flags_t), ## [in] 0 or some combination of ::ze_rtas_builder_geometry_exp_flag_t - ## bits representing the geometry flags for all primitives of this - ## geometry - ("geometryMask", c_ubyte), ## [in] 8-bit geometry mask for ray masking - ("quadFormat", ze_rtas_builder_packed_input_data_format_exp_t), ## [in] format of quad buffer data, must be - ## ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_QUAD_INDICES_UINT32 - ("vertexFormat", ze_rtas_builder_packed_input_data_format_exp_t), ## [in] format of vertex buffer data, must be - ## ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3 - ("quadCount", c_ulong), ## [in] number of quads in quad buffer - ("vertexCount", c_ulong), ## [in] number of vertices in vertex buffer - ("quadStride", c_ulong), ## [in] stride (in bytes) of quads in quad buffer - ("vertexStride", c_ulong), ## [in] stride (in bytes) of vertices in vertex buffer - ("pQuadBuffer", c_void_p), ## [in] pointer to array of quad indices in specified format - ("pVertexBuffer", c_void_p) ## [in] pointer to array of quad vertices in specified format - ] - -############################################################################### -## @brief AABB callback function parameters -class ze_rtas_geometry_aabbs_exp_cb_params_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("primID", c_ulong), ## [in] first primitive to return bounds for - ("primIDCount", c_ulong), ## [in] number of primitives to return bounds for - ("pGeomUserPtr", c_void_p), ## [in] pointer provided through geometry descriptor - ("pBuildUserPtr", c_void_p), ## [in] pointer provided through ::zeRTASBuilderBuildExp function - ("pBoundsOut", POINTER(ze_rtas_aabb_exp_t)) ## [out] destination buffer to write AABB bounds to - ] - -############################################################################### -## @brief Callback function pointer type to return AABBs for a range of -## procedural primitives - -############################################################################### -## @brief Ray tracing acceleration structure builder procedural primitives -## geometry info -## -## @details -## - A host-side bounds callback function is invoked by the acceleration -## structure builder to query the bounds of procedural primitives on -## demand. The callback is passed some `pGeomUserPtr` that can point to -## an application-side representation of the procedural primitives. -## Further, a second `pBuildUserPtr`, which is set by a parameter to -## ::zeRTASBuilderBuildExp, is passed to the callback. This allows the -## build to change the bounds of the procedural geometry, for example, to -## build a BVH only over a short time range to implement multi-segment -## motion blur. -class ze_rtas_builder_procedural_geometry_info_exp_t(Structure): - _fields_ = [ - ("geometryType", ze_rtas_builder_packed_geometry_type_exp_t), ## [in] geometry type, must be - ## ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_PROCEDURAL - ("geometryFlags", ze_rtas_builder_packed_geometry_exp_flags_t), ## [in] 0 or some combination of ::ze_rtas_builder_geometry_exp_flag_t - ## bits representing the geometry flags for all primitives of this - ## geometry - ("geometryMask", c_ubyte), ## [in] 8-bit geometry mask for ray masking - ("reserved", c_ubyte), ## [in] reserved for future use - ("primCount", c_ulong), ## [in] number of primitives in geometry - ("pfnGetBoundsCb", ze_rtas_geometry_aabbs_cb_exp_t), ## [in] pointer to callback function to get the axis-aligned bounding-box - ## for a range of primitives - ("pGeomUserPtr", c_void_p) ## [in] user data pointer passed to callback - ] - -############################################################################### -## @brief Ray tracing acceleration structure builder instance geometry info -class ze_rtas_builder_instance_geometry_info_exp_t(Structure): - _fields_ = [ - ("geometryType", ze_rtas_builder_packed_geometry_type_exp_t), ## [in] geometry type, must be - ## ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_INSTANCE - ("instanceFlags", ze_rtas_builder_packed_instance_exp_flags_t), ## [in] 0 or some combination of ::ze_rtas_builder_geometry_exp_flag_t - ## bits representing the geometry flags for all primitives of this - ## geometry - ("geometryMask", c_ubyte), ## [in] 8-bit geometry mask for ray masking - ("transformFormat", ze_rtas_builder_packed_input_data_format_exp_t),## [in] format of the specified transformation - ("instanceUserID", c_ulong), ## [in] user-specified identifier for the instance - ("pTransform", c_void_p), ## [in] object-to-world instance transformation in specified format - ("pBounds", POINTER(ze_rtas_aabb_exp_t)), ## [in] object-space axis-aligned bounding-box of the instanced - ## acceleration structure - ("pAccelerationStructure", c_void_p) ## [in] pointer to acceleration structure to instantiate - ] - -############################################################################### -## @brief -class ze_rtas_builder_build_op_exp_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("rtasFormat", ze_rtas_format_exp_t), ## [in] ray tracing acceleration structure format - ("buildQuality", ze_rtas_builder_build_quality_hint_exp_t), ## [in] acceleration structure build quality hint - ("buildFlags", ze_rtas_builder_build_op_exp_flags_t), ## [in] 0 or some combination of ::ze_rtas_builder_build_op_exp_flag_t - ## flags - ("ppGeometries", POINTER(ze_rtas_builder_geometry_info_exp_t*)),## [in][optional][range(0, `numGeometries`)] NULL or a valid array of - ## pointers to geometry infos - ("numGeometries", c_ulong) ## [in] number of geometries in geometry infos array, can be zero when - ## `ppGeometries` is NULL - ] - -############################################################################### -## @brief Counter-based Event Pools Extension Name -ZE_EVENT_POOL_COUNTER_BASED_EXP_NAME = "ZE_experimental_event_pool_counter_based" - -############################################################################### -## @brief Counter-based Event Pools Extension Version(s) -class ze_event_pool_counter_based_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_event_pool_counter_based_exp_version_t(c_int): - def __str__(self): - return str(ze_event_pool_counter_based_exp_version_v(self.value)) - - -############################################################################### -## @brief Supported event flags for defining counter-based event pools. -class ze_event_pool_counter_based_exp_flags_v(IntEnum): - IMMEDIATE = ZE_BIT(0) ## Counter-based event pool is used for immediate command lists (default) - NON_IMMEDIATE = ZE_BIT(1) ## Counter-based event pool is for non-immediate command lists - -class ze_event_pool_counter_based_exp_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Event pool descriptor for counter-based events. This structure may be -## passed to ::zeEventPoolCreate as pNext member of -## ::ze_event_pool_desc_t. @deprecated since 1.15 -class ze_event_pool_counter_based_exp_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_event_pool_counter_based_exp_flags_t) ## [in] mode flags. - ## must be 0 (default) or a valid value of ::ze_event_pool_counter_based_exp_flag_t - ## default behavior is counter-based event pool is only used for - ## immediate command lists. - ] - -############################################################################### -## @brief Image Memory Properties Extension Name -ZE_BINDLESS_IMAGE_EXP_NAME = "ZE_experimental_bindless_image" - -############################################################################### -## @brief Bindless Image Extension Version(s) -class ze_bindless_image_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_bindless_image_exp_version_t(c_int): - def __str__(self): - return str(ze_bindless_image_exp_version_v(self.value)) - - -############################################################################### -## @brief Image flags for Bindless images -class ze_image_bindless_exp_flags_v(IntEnum): - BINDLESS = ZE_BIT(0) ## Bindless images are created with ::zeImageCreate. The image handle - ## created with this flag is valid on both host and device. - SAMPLED_IMAGE = ZE_BIT(1) ## Bindless sampled images are created with ::zeImageCreate by combining - ## BINDLESS and SAMPLED_IMAGE. - ## Create sampled image view from bindless unsampled image using SAMPLED_IMAGE. - -class ze_image_bindless_exp_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Image descriptor for bindless images. This structure may be passed to -## ::zeImageCreate via pNext member of ::ze_image_desc_t. -class ze_image_bindless_exp_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_image_bindless_exp_flags_t) ## [in] image flags. - ## must be 0 (default) or a valid value of ::ze_image_bindless_exp_flag_t - ## default behavior is bindless images are not used when creating handles - ## via ::zeImageCreate. - ## When the flag is passed to ::zeImageCreate, then only the memory for - ## the image is allocated. - ## Additional image handles can be created with ::zeImageViewCreateExt. - ## When ::ZE_IMAGE_BINDLESS_EXP_FLAG_SAMPLED_IMAGE flag is passed, - ## ::ze_sampler_desc_t must be attached via pNext member of ::ze_image_bindless_exp_desc_t. - ] - -############################################################################### -## @brief Image descriptor for bindless images created from pitched allocations. -## This structure may be passed to ::zeImageCreate via pNext member of -## ::ze_image_desc_t. -class ze_image_pitched_exp_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("ptr", c_void_p) ## [in] pointer to pitched device allocation allocated using ::zeMemAllocDevice - ] - -############################################################################### -## @brief Device specific properties for pitched allocations -## -## @details -## - This structure may be passed to ::zeDeviceGetImageProperties via the -## pNext member of ::ze_device_image_properties_t. -class ze_device_pitched_alloc_exp_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("maxImageLinearWidth", c_size_t), ## [out] Maximum image linear width. - ("maxImageLinearHeight", c_size_t) ## [out] Maximum image linear height. - ] - -############################################################################### -## @brief Pitch information for 2-dimensional linear pitched allocations -## -## @details -## - This structure may be passed to ::zeDeviceGetImageProperties in -## conjunction with the ::ze_device_pitched_alloc_exp_properties_t via -## its pNext member -class ze_pitched_alloc_2dimage_linear_pitch_exp_info_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("pitchAlign", c_size_t), ## [out] Required pitch Aligment in Bytes. - ("maxSupportedPitch", c_size_t) ## [out] Maximum allowed pitch in Bytes. - ] - -############################################################################### -## @brief Specify user defined pitch for pitched linear image allocations. This -## structure may be passed to ::zeImageCreate in conjunction with -## ::ze_image_pitched_exp_desc_t via its pNext member -class ze_custom_pitch_exp_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("rowPitch", c_size_t), ## [in] user programmed aligned pitch for pitched linear image - ## allocations. This pitch should satisfy the pitchAlign requirement in - ## ::ze_pitched_alloc_2dimage_linear_pitch_exp_info_t - ("slicePitch", c_size_t) ## [in] user programmed slice pitch , must be multiple of rowPitch. For - ## 2D image arrary or a slice of a 3D image array - this pitch should be - ## >= rowPitch * image_height . For 1D iamge array >= rowPitch. - ] - -############################################################################### -## @brief Command List Clone Extension Name -ZE_COMMAND_LIST_CLONE_EXP_NAME = "ZE_experimental_command_list_clone" - -############################################################################### -## @brief Command List Clone Extension Version(s) -class ze_command_list_clone_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_command_list_clone_exp_version_t(c_int): - def __str__(self): - return str(ze_command_list_clone_exp_version_v(self.value)) - - -############################################################################### -## @brief Immediate Command List Append Extension Name -ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_NAME = "ZE_experimental_immediate_command_list_append" - -############################################################################### -## @brief Immediate Command List Append Extension Version(s) -class ze_immediate_command_list_append_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_immediate_command_list_append_exp_version_t(c_int): - def __str__(self): - return str(ze_immediate_command_list_append_exp_version_v(self.value)) - - -############################################################################### -## @brief Mutable Command List Extension Name -ZE_MUTABLE_COMMAND_LIST_EXP_NAME = "ZE_experimental_mutable_command_list" - -############################################################################### -## @brief Mutable Command List Extension Version(s) -class ze_mutable_command_list_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - _1_1 = ZE_MAKE_VERSION( 1, 1 ) ## version 1.1 - CURRENT = ZE_MAKE_VERSION( 1, 1 ) ## latest known version - -class ze_mutable_command_list_exp_version_t(c_int): - def __str__(self): - return str(ze_mutable_command_list_exp_version_v(self.value)) - - -############################################################################### -## @brief Mutable command flags -class ze_mutable_command_exp_flags_v(IntEnum): - KERNEL_ARGUMENTS = ZE_BIT(0) ## kernel arguments - GROUP_COUNT = ZE_BIT(1) ## kernel group count - GROUP_SIZE = ZE_BIT(2) ## kernel group size - GLOBAL_OFFSET = ZE_BIT(3) ## kernel global offset - SIGNAL_EVENT = ZE_BIT(4) ## command signal event - WAIT_EVENTS = ZE_BIT(5) ## command wait events - KERNEL_INSTRUCTION = ZE_BIT(6) ## command kernel - GRAPH_ARGUMENTS = ZE_BIT(7) ## graph arguments - -class ze_mutable_command_exp_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Mutable command identifier descriptor -class ze_mutable_command_id_exp_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_mutable_command_exp_flags_t) ## [in] mutable command flags. - ## - must be 0 (default, equivalent to setting all flags bar kernel - ## instruction), or a valid combination of ::ze_mutable_command_exp_flag_t - ## - in order to include kernel instruction mutation, - ## ::ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_INSTRUCTION must be explictly included - ] - -############################################################################### -## @brief Mutable command list flags -class ze_mutable_command_list_exp_flags_v(IntEnum): - RESERVED = ZE_BIT(0) ## reserved - -class ze_mutable_command_list_exp_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Mutable command list properties -class ze_mutable_command_list_exp_properties_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("mutableCommandListFlags", ze_mutable_command_list_exp_flags_t), ## [out] mutable command list flags - ("mutableCommandFlags", ze_mutable_command_exp_flags_t) ## [out] mutable command flags - ] - -############################################################################### -## @brief Mutable command list descriptor -class ze_mutable_command_list_exp_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", ze_mutable_command_list_exp_flags_t) ## [in] mutable command list flags. - ## - must be 0 (default) or a valid combination of ::ze_mutable_command_list_exp_flag_t - ] - -############################################################################### -## @brief Mutable commands descriptor -class ze_mutable_commands_exp_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", c_ulong) ## [in] must be 0, this field is reserved for future use - ] - -############################################################################### -## @brief Mutable kernel argument descriptor -class ze_mutable_kernel_argument_exp_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("commandId", c_ulonglong), ## [in] command identifier - ("argIndex", c_ulong), ## [in] kernel argument index - ("argSize", c_size_t), ## [in] kernel argument size - ("pArgValue", c_void_p) ## [in] pointer to kernel argument value - ] - -############################################################################### -## @brief Mutable kernel group count descriptor -class ze_mutable_group_count_exp_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("commandId", c_ulonglong), ## [in] command identifier - ("pGroupCount", POINTER(ze_group_count_t)) ## [in] pointer to group count - ] - -############################################################################### -## @brief Mutable kernel group size descriptor -class ze_mutable_group_size_exp_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("commandId", c_ulonglong), ## [in] command identifier - ("groupSizeX", c_ulong), ## [in] group size for X dimension to use for the kernel - ("groupSizeY", c_ulong), ## [in] group size for Y dimension to use for the kernel - ("groupSizeZ", c_ulong) ## [in] group size for Z dimension to use for the kernel - ] - -############################################################################### -## @brief Mutable kernel global offset descriptor -class ze_mutable_global_offset_exp_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("commandId", c_ulonglong), ## [in] command identifier - ("offsetX", c_ulong), ## [in] global offset for X dimension to use for this kernel - ("offsetY", c_ulong), ## [in] global offset for Y dimension to use for this kernel - ("offsetZ", c_ulong) ## [in] global offset for Z dimension to use for this kernel - ] - -############################################################################### -## @brief Mutable graph argument descriptor -class ze_mutable_graph_argument_exp_desc_t(Structure): - _fields_ = [ - ("stype", ze_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("commandId", c_ulonglong), ## [in] command identifier - ("argIndex", c_ulong), ## [in] graph argument index - ("pArgValue", c_void_p) ## [in] pointer to graph argument value - ] - -############################################################################### -__use_win_types = "Windows" == platform.uname()[0] - -############################################################################### -## @brief Function-pointer for zeRTASBuilderCreateExt -if __use_win_types: - _zeRTASBuilderCreateExt_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_rtas_builder_ext_desc_t), POINTER(ze_rtas_builder_ext_handle_t) ) -else: - _zeRTASBuilderCreateExt_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_rtas_builder_ext_desc_t), POINTER(ze_rtas_builder_ext_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeRTASBuilderGetBuildPropertiesExt -if __use_win_types: - _zeRTASBuilderGetBuildPropertiesExt_t = WINFUNCTYPE( ze_result_t, ze_rtas_builder_ext_handle_t, POINTER(ze_rtas_builder_build_op_ext_desc_t), POINTER(ze_rtas_builder_ext_properties_t) ) -else: - _zeRTASBuilderGetBuildPropertiesExt_t = CFUNCTYPE( ze_result_t, ze_rtas_builder_ext_handle_t, POINTER(ze_rtas_builder_build_op_ext_desc_t), POINTER(ze_rtas_builder_ext_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeRTASBuilderBuildExt -if __use_win_types: - _zeRTASBuilderBuildExt_t = WINFUNCTYPE( ze_result_t, ze_rtas_builder_ext_handle_t, POINTER(ze_rtas_builder_build_op_ext_desc_t), c_void_p, c_size_t, c_void_p, c_size_t, ze_rtas_parallel_operation_ext_handle_t, c_void_p, POINTER(ze_rtas_aabb_ext_t), POINTER(c_size_t) ) -else: - _zeRTASBuilderBuildExt_t = CFUNCTYPE( ze_result_t, ze_rtas_builder_ext_handle_t, POINTER(ze_rtas_builder_build_op_ext_desc_t), c_void_p, c_size_t, c_void_p, c_size_t, ze_rtas_parallel_operation_ext_handle_t, c_void_p, POINTER(ze_rtas_aabb_ext_t), POINTER(c_size_t) ) - -############################################################################### -## @brief Function-pointer for zeRTASBuilderCommandListAppendCopyExt -if __use_win_types: - _zeRTASBuilderCommandListAppendCopyExt_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, c_void_p, c_size_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeRTASBuilderCommandListAppendCopyExt_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, c_void_p, c_size_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeRTASBuilderDestroyExt -if __use_win_types: - _zeRTASBuilderDestroyExt_t = WINFUNCTYPE( ze_result_t, ze_rtas_builder_ext_handle_t ) -else: - _zeRTASBuilderDestroyExt_t = CFUNCTYPE( ze_result_t, ze_rtas_builder_ext_handle_t ) - - -############################################################################### -## @brief Table of RTASBuilder functions pointers -class _ze_rtas_builder_dditable_t(Structure): - _fields_ = [ - ("pfnCreateExt", c_void_p), ## _zeRTASBuilderCreateExt_t - ("pfnGetBuildPropertiesExt", c_void_p), ## _zeRTASBuilderGetBuildPropertiesExt_t - ("pfnBuildExt", c_void_p), ## _zeRTASBuilderBuildExt_t - ("pfnCommandListAppendCopyExt", c_void_p), ## _zeRTASBuilderCommandListAppendCopyExt_t - ("pfnDestroyExt", c_void_p) ## _zeRTASBuilderDestroyExt_t - ] - -############################################################################### -## @brief Function-pointer for zeRTASBuilderCreateExp -if __use_win_types: - _zeRTASBuilderCreateExp_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_rtas_builder_exp_desc_t), POINTER(ze_rtas_builder_exp_handle_t) ) -else: - _zeRTASBuilderCreateExp_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_rtas_builder_exp_desc_t), POINTER(ze_rtas_builder_exp_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeRTASBuilderGetBuildPropertiesExp -if __use_win_types: - _zeRTASBuilderGetBuildPropertiesExp_t = WINFUNCTYPE( ze_result_t, ze_rtas_builder_exp_handle_t, POINTER(ze_rtas_builder_build_op_exp_desc_t), POINTER(ze_rtas_builder_exp_properties_t) ) -else: - _zeRTASBuilderGetBuildPropertiesExp_t = CFUNCTYPE( ze_result_t, ze_rtas_builder_exp_handle_t, POINTER(ze_rtas_builder_build_op_exp_desc_t), POINTER(ze_rtas_builder_exp_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeRTASBuilderBuildExp -if __use_win_types: - _zeRTASBuilderBuildExp_t = WINFUNCTYPE( ze_result_t, ze_rtas_builder_exp_handle_t, POINTER(ze_rtas_builder_build_op_exp_desc_t), c_void_p, c_size_t, c_void_p, c_size_t, ze_rtas_parallel_operation_exp_handle_t, c_void_p, POINTER(ze_rtas_aabb_exp_t), POINTER(c_size_t) ) -else: - _zeRTASBuilderBuildExp_t = CFUNCTYPE( ze_result_t, ze_rtas_builder_exp_handle_t, POINTER(ze_rtas_builder_build_op_exp_desc_t), c_void_p, c_size_t, c_void_p, c_size_t, ze_rtas_parallel_operation_exp_handle_t, c_void_p, POINTER(ze_rtas_aabb_exp_t), POINTER(c_size_t) ) - -############################################################################### -## @brief Function-pointer for zeRTASBuilderDestroyExp -if __use_win_types: - _zeRTASBuilderDestroyExp_t = WINFUNCTYPE( ze_result_t, ze_rtas_builder_exp_handle_t ) -else: - _zeRTASBuilderDestroyExp_t = CFUNCTYPE( ze_result_t, ze_rtas_builder_exp_handle_t ) - - -############################################################################### -## @brief Table of RTASBuilderExp functions pointers -class _ze_rtas_builder_exp_dditable_t(Structure): - _fields_ = [ - ("pfnCreateExp", c_void_p), ## _zeRTASBuilderCreateExp_t - ("pfnGetBuildPropertiesExp", c_void_p), ## _zeRTASBuilderGetBuildPropertiesExp_t - ("pfnBuildExp", c_void_p), ## _zeRTASBuilderBuildExp_t - ("pfnDestroyExp", c_void_p) ## _zeRTASBuilderDestroyExp_t - ] - -############################################################################### -## @brief Function-pointer for zeRTASParallelOperationCreateExt -if __use_win_types: - _zeRTASParallelOperationCreateExt_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_rtas_parallel_operation_ext_handle_t) ) -else: - _zeRTASParallelOperationCreateExt_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_rtas_parallel_operation_ext_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeRTASParallelOperationGetPropertiesExt -if __use_win_types: - _zeRTASParallelOperationGetPropertiesExt_t = WINFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_ext_handle_t, POINTER(ze_rtas_parallel_operation_ext_properties_t) ) -else: - _zeRTASParallelOperationGetPropertiesExt_t = CFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_ext_handle_t, POINTER(ze_rtas_parallel_operation_ext_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeRTASParallelOperationJoinExt -if __use_win_types: - _zeRTASParallelOperationJoinExt_t = WINFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_ext_handle_t ) -else: - _zeRTASParallelOperationJoinExt_t = CFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_ext_handle_t ) - -############################################################################### -## @brief Function-pointer for zeRTASParallelOperationDestroyExt -if __use_win_types: - _zeRTASParallelOperationDestroyExt_t = WINFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_ext_handle_t ) -else: - _zeRTASParallelOperationDestroyExt_t = CFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_ext_handle_t ) - - -############################################################################### -## @brief Table of RTASParallelOperation functions pointers -class _ze_rtas_parallel_operation_dditable_t(Structure): - _fields_ = [ - ("pfnCreateExt", c_void_p), ## _zeRTASParallelOperationCreateExt_t - ("pfnGetPropertiesExt", c_void_p), ## _zeRTASParallelOperationGetPropertiesExt_t - ("pfnJoinExt", c_void_p), ## _zeRTASParallelOperationJoinExt_t - ("pfnDestroyExt", c_void_p) ## _zeRTASParallelOperationDestroyExt_t - ] - -############################################################################### -## @brief Function-pointer for zeRTASParallelOperationCreateExp -if __use_win_types: - _zeRTASParallelOperationCreateExp_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_rtas_parallel_operation_exp_handle_t) ) -else: - _zeRTASParallelOperationCreateExp_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_rtas_parallel_operation_exp_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeRTASParallelOperationGetPropertiesExp -if __use_win_types: - _zeRTASParallelOperationGetPropertiesExp_t = WINFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_exp_handle_t, POINTER(ze_rtas_parallel_operation_exp_properties_t) ) -else: - _zeRTASParallelOperationGetPropertiesExp_t = CFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_exp_handle_t, POINTER(ze_rtas_parallel_operation_exp_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeRTASParallelOperationJoinExp -if __use_win_types: - _zeRTASParallelOperationJoinExp_t = WINFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_exp_handle_t ) -else: - _zeRTASParallelOperationJoinExp_t = CFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_exp_handle_t ) - -############################################################################### -## @brief Function-pointer for zeRTASParallelOperationDestroyExp -if __use_win_types: - _zeRTASParallelOperationDestroyExp_t = WINFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_exp_handle_t ) -else: - _zeRTASParallelOperationDestroyExp_t = CFUNCTYPE( ze_result_t, ze_rtas_parallel_operation_exp_handle_t ) - - -############################################################################### -## @brief Table of RTASParallelOperationExp functions pointers -class _ze_rtas_parallel_operation_exp_dditable_t(Structure): - _fields_ = [ - ("pfnCreateExp", c_void_p), ## _zeRTASParallelOperationCreateExp_t - ("pfnGetPropertiesExp", c_void_p), ## _zeRTASParallelOperationGetPropertiesExp_t - ("pfnJoinExp", c_void_p), ## _zeRTASParallelOperationJoinExp_t - ("pfnDestroyExp", c_void_p) ## _zeRTASParallelOperationDestroyExp_t - ] - -############################################################################### -## @brief Function-pointer for zeInit -if __use_win_types: - _zeInit_t = WINFUNCTYPE( ze_result_t, ze_init_flags_t ) -else: - _zeInit_t = CFUNCTYPE( ze_result_t, ze_init_flags_t ) - -############################################################################### -## @brief Function-pointer for zeInitDrivers -if __use_win_types: - _zeInitDrivers_t = WINFUNCTYPE( ze_result_t, POINTER(c_ulong), POINTER(ze_driver_handle_t), POINTER(ze_init_driver_type_desc_t) ) -else: - _zeInitDrivers_t = CFUNCTYPE( ze_result_t, POINTER(c_ulong), POINTER(ze_driver_handle_t), POINTER(ze_init_driver_type_desc_t) ) - - -############################################################################### -## @brief Table of Global functions pointers -class _ze_global_dditable_t(Structure): - _fields_ = [ - ("pfnInit", c_void_p), ## _zeInit_t - ("pfnInitDrivers", c_void_p) ## _zeInitDrivers_t - ] - -############################################################################### -## @brief Function-pointer for zeDriverGet -if __use_win_types: - _zeDriverGet_t = WINFUNCTYPE( ze_result_t, POINTER(c_ulong), POINTER(ze_driver_handle_t) ) -else: - _zeDriverGet_t = CFUNCTYPE( ze_result_t, POINTER(c_ulong), POINTER(ze_driver_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeDriverGetApiVersion -if __use_win_types: - _zeDriverGetApiVersion_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_api_version_t) ) -else: - _zeDriverGetApiVersion_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_api_version_t) ) - -############################################################################### -## @brief Function-pointer for zeDriverGetProperties -if __use_win_types: - _zeDriverGetProperties_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_driver_properties_t) ) -else: - _zeDriverGetProperties_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_driver_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeDriverGetIpcProperties -if __use_win_types: - _zeDriverGetIpcProperties_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_driver_ipc_properties_t) ) -else: - _zeDriverGetIpcProperties_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_driver_ipc_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeDriverGetExtensionProperties -if __use_win_types: - _zeDriverGetExtensionProperties_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(c_ulong), POINTER(ze_driver_extension_properties_t) ) -else: - _zeDriverGetExtensionProperties_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(c_ulong), POINTER(ze_driver_extension_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeDriverGetExtensionFunctionAddress -if __use_win_types: - _zeDriverGetExtensionFunctionAddress_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, c_char_p, POINTER(c_void_p) ) -else: - _zeDriverGetExtensionFunctionAddress_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, c_char_p, POINTER(c_void_p) ) - -############################################################################### -## @brief Function-pointer for zeDriverGetLastErrorDescription -if __use_win_types: - _zeDriverGetLastErrorDescription_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(c_char_p) ) -else: - _zeDriverGetLastErrorDescription_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(c_char_p) ) - -############################################################################### -## @brief Function-pointer for zeDriverRTASFormatCompatibilityCheckExt -if __use_win_types: - _zeDriverRTASFormatCompatibilityCheckExt_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, ze_rtas_format_ext_t, ze_rtas_format_ext_t ) -else: - _zeDriverRTASFormatCompatibilityCheckExt_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, ze_rtas_format_ext_t, ze_rtas_format_ext_t ) - -############################################################################### -## @brief Function-pointer for zeDriverGetDefaultContext -if __use_win_types: - _zeDriverGetDefaultContext_t = WINFUNCTYPE( ze_context_handle_t, ze_driver_handle_t ) -else: - _zeDriverGetDefaultContext_t = CFUNCTYPE( ze_context_handle_t, ze_driver_handle_t ) - - -############################################################################### -## @brief Table of Driver functions pointers -class _ze_driver_dditable_t(Structure): - _fields_ = [ - ("pfnGet", c_void_p), ## _zeDriverGet_t - ("pfnGetApiVersion", c_void_p), ## _zeDriverGetApiVersion_t - ("pfnGetProperties", c_void_p), ## _zeDriverGetProperties_t - ("pfnGetIpcProperties", c_void_p), ## _zeDriverGetIpcProperties_t - ("pfnGetExtensionProperties", c_void_p), ## _zeDriverGetExtensionProperties_t - ("pfnGetExtensionFunctionAddress", c_void_p), ## _zeDriverGetExtensionFunctionAddress_t - ("pfnGetLastErrorDescription", c_void_p), ## _zeDriverGetLastErrorDescription_t - ("pfnRTASFormatCompatibilityCheckExt", c_void_p), ## _zeDriverRTASFormatCompatibilityCheckExt_t - ("pfnGetDefaultContext", c_void_p) ## _zeDriverGetDefaultContext_t - ] - -############################################################################### -## @brief Function-pointer for zeDriverRTASFormatCompatibilityCheckExp -if __use_win_types: - _zeDriverRTASFormatCompatibilityCheckExp_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, ze_rtas_format_exp_t, ze_rtas_format_exp_t ) -else: - _zeDriverRTASFormatCompatibilityCheckExp_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, ze_rtas_format_exp_t, ze_rtas_format_exp_t ) - - -############################################################################### -## @brief Table of DriverExp functions pointers -class _ze_driver_exp_dditable_t(Structure): - _fields_ = [ - ("pfnRTASFormatCompatibilityCheckExp", c_void_p) ## _zeDriverRTASFormatCompatibilityCheckExp_t - ] - -############################################################################### -## @brief Function-pointer for zeDeviceGet -if __use_win_types: - _zeDeviceGet_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(c_ulong), POINTER(ze_device_handle_t) ) -else: - _zeDeviceGet_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(c_ulong), POINTER(ze_device_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeDeviceGetSubDevices -if __use_win_types: - _zeDeviceGetSubDevices_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_device_handle_t) ) -else: - _zeDeviceGetSubDevices_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_device_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeDeviceGetProperties -if __use_win_types: - _zeDeviceGetProperties_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_properties_t) ) -else: - _zeDeviceGetProperties_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeDeviceGetComputeProperties -if __use_win_types: - _zeDeviceGetComputeProperties_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_compute_properties_t) ) -else: - _zeDeviceGetComputeProperties_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_compute_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeDeviceGetModuleProperties -if __use_win_types: - _zeDeviceGetModuleProperties_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_module_properties_t) ) -else: - _zeDeviceGetModuleProperties_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_module_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeDeviceGetCommandQueueGroupProperties -if __use_win_types: - _zeDeviceGetCommandQueueGroupProperties_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_command_queue_group_properties_t) ) -else: - _zeDeviceGetCommandQueueGroupProperties_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_command_queue_group_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeDeviceGetMemoryProperties -if __use_win_types: - _zeDeviceGetMemoryProperties_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_device_memory_properties_t) ) -else: - _zeDeviceGetMemoryProperties_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_device_memory_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeDeviceGetMemoryAccessProperties -if __use_win_types: - _zeDeviceGetMemoryAccessProperties_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_memory_access_properties_t) ) -else: - _zeDeviceGetMemoryAccessProperties_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_memory_access_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeDeviceGetCacheProperties -if __use_win_types: - _zeDeviceGetCacheProperties_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_device_cache_properties_t) ) -else: - _zeDeviceGetCacheProperties_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_device_cache_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeDeviceGetImageProperties -if __use_win_types: - _zeDeviceGetImageProperties_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_image_properties_t) ) -else: - _zeDeviceGetImageProperties_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_image_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeDeviceGetExternalMemoryProperties -if __use_win_types: - _zeDeviceGetExternalMemoryProperties_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_external_memory_properties_t) ) -else: - _zeDeviceGetExternalMemoryProperties_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_external_memory_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeDeviceGetP2PProperties -if __use_win_types: - _zeDeviceGetP2PProperties_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, ze_device_handle_t, POINTER(ze_device_p2p_properties_t) ) -else: - _zeDeviceGetP2PProperties_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, ze_device_handle_t, POINTER(ze_device_p2p_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeDeviceCanAccessPeer -if __use_win_types: - _zeDeviceCanAccessPeer_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, ze_device_handle_t, POINTER(ze_bool_t) ) -else: - _zeDeviceCanAccessPeer_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, ze_device_handle_t, POINTER(ze_bool_t) ) - -############################################################################### -## @brief Function-pointer for zeDeviceGetStatus -if __use_win_types: - _zeDeviceGetStatus_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t ) -else: - _zeDeviceGetStatus_t = CFUNCTYPE( ze_result_t, ze_device_handle_t ) - -############################################################################### -## @brief Function-pointer for zeDeviceGetGlobalTimestamps -if __use_win_types: - _zeDeviceGetGlobalTimestamps_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulonglong), POINTER(c_ulonglong) ) -else: - _zeDeviceGetGlobalTimestamps_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulonglong), POINTER(c_ulonglong) ) - -############################################################################### -## @brief Function-pointer for zeDeviceReserveCacheExt -if __use_win_types: - _zeDeviceReserveCacheExt_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, c_size_t, c_size_t ) -else: - _zeDeviceReserveCacheExt_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, c_size_t, c_size_t ) - -############################################################################### -## @brief Function-pointer for zeDeviceSetCacheAdviceExt -if __use_win_types: - _zeDeviceSetCacheAdviceExt_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, c_void_p, c_size_t, ze_cache_ext_region_t ) -else: - _zeDeviceSetCacheAdviceExt_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, c_void_p, c_size_t, ze_cache_ext_region_t ) - -############################################################################### -## @brief Function-pointer for zeDevicePciGetPropertiesExt -if __use_win_types: - _zeDevicePciGetPropertiesExt_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_pci_ext_properties_t) ) -else: - _zeDevicePciGetPropertiesExt_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_pci_ext_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeDeviceGetRootDevice -if __use_win_types: - _zeDeviceGetRootDevice_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_handle_t) ) -else: - _zeDeviceGetRootDevice_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_device_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeDeviceImportExternalSemaphoreExt -if __use_win_types: - _zeDeviceImportExternalSemaphoreExt_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_external_semaphore_ext_desc_t), POINTER(ze_external_semaphore_ext_handle_t) ) -else: - _zeDeviceImportExternalSemaphoreExt_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_external_semaphore_ext_desc_t), POINTER(ze_external_semaphore_ext_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeDeviceReleaseExternalSemaphoreExt -if __use_win_types: - _zeDeviceReleaseExternalSemaphoreExt_t = WINFUNCTYPE( ze_result_t, ze_external_semaphore_ext_handle_t ) -else: - _zeDeviceReleaseExternalSemaphoreExt_t = CFUNCTYPE( ze_result_t, ze_external_semaphore_ext_handle_t ) - -############################################################################### -## @brief Function-pointer for zeDeviceGetVectorWidthPropertiesExt -if __use_win_types: - _zeDeviceGetVectorWidthPropertiesExt_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_device_vector_width_properties_ext_t) ) -else: - _zeDeviceGetVectorWidthPropertiesExt_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_device_vector_width_properties_ext_t) ) - -############################################################################### -## @brief Function-pointer for zeDeviceSynchronize -if __use_win_types: - _zeDeviceSynchronize_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t ) -else: - _zeDeviceSynchronize_t = CFUNCTYPE( ze_result_t, ze_device_handle_t ) - -############################################################################### -## @brief Function-pointer for zeDeviceGetAggregatedCopyOffloadIncrementValue -if __use_win_types: - _zeDeviceGetAggregatedCopyOffloadIncrementValue_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong) ) -else: - _zeDeviceGetAggregatedCopyOffloadIncrementValue_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(c_ulong) ) - - -############################################################################### -## @brief Table of Device functions pointers -class _ze_device_dditable_t(Structure): - _fields_ = [ - ("pfnGet", c_void_p), ## _zeDeviceGet_t - ("pfnGetSubDevices", c_void_p), ## _zeDeviceGetSubDevices_t - ("pfnGetProperties", c_void_p), ## _zeDeviceGetProperties_t - ("pfnGetComputeProperties", c_void_p), ## _zeDeviceGetComputeProperties_t - ("pfnGetModuleProperties", c_void_p), ## _zeDeviceGetModuleProperties_t - ("pfnGetCommandQueueGroupProperties", c_void_p), ## _zeDeviceGetCommandQueueGroupProperties_t - ("pfnGetMemoryProperties", c_void_p), ## _zeDeviceGetMemoryProperties_t - ("pfnGetMemoryAccessProperties", c_void_p), ## _zeDeviceGetMemoryAccessProperties_t - ("pfnGetCacheProperties", c_void_p), ## _zeDeviceGetCacheProperties_t - ("pfnGetImageProperties", c_void_p), ## _zeDeviceGetImageProperties_t - ("pfnGetExternalMemoryProperties", c_void_p), ## _zeDeviceGetExternalMemoryProperties_t - ("pfnGetP2PProperties", c_void_p), ## _zeDeviceGetP2PProperties_t - ("pfnCanAccessPeer", c_void_p), ## _zeDeviceCanAccessPeer_t - ("pfnGetStatus", c_void_p), ## _zeDeviceGetStatus_t - ("pfnGetGlobalTimestamps", c_void_p), ## _zeDeviceGetGlobalTimestamps_t - ("pfnReserveCacheExt", c_void_p), ## _zeDeviceReserveCacheExt_t - ("pfnSetCacheAdviceExt", c_void_p), ## _zeDeviceSetCacheAdviceExt_t - ("pfnPciGetPropertiesExt", c_void_p), ## _zeDevicePciGetPropertiesExt_t - ("pfnGetRootDevice", c_void_p), ## _zeDeviceGetRootDevice_t - ("pfnImportExternalSemaphoreExt", c_void_p), ## _zeDeviceImportExternalSemaphoreExt_t - ("pfnReleaseExternalSemaphoreExt", c_void_p), ## _zeDeviceReleaseExternalSemaphoreExt_t - ("pfnGetVectorWidthPropertiesExt", c_void_p), ## _zeDeviceGetVectorWidthPropertiesExt_t - ("pfnSynchronize", c_void_p), ## _zeDeviceSynchronize_t - ("pfnGetAggregatedCopyOffloadIncrementValue", c_void_p) ## _zeDeviceGetAggregatedCopyOffloadIncrementValue_t - ] - -############################################################################### -## @brief Function-pointer for zeDeviceGetFabricVertexExp -if __use_win_types: - _zeDeviceGetFabricVertexExp_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_fabric_vertex_handle_t) ) -else: - _zeDeviceGetFabricVertexExp_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_fabric_vertex_handle_t) ) - - -############################################################################### -## @brief Table of DeviceExp functions pointers -class _ze_device_exp_dditable_t(Structure): - _fields_ = [ - ("pfnGetFabricVertexExp", c_void_p) ## _zeDeviceGetFabricVertexExp_t - ] - -############################################################################### -## @brief Function-pointer for zeContextCreate -if __use_win_types: - _zeContextCreate_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_context_desc_t), POINTER(ze_context_handle_t) ) -else: - _zeContextCreate_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_context_desc_t), POINTER(ze_context_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeContextDestroy -if __use_win_types: - _zeContextDestroy_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t ) -else: - _zeContextDestroy_t = CFUNCTYPE( ze_result_t, ze_context_handle_t ) - -############################################################################### -## @brief Function-pointer for zeContextGetStatus -if __use_win_types: - _zeContextGetStatus_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t ) -else: - _zeContextGetStatus_t = CFUNCTYPE( ze_result_t, ze_context_handle_t ) - -############################################################################### -## @brief Function-pointer for zeContextSystemBarrier -if __use_win_types: - _zeContextSystemBarrier_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t ) -else: - _zeContextSystemBarrier_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t ) - -############################################################################### -## @brief Function-pointer for zeContextMakeMemoryResident -if __use_win_types: - _zeContextMakeMemoryResident_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_void_p, c_size_t ) -else: - _zeContextMakeMemoryResident_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_void_p, c_size_t ) - -############################################################################### -## @brief Function-pointer for zeContextEvictMemory -if __use_win_types: - _zeContextEvictMemory_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_void_p, c_size_t ) -else: - _zeContextEvictMemory_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_void_p, c_size_t ) - -############################################################################### -## @brief Function-pointer for zeContextMakeImageResident -if __use_win_types: - _zeContextMakeImageResident_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, ze_image_handle_t ) -else: - _zeContextMakeImageResident_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, ze_image_handle_t ) - -############################################################################### -## @brief Function-pointer for zeContextEvictImage -if __use_win_types: - _zeContextEvictImage_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, ze_image_handle_t ) -else: - _zeContextEvictImage_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, ze_image_handle_t ) - -############################################################################### -## @brief Function-pointer for zeContextCreateEx -if __use_win_types: - _zeContextCreateEx_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_context_desc_t), c_ulong, POINTER(ze_device_handle_t), POINTER(ze_context_handle_t) ) -else: - _zeContextCreateEx_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(ze_context_desc_t), c_ulong, POINTER(ze_device_handle_t), POINTER(ze_context_handle_t) ) - - -############################################################################### -## @brief Table of Context functions pointers -class _ze_context_dditable_t(Structure): - _fields_ = [ - ("pfnCreate", c_void_p), ## _zeContextCreate_t - ("pfnDestroy", c_void_p), ## _zeContextDestroy_t - ("pfnGetStatus", c_void_p), ## _zeContextGetStatus_t - ("pfnSystemBarrier", c_void_p), ## _zeContextSystemBarrier_t - ("pfnMakeMemoryResident", c_void_p), ## _zeContextMakeMemoryResident_t - ("pfnEvictMemory", c_void_p), ## _zeContextEvictMemory_t - ("pfnMakeImageResident", c_void_p), ## _zeContextMakeImageResident_t - ("pfnEvictImage", c_void_p), ## _zeContextEvictImage_t - ("pfnCreateEx", c_void_p) ## _zeContextCreateEx_t - ] - -############################################################################### -## @brief Function-pointer for zeCommandQueueCreate -if __use_win_types: - _zeCommandQueueCreate_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_command_queue_desc_t), POINTER(ze_command_queue_handle_t) ) -else: - _zeCommandQueueCreate_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_command_queue_desc_t), POINTER(ze_command_queue_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandQueueDestroy -if __use_win_types: - _zeCommandQueueDestroy_t = WINFUNCTYPE( ze_result_t, ze_command_queue_handle_t ) -else: - _zeCommandQueueDestroy_t = CFUNCTYPE( ze_result_t, ze_command_queue_handle_t ) - -############################################################################### -## @brief Function-pointer for zeCommandQueueExecuteCommandLists -if __use_win_types: - _zeCommandQueueExecuteCommandLists_t = WINFUNCTYPE( ze_result_t, ze_command_queue_handle_t, c_ulong, POINTER(ze_command_list_handle_t), ze_fence_handle_t ) -else: - _zeCommandQueueExecuteCommandLists_t = CFUNCTYPE( ze_result_t, ze_command_queue_handle_t, c_ulong, POINTER(ze_command_list_handle_t), ze_fence_handle_t ) - -############################################################################### -## @brief Function-pointer for zeCommandQueueSynchronize -if __use_win_types: - _zeCommandQueueSynchronize_t = WINFUNCTYPE( ze_result_t, ze_command_queue_handle_t, c_ulonglong ) -else: - _zeCommandQueueSynchronize_t = CFUNCTYPE( ze_result_t, ze_command_queue_handle_t, c_ulonglong ) - -############################################################################### -## @brief Function-pointer for zeCommandQueueGetOrdinal -if __use_win_types: - _zeCommandQueueGetOrdinal_t = WINFUNCTYPE( ze_result_t, ze_command_queue_handle_t, POINTER(c_ulong) ) -else: - _zeCommandQueueGetOrdinal_t = CFUNCTYPE( ze_result_t, ze_command_queue_handle_t, POINTER(c_ulong) ) - -############################################################################### -## @brief Function-pointer for zeCommandQueueGetIndex -if __use_win_types: - _zeCommandQueueGetIndex_t = WINFUNCTYPE( ze_result_t, ze_command_queue_handle_t, POINTER(c_ulong) ) -else: - _zeCommandQueueGetIndex_t = CFUNCTYPE( ze_result_t, ze_command_queue_handle_t, POINTER(c_ulong) ) - - -############################################################################### -## @brief Table of CommandQueue functions pointers -class _ze_command_queue_dditable_t(Structure): - _fields_ = [ - ("pfnCreate", c_void_p), ## _zeCommandQueueCreate_t - ("pfnDestroy", c_void_p), ## _zeCommandQueueDestroy_t - ("pfnExecuteCommandLists", c_void_p), ## _zeCommandQueueExecuteCommandLists_t - ("pfnSynchronize", c_void_p), ## _zeCommandQueueSynchronize_t - ("pfnGetOrdinal", c_void_p), ## _zeCommandQueueGetOrdinal_t - ("pfnGetIndex", c_void_p) ## _zeCommandQueueGetIndex_t - ] - -############################################################################### -## @brief Function-pointer for zeCommandListCreate -if __use_win_types: - _zeCommandListCreate_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_command_list_desc_t), POINTER(ze_command_list_handle_t) ) -else: - _zeCommandListCreate_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_command_list_desc_t), POINTER(ze_command_list_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListCreateImmediate -if __use_win_types: - _zeCommandListCreateImmediate_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_command_queue_desc_t), POINTER(ze_command_list_handle_t) ) -else: - _zeCommandListCreateImmediate_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_command_queue_desc_t), POINTER(ze_command_list_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListDestroy -if __use_win_types: - _zeCommandListDestroy_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t ) -else: - _zeCommandListDestroy_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t ) - -############################################################################### -## @brief Function-pointer for zeCommandListClose -if __use_win_types: - _zeCommandListClose_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t ) -else: - _zeCommandListClose_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t ) - -############################################################################### -## @brief Function-pointer for zeCommandListReset -if __use_win_types: - _zeCommandListReset_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t ) -else: - _zeCommandListReset_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendWriteGlobalTimestamp -if __use_win_types: - _zeCommandListAppendWriteGlobalTimestamp_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(c_ulonglong), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListAppendWriteGlobalTimestamp_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(c_ulonglong), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendBarrier -if __use_win_types: - _zeCommandListAppendBarrier_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListAppendBarrier_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendMemoryRangesBarrier -if __use_win_types: - _zeCommandListAppendMemoryRangesBarrier_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(c_size_t), POINTER(c_void_p), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListAppendMemoryRangesBarrier_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(c_size_t), POINTER(c_void_p), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendMemoryCopy -if __use_win_types: - _zeCommandListAppendMemoryCopy_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, c_void_p, c_size_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListAppendMemoryCopy_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, c_void_p, c_size_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendMemoryFill -if __use_win_types: - _zeCommandListAppendMemoryFill_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, c_void_p, c_size_t, c_size_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListAppendMemoryFill_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, c_void_p, c_size_t, c_size_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendMemoryCopyRegion -if __use_win_types: - _zeCommandListAppendMemoryCopyRegion_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, POINTER(ze_copy_region_t), c_ulong, c_ulong, c_void_p, POINTER(ze_copy_region_t), c_ulong, c_ulong, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListAppendMemoryCopyRegion_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, POINTER(ze_copy_region_t), c_ulong, c_ulong, c_void_p, POINTER(ze_copy_region_t), c_ulong, c_ulong, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendMemoryCopyFromContext -if __use_win_types: - _zeCommandListAppendMemoryCopyFromContext_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, ze_context_handle_t, c_void_p, c_size_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListAppendMemoryCopyFromContext_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, ze_context_handle_t, c_void_p, c_size_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendImageCopy -if __use_win_types: - _zeCommandListAppendImageCopy_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_image_handle_t, ze_image_handle_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListAppendImageCopy_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_image_handle_t, ze_image_handle_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendImageCopyRegion -if __use_win_types: - _zeCommandListAppendImageCopyRegion_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_image_handle_t, ze_image_handle_t, POINTER(ze_image_region_t), POINTER(ze_image_region_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListAppendImageCopyRegion_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_image_handle_t, ze_image_handle_t, POINTER(ze_image_region_t), POINTER(ze_image_region_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendImageCopyToMemory -if __use_win_types: - _zeCommandListAppendImageCopyToMemory_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, ze_image_handle_t, POINTER(ze_image_region_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListAppendImageCopyToMemory_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, ze_image_handle_t, POINTER(ze_image_region_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendImageCopyFromMemory -if __use_win_types: - _zeCommandListAppendImageCopyFromMemory_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_image_handle_t, c_void_p, POINTER(ze_image_region_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListAppendImageCopyFromMemory_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_image_handle_t, c_void_p, POINTER(ze_image_region_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendMemoryPrefetch -if __use_win_types: - _zeCommandListAppendMemoryPrefetch_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, c_size_t ) -else: - _zeCommandListAppendMemoryPrefetch_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, c_size_t ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendMemAdvise -if __use_win_types: - _zeCommandListAppendMemAdvise_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_device_handle_t, c_void_p, c_size_t, ze_memory_advice_t ) -else: - _zeCommandListAppendMemAdvise_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_device_handle_t, c_void_p, c_size_t, ze_memory_advice_t ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendSignalEvent -if __use_win_types: - _zeCommandListAppendSignalEvent_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_event_handle_t ) -else: - _zeCommandListAppendSignalEvent_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_event_handle_t ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendWaitOnEvents -if __use_win_types: - _zeCommandListAppendWaitOnEvents_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListAppendWaitOnEvents_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendEventReset -if __use_win_types: - _zeCommandListAppendEventReset_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_event_handle_t ) -else: - _zeCommandListAppendEventReset_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_event_handle_t ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendQueryKernelTimestamps -if __use_win_types: - _zeCommandListAppendQueryKernelTimestamps_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_event_handle_t), c_void_p, POINTER(c_size_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListAppendQueryKernelTimestamps_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_event_handle_t), c_void_p, POINTER(c_size_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendLaunchKernel -if __use_win_types: - _zeCommandListAppendLaunchKernel_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_kernel_handle_t, POINTER(ze_group_count_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListAppendLaunchKernel_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_kernel_handle_t, POINTER(ze_group_count_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendLaunchCooperativeKernel -if __use_win_types: - _zeCommandListAppendLaunchCooperativeKernel_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_kernel_handle_t, POINTER(ze_group_count_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListAppendLaunchCooperativeKernel_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_kernel_handle_t, POINTER(ze_group_count_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendLaunchKernelIndirect -if __use_win_types: - _zeCommandListAppendLaunchKernelIndirect_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_kernel_handle_t, POINTER(ze_group_count_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListAppendLaunchKernelIndirect_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_kernel_handle_t, POINTER(ze_group_count_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendLaunchMultipleKernelsIndirect -if __use_win_types: - _zeCommandListAppendLaunchMultipleKernelsIndirect_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_kernel_handle_t), POINTER(c_ulong), POINTER(ze_group_count_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListAppendLaunchMultipleKernelsIndirect_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_kernel_handle_t), POINTER(c_ulong), POINTER(ze_group_count_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendImageCopyToMemoryExt -if __use_win_types: - _zeCommandListAppendImageCopyToMemoryExt_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, ze_image_handle_t, POINTER(ze_image_region_t), c_ulong, c_ulong, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListAppendImageCopyToMemoryExt_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_void_p, ze_image_handle_t, POINTER(ze_image_region_t), c_ulong, c_ulong, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendImageCopyFromMemoryExt -if __use_win_types: - _zeCommandListAppendImageCopyFromMemoryExt_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_image_handle_t, c_void_p, POINTER(ze_image_region_t), c_ulong, c_ulong, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListAppendImageCopyFromMemoryExt_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_image_handle_t, c_void_p, POINTER(ze_image_region_t), c_ulong, c_ulong, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListHostSynchronize -if __use_win_types: - _zeCommandListHostSynchronize_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulonglong ) -else: - _zeCommandListHostSynchronize_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulonglong ) - -############################################################################### -## @brief Function-pointer for zeCommandListGetDeviceHandle -if __use_win_types: - _zeCommandListGetDeviceHandle_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_device_handle_t) ) -else: - _zeCommandListGetDeviceHandle_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_device_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListGetContextHandle -if __use_win_types: - _zeCommandListGetContextHandle_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_context_handle_t) ) -else: - _zeCommandListGetContextHandle_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_context_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListGetOrdinal -if __use_win_types: - _zeCommandListGetOrdinal_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(c_ulong) ) -else: - _zeCommandListGetOrdinal_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(c_ulong) ) - -############################################################################### -## @brief Function-pointer for zeCommandListImmediateGetIndex -if __use_win_types: - _zeCommandListImmediateGetIndex_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(c_ulong) ) -else: - _zeCommandListImmediateGetIndex_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(c_ulong) ) - -############################################################################### -## @brief Function-pointer for zeCommandListIsImmediate -if __use_win_types: - _zeCommandListIsImmediate_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_bool_t) ) -else: - _zeCommandListIsImmediate_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_bool_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendSignalExternalSemaphoreExt -if __use_win_types: - _zeCommandListAppendSignalExternalSemaphoreExt_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_external_semaphore_ext_handle_t), POINTER(ze_external_semaphore_signal_params_ext_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListAppendSignalExternalSemaphoreExt_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_external_semaphore_ext_handle_t), POINTER(ze_external_semaphore_signal_params_ext_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendWaitExternalSemaphoreExt -if __use_win_types: - _zeCommandListAppendWaitExternalSemaphoreExt_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_external_semaphore_ext_handle_t), POINTER(ze_external_semaphore_wait_params_ext_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListAppendWaitExternalSemaphoreExt_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_external_semaphore_ext_handle_t), POINTER(ze_external_semaphore_wait_params_ext_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendLaunchKernelWithParameters -if __use_win_types: - _zeCommandListAppendLaunchKernelWithParameters_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_kernel_handle_t, POINTER(ze_group_count_t), *, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListAppendLaunchKernelWithParameters_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_kernel_handle_t, POINTER(ze_group_count_t), *, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListAppendLaunchKernelWithArguments -if __use_win_types: - _zeCommandListAppendLaunchKernelWithArguments_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_kernel_handle_t, ze_group_count_t, ze_group_c_size_t, **, *, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListAppendLaunchKernelWithArguments_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, ze_kernel_handle_t, ze_group_count_t, ze_group_c_size_t, **, *, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - - -############################################################################### -## @brief Table of CommandList functions pointers -class _ze_command_list_dditable_t(Structure): - _fields_ = [ - ("pfnCreate", c_void_p), ## _zeCommandListCreate_t - ("pfnCreateImmediate", c_void_p), ## _zeCommandListCreateImmediate_t - ("pfnDestroy", c_void_p), ## _zeCommandListDestroy_t - ("pfnClose", c_void_p), ## _zeCommandListClose_t - ("pfnReset", c_void_p), ## _zeCommandListReset_t - ("pfnAppendWriteGlobalTimestamp", c_void_p), ## _zeCommandListAppendWriteGlobalTimestamp_t - ("pfnAppendBarrier", c_void_p), ## _zeCommandListAppendBarrier_t - ("pfnAppendMemoryRangesBarrier", c_void_p), ## _zeCommandListAppendMemoryRangesBarrier_t - ("pfnAppendMemoryCopy", c_void_p), ## _zeCommandListAppendMemoryCopy_t - ("pfnAppendMemoryFill", c_void_p), ## _zeCommandListAppendMemoryFill_t - ("pfnAppendMemoryCopyRegion", c_void_p), ## _zeCommandListAppendMemoryCopyRegion_t - ("pfnAppendMemoryCopyFromContext", c_void_p), ## _zeCommandListAppendMemoryCopyFromContext_t - ("pfnAppendImageCopy", c_void_p), ## _zeCommandListAppendImageCopy_t - ("pfnAppendImageCopyRegion", c_void_p), ## _zeCommandListAppendImageCopyRegion_t - ("pfnAppendImageCopyToMemory", c_void_p), ## _zeCommandListAppendImageCopyToMemory_t - ("pfnAppendImageCopyFromMemory", c_void_p), ## _zeCommandListAppendImageCopyFromMemory_t - ("pfnAppendMemoryPrefetch", c_void_p), ## _zeCommandListAppendMemoryPrefetch_t - ("pfnAppendMemAdvise", c_void_p), ## _zeCommandListAppendMemAdvise_t - ("pfnAppendSignalEvent", c_void_p), ## _zeCommandListAppendSignalEvent_t - ("pfnAppendWaitOnEvents", c_void_p), ## _zeCommandListAppendWaitOnEvents_t - ("pfnAppendEventReset", c_void_p), ## _zeCommandListAppendEventReset_t - ("pfnAppendQueryKernelTimestamps", c_void_p), ## _zeCommandListAppendQueryKernelTimestamps_t - ("pfnAppendLaunchKernel", c_void_p), ## _zeCommandListAppendLaunchKernel_t - ("pfnAppendLaunchCooperativeKernel", c_void_p), ## _zeCommandListAppendLaunchCooperativeKernel_t - ("pfnAppendLaunchKernelIndirect", c_void_p), ## _zeCommandListAppendLaunchKernelIndirect_t - ("pfnAppendLaunchMultipleKernelsIndirect", c_void_p), ## _zeCommandListAppendLaunchMultipleKernelsIndirect_t - ("pfnAppendImageCopyToMemoryExt", c_void_p), ## _zeCommandListAppendImageCopyToMemoryExt_t - ("pfnAppendImageCopyFromMemoryExt", c_void_p), ## _zeCommandListAppendImageCopyFromMemoryExt_t - ("pfnHostSynchronize", c_void_p), ## _zeCommandListHostSynchronize_t - ("pfnGetDeviceHandle", c_void_p), ## _zeCommandListGetDeviceHandle_t - ("pfnGetContextHandle", c_void_p), ## _zeCommandListGetContextHandle_t - ("pfnGetOrdinal", c_void_p), ## _zeCommandListGetOrdinal_t - ("pfnImmediateGetIndex", c_void_p), ## _zeCommandListImmediateGetIndex_t - ("pfnIsImmediate", c_void_p), ## _zeCommandListIsImmediate_t - ("pfnAppendSignalExternalSemaphoreExt", c_void_p), ## _zeCommandListAppendSignalExternalSemaphoreExt_t - ("pfnAppendWaitExternalSemaphoreExt", c_void_p), ## _zeCommandListAppendWaitExternalSemaphoreExt_t - ("pfnAppendLaunchKernelWithParameters", c_void_p), ## _zeCommandListAppendLaunchKernelWithParameters_t - ("pfnAppendLaunchKernelWithArguments", c_void_p) ## _zeCommandListAppendLaunchKernelWithArguments_t - ] - -############################################################################### -## @brief Function-pointer for zeCommandListCreateCloneExp -if __use_win_types: - _zeCommandListCreateCloneExp_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_command_list_handle_t) ) -else: - _zeCommandListCreateCloneExp_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_command_list_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListImmediateAppendCommandListsExp -if __use_win_types: - _zeCommandListImmediateAppendCommandListsExp_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_command_list_handle_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListImmediateAppendCommandListsExp_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(ze_command_list_handle_t), ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListGetNextCommandIdExp -if __use_win_types: - _zeCommandListGetNextCommandIdExp_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_mutable_command_id_exp_desc_t), POINTER(c_ulonglong) ) -else: - _zeCommandListGetNextCommandIdExp_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_mutable_command_id_exp_desc_t), POINTER(c_ulonglong) ) - -############################################################################### -## @brief Function-pointer for zeCommandListUpdateMutableCommandsExp -if __use_win_types: - _zeCommandListUpdateMutableCommandsExp_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_mutable_commands_exp_desc_t) ) -else: - _zeCommandListUpdateMutableCommandsExp_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_mutable_commands_exp_desc_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListUpdateMutableCommandSignalEventExp -if __use_win_types: - _zeCommandListUpdateMutableCommandSignalEventExp_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulonglong, ze_event_handle_t ) -else: - _zeCommandListUpdateMutableCommandSignalEventExp_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulonglong, ze_event_handle_t ) - -############################################################################### -## @brief Function-pointer for zeCommandListUpdateMutableCommandWaitEventsExp -if __use_win_types: - _zeCommandListUpdateMutableCommandWaitEventsExp_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulonglong, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zeCommandListUpdateMutableCommandWaitEventsExp_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulonglong, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeCommandListGetNextCommandIdWithKernelsExp -if __use_win_types: - _zeCommandListGetNextCommandIdWithKernelsExp_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_mutable_command_id_exp_desc_t), c_ulong, POINTER(ze_kernel_handle_t), POINTER(c_ulonglong) ) -else: - _zeCommandListGetNextCommandIdWithKernelsExp_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, POINTER(ze_mutable_command_id_exp_desc_t), c_ulong, POINTER(ze_kernel_handle_t), POINTER(c_ulonglong) ) - -############################################################################### -## @brief Function-pointer for zeCommandListUpdateMutableCommandKernelsExp -if __use_win_types: - _zeCommandListUpdateMutableCommandKernelsExp_t = WINFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(c_ulonglong), POINTER(ze_kernel_handle_t) ) -else: - _zeCommandListUpdateMutableCommandKernelsExp_t = CFUNCTYPE( ze_result_t, ze_command_list_handle_t, c_ulong, POINTER(c_ulonglong), POINTER(ze_kernel_handle_t) ) - - -############################################################################### -## @brief Table of CommandListExp functions pointers -class _ze_command_list_exp_dditable_t(Structure): - _fields_ = [ - ("pfnCreateCloneExp", c_void_p), ## _zeCommandListCreateCloneExp_t - ("pfnImmediateAppendCommandListsExp", c_void_p), ## _zeCommandListImmediateAppendCommandListsExp_t - ("pfnGetNextCommandIdExp", c_void_p), ## _zeCommandListGetNextCommandIdExp_t - ("pfnUpdateMutableCommandsExp", c_void_p), ## _zeCommandListUpdateMutableCommandsExp_t - ("pfnUpdateMutableCommandSignalEventExp", c_void_p), ## _zeCommandListUpdateMutableCommandSignalEventExp_t - ("pfnUpdateMutableCommandWaitEventsExp", c_void_p), ## _zeCommandListUpdateMutableCommandWaitEventsExp_t - ("pfnGetNextCommandIdWithKernelsExp", c_void_p), ## _zeCommandListGetNextCommandIdWithKernelsExp_t - ("pfnUpdateMutableCommandKernelsExp", c_void_p) ## _zeCommandListUpdateMutableCommandKernelsExp_t - ] - -############################################################################### -## @brief Function-pointer for zeImageGetProperties -if __use_win_types: - _zeImageGetProperties_t = WINFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_image_desc_t), POINTER(ze_image_properties_t) ) -else: - _zeImageGetProperties_t = CFUNCTYPE( ze_result_t, ze_device_handle_t, POINTER(ze_image_desc_t), POINTER(ze_image_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeImageCreate -if __use_win_types: - _zeImageCreate_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_image_desc_t), POINTER(ze_image_handle_t) ) -else: - _zeImageCreate_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_image_desc_t), POINTER(ze_image_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeImageDestroy -if __use_win_types: - _zeImageDestroy_t = WINFUNCTYPE( ze_result_t, ze_image_handle_t ) -else: - _zeImageDestroy_t = CFUNCTYPE( ze_result_t, ze_image_handle_t ) - -############################################################################### -## @brief Function-pointer for zeImageGetAllocPropertiesExt -if __use_win_types: - _zeImageGetAllocPropertiesExt_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_image_handle_t, POINTER(ze_image_allocation_ext_properties_t) ) -else: - _zeImageGetAllocPropertiesExt_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_image_handle_t, POINTER(ze_image_allocation_ext_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeImageViewCreateExt -if __use_win_types: - _zeImageViewCreateExt_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_image_desc_t), ze_image_handle_t, POINTER(ze_image_handle_t) ) -else: - _zeImageViewCreateExt_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_image_desc_t), ze_image_handle_t, POINTER(ze_image_handle_t) ) - - -############################################################################### -## @brief Table of Image functions pointers -class _ze_image_dditable_t(Structure): - _fields_ = [ - ("pfnGetProperties", c_void_p), ## _zeImageGetProperties_t - ("pfnCreate", c_void_p), ## _zeImageCreate_t - ("pfnDestroy", c_void_p), ## _zeImageDestroy_t - ("pfnGetAllocPropertiesExt", c_void_p), ## _zeImageGetAllocPropertiesExt_t - ("pfnViewCreateExt", c_void_p) ## _zeImageViewCreateExt_t - ] - -############################################################################### -## @brief Function-pointer for zeImageGetMemoryPropertiesExp -if __use_win_types: - _zeImageGetMemoryPropertiesExp_t = WINFUNCTYPE( ze_result_t, ze_image_handle_t, POINTER(ze_image_memory_properties_exp_t) ) -else: - _zeImageGetMemoryPropertiesExp_t = CFUNCTYPE( ze_result_t, ze_image_handle_t, POINTER(ze_image_memory_properties_exp_t) ) - -############################################################################### -## @brief Function-pointer for zeImageViewCreateExp -if __use_win_types: - _zeImageViewCreateExp_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_image_desc_t), ze_image_handle_t, POINTER(ze_image_handle_t) ) -else: - _zeImageViewCreateExp_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_image_desc_t), ze_image_handle_t, POINTER(ze_image_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeImageGetDeviceOffsetExp -if __use_win_types: - _zeImageGetDeviceOffsetExp_t = WINFUNCTYPE( ze_result_t, ze_image_handle_t, POINTER(c_ulonglong) ) -else: - _zeImageGetDeviceOffsetExp_t = CFUNCTYPE( ze_result_t, ze_image_handle_t, POINTER(c_ulonglong) ) - - -############################################################################### -## @brief Table of ImageExp functions pointers -class _ze_image_exp_dditable_t(Structure): - _fields_ = [ - ("pfnGetMemoryPropertiesExp", c_void_p), ## _zeImageGetMemoryPropertiesExp_t - ("pfnViewCreateExp", c_void_p), ## _zeImageViewCreateExp_t - ("pfnGetDeviceOffsetExp", c_void_p) ## _zeImageGetDeviceOffsetExp_t - ] - -############################################################################### -## @brief Function-pointer for zeMemAllocShared -if __use_win_types: - _zeMemAllocShared_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, POINTER(ze_device_mem_alloc_desc_t), POINTER(ze_host_mem_alloc_desc_t), c_size_t, c_size_t, ze_device_handle_t, POINTER(c_void_p) ) -else: - _zeMemAllocShared_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, POINTER(ze_device_mem_alloc_desc_t), POINTER(ze_host_mem_alloc_desc_t), c_size_t, c_size_t, ze_device_handle_t, POINTER(c_void_p) ) - -############################################################################### -## @brief Function-pointer for zeMemAllocDevice -if __use_win_types: - _zeMemAllocDevice_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, POINTER(ze_device_mem_alloc_desc_t), c_size_t, c_size_t, ze_device_handle_t, POINTER(c_void_p) ) -else: - _zeMemAllocDevice_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, POINTER(ze_device_mem_alloc_desc_t), c_size_t, c_size_t, ze_device_handle_t, POINTER(c_void_p) ) - -############################################################################### -## @brief Function-pointer for zeMemAllocHost -if __use_win_types: - _zeMemAllocHost_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, POINTER(ze_host_mem_alloc_desc_t), c_size_t, c_size_t, POINTER(c_void_p) ) -else: - _zeMemAllocHost_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, POINTER(ze_host_mem_alloc_desc_t), c_size_t, c_size_t, POINTER(c_void_p) ) - -############################################################################### -## @brief Function-pointer for zeMemFree -if __use_win_types: - _zeMemFree_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p ) -else: - _zeMemFree_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p ) - -############################################################################### -## @brief Function-pointer for zeMemGetAllocProperties -if __use_win_types: - _zeMemGetAllocProperties_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, POINTER(ze_memory_allocation_properties_t), POINTER(ze_device_handle_t) ) -else: - _zeMemGetAllocProperties_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, POINTER(ze_memory_allocation_properties_t), POINTER(ze_device_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeMemGetAddressRange -if __use_win_types: - _zeMemGetAddressRange_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, POINTER(c_void_p), POINTER(c_size_t) ) -else: - _zeMemGetAddressRange_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, POINTER(c_void_p), POINTER(c_size_t) ) - -############################################################################### -## @brief Function-pointer for zeMemGetIpcHandle -if __use_win_types: - _zeMemGetIpcHandle_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, POINTER(ze_ipc_mem_handle_t) ) -else: - _zeMemGetIpcHandle_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, POINTER(ze_ipc_mem_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeMemOpenIpcHandle -if __use_win_types: - _zeMemOpenIpcHandle_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, ze_ipc_mem_handle_t, ze_ipc_memory_flags_t, POINTER(c_void_p) ) -else: - _zeMemOpenIpcHandle_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, ze_ipc_mem_handle_t, ze_ipc_memory_flags_t, POINTER(c_void_p) ) - -############################################################################### -## @brief Function-pointer for zeMemCloseIpcHandle -if __use_win_types: - _zeMemCloseIpcHandle_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p ) -else: - _zeMemCloseIpcHandle_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p ) - -############################################################################### -## @brief Function-pointer for zeMemFreeExt -if __use_win_types: - _zeMemFreeExt_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, POINTER(ze_memory_free_ext_desc_t), c_void_p ) -else: - _zeMemFreeExt_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, POINTER(ze_memory_free_ext_desc_t), c_void_p ) - -############################################################################### -## @brief Function-pointer for zeMemPutIpcHandle -if __use_win_types: - _zeMemPutIpcHandle_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_ipc_mem_handle_t ) -else: - _zeMemPutIpcHandle_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_ipc_mem_handle_t ) - -############################################################################### -## @brief Function-pointer for zeMemGetPitchFor2dImage -if __use_win_types: - _zeMemGetPitchFor2dImage_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_size_t, c_size_t, c_int, * ) -else: - _zeMemGetPitchFor2dImage_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_size_t, c_size_t, c_int, * ) - -############################################################################### -## @brief Function-pointer for zeMemGetIpcHandleWithProperties -if __use_win_types: - _zeMemGetIpcHandleWithProperties_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_void_p, POINTER(ze_ipc_mem_handle_t) ) -else: - _zeMemGetIpcHandleWithProperties_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_void_p, POINTER(ze_ipc_mem_handle_t) ) - - -############################################################################### -## @brief Table of Mem functions pointers -class _ze_mem_dditable_t(Structure): - _fields_ = [ - ("pfnAllocShared", c_void_p), ## _zeMemAllocShared_t - ("pfnAllocDevice", c_void_p), ## _zeMemAllocDevice_t - ("pfnAllocHost", c_void_p), ## _zeMemAllocHost_t - ("pfnFree", c_void_p), ## _zeMemFree_t - ("pfnGetAllocProperties", c_void_p), ## _zeMemGetAllocProperties_t - ("pfnGetAddressRange", c_void_p), ## _zeMemGetAddressRange_t - ("pfnGetIpcHandle", c_void_p), ## _zeMemGetIpcHandle_t - ("pfnOpenIpcHandle", c_void_p), ## _zeMemOpenIpcHandle_t - ("pfnCloseIpcHandle", c_void_p), ## _zeMemCloseIpcHandle_t - ("pfnFreeExt", c_void_p), ## _zeMemFreeExt_t - ("pfnPutIpcHandle", c_void_p), ## _zeMemPutIpcHandle_t - ("pfnGetPitchFor2dImage", c_void_p), ## _zeMemGetPitchFor2dImage_t - ("pfnGetIpcHandleWithProperties", c_void_p) ## _zeMemGetIpcHandleWithProperties_t - ] - -############################################################################### -## @brief Function-pointer for zeMemGetIpcHandleFromFileDescriptorExp -if __use_win_types: - _zeMemGetIpcHandleFromFileDescriptorExp_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_ulonglong, POINTER(ze_ipc_mem_handle_t) ) -else: - _zeMemGetIpcHandleFromFileDescriptorExp_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_ulonglong, POINTER(ze_ipc_mem_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeMemGetFileDescriptorFromIpcHandleExp -if __use_win_types: - _zeMemGetFileDescriptorFromIpcHandleExp_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_ipc_mem_handle_t, POINTER(c_ulonglong) ) -else: - _zeMemGetFileDescriptorFromIpcHandleExp_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_ipc_mem_handle_t, POINTER(c_ulonglong) ) - -############################################################################### -## @brief Function-pointer for zeMemSetAtomicAccessAttributeExp -if __use_win_types: - _zeMemSetAtomicAccessAttributeExp_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_void_p, c_size_t, ze_memory_atomic_attr_exp_flags_t ) -else: - _zeMemSetAtomicAccessAttributeExp_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_void_p, c_size_t, ze_memory_atomic_attr_exp_flags_t ) - -############################################################################### -## @brief Function-pointer for zeMemGetAtomicAccessAttributeExp -if __use_win_types: - _zeMemGetAtomicAccessAttributeExp_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_void_p, c_size_t, POINTER(ze_memory_atomic_attr_exp_flags_t) ) -else: - _zeMemGetAtomicAccessAttributeExp_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_void_p, c_size_t, POINTER(ze_memory_atomic_attr_exp_flags_t) ) - - -############################################################################### -## @brief Table of MemExp functions pointers -class _ze_mem_exp_dditable_t(Structure): - _fields_ = [ - ("pfnGetIpcHandleFromFileDescriptorExp", c_void_p), ## _zeMemGetIpcHandleFromFileDescriptorExp_t - ("pfnGetFileDescriptorFromIpcHandleExp", c_void_p), ## _zeMemGetFileDescriptorFromIpcHandleExp_t - ("pfnSetAtomicAccessAttributeExp", c_void_p), ## _zeMemSetAtomicAccessAttributeExp_t - ("pfnGetAtomicAccessAttributeExp", c_void_p) ## _zeMemGetAtomicAccessAttributeExp_t - ] - -############################################################################### -## @brief Function-pointer for zeFenceCreate -if __use_win_types: - _zeFenceCreate_t = WINFUNCTYPE( ze_result_t, ze_command_queue_handle_t, POINTER(ze_fence_desc_t), POINTER(ze_fence_handle_t) ) -else: - _zeFenceCreate_t = CFUNCTYPE( ze_result_t, ze_command_queue_handle_t, POINTER(ze_fence_desc_t), POINTER(ze_fence_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeFenceDestroy -if __use_win_types: - _zeFenceDestroy_t = WINFUNCTYPE( ze_result_t, ze_fence_handle_t ) -else: - _zeFenceDestroy_t = CFUNCTYPE( ze_result_t, ze_fence_handle_t ) - -############################################################################### -## @brief Function-pointer for zeFenceHostSynchronize -if __use_win_types: - _zeFenceHostSynchronize_t = WINFUNCTYPE( ze_result_t, ze_fence_handle_t, c_ulonglong ) -else: - _zeFenceHostSynchronize_t = CFUNCTYPE( ze_result_t, ze_fence_handle_t, c_ulonglong ) - -############################################################################### -## @brief Function-pointer for zeFenceQueryStatus -if __use_win_types: - _zeFenceQueryStatus_t = WINFUNCTYPE( ze_result_t, ze_fence_handle_t ) -else: - _zeFenceQueryStatus_t = CFUNCTYPE( ze_result_t, ze_fence_handle_t ) - -############################################################################### -## @brief Function-pointer for zeFenceReset -if __use_win_types: - _zeFenceReset_t = WINFUNCTYPE( ze_result_t, ze_fence_handle_t ) -else: - _zeFenceReset_t = CFUNCTYPE( ze_result_t, ze_fence_handle_t ) - - -############################################################################### -## @brief Table of Fence functions pointers -class _ze_fence_dditable_t(Structure): - _fields_ = [ - ("pfnCreate", c_void_p), ## _zeFenceCreate_t - ("pfnDestroy", c_void_p), ## _zeFenceDestroy_t - ("pfnHostSynchronize", c_void_p), ## _zeFenceHostSynchronize_t - ("pfnQueryStatus", c_void_p), ## _zeFenceQueryStatus_t - ("pfnReset", c_void_p) ## _zeFenceReset_t - ] - -############################################################################### -## @brief Function-pointer for zeEventPoolCreate -if __use_win_types: - _zeEventPoolCreate_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, POINTER(ze_event_pool_desc_t), c_ulong, POINTER(ze_device_handle_t), POINTER(ze_event_pool_handle_t) ) -else: - _zeEventPoolCreate_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, POINTER(ze_event_pool_desc_t), c_ulong, POINTER(ze_device_handle_t), POINTER(ze_event_pool_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeEventPoolDestroy -if __use_win_types: - _zeEventPoolDestroy_t = WINFUNCTYPE( ze_result_t, ze_event_pool_handle_t ) -else: - _zeEventPoolDestroy_t = CFUNCTYPE( ze_result_t, ze_event_pool_handle_t ) - -############################################################################### -## @brief Function-pointer for zeEventPoolGetIpcHandle -if __use_win_types: - _zeEventPoolGetIpcHandle_t = WINFUNCTYPE( ze_result_t, ze_event_pool_handle_t, POINTER(ze_ipc_event_pool_handle_t) ) -else: - _zeEventPoolGetIpcHandle_t = CFUNCTYPE( ze_result_t, ze_event_pool_handle_t, POINTER(ze_ipc_event_pool_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeEventPoolOpenIpcHandle -if __use_win_types: - _zeEventPoolOpenIpcHandle_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_ipc_event_pool_handle_t, POINTER(ze_event_pool_handle_t) ) -else: - _zeEventPoolOpenIpcHandle_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_ipc_event_pool_handle_t, POINTER(ze_event_pool_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeEventPoolCloseIpcHandle -if __use_win_types: - _zeEventPoolCloseIpcHandle_t = WINFUNCTYPE( ze_result_t, ze_event_pool_handle_t ) -else: - _zeEventPoolCloseIpcHandle_t = CFUNCTYPE( ze_result_t, ze_event_pool_handle_t ) - -############################################################################### -## @brief Function-pointer for zeEventPoolPutIpcHandle -if __use_win_types: - _zeEventPoolPutIpcHandle_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_ipc_event_pool_handle_t ) -else: - _zeEventPoolPutIpcHandle_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_ipc_event_pool_handle_t ) - -############################################################################### -## @brief Function-pointer for zeEventPoolGetContextHandle -if __use_win_types: - _zeEventPoolGetContextHandle_t = WINFUNCTYPE( ze_result_t, ze_event_pool_handle_t, POINTER(ze_context_handle_t) ) -else: - _zeEventPoolGetContextHandle_t = CFUNCTYPE( ze_result_t, ze_event_pool_handle_t, POINTER(ze_context_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeEventPoolGetFlags -if __use_win_types: - _zeEventPoolGetFlags_t = WINFUNCTYPE( ze_result_t, ze_event_pool_handle_t, POINTER(ze_event_pool_flags_t) ) -else: - _zeEventPoolGetFlags_t = CFUNCTYPE( ze_result_t, ze_event_pool_handle_t, POINTER(ze_event_pool_flags_t) ) - - -############################################################################### -## @brief Table of EventPool functions pointers -class _ze_event_pool_dditable_t(Structure): - _fields_ = [ - ("pfnCreate", c_void_p), ## _zeEventPoolCreate_t - ("pfnDestroy", c_void_p), ## _zeEventPoolDestroy_t - ("pfnGetIpcHandle", c_void_p), ## _zeEventPoolGetIpcHandle_t - ("pfnOpenIpcHandle", c_void_p), ## _zeEventPoolOpenIpcHandle_t - ("pfnCloseIpcHandle", c_void_p), ## _zeEventPoolCloseIpcHandle_t - ("pfnPutIpcHandle", c_void_p), ## _zeEventPoolPutIpcHandle_t - ("pfnGetContextHandle", c_void_p), ## _zeEventPoolGetContextHandle_t - ("pfnGetFlags", c_void_p) ## _zeEventPoolGetFlags_t - ] - -############################################################################### -## @brief Function-pointer for zeEventCreate -if __use_win_types: - _zeEventCreate_t = WINFUNCTYPE( ze_result_t, ze_event_pool_handle_t, POINTER(ze_event_desc_t), POINTER(ze_event_handle_t) ) -else: - _zeEventCreate_t = CFUNCTYPE( ze_result_t, ze_event_pool_handle_t, POINTER(ze_event_desc_t), POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeEventDestroy -if __use_win_types: - _zeEventDestroy_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t ) -else: - _zeEventDestroy_t = CFUNCTYPE( ze_result_t, ze_event_handle_t ) - -############################################################################### -## @brief Function-pointer for zeEventHostSignal -if __use_win_types: - _zeEventHostSignal_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t ) -else: - _zeEventHostSignal_t = CFUNCTYPE( ze_result_t, ze_event_handle_t ) - -############################################################################### -## @brief Function-pointer for zeEventHostSynchronize -if __use_win_types: - _zeEventHostSynchronize_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t, c_ulonglong ) -else: - _zeEventHostSynchronize_t = CFUNCTYPE( ze_result_t, ze_event_handle_t, c_ulonglong ) - -############################################################################### -## @brief Function-pointer for zeEventQueryStatus -if __use_win_types: - _zeEventQueryStatus_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t ) -else: - _zeEventQueryStatus_t = CFUNCTYPE( ze_result_t, ze_event_handle_t ) - -############################################################################### -## @brief Function-pointer for zeEventHostReset -if __use_win_types: - _zeEventHostReset_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t ) -else: - _zeEventHostReset_t = CFUNCTYPE( ze_result_t, ze_event_handle_t ) - -############################################################################### -## @brief Function-pointer for zeEventQueryKernelTimestamp -if __use_win_types: - _zeEventQueryKernelTimestamp_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(ze_kernel_timestamp_result_t) ) -else: - _zeEventQueryKernelTimestamp_t = CFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(ze_kernel_timestamp_result_t) ) - -############################################################################### -## @brief Function-pointer for zeEventQueryKernelTimestampsExt -if __use_win_types: - _zeEventQueryKernelTimestampsExt_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_event_query_kernel_timestamps_results_ext_properties_t) ) -else: - _zeEventQueryKernelTimestampsExt_t = CFUNCTYPE( ze_result_t, ze_event_handle_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_event_query_kernel_timestamps_results_ext_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeEventGetEventPool -if __use_win_types: - _zeEventGetEventPool_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(ze_event_pool_handle_t) ) -else: - _zeEventGetEventPool_t = CFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(ze_event_pool_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeEventGetSignalScope -if __use_win_types: - _zeEventGetSignalScope_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(ze_event_scope_flags_t) ) -else: - _zeEventGetSignalScope_t = CFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(ze_event_scope_flags_t) ) - -############################################################################### -## @brief Function-pointer for zeEventGetWaitScope -if __use_win_types: - _zeEventGetWaitScope_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(ze_event_scope_flags_t) ) -else: - _zeEventGetWaitScope_t = CFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(ze_event_scope_flags_t) ) - -############################################################################### -## @brief Function-pointer for zeEventCounterBasedCreate -if __use_win_types: - _zeEventCounterBasedCreate_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_event_counter_based_desc_t), POINTER(ze_event_handle_t) ) -else: - _zeEventCounterBasedCreate_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_event_counter_based_desc_t), POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeEventCounterBasedGetIpcHandle -if __use_win_types: - _zeEventCounterBasedGetIpcHandle_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(ze_ipc_event_counter_based_handle_t) ) -else: - _zeEventCounterBasedGetIpcHandle_t = CFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(ze_ipc_event_counter_based_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeEventCounterBasedOpenIpcHandle -if __use_win_types: - _zeEventCounterBasedOpenIpcHandle_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_ipc_event_counter_based_handle_t, POINTER(ze_event_handle_t) ) -else: - _zeEventCounterBasedOpenIpcHandle_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_ipc_event_counter_based_handle_t, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeEventCounterBasedCloseIpcHandle -if __use_win_types: - _zeEventCounterBasedCloseIpcHandle_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t ) -else: - _zeEventCounterBasedCloseIpcHandle_t = CFUNCTYPE( ze_result_t, ze_event_handle_t ) - -############################################################################### -## @brief Function-pointer for zeEventCounterBasedGetDeviceAddress -if __use_win_types: - _zeEventCounterBasedGetDeviceAddress_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(c_ulonglong), POINTER(c_ulonglong) ) -else: - _zeEventCounterBasedGetDeviceAddress_t = CFUNCTYPE( ze_result_t, ze_event_handle_t, POINTER(c_ulonglong), POINTER(c_ulonglong) ) - - -############################################################################### -## @brief Table of Event functions pointers -class _ze_event_dditable_t(Structure): - _fields_ = [ - ("pfnCreate", c_void_p), ## _zeEventCreate_t - ("pfnDestroy", c_void_p), ## _zeEventDestroy_t - ("pfnHostSignal", c_void_p), ## _zeEventHostSignal_t - ("pfnHostSynchronize", c_void_p), ## _zeEventHostSynchronize_t - ("pfnQueryStatus", c_void_p), ## _zeEventQueryStatus_t - ("pfnHostReset", c_void_p), ## _zeEventHostReset_t - ("pfnQueryKernelTimestamp", c_void_p), ## _zeEventQueryKernelTimestamp_t - ("pfnQueryKernelTimestampsExt", c_void_p), ## _zeEventQueryKernelTimestampsExt_t - ("pfnGetEventPool", c_void_p), ## _zeEventGetEventPool_t - ("pfnGetSignalScope", c_void_p), ## _zeEventGetSignalScope_t - ("pfnGetWaitScope", c_void_p), ## _zeEventGetWaitScope_t - ("pfnCounterBasedCreate", c_void_p), ## _zeEventCounterBasedCreate_t - ("pfnCounterBasedGetIpcHandle", c_void_p), ## _zeEventCounterBasedGetIpcHandle_t - ("pfnCounterBasedOpenIpcHandle", c_void_p), ## _zeEventCounterBasedOpenIpcHandle_t - ("pfnCounterBasedCloseIpcHandle", c_void_p), ## _zeEventCounterBasedCloseIpcHandle_t - ("pfnCounterBasedGetDeviceAddress", c_void_p) ## _zeEventCounterBasedGetDeviceAddress_t - ] - -############################################################################### -## @brief Function-pointer for zeEventQueryTimestampsExp -if __use_win_types: - _zeEventQueryTimestampsExp_t = WINFUNCTYPE( ze_result_t, ze_event_handle_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_kernel_timestamp_result_t) ) -else: - _zeEventQueryTimestampsExp_t = CFUNCTYPE( ze_result_t, ze_event_handle_t, ze_device_handle_t, POINTER(c_ulong), POINTER(ze_kernel_timestamp_result_t) ) - - -############################################################################### -## @brief Table of EventExp functions pointers -class _ze_event_exp_dditable_t(Structure): - _fields_ = [ - ("pfnQueryTimestampsExp", c_void_p) ## _zeEventQueryTimestampsExp_t - ] - -############################################################################### -## @brief Function-pointer for zeModuleCreate -if __use_win_types: - _zeModuleCreate_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_module_desc_t), POINTER(ze_module_handle_t), POINTER(ze_module_build_log_handle_t) ) -else: - _zeModuleCreate_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_module_desc_t), POINTER(ze_module_handle_t), POINTER(ze_module_build_log_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeModuleDestroy -if __use_win_types: - _zeModuleDestroy_t = WINFUNCTYPE( ze_result_t, ze_module_handle_t ) -else: - _zeModuleDestroy_t = CFUNCTYPE( ze_result_t, ze_module_handle_t ) - -############################################################################### -## @brief Function-pointer for zeModuleDynamicLink -if __use_win_types: - _zeModuleDynamicLink_t = WINFUNCTYPE( ze_result_t, c_ulong, POINTER(ze_module_handle_t), POINTER(ze_module_build_log_handle_t) ) -else: - _zeModuleDynamicLink_t = CFUNCTYPE( ze_result_t, c_ulong, POINTER(ze_module_handle_t), POINTER(ze_module_build_log_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeModuleGetNativeBinary -if __use_win_types: - _zeModuleGetNativeBinary_t = WINFUNCTYPE( ze_result_t, ze_module_handle_t, POINTER(c_size_t), POINTER(c_ubyte) ) -else: - _zeModuleGetNativeBinary_t = CFUNCTYPE( ze_result_t, ze_module_handle_t, POINTER(c_size_t), POINTER(c_ubyte) ) - -############################################################################### -## @brief Function-pointer for zeModuleGetGlobalPointer -if __use_win_types: - _zeModuleGetGlobalPointer_t = WINFUNCTYPE( ze_result_t, ze_module_handle_t, c_char_p, POINTER(c_size_t), POINTER(c_void_p) ) -else: - _zeModuleGetGlobalPointer_t = CFUNCTYPE( ze_result_t, ze_module_handle_t, c_char_p, POINTER(c_size_t), POINTER(c_void_p) ) - -############################################################################### -## @brief Function-pointer for zeModuleGetKernelNames -if __use_win_types: - _zeModuleGetKernelNames_t = WINFUNCTYPE( ze_result_t, ze_module_handle_t, POINTER(c_ulong), POINTER(c_char_p) ) -else: - _zeModuleGetKernelNames_t = CFUNCTYPE( ze_result_t, ze_module_handle_t, POINTER(c_ulong), POINTER(c_char_p) ) - -############################################################################### -## @brief Function-pointer for zeModuleGetProperties -if __use_win_types: - _zeModuleGetProperties_t = WINFUNCTYPE( ze_result_t, ze_module_handle_t, POINTER(ze_module_properties_t) ) -else: - _zeModuleGetProperties_t = CFUNCTYPE( ze_result_t, ze_module_handle_t, POINTER(ze_module_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeModuleGetFunctionPointer -if __use_win_types: - _zeModuleGetFunctionPointer_t = WINFUNCTYPE( ze_result_t, ze_module_handle_t, c_char_p, POINTER(c_void_p) ) -else: - _zeModuleGetFunctionPointer_t = CFUNCTYPE( ze_result_t, ze_module_handle_t, c_char_p, POINTER(c_void_p) ) - -############################################################################### -## @brief Function-pointer for zeModuleInspectLinkageExt -if __use_win_types: - _zeModuleInspectLinkageExt_t = WINFUNCTYPE( ze_result_t, POINTER(ze_linkage_inspection_ext_desc_t), c_ulong, POINTER(ze_module_handle_t), POINTER(ze_module_build_log_handle_t) ) -else: - _zeModuleInspectLinkageExt_t = CFUNCTYPE( ze_result_t, POINTER(ze_linkage_inspection_ext_desc_t), c_ulong, POINTER(ze_module_handle_t), POINTER(ze_module_build_log_handle_t) ) - - -############################################################################### -## @brief Table of Module functions pointers -class _ze_module_dditable_t(Structure): - _fields_ = [ - ("pfnCreate", c_void_p), ## _zeModuleCreate_t - ("pfnDestroy", c_void_p), ## _zeModuleDestroy_t - ("pfnDynamicLink", c_void_p), ## _zeModuleDynamicLink_t - ("pfnGetNativeBinary", c_void_p), ## _zeModuleGetNativeBinary_t - ("pfnGetGlobalPointer", c_void_p), ## _zeModuleGetGlobalPointer_t - ("pfnGetKernelNames", c_void_p), ## _zeModuleGetKernelNames_t - ("pfnGetProperties", c_void_p), ## _zeModuleGetProperties_t - ("pfnGetFunctionPointer", c_void_p), ## _zeModuleGetFunctionPointer_t - ("pfnInspectLinkageExt", c_void_p) ## _zeModuleInspectLinkageExt_t - ] - -############################################################################### -## @brief Function-pointer for zeModuleBuildLogDestroy -if __use_win_types: - _zeModuleBuildLogDestroy_t = WINFUNCTYPE( ze_result_t, ze_module_build_log_handle_t ) -else: - _zeModuleBuildLogDestroy_t = CFUNCTYPE( ze_result_t, ze_module_build_log_handle_t ) - -############################################################################### -## @brief Function-pointer for zeModuleBuildLogGetString -if __use_win_types: - _zeModuleBuildLogGetString_t = WINFUNCTYPE( ze_result_t, ze_module_build_log_handle_t, POINTER(c_size_t), c_char_p ) -else: - _zeModuleBuildLogGetString_t = CFUNCTYPE( ze_result_t, ze_module_build_log_handle_t, POINTER(c_size_t), c_char_p ) - - -############################################################################### -## @brief Table of ModuleBuildLog functions pointers -class _ze_module_build_log_dditable_t(Structure): - _fields_ = [ - ("pfnDestroy", c_void_p), ## _zeModuleBuildLogDestroy_t - ("pfnGetString", c_void_p) ## _zeModuleBuildLogGetString_t - ] - -############################################################################### -## @brief Function-pointer for zeKernelCreate -if __use_win_types: - _zeKernelCreate_t = WINFUNCTYPE( ze_result_t, ze_module_handle_t, POINTER(ze_kernel_desc_t), POINTER(ze_kernel_handle_t) ) -else: - _zeKernelCreate_t = CFUNCTYPE( ze_result_t, ze_module_handle_t, POINTER(ze_kernel_desc_t), POINTER(ze_kernel_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeKernelDestroy -if __use_win_types: - _zeKernelDestroy_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t ) -else: - _zeKernelDestroy_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t ) - -############################################################################### -## @brief Function-pointer for zeKernelSetCacheConfig -if __use_win_types: - _zeKernelSetCacheConfig_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, ze_cache_config_flags_t ) -else: - _zeKernelSetCacheConfig_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, ze_cache_config_flags_t ) - -############################################################################### -## @brief Function-pointer for zeKernelSetGroupSize -if __use_win_types: - _zeKernelSetGroupSize_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, c_ulong, c_ulong, c_ulong ) -else: - _zeKernelSetGroupSize_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, c_ulong, c_ulong, c_ulong ) - -############################################################################### -## @brief Function-pointer for zeKernelSuggestGroupSize -if __use_win_types: - _zeKernelSuggestGroupSize_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, c_ulong, c_ulong, c_ulong, POINTER(c_ulong), POINTER(c_ulong), POINTER(c_ulong) ) -else: - _zeKernelSuggestGroupSize_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, c_ulong, c_ulong, c_ulong, POINTER(c_ulong), POINTER(c_ulong), POINTER(c_ulong) ) - -############################################################################### -## @brief Function-pointer for zeKernelSuggestMaxCooperativeGroupCount -if __use_win_types: - _zeKernelSuggestMaxCooperativeGroupCount_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(c_ulong) ) -else: - _zeKernelSuggestMaxCooperativeGroupCount_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(c_ulong) ) - -############################################################################### -## @brief Function-pointer for zeKernelSetArgumentValue -if __use_win_types: - _zeKernelSetArgumentValue_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, c_ulong, c_size_t, c_void_p ) -else: - _zeKernelSetArgumentValue_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, c_ulong, c_size_t, c_void_p ) - -############################################################################### -## @brief Function-pointer for zeKernelSetIndirectAccess -if __use_win_types: - _zeKernelSetIndirectAccess_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, ze_kernel_indirect_access_flags_t ) -else: - _zeKernelSetIndirectAccess_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, ze_kernel_indirect_access_flags_t ) - -############################################################################### -## @brief Function-pointer for zeKernelGetIndirectAccess -if __use_win_types: - _zeKernelGetIndirectAccess_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(ze_kernel_indirect_access_flags_t) ) -else: - _zeKernelGetIndirectAccess_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(ze_kernel_indirect_access_flags_t) ) - -############################################################################### -## @brief Function-pointer for zeKernelGetSourceAttributes -if __use_win_types: - _zeKernelGetSourceAttributes_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(c_ulong), POINTER(c_char_p) ) -else: - _zeKernelGetSourceAttributes_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(c_ulong), POINTER(c_char_p) ) - -############################################################################### -## @brief Function-pointer for zeKernelGetProperties -if __use_win_types: - _zeKernelGetProperties_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(ze_kernel_properties_t) ) -else: - _zeKernelGetProperties_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(ze_kernel_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeKernelGetName -if __use_win_types: - _zeKernelGetName_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(c_size_t), c_char_p ) -else: - _zeKernelGetName_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(c_size_t), c_char_p ) - - -############################################################################### -## @brief Table of Kernel functions pointers -class _ze_kernel_dditable_t(Structure): - _fields_ = [ - ("pfnCreate", c_void_p), ## _zeKernelCreate_t - ("pfnDestroy", c_void_p), ## _zeKernelDestroy_t - ("pfnSetCacheConfig", c_void_p), ## _zeKernelSetCacheConfig_t - ("pfnSetGroupSize", c_void_p), ## _zeKernelSetGroupSize_t - ("pfnSuggestGroupSize", c_void_p), ## _zeKernelSuggestGroupSize_t - ("pfnSuggestMaxCooperativeGroupCount", c_void_p), ## _zeKernelSuggestMaxCooperativeGroupCount_t - ("pfnSetArgumentValue", c_void_p), ## _zeKernelSetArgumentValue_t - ("pfnSetIndirectAccess", c_void_p), ## _zeKernelSetIndirectAccess_t - ("pfnGetIndirectAccess", c_void_p), ## _zeKernelGetIndirectAccess_t - ("pfnGetSourceAttributes", c_void_p), ## _zeKernelGetSourceAttributes_t - ("pfnGetProperties", c_void_p), ## _zeKernelGetProperties_t - ("pfnGetName", c_void_p) ## _zeKernelGetName_t - ] - -############################################################################### -## @brief Function-pointer for zeKernelSetGlobalOffsetExp -if __use_win_types: - _zeKernelSetGlobalOffsetExp_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, c_ulong, c_ulong, c_ulong ) -else: - _zeKernelSetGlobalOffsetExp_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, c_ulong, c_ulong, c_ulong ) - -############################################################################### -## @brief Function-pointer for zeKernelSchedulingHintExp -if __use_win_types: - _zeKernelSchedulingHintExp_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(ze_scheduling_hint_exp_desc_t) ) -else: - _zeKernelSchedulingHintExp_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(ze_scheduling_hint_exp_desc_t) ) - -############################################################################### -## @brief Function-pointer for zeKernelGetBinaryExp -if __use_win_types: - _zeKernelGetBinaryExp_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(c_size_t), POINTER(c_ubyte) ) -else: - _zeKernelGetBinaryExp_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(c_size_t), POINTER(c_ubyte) ) - -############################################################################### -## @brief Function-pointer for zeKernelGetAllocationPropertiesExp -if __use_win_types: - _zeKernelGetAllocationPropertiesExp_t = WINFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(c_ulong), POINTER(ze_kernel_allocation_exp_properties_t) ) -else: - _zeKernelGetAllocationPropertiesExp_t = CFUNCTYPE( ze_result_t, ze_kernel_handle_t, POINTER(c_ulong), POINTER(ze_kernel_allocation_exp_properties_t) ) - - -############################################################################### -## @brief Table of KernelExp functions pointers -class _ze_kernel_exp_dditable_t(Structure): - _fields_ = [ - ("pfnSetGlobalOffsetExp", c_void_p), ## _zeKernelSetGlobalOffsetExp_t - ("pfnSchedulingHintExp", c_void_p), ## _zeKernelSchedulingHintExp_t - ("pfnGetBinaryExp", c_void_p), ## _zeKernelGetBinaryExp_t - ("pfnGetAllocationPropertiesExp", c_void_p) ## _zeKernelGetAllocationPropertiesExp_t - ] - -############################################################################### -## @brief Function-pointer for zeSamplerCreate -if __use_win_types: - _zeSamplerCreate_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_sampler_desc_t), POINTER(ze_sampler_handle_t) ) -else: - _zeSamplerCreate_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_sampler_desc_t), POINTER(ze_sampler_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeSamplerDestroy -if __use_win_types: - _zeSamplerDestroy_t = WINFUNCTYPE( ze_result_t, ze_sampler_handle_t ) -else: - _zeSamplerDestroy_t = CFUNCTYPE( ze_result_t, ze_sampler_handle_t ) - - -############################################################################### -## @brief Table of Sampler functions pointers -class _ze_sampler_dditable_t(Structure): - _fields_ = [ - ("pfnCreate", c_void_p), ## _zeSamplerCreate_t - ("pfnDestroy", c_void_p) ## _zeSamplerDestroy_t - ] - -############################################################################### -## @brief Function-pointer for zePhysicalMemCreate -if __use_win_types: - _zePhysicalMemCreate_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_physical_mem_desc_t), POINTER(ze_physical_mem_handle_t) ) -else: - _zePhysicalMemCreate_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, POINTER(ze_physical_mem_desc_t), POINTER(ze_physical_mem_handle_t) ) - -############################################################################### -## @brief Function-pointer for zePhysicalMemDestroy -if __use_win_types: - _zePhysicalMemDestroy_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_physical_mem_handle_t ) -else: - _zePhysicalMemDestroy_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_physical_mem_handle_t ) - -############################################################################### -## @brief Function-pointer for zePhysicalMemGetProperties -if __use_win_types: - _zePhysicalMemGetProperties_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_physical_mem_handle_t, POINTER(ze_physical_mem_properties_t) ) -else: - _zePhysicalMemGetProperties_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_physical_mem_handle_t, POINTER(ze_physical_mem_properties_t) ) - - -############################################################################### -## @brief Table of PhysicalMem functions pointers -class _ze_physical_mem_dditable_t(Structure): - _fields_ = [ - ("pfnCreate", c_void_p), ## _zePhysicalMemCreate_t - ("pfnDestroy", c_void_p), ## _zePhysicalMemDestroy_t - ("pfnGetProperties", c_void_p) ## _zePhysicalMemGetProperties_t - ] - -############################################################################### -## @brief Function-pointer for zeVirtualMemReserve -if __use_win_types: - _zeVirtualMemReserve_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t, POINTER(c_void_p) ) -else: - _zeVirtualMemReserve_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t, POINTER(c_void_p) ) - -############################################################################### -## @brief Function-pointer for zeVirtualMemFree -if __use_win_types: - _zeVirtualMemFree_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t ) -else: - _zeVirtualMemFree_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t ) - -############################################################################### -## @brief Function-pointer for zeVirtualMemQueryPageSize -if __use_win_types: - _zeVirtualMemQueryPageSize_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_size_t, POINTER(c_size_t) ) -else: - _zeVirtualMemQueryPageSize_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, ze_device_handle_t, c_size_t, POINTER(c_size_t) ) - -############################################################################### -## @brief Function-pointer for zeVirtualMemMap -if __use_win_types: - _zeVirtualMemMap_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t, ze_physical_mem_handle_t, c_size_t, ze_memory_access_attribute_t ) -else: - _zeVirtualMemMap_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t, ze_physical_mem_handle_t, c_size_t, ze_memory_access_attribute_t ) - -############################################################################### -## @brief Function-pointer for zeVirtualMemUnmap -if __use_win_types: - _zeVirtualMemUnmap_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t ) -else: - _zeVirtualMemUnmap_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t ) - -############################################################################### -## @brief Function-pointer for zeVirtualMemSetAccessAttribute -if __use_win_types: - _zeVirtualMemSetAccessAttribute_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t, ze_memory_access_attribute_t ) -else: - _zeVirtualMemSetAccessAttribute_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t, ze_memory_access_attribute_t ) - -############################################################################### -## @brief Function-pointer for zeVirtualMemGetAccessAttribute -if __use_win_types: - _zeVirtualMemGetAccessAttribute_t = WINFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t, POINTER(ze_memory_access_attribute_t), POINTER(c_size_t) ) -else: - _zeVirtualMemGetAccessAttribute_t = CFUNCTYPE( ze_result_t, ze_context_handle_t, c_void_p, c_size_t, POINTER(ze_memory_access_attribute_t), POINTER(c_size_t) ) - - -############################################################################### -## @brief Table of VirtualMem functions pointers -class _ze_virtual_mem_dditable_t(Structure): - _fields_ = [ - ("pfnReserve", c_void_p), ## _zeVirtualMemReserve_t - ("pfnFree", c_void_p), ## _zeVirtualMemFree_t - ("pfnQueryPageSize", c_void_p), ## _zeVirtualMemQueryPageSize_t - ("pfnMap", c_void_p), ## _zeVirtualMemMap_t - ("pfnUnmap", c_void_p), ## _zeVirtualMemUnmap_t - ("pfnSetAccessAttribute", c_void_p), ## _zeVirtualMemSetAccessAttribute_t - ("pfnGetAccessAttribute", c_void_p) ## _zeVirtualMemGetAccessAttribute_t - ] - -############################################################################### -## @brief Function-pointer for zeFabricVertexGetExp -if __use_win_types: - _zeFabricVertexGetExp_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(c_ulong), POINTER(ze_fabric_vertex_handle_t) ) -else: - _zeFabricVertexGetExp_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, POINTER(c_ulong), POINTER(ze_fabric_vertex_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeFabricVertexGetSubVerticesExp -if __use_win_types: - _zeFabricVertexGetSubVerticesExp_t = WINFUNCTYPE( ze_result_t, ze_fabric_vertex_handle_t, POINTER(c_ulong), POINTER(ze_fabric_vertex_handle_t) ) -else: - _zeFabricVertexGetSubVerticesExp_t = CFUNCTYPE( ze_result_t, ze_fabric_vertex_handle_t, POINTER(c_ulong), POINTER(ze_fabric_vertex_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeFabricVertexGetPropertiesExp -if __use_win_types: - _zeFabricVertexGetPropertiesExp_t = WINFUNCTYPE( ze_result_t, ze_fabric_vertex_handle_t, POINTER(ze_fabric_vertex_exp_properties_t) ) -else: - _zeFabricVertexGetPropertiesExp_t = CFUNCTYPE( ze_result_t, ze_fabric_vertex_handle_t, POINTER(ze_fabric_vertex_exp_properties_t) ) - -############################################################################### -## @brief Function-pointer for zeFabricVertexGetDeviceExp -if __use_win_types: - _zeFabricVertexGetDeviceExp_t = WINFUNCTYPE( ze_result_t, ze_fabric_vertex_handle_t, POINTER(ze_device_handle_t) ) -else: - _zeFabricVertexGetDeviceExp_t = CFUNCTYPE( ze_result_t, ze_fabric_vertex_handle_t, POINTER(ze_device_handle_t) ) - - -############################################################################### -## @brief Table of FabricVertexExp functions pointers -class _ze_fabric_vertex_exp_dditable_t(Structure): - _fields_ = [ - ("pfnGetExp", c_void_p), ## _zeFabricVertexGetExp_t - ("pfnGetSubVerticesExp", c_void_p), ## _zeFabricVertexGetSubVerticesExp_t - ("pfnGetPropertiesExp", c_void_p), ## _zeFabricVertexGetPropertiesExp_t - ("pfnGetDeviceExp", c_void_p) ## _zeFabricVertexGetDeviceExp_t - ] - -############################################################################### -## @brief Function-pointer for zeFabricEdgeGetExp -if __use_win_types: - _zeFabricEdgeGetExp_t = WINFUNCTYPE( ze_result_t, ze_fabric_vertex_handle_t, ze_fabric_vertex_handle_t, POINTER(c_ulong), POINTER(ze_fabric_edge_handle_t) ) -else: - _zeFabricEdgeGetExp_t = CFUNCTYPE( ze_result_t, ze_fabric_vertex_handle_t, ze_fabric_vertex_handle_t, POINTER(c_ulong), POINTER(ze_fabric_edge_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeFabricEdgeGetVerticesExp -if __use_win_types: - _zeFabricEdgeGetVerticesExp_t = WINFUNCTYPE( ze_result_t, ze_fabric_edge_handle_t, POINTER(ze_fabric_vertex_handle_t), POINTER(ze_fabric_vertex_handle_t) ) -else: - _zeFabricEdgeGetVerticesExp_t = CFUNCTYPE( ze_result_t, ze_fabric_edge_handle_t, POINTER(ze_fabric_vertex_handle_t), POINTER(ze_fabric_vertex_handle_t) ) - -############################################################################### -## @brief Function-pointer for zeFabricEdgeGetPropertiesExp -if __use_win_types: - _zeFabricEdgeGetPropertiesExp_t = WINFUNCTYPE( ze_result_t, ze_fabric_edge_handle_t, POINTER(ze_fabric_edge_exp_properties_t) ) -else: - _zeFabricEdgeGetPropertiesExp_t = CFUNCTYPE( ze_result_t, ze_fabric_edge_handle_t, POINTER(ze_fabric_edge_exp_properties_t) ) - - -############################################################################### -## @brief Table of FabricEdgeExp functions pointers -class _ze_fabric_edge_exp_dditable_t(Structure): - _fields_ = [ - ("pfnGetExp", c_void_p), ## _zeFabricEdgeGetExp_t - ("pfnGetVerticesExp", c_void_p), ## _zeFabricEdgeGetVerticesExp_t - ("pfnGetPropertiesExp", c_void_p) ## _zeFabricEdgeGetPropertiesExp_t - ] - -############################################################################### -class _ze_dditable_t(Structure): - _fields_ = [ - ("RTASBuilder", _ze_rtas_builder_dditable_t), - ("RTASBuilderExp", _ze_rtas_builder_exp_dditable_t), - ("RTASParallelOperation", _ze_rtas_parallel_operation_dditable_t), - ("RTASParallelOperationExp", _ze_rtas_parallel_operation_exp_dditable_t), - ("Global", _ze_global_dditable_t), - ("Driver", _ze_driver_dditable_t), - ("DriverExp", _ze_driver_exp_dditable_t), - ("Device", _ze_device_dditable_t), - ("DeviceExp", _ze_device_exp_dditable_t), - ("Context", _ze_context_dditable_t), - ("CommandQueue", _ze_command_queue_dditable_t), - ("CommandList", _ze_command_list_dditable_t), - ("CommandListExp", _ze_command_list_exp_dditable_t), - ("Image", _ze_image_dditable_t), - ("ImageExp", _ze_image_exp_dditable_t), - ("Mem", _ze_mem_dditable_t), - ("MemExp", _ze_mem_exp_dditable_t), - ("Fence", _ze_fence_dditable_t), - ("EventPool", _ze_event_pool_dditable_t), - ("Event", _ze_event_dditable_t), - ("EventExp", _ze_event_exp_dditable_t), - ("Module", _ze_module_dditable_t), - ("ModuleBuildLog", _ze_module_build_log_dditable_t), - ("Kernel", _ze_kernel_dditable_t), - ("KernelExp", _ze_kernel_exp_dditable_t), - ("Sampler", _ze_sampler_dditable_t), - ("PhysicalMem", _ze_physical_mem_dditable_t), - ("VirtualMem", _ze_virtual_mem_dditable_t), - ("FabricVertexExp", _ze_fabric_vertex_exp_dditable_t), - ("FabricEdgeExp", _ze_fabric_edge_exp_dditable_t) - ] - -############################################################################### -## @brief ze device-driver interfaces -class ZE_DDI: - def __init__(self, version : ze_api_version_t): - # load the ze_loader library - if "Windows" == platform.uname()[0]: - self.__dll = WinDLL("ze_loader.dll") - else: - self.__dll = CDLL("ze_loader.so") - - # fill the ddi tables - self.__dditable = _ze_dditable_t() - - # call driver to get function pointers - _RTASBuilder = _ze_rtas_builder_dditable_t() - r = ze_result_v(self.__dll.zeGetRTASBuilderProcAddrTable(version, byref(_RTASBuilder))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.RTASBuilder = _RTASBuilder - - # attach function interface to function address - self.zeRTASBuilderCreateExt = _zeRTASBuilderCreateExt_t(self.__dditable.RTASBuilder.pfnCreateExt) - self.zeRTASBuilderGetBuildPropertiesExt = _zeRTASBuilderGetBuildPropertiesExt_t(self.__dditable.RTASBuilder.pfnGetBuildPropertiesExt) - self.zeRTASBuilderBuildExt = _zeRTASBuilderBuildExt_t(self.__dditable.RTASBuilder.pfnBuildExt) - self.zeRTASBuilderCommandListAppendCopyExt = _zeRTASBuilderCommandListAppendCopyExt_t(self.__dditable.RTASBuilder.pfnCommandListAppendCopyExt) - self.zeRTASBuilderDestroyExt = _zeRTASBuilderDestroyExt_t(self.__dditable.RTASBuilder.pfnDestroyExt) - - # call driver to get function pointers - _RTASBuilderExp = _ze_rtas_builder_exp_dditable_t() - r = ze_result_v(self.__dll.zeGetRTASBuilderExpProcAddrTable(version, byref(_RTASBuilderExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.RTASBuilderExp = _RTASBuilderExp - - # attach function interface to function address - self.zeRTASBuilderCreateExp = _zeRTASBuilderCreateExp_t(self.__dditable.RTASBuilderExp.pfnCreateExp) - self.zeRTASBuilderGetBuildPropertiesExp = _zeRTASBuilderGetBuildPropertiesExp_t(self.__dditable.RTASBuilderExp.pfnGetBuildPropertiesExp) - self.zeRTASBuilderBuildExp = _zeRTASBuilderBuildExp_t(self.__dditable.RTASBuilderExp.pfnBuildExp) - self.zeRTASBuilderDestroyExp = _zeRTASBuilderDestroyExp_t(self.__dditable.RTASBuilderExp.pfnDestroyExp) - - # call driver to get function pointers - _RTASParallelOperation = _ze_rtas_parallel_operation_dditable_t() - r = ze_result_v(self.__dll.zeGetRTASParallelOperationProcAddrTable(version, byref(_RTASParallelOperation))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.RTASParallelOperation = _RTASParallelOperation - - # attach function interface to function address - self.zeRTASParallelOperationCreateExt = _zeRTASParallelOperationCreateExt_t(self.__dditable.RTASParallelOperation.pfnCreateExt) - self.zeRTASParallelOperationGetPropertiesExt = _zeRTASParallelOperationGetPropertiesExt_t(self.__dditable.RTASParallelOperation.pfnGetPropertiesExt) - self.zeRTASParallelOperationJoinExt = _zeRTASParallelOperationJoinExt_t(self.__dditable.RTASParallelOperation.pfnJoinExt) - self.zeRTASParallelOperationDestroyExt = _zeRTASParallelOperationDestroyExt_t(self.__dditable.RTASParallelOperation.pfnDestroyExt) - - # call driver to get function pointers - _RTASParallelOperationExp = _ze_rtas_parallel_operation_exp_dditable_t() - r = ze_result_v(self.__dll.zeGetRTASParallelOperationExpProcAddrTable(version, byref(_RTASParallelOperationExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.RTASParallelOperationExp = _RTASParallelOperationExp - - # attach function interface to function address - self.zeRTASParallelOperationCreateExp = _zeRTASParallelOperationCreateExp_t(self.__dditable.RTASParallelOperationExp.pfnCreateExp) - self.zeRTASParallelOperationGetPropertiesExp = _zeRTASParallelOperationGetPropertiesExp_t(self.__dditable.RTASParallelOperationExp.pfnGetPropertiesExp) - self.zeRTASParallelOperationJoinExp = _zeRTASParallelOperationJoinExp_t(self.__dditable.RTASParallelOperationExp.pfnJoinExp) - self.zeRTASParallelOperationDestroyExp = _zeRTASParallelOperationDestroyExp_t(self.__dditable.RTASParallelOperationExp.pfnDestroyExp) - - # call driver to get function pointers - _Global = _ze_global_dditable_t() - r = ze_result_v(self.__dll.zeGetGlobalProcAddrTable(version, byref(_Global))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Global = _Global - - # attach function interface to function address - self.zeInit = _zeInit_t(self.__dditable.Global.pfnInit) - self.zeInitDrivers = _zeInitDrivers_t(self.__dditable.Global.pfnInitDrivers) - - # call driver to get function pointers - _Driver = _ze_driver_dditable_t() - r = ze_result_v(self.__dll.zeGetDriverProcAddrTable(version, byref(_Driver))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Driver = _Driver - - # attach function interface to function address - self.zeDriverGet = _zeDriverGet_t(self.__dditable.Driver.pfnGet) - self.zeDriverGetApiVersion = _zeDriverGetApiVersion_t(self.__dditable.Driver.pfnGetApiVersion) - self.zeDriverGetProperties = _zeDriverGetProperties_t(self.__dditable.Driver.pfnGetProperties) - self.zeDriverGetIpcProperties = _zeDriverGetIpcProperties_t(self.__dditable.Driver.pfnGetIpcProperties) - self.zeDriverGetExtensionProperties = _zeDriverGetExtensionProperties_t(self.__dditable.Driver.pfnGetExtensionProperties) - self.zeDriverGetExtensionFunctionAddress = _zeDriverGetExtensionFunctionAddress_t(self.__dditable.Driver.pfnGetExtensionFunctionAddress) - self.zeDriverGetLastErrorDescription = _zeDriverGetLastErrorDescription_t(self.__dditable.Driver.pfnGetLastErrorDescription) - self.zeDriverRTASFormatCompatibilityCheckExt = _zeDriverRTASFormatCompatibilityCheckExt_t(self.__dditable.Driver.pfnRTASFormatCompatibilityCheckExt) - self.zeDriverGetDefaultContext = _zeDriverGetDefaultContext_t(self.__dditable.Driver.pfnGetDefaultContext) - - # call driver to get function pointers - _DriverExp = _ze_driver_exp_dditable_t() - r = ze_result_v(self.__dll.zeGetDriverExpProcAddrTable(version, byref(_DriverExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.DriverExp = _DriverExp - - # attach function interface to function address - self.zeDriverRTASFormatCompatibilityCheckExp = _zeDriverRTASFormatCompatibilityCheckExp_t(self.__dditable.DriverExp.pfnRTASFormatCompatibilityCheckExp) - - # call driver to get function pointers - _Device = _ze_device_dditable_t() - r = ze_result_v(self.__dll.zeGetDeviceProcAddrTable(version, byref(_Device))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Device = _Device - - # attach function interface to function address - self.zeDeviceGet = _zeDeviceGet_t(self.__dditable.Device.pfnGet) - self.zeDeviceGetSubDevices = _zeDeviceGetSubDevices_t(self.__dditable.Device.pfnGetSubDevices) - self.zeDeviceGetProperties = _zeDeviceGetProperties_t(self.__dditable.Device.pfnGetProperties) - self.zeDeviceGetComputeProperties = _zeDeviceGetComputeProperties_t(self.__dditable.Device.pfnGetComputeProperties) - self.zeDeviceGetModuleProperties = _zeDeviceGetModuleProperties_t(self.__dditable.Device.pfnGetModuleProperties) - self.zeDeviceGetCommandQueueGroupProperties = _zeDeviceGetCommandQueueGroupProperties_t(self.__dditable.Device.pfnGetCommandQueueGroupProperties) - self.zeDeviceGetMemoryProperties = _zeDeviceGetMemoryProperties_t(self.__dditable.Device.pfnGetMemoryProperties) - self.zeDeviceGetMemoryAccessProperties = _zeDeviceGetMemoryAccessProperties_t(self.__dditable.Device.pfnGetMemoryAccessProperties) - self.zeDeviceGetCacheProperties = _zeDeviceGetCacheProperties_t(self.__dditable.Device.pfnGetCacheProperties) - self.zeDeviceGetImageProperties = _zeDeviceGetImageProperties_t(self.__dditable.Device.pfnGetImageProperties) - self.zeDeviceGetExternalMemoryProperties = _zeDeviceGetExternalMemoryProperties_t(self.__dditable.Device.pfnGetExternalMemoryProperties) - self.zeDeviceGetP2PProperties = _zeDeviceGetP2PProperties_t(self.__dditable.Device.pfnGetP2PProperties) - self.zeDeviceCanAccessPeer = _zeDeviceCanAccessPeer_t(self.__dditable.Device.pfnCanAccessPeer) - self.zeDeviceGetStatus = _zeDeviceGetStatus_t(self.__dditable.Device.pfnGetStatus) - self.zeDeviceGetGlobalTimestamps = _zeDeviceGetGlobalTimestamps_t(self.__dditable.Device.pfnGetGlobalTimestamps) - self.zeDeviceReserveCacheExt = _zeDeviceReserveCacheExt_t(self.__dditable.Device.pfnReserveCacheExt) - self.zeDeviceSetCacheAdviceExt = _zeDeviceSetCacheAdviceExt_t(self.__dditable.Device.pfnSetCacheAdviceExt) - self.zeDevicePciGetPropertiesExt = _zeDevicePciGetPropertiesExt_t(self.__dditable.Device.pfnPciGetPropertiesExt) - self.zeDeviceGetRootDevice = _zeDeviceGetRootDevice_t(self.__dditable.Device.pfnGetRootDevice) - self.zeDeviceImportExternalSemaphoreExt = _zeDeviceImportExternalSemaphoreExt_t(self.__dditable.Device.pfnImportExternalSemaphoreExt) - self.zeDeviceReleaseExternalSemaphoreExt = _zeDeviceReleaseExternalSemaphoreExt_t(self.__dditable.Device.pfnReleaseExternalSemaphoreExt) - self.zeDeviceGetVectorWidthPropertiesExt = _zeDeviceGetVectorWidthPropertiesExt_t(self.__dditable.Device.pfnGetVectorWidthPropertiesExt) - self.zeDeviceSynchronize = _zeDeviceSynchronize_t(self.__dditable.Device.pfnSynchronize) - self.zeDeviceGetAggregatedCopyOffloadIncrementValue = _zeDeviceGetAggregatedCopyOffloadIncrementValue_t(self.__dditable.Device.pfnGetAggregatedCopyOffloadIncrementValue) - - # call driver to get function pointers - _DeviceExp = _ze_device_exp_dditable_t() - r = ze_result_v(self.__dll.zeGetDeviceExpProcAddrTable(version, byref(_DeviceExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.DeviceExp = _DeviceExp - - # attach function interface to function address - self.zeDeviceGetFabricVertexExp = _zeDeviceGetFabricVertexExp_t(self.__dditable.DeviceExp.pfnGetFabricVertexExp) - - # call driver to get function pointers - _Context = _ze_context_dditable_t() - r = ze_result_v(self.__dll.zeGetContextProcAddrTable(version, byref(_Context))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Context = _Context - - # attach function interface to function address - self.zeContextCreate = _zeContextCreate_t(self.__dditable.Context.pfnCreate) - self.zeContextDestroy = _zeContextDestroy_t(self.__dditable.Context.pfnDestroy) - self.zeContextGetStatus = _zeContextGetStatus_t(self.__dditable.Context.pfnGetStatus) - self.zeContextSystemBarrier = _zeContextSystemBarrier_t(self.__dditable.Context.pfnSystemBarrier) - self.zeContextMakeMemoryResident = _zeContextMakeMemoryResident_t(self.__dditable.Context.pfnMakeMemoryResident) - self.zeContextEvictMemory = _zeContextEvictMemory_t(self.__dditable.Context.pfnEvictMemory) - self.zeContextMakeImageResident = _zeContextMakeImageResident_t(self.__dditable.Context.pfnMakeImageResident) - self.zeContextEvictImage = _zeContextEvictImage_t(self.__dditable.Context.pfnEvictImage) - self.zeContextCreateEx = _zeContextCreateEx_t(self.__dditable.Context.pfnCreateEx) - - # call driver to get function pointers - _CommandQueue = _ze_command_queue_dditable_t() - r = ze_result_v(self.__dll.zeGetCommandQueueProcAddrTable(version, byref(_CommandQueue))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.CommandQueue = _CommandQueue - - # attach function interface to function address - self.zeCommandQueueCreate = _zeCommandQueueCreate_t(self.__dditable.CommandQueue.pfnCreate) - self.zeCommandQueueDestroy = _zeCommandQueueDestroy_t(self.__dditable.CommandQueue.pfnDestroy) - self.zeCommandQueueExecuteCommandLists = _zeCommandQueueExecuteCommandLists_t(self.__dditable.CommandQueue.pfnExecuteCommandLists) - self.zeCommandQueueSynchronize = _zeCommandQueueSynchronize_t(self.__dditable.CommandQueue.pfnSynchronize) - self.zeCommandQueueGetOrdinal = _zeCommandQueueGetOrdinal_t(self.__dditable.CommandQueue.pfnGetOrdinal) - self.zeCommandQueueGetIndex = _zeCommandQueueGetIndex_t(self.__dditable.CommandQueue.pfnGetIndex) - - # call driver to get function pointers - _CommandList = _ze_command_list_dditable_t() - r = ze_result_v(self.__dll.zeGetCommandListProcAddrTable(version, byref(_CommandList))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.CommandList = _CommandList - - # attach function interface to function address - self.zeCommandListCreate = _zeCommandListCreate_t(self.__dditable.CommandList.pfnCreate) - self.zeCommandListCreateImmediate = _zeCommandListCreateImmediate_t(self.__dditable.CommandList.pfnCreateImmediate) - self.zeCommandListDestroy = _zeCommandListDestroy_t(self.__dditable.CommandList.pfnDestroy) - self.zeCommandListClose = _zeCommandListClose_t(self.__dditable.CommandList.pfnClose) - self.zeCommandListReset = _zeCommandListReset_t(self.__dditable.CommandList.pfnReset) - self.zeCommandListAppendWriteGlobalTimestamp = _zeCommandListAppendWriteGlobalTimestamp_t(self.__dditable.CommandList.pfnAppendWriteGlobalTimestamp) - self.zeCommandListAppendBarrier = _zeCommandListAppendBarrier_t(self.__dditable.CommandList.pfnAppendBarrier) - self.zeCommandListAppendMemoryRangesBarrier = _zeCommandListAppendMemoryRangesBarrier_t(self.__dditable.CommandList.pfnAppendMemoryRangesBarrier) - self.zeCommandListAppendMemoryCopy = _zeCommandListAppendMemoryCopy_t(self.__dditable.CommandList.pfnAppendMemoryCopy) - self.zeCommandListAppendMemoryFill = _zeCommandListAppendMemoryFill_t(self.__dditable.CommandList.pfnAppendMemoryFill) - self.zeCommandListAppendMemoryCopyRegion = _zeCommandListAppendMemoryCopyRegion_t(self.__dditable.CommandList.pfnAppendMemoryCopyRegion) - self.zeCommandListAppendMemoryCopyFromContext = _zeCommandListAppendMemoryCopyFromContext_t(self.__dditable.CommandList.pfnAppendMemoryCopyFromContext) - self.zeCommandListAppendImageCopy = _zeCommandListAppendImageCopy_t(self.__dditable.CommandList.pfnAppendImageCopy) - self.zeCommandListAppendImageCopyRegion = _zeCommandListAppendImageCopyRegion_t(self.__dditable.CommandList.pfnAppendImageCopyRegion) - self.zeCommandListAppendImageCopyToMemory = _zeCommandListAppendImageCopyToMemory_t(self.__dditable.CommandList.pfnAppendImageCopyToMemory) - self.zeCommandListAppendImageCopyFromMemory = _zeCommandListAppendImageCopyFromMemory_t(self.__dditable.CommandList.pfnAppendImageCopyFromMemory) - self.zeCommandListAppendMemoryPrefetch = _zeCommandListAppendMemoryPrefetch_t(self.__dditable.CommandList.pfnAppendMemoryPrefetch) - self.zeCommandListAppendMemAdvise = _zeCommandListAppendMemAdvise_t(self.__dditable.CommandList.pfnAppendMemAdvise) - self.zeCommandListAppendSignalEvent = _zeCommandListAppendSignalEvent_t(self.__dditable.CommandList.pfnAppendSignalEvent) - self.zeCommandListAppendWaitOnEvents = _zeCommandListAppendWaitOnEvents_t(self.__dditable.CommandList.pfnAppendWaitOnEvents) - self.zeCommandListAppendEventReset = _zeCommandListAppendEventReset_t(self.__dditable.CommandList.pfnAppendEventReset) - self.zeCommandListAppendQueryKernelTimestamps = _zeCommandListAppendQueryKernelTimestamps_t(self.__dditable.CommandList.pfnAppendQueryKernelTimestamps) - self.zeCommandListAppendLaunchKernel = _zeCommandListAppendLaunchKernel_t(self.__dditable.CommandList.pfnAppendLaunchKernel) - self.zeCommandListAppendLaunchCooperativeKernel = _zeCommandListAppendLaunchCooperativeKernel_t(self.__dditable.CommandList.pfnAppendLaunchCooperativeKernel) - self.zeCommandListAppendLaunchKernelIndirect = _zeCommandListAppendLaunchKernelIndirect_t(self.__dditable.CommandList.pfnAppendLaunchKernelIndirect) - self.zeCommandListAppendLaunchMultipleKernelsIndirect = _zeCommandListAppendLaunchMultipleKernelsIndirect_t(self.__dditable.CommandList.pfnAppendLaunchMultipleKernelsIndirect) - self.zeCommandListAppendImageCopyToMemoryExt = _zeCommandListAppendImageCopyToMemoryExt_t(self.__dditable.CommandList.pfnAppendImageCopyToMemoryExt) - self.zeCommandListAppendImageCopyFromMemoryExt = _zeCommandListAppendImageCopyFromMemoryExt_t(self.__dditable.CommandList.pfnAppendImageCopyFromMemoryExt) - self.zeCommandListHostSynchronize = _zeCommandListHostSynchronize_t(self.__dditable.CommandList.pfnHostSynchronize) - self.zeCommandListGetDeviceHandle = _zeCommandListGetDeviceHandle_t(self.__dditable.CommandList.pfnGetDeviceHandle) - self.zeCommandListGetContextHandle = _zeCommandListGetContextHandle_t(self.__dditable.CommandList.pfnGetContextHandle) - self.zeCommandListGetOrdinal = _zeCommandListGetOrdinal_t(self.__dditable.CommandList.pfnGetOrdinal) - self.zeCommandListImmediateGetIndex = _zeCommandListImmediateGetIndex_t(self.__dditable.CommandList.pfnImmediateGetIndex) - self.zeCommandListIsImmediate = _zeCommandListIsImmediate_t(self.__dditable.CommandList.pfnIsImmediate) - self.zeCommandListAppendSignalExternalSemaphoreExt = _zeCommandListAppendSignalExternalSemaphoreExt_t(self.__dditable.CommandList.pfnAppendSignalExternalSemaphoreExt) - self.zeCommandListAppendWaitExternalSemaphoreExt = _zeCommandListAppendWaitExternalSemaphoreExt_t(self.__dditable.CommandList.pfnAppendWaitExternalSemaphoreExt) - self.zeCommandListAppendLaunchKernelWithParameters = _zeCommandListAppendLaunchKernelWithParameters_t(self.__dditable.CommandList.pfnAppendLaunchKernelWithParameters) - self.zeCommandListAppendLaunchKernelWithArguments = _zeCommandListAppendLaunchKernelWithArguments_t(self.__dditable.CommandList.pfnAppendLaunchKernelWithArguments) - - # call driver to get function pointers - _CommandListExp = _ze_command_list_exp_dditable_t() - r = ze_result_v(self.__dll.zeGetCommandListExpProcAddrTable(version, byref(_CommandListExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.CommandListExp = _CommandListExp - - # attach function interface to function address - self.zeCommandListCreateCloneExp = _zeCommandListCreateCloneExp_t(self.__dditable.CommandListExp.pfnCreateCloneExp) - self.zeCommandListImmediateAppendCommandListsExp = _zeCommandListImmediateAppendCommandListsExp_t(self.__dditable.CommandListExp.pfnImmediateAppendCommandListsExp) - self.zeCommandListGetNextCommandIdExp = _zeCommandListGetNextCommandIdExp_t(self.__dditable.CommandListExp.pfnGetNextCommandIdExp) - self.zeCommandListUpdateMutableCommandsExp = _zeCommandListUpdateMutableCommandsExp_t(self.__dditable.CommandListExp.pfnUpdateMutableCommandsExp) - self.zeCommandListUpdateMutableCommandSignalEventExp = _zeCommandListUpdateMutableCommandSignalEventExp_t(self.__dditable.CommandListExp.pfnUpdateMutableCommandSignalEventExp) - self.zeCommandListUpdateMutableCommandWaitEventsExp = _zeCommandListUpdateMutableCommandWaitEventsExp_t(self.__dditable.CommandListExp.pfnUpdateMutableCommandWaitEventsExp) - self.zeCommandListGetNextCommandIdWithKernelsExp = _zeCommandListGetNextCommandIdWithKernelsExp_t(self.__dditable.CommandListExp.pfnGetNextCommandIdWithKernelsExp) - self.zeCommandListUpdateMutableCommandKernelsExp = _zeCommandListUpdateMutableCommandKernelsExp_t(self.__dditable.CommandListExp.pfnUpdateMutableCommandKernelsExp) - - # call driver to get function pointers - _Image = _ze_image_dditable_t() - r = ze_result_v(self.__dll.zeGetImageProcAddrTable(version, byref(_Image))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Image = _Image - - # attach function interface to function address - self.zeImageGetProperties = _zeImageGetProperties_t(self.__dditable.Image.pfnGetProperties) - self.zeImageCreate = _zeImageCreate_t(self.__dditable.Image.pfnCreate) - self.zeImageDestroy = _zeImageDestroy_t(self.__dditable.Image.pfnDestroy) - self.zeImageGetAllocPropertiesExt = _zeImageGetAllocPropertiesExt_t(self.__dditable.Image.pfnGetAllocPropertiesExt) - self.zeImageViewCreateExt = _zeImageViewCreateExt_t(self.__dditable.Image.pfnViewCreateExt) - - # call driver to get function pointers - _ImageExp = _ze_image_exp_dditable_t() - r = ze_result_v(self.__dll.zeGetImageExpProcAddrTable(version, byref(_ImageExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.ImageExp = _ImageExp - - # attach function interface to function address - self.zeImageGetMemoryPropertiesExp = _zeImageGetMemoryPropertiesExp_t(self.__dditable.ImageExp.pfnGetMemoryPropertiesExp) - self.zeImageViewCreateExp = _zeImageViewCreateExp_t(self.__dditable.ImageExp.pfnViewCreateExp) - self.zeImageGetDeviceOffsetExp = _zeImageGetDeviceOffsetExp_t(self.__dditable.ImageExp.pfnGetDeviceOffsetExp) - - # call driver to get function pointers - _Mem = _ze_mem_dditable_t() - r = ze_result_v(self.__dll.zeGetMemProcAddrTable(version, byref(_Mem))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Mem = _Mem - - # attach function interface to function address - self.zeMemAllocShared = _zeMemAllocShared_t(self.__dditable.Mem.pfnAllocShared) - self.zeMemAllocDevice = _zeMemAllocDevice_t(self.__dditable.Mem.pfnAllocDevice) - self.zeMemAllocHost = _zeMemAllocHost_t(self.__dditable.Mem.pfnAllocHost) - self.zeMemFree = _zeMemFree_t(self.__dditable.Mem.pfnFree) - self.zeMemGetAllocProperties = _zeMemGetAllocProperties_t(self.__dditable.Mem.pfnGetAllocProperties) - self.zeMemGetAddressRange = _zeMemGetAddressRange_t(self.__dditable.Mem.pfnGetAddressRange) - self.zeMemGetIpcHandle = _zeMemGetIpcHandle_t(self.__dditable.Mem.pfnGetIpcHandle) - self.zeMemOpenIpcHandle = _zeMemOpenIpcHandle_t(self.__dditable.Mem.pfnOpenIpcHandle) - self.zeMemCloseIpcHandle = _zeMemCloseIpcHandle_t(self.__dditable.Mem.pfnCloseIpcHandle) - self.zeMemFreeExt = _zeMemFreeExt_t(self.__dditable.Mem.pfnFreeExt) - self.zeMemPutIpcHandle = _zeMemPutIpcHandle_t(self.__dditable.Mem.pfnPutIpcHandle) - self.zeMemGetPitchFor2dImage = _zeMemGetPitchFor2dImage_t(self.__dditable.Mem.pfnGetPitchFor2dImage) - self.zeMemGetIpcHandleWithProperties = _zeMemGetIpcHandleWithProperties_t(self.__dditable.Mem.pfnGetIpcHandleWithProperties) - - # call driver to get function pointers - _MemExp = _ze_mem_exp_dditable_t() - r = ze_result_v(self.__dll.zeGetMemExpProcAddrTable(version, byref(_MemExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.MemExp = _MemExp - - # attach function interface to function address - self.zeMemGetIpcHandleFromFileDescriptorExp = _zeMemGetIpcHandleFromFileDescriptorExp_t(self.__dditable.MemExp.pfnGetIpcHandleFromFileDescriptorExp) - self.zeMemGetFileDescriptorFromIpcHandleExp = _zeMemGetFileDescriptorFromIpcHandleExp_t(self.__dditable.MemExp.pfnGetFileDescriptorFromIpcHandleExp) - self.zeMemSetAtomicAccessAttributeExp = _zeMemSetAtomicAccessAttributeExp_t(self.__dditable.MemExp.pfnSetAtomicAccessAttributeExp) - self.zeMemGetAtomicAccessAttributeExp = _zeMemGetAtomicAccessAttributeExp_t(self.__dditable.MemExp.pfnGetAtomicAccessAttributeExp) - - # call driver to get function pointers - _Fence = _ze_fence_dditable_t() - r = ze_result_v(self.__dll.zeGetFenceProcAddrTable(version, byref(_Fence))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Fence = _Fence - - # attach function interface to function address - self.zeFenceCreate = _zeFenceCreate_t(self.__dditable.Fence.pfnCreate) - self.zeFenceDestroy = _zeFenceDestroy_t(self.__dditable.Fence.pfnDestroy) - self.zeFenceHostSynchronize = _zeFenceHostSynchronize_t(self.__dditable.Fence.pfnHostSynchronize) - self.zeFenceQueryStatus = _zeFenceQueryStatus_t(self.__dditable.Fence.pfnQueryStatus) - self.zeFenceReset = _zeFenceReset_t(self.__dditable.Fence.pfnReset) - - # call driver to get function pointers - _EventPool = _ze_event_pool_dditable_t() - r = ze_result_v(self.__dll.zeGetEventPoolProcAddrTable(version, byref(_EventPool))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.EventPool = _EventPool - - # attach function interface to function address - self.zeEventPoolCreate = _zeEventPoolCreate_t(self.__dditable.EventPool.pfnCreate) - self.zeEventPoolDestroy = _zeEventPoolDestroy_t(self.__dditable.EventPool.pfnDestroy) - self.zeEventPoolGetIpcHandle = _zeEventPoolGetIpcHandle_t(self.__dditable.EventPool.pfnGetIpcHandle) - self.zeEventPoolOpenIpcHandle = _zeEventPoolOpenIpcHandle_t(self.__dditable.EventPool.pfnOpenIpcHandle) - self.zeEventPoolCloseIpcHandle = _zeEventPoolCloseIpcHandle_t(self.__dditable.EventPool.pfnCloseIpcHandle) - self.zeEventPoolPutIpcHandle = _zeEventPoolPutIpcHandle_t(self.__dditable.EventPool.pfnPutIpcHandle) - self.zeEventPoolGetContextHandle = _zeEventPoolGetContextHandle_t(self.__dditable.EventPool.pfnGetContextHandle) - self.zeEventPoolGetFlags = _zeEventPoolGetFlags_t(self.__dditable.EventPool.pfnGetFlags) - - # call driver to get function pointers - _Event = _ze_event_dditable_t() - r = ze_result_v(self.__dll.zeGetEventProcAddrTable(version, byref(_Event))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Event = _Event - - # attach function interface to function address - self.zeEventCreate = _zeEventCreate_t(self.__dditable.Event.pfnCreate) - self.zeEventDestroy = _zeEventDestroy_t(self.__dditable.Event.pfnDestroy) - self.zeEventHostSignal = _zeEventHostSignal_t(self.__dditable.Event.pfnHostSignal) - self.zeEventHostSynchronize = _zeEventHostSynchronize_t(self.__dditable.Event.pfnHostSynchronize) - self.zeEventQueryStatus = _zeEventQueryStatus_t(self.__dditable.Event.pfnQueryStatus) - self.zeEventHostReset = _zeEventHostReset_t(self.__dditable.Event.pfnHostReset) - self.zeEventQueryKernelTimestamp = _zeEventQueryKernelTimestamp_t(self.__dditable.Event.pfnQueryKernelTimestamp) - self.zeEventQueryKernelTimestampsExt = _zeEventQueryKernelTimestampsExt_t(self.__dditable.Event.pfnQueryKernelTimestampsExt) - self.zeEventGetEventPool = _zeEventGetEventPool_t(self.__dditable.Event.pfnGetEventPool) - self.zeEventGetSignalScope = _zeEventGetSignalScope_t(self.__dditable.Event.pfnGetSignalScope) - self.zeEventGetWaitScope = _zeEventGetWaitScope_t(self.__dditable.Event.pfnGetWaitScope) - self.zeEventCounterBasedCreate = _zeEventCounterBasedCreate_t(self.__dditable.Event.pfnCounterBasedCreate) - self.zeEventCounterBasedGetIpcHandle = _zeEventCounterBasedGetIpcHandle_t(self.__dditable.Event.pfnCounterBasedGetIpcHandle) - self.zeEventCounterBasedOpenIpcHandle = _zeEventCounterBasedOpenIpcHandle_t(self.__dditable.Event.pfnCounterBasedOpenIpcHandle) - self.zeEventCounterBasedCloseIpcHandle = _zeEventCounterBasedCloseIpcHandle_t(self.__dditable.Event.pfnCounterBasedCloseIpcHandle) - self.zeEventCounterBasedGetDeviceAddress = _zeEventCounterBasedGetDeviceAddress_t(self.__dditable.Event.pfnCounterBasedGetDeviceAddress) - - # call driver to get function pointers - _EventExp = _ze_event_exp_dditable_t() - r = ze_result_v(self.__dll.zeGetEventExpProcAddrTable(version, byref(_EventExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.EventExp = _EventExp - - # attach function interface to function address - self.zeEventQueryTimestampsExp = _zeEventQueryTimestampsExp_t(self.__dditable.EventExp.pfnQueryTimestampsExp) - - # call driver to get function pointers - _Module = _ze_module_dditable_t() - r = ze_result_v(self.__dll.zeGetModuleProcAddrTable(version, byref(_Module))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Module = _Module - - # attach function interface to function address - self.zeModuleCreate = _zeModuleCreate_t(self.__dditable.Module.pfnCreate) - self.zeModuleDestroy = _zeModuleDestroy_t(self.__dditable.Module.pfnDestroy) - self.zeModuleDynamicLink = _zeModuleDynamicLink_t(self.__dditable.Module.pfnDynamicLink) - self.zeModuleGetNativeBinary = _zeModuleGetNativeBinary_t(self.__dditable.Module.pfnGetNativeBinary) - self.zeModuleGetGlobalPointer = _zeModuleGetGlobalPointer_t(self.__dditable.Module.pfnGetGlobalPointer) - self.zeModuleGetKernelNames = _zeModuleGetKernelNames_t(self.__dditable.Module.pfnGetKernelNames) - self.zeModuleGetProperties = _zeModuleGetProperties_t(self.__dditable.Module.pfnGetProperties) - self.zeModuleGetFunctionPointer = _zeModuleGetFunctionPointer_t(self.__dditable.Module.pfnGetFunctionPointer) - self.zeModuleInspectLinkageExt = _zeModuleInspectLinkageExt_t(self.__dditable.Module.pfnInspectLinkageExt) - - # call driver to get function pointers - _ModuleBuildLog = _ze_module_build_log_dditable_t() - r = ze_result_v(self.__dll.zeGetModuleBuildLogProcAddrTable(version, byref(_ModuleBuildLog))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.ModuleBuildLog = _ModuleBuildLog - - # attach function interface to function address - self.zeModuleBuildLogDestroy = _zeModuleBuildLogDestroy_t(self.__dditable.ModuleBuildLog.pfnDestroy) - self.zeModuleBuildLogGetString = _zeModuleBuildLogGetString_t(self.__dditable.ModuleBuildLog.pfnGetString) - - # call driver to get function pointers - _Kernel = _ze_kernel_dditable_t() - r = ze_result_v(self.__dll.zeGetKernelProcAddrTable(version, byref(_Kernel))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Kernel = _Kernel - - # attach function interface to function address - self.zeKernelCreate = _zeKernelCreate_t(self.__dditable.Kernel.pfnCreate) - self.zeKernelDestroy = _zeKernelDestroy_t(self.__dditable.Kernel.pfnDestroy) - self.zeKernelSetCacheConfig = _zeKernelSetCacheConfig_t(self.__dditable.Kernel.pfnSetCacheConfig) - self.zeKernelSetGroupSize = _zeKernelSetGroupSize_t(self.__dditable.Kernel.pfnSetGroupSize) - self.zeKernelSuggestGroupSize = _zeKernelSuggestGroupSize_t(self.__dditable.Kernel.pfnSuggestGroupSize) - self.zeKernelSuggestMaxCooperativeGroupCount = _zeKernelSuggestMaxCooperativeGroupCount_t(self.__dditable.Kernel.pfnSuggestMaxCooperativeGroupCount) - self.zeKernelSetArgumentValue = _zeKernelSetArgumentValue_t(self.__dditable.Kernel.pfnSetArgumentValue) - self.zeKernelSetIndirectAccess = _zeKernelSetIndirectAccess_t(self.__dditable.Kernel.pfnSetIndirectAccess) - self.zeKernelGetIndirectAccess = _zeKernelGetIndirectAccess_t(self.__dditable.Kernel.pfnGetIndirectAccess) - self.zeKernelGetSourceAttributes = _zeKernelGetSourceAttributes_t(self.__dditable.Kernel.pfnGetSourceAttributes) - self.zeKernelGetProperties = _zeKernelGetProperties_t(self.__dditable.Kernel.pfnGetProperties) - self.zeKernelGetName = _zeKernelGetName_t(self.__dditable.Kernel.pfnGetName) - - # call driver to get function pointers - _KernelExp = _ze_kernel_exp_dditable_t() - r = ze_result_v(self.__dll.zeGetKernelExpProcAddrTable(version, byref(_KernelExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.KernelExp = _KernelExp - - # attach function interface to function address - self.zeKernelSetGlobalOffsetExp = _zeKernelSetGlobalOffsetExp_t(self.__dditable.KernelExp.pfnSetGlobalOffsetExp) - self.zeKernelSchedulingHintExp = _zeKernelSchedulingHintExp_t(self.__dditable.KernelExp.pfnSchedulingHintExp) - self.zeKernelGetBinaryExp = _zeKernelGetBinaryExp_t(self.__dditable.KernelExp.pfnGetBinaryExp) - self.zeKernelGetAllocationPropertiesExp = _zeKernelGetAllocationPropertiesExp_t(self.__dditable.KernelExp.pfnGetAllocationPropertiesExp) - - # call driver to get function pointers - _Sampler = _ze_sampler_dditable_t() - r = ze_result_v(self.__dll.zeGetSamplerProcAddrTable(version, byref(_Sampler))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Sampler = _Sampler - - # attach function interface to function address - self.zeSamplerCreate = _zeSamplerCreate_t(self.__dditable.Sampler.pfnCreate) - self.zeSamplerDestroy = _zeSamplerDestroy_t(self.__dditable.Sampler.pfnDestroy) - - # call driver to get function pointers - _PhysicalMem = _ze_physical_mem_dditable_t() - r = ze_result_v(self.__dll.zeGetPhysicalMemProcAddrTable(version, byref(_PhysicalMem))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.PhysicalMem = _PhysicalMem - - # attach function interface to function address - self.zePhysicalMemCreate = _zePhysicalMemCreate_t(self.__dditable.PhysicalMem.pfnCreate) - self.zePhysicalMemDestroy = _zePhysicalMemDestroy_t(self.__dditable.PhysicalMem.pfnDestroy) - self.zePhysicalMemGetProperties = _zePhysicalMemGetProperties_t(self.__dditable.PhysicalMem.pfnGetProperties) - - # call driver to get function pointers - _VirtualMem = _ze_virtual_mem_dditable_t() - r = ze_result_v(self.__dll.zeGetVirtualMemProcAddrTable(version, byref(_VirtualMem))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.VirtualMem = _VirtualMem - - # attach function interface to function address - self.zeVirtualMemReserve = _zeVirtualMemReserve_t(self.__dditable.VirtualMem.pfnReserve) - self.zeVirtualMemFree = _zeVirtualMemFree_t(self.__dditable.VirtualMem.pfnFree) - self.zeVirtualMemQueryPageSize = _zeVirtualMemQueryPageSize_t(self.__dditable.VirtualMem.pfnQueryPageSize) - self.zeVirtualMemMap = _zeVirtualMemMap_t(self.__dditable.VirtualMem.pfnMap) - self.zeVirtualMemUnmap = _zeVirtualMemUnmap_t(self.__dditable.VirtualMem.pfnUnmap) - self.zeVirtualMemSetAccessAttribute = _zeVirtualMemSetAccessAttribute_t(self.__dditable.VirtualMem.pfnSetAccessAttribute) - self.zeVirtualMemGetAccessAttribute = _zeVirtualMemGetAccessAttribute_t(self.__dditable.VirtualMem.pfnGetAccessAttribute) - - # call driver to get function pointers - _FabricVertexExp = _ze_fabric_vertex_exp_dditable_t() - r = ze_result_v(self.__dll.zeGetFabricVertexExpProcAddrTable(version, byref(_FabricVertexExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.FabricVertexExp = _FabricVertexExp - - # attach function interface to function address - self.zeFabricVertexGetExp = _zeFabricVertexGetExp_t(self.__dditable.FabricVertexExp.pfnGetExp) - self.zeFabricVertexGetSubVerticesExp = _zeFabricVertexGetSubVerticesExp_t(self.__dditable.FabricVertexExp.pfnGetSubVerticesExp) - self.zeFabricVertexGetPropertiesExp = _zeFabricVertexGetPropertiesExp_t(self.__dditable.FabricVertexExp.pfnGetPropertiesExp) - self.zeFabricVertexGetDeviceExp = _zeFabricVertexGetDeviceExp_t(self.__dditable.FabricVertexExp.pfnGetDeviceExp) - - # call driver to get function pointers - _FabricEdgeExp = _ze_fabric_edge_exp_dditable_t() - r = ze_result_v(self.__dll.zeGetFabricEdgeExpProcAddrTable(version, byref(_FabricEdgeExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.FabricEdgeExp = _FabricEdgeExp - - # attach function interface to function address - self.zeFabricEdgeGetExp = _zeFabricEdgeGetExp_t(self.__dditable.FabricEdgeExp.pfnGetExp) - self.zeFabricEdgeGetVerticesExp = _zeFabricEdgeGetVerticesExp_t(self.__dditable.FabricEdgeExp.pfnGetVerticesExp) - self.zeFabricEdgeGetPropertiesExp = _zeFabricEdgeGetPropertiesExp_t(self.__dditable.FabricEdgeExp.pfnGetPropertiesExp) - - # success! diff --git a/backends/ze/include/zer.py b/backends/ze/include/zer.py deleted file mode 100644 index 4e6f46574..000000000 --- a/backends/ze/include/zer.py +++ /dev/null @@ -1,102 +0,0 @@ -""" - Copyright (C) 2019-2025 Intel Corporation - - SPDX-License-Identifier: MIT - - @file zer.py - @version v1.15-r1.13.73 - - """ -import platform -from ctypes import * -from enum import * - -############################################################################### -__version__ = "1.0" - -############################################################################### -## @brief Immediate Command List default descriptor for GPU devices - -############################################################################### -## @brief Device Unified Shared Memory Allocation default descriptor for GPU -## devices - -############################################################################### -## @brief Host Unified Shared Memory Allocation default descriptor for GPU -## devices - -############################################################################### -__use_win_types = "Windows" == platform.uname()[0] - -############################################################################### -## @brief Function-pointer for zerGetLastErrorDescription -if __use_win_types: - _zerGetLastErrorDescription_t = WINFUNCTYPE( ze_result_t, POINTER(c_char_p) ) -else: - _zerGetLastErrorDescription_t = CFUNCTYPE( ze_result_t, POINTER(c_char_p) ) - -############################################################################### -## @brief Function-pointer for zerTranslateDeviceHandleToIdentifier -if __use_win_types: - _zerTranslateDeviceHandleToIdentifier_t = WINFUNCTYPE( uint32_t, ze_device_handle_t ) -else: - _zerTranslateDeviceHandleToIdentifier_t = CFUNCTYPE( uint32_t, ze_device_handle_t ) - -############################################################################### -## @brief Function-pointer for zerTranslateIdentifierToDeviceHandle -if __use_win_types: - _zerTranslateIdentifierToDeviceHandle_t = WINFUNCTYPE( ze_device_handle_t, c_ulong ) -else: - _zerTranslateIdentifierToDeviceHandle_t = CFUNCTYPE( ze_device_handle_t, c_ulong ) - -############################################################################### -## @brief Function-pointer for zerGetDefaultContext -if __use_win_types: - _zerGetDefaultContext_t = WINFUNCTYPE( ze_context_handle_t, ) -else: - _zerGetDefaultContext_t = CFUNCTYPE( ze_context_handle_t, ) - - -############################################################################### -## @brief Table of Global functions pointers -class _zer_global_dditable_t(Structure): - _fields_ = [ - ("pfnGetLastErrorDescription", c_void_p), ## _zerGetLastErrorDescription_t - ("pfnTranslateDeviceHandleToIdentifier", c_void_p), ## _zerTranslateDeviceHandleToIdentifier_t - ("pfnTranslateIdentifierToDeviceHandle", c_void_p), ## _zerTranslateIdentifierToDeviceHandle_t - ("pfnGetDefaultContext", c_void_p) ## _zerGetDefaultContext_t - ] - -############################################################################### -class _zer_dditable_t(Structure): - _fields_ = [ - ("Global", _zer_global_dditable_t) - ] - -############################################################################### -## @brief zer device-driver interfaces -class ZER_DDI: - def __init__(self, version : ze_api_version_t): - # load the ze_loader library - if "Windows" == platform.uname()[0]: - self.__dll = WinDLL("ze_loader.dll") - else: - self.__dll = CDLL("ze_loader.so") - - # fill the ddi tables - self.__dditable = _zer_dditable_t() - - # call driver to get function pointers - _Global = _zer_global_dditable_t() - r = ze_result_v(self.__dll.zerGetGlobalProcAddrTable(version, byref(_Global))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Global = _Global - - # attach function interface to function address - self.zerGetLastErrorDescription = _zerGetLastErrorDescription_t(self.__dditable.Global.pfnGetLastErrorDescription) - self.zerTranslateDeviceHandleToIdentifier = _zerTranslateDeviceHandleToIdentifier_t(self.__dditable.Global.pfnTranslateDeviceHandleToIdentifier) - self.zerTranslateIdentifierToDeviceHandle = _zerTranslateIdentifierToDeviceHandle_t(self.__dditable.Global.pfnTranslateIdentifierToDeviceHandle) - self.zerGetDefaultContext = _zerGetDefaultContext_t(self.__dditable.Global.pfnGetDefaultContext) - - # success! diff --git a/backends/ze/include/zes.py b/backends/ze/include/zes.py deleted file mode 100644 index 52a0c1059..000000000 --- a/backends/ze/include/zes.py +++ /dev/null @@ -1,4423 +0,0 @@ -""" - Copyright (C) 2019-2025 Intel Corporation - - SPDX-License-Identifier: MIT - - @file zes.py - @version v1.15-r1.13.73 - - """ -import platform -from ctypes import * -from enum import * - -############################################################################### -__version__ = "1.0" - -############################################################################### -## @brief Handle to a driver instance -class zes_driver_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of device object -class zes_device_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle for a Sysman device scheduler queue -class zes_sched_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle for a Sysman device performance factors -class zes_perf_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle for a Sysman device power domain -class zes_pwr_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle for a Sysman device frequency domain -class zes_freq_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle for a Sysman device engine group -class zes_engine_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle for a Sysman device standby control -class zes_standby_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle for a Sysman device firmware -class zes_firmware_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle for a Sysman device memory module -class zes_mem_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle for a Sysman fabric port -class zes_fabric_port_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle for a Sysman device temperature sensor -class zes_temp_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle for a Sysman device power supply -class zes_psu_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle for a Sysman device fan -class zes_fan_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle for a Sysman device LED -class zes_led_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle for a Sysman device RAS error set -class zes_ras_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle for a Sysman device diagnostics test suite -class zes_diag_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle for a Sysman device overclock domain -class zes_overclock_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle for a Sysman virtual function management domain -class zes_vf_handle_t(c_void_p): - pass - -############################################################################### -## @brief Defines structure types -class zes_structure_type_v(IntEnum): - DEVICE_PROPERTIES = 0x1 ## ::zes_device_properties_t - PCI_PROPERTIES = 0x2 ## ::zes_pci_properties_t - PCI_BAR_PROPERTIES = 0x3 ## ::zes_pci_bar_properties_t - DIAG_PROPERTIES = 0x4 ## ::zes_diag_properties_t - ENGINE_PROPERTIES = 0x5 ## ::zes_engine_properties_t - FABRIC_PORT_PROPERTIES = 0x6 ## ::zes_fabric_port_properties_t - FAN_PROPERTIES = 0x7 ## ::zes_fan_properties_t - FIRMWARE_PROPERTIES = 0x8 ## ::zes_firmware_properties_t - FREQ_PROPERTIES = 0x9 ## ::zes_freq_properties_t - LED_PROPERTIES = 0xa ## ::zes_led_properties_t - MEM_PROPERTIES = 0xb ## ::zes_mem_properties_t - PERF_PROPERTIES = 0xc ## ::zes_perf_properties_t - POWER_PROPERTIES = 0xd ## ::zes_power_properties_t - PSU_PROPERTIES = 0xe ## ::zes_psu_properties_t - RAS_PROPERTIES = 0xf ## ::zes_ras_properties_t - SCHED_PROPERTIES = 0x10 ## ::zes_sched_properties_t - SCHED_TIMEOUT_PROPERTIES = 0x11 ## ::zes_sched_timeout_properties_t - SCHED_TIMESLICE_PROPERTIES = 0x12 ## ::zes_sched_timeslice_properties_t - STANDBY_PROPERTIES = 0x13 ## ::zes_standby_properties_t - TEMP_PROPERTIES = 0x14 ## ::zes_temp_properties_t - DEVICE_STATE = 0x15 ## ::zes_device_state_t - PROCESS_STATE = 0x16 ## ::zes_process_state_t - PCI_STATE = 0x17 ## ::zes_pci_state_t - FABRIC_PORT_CONFIG = 0x18 ## ::zes_fabric_port_config_t - FABRIC_PORT_STATE = 0x19 ## ::zes_fabric_port_state_t - FAN_CONFIG = 0x1a ## ::zes_fan_config_t - FREQ_STATE = 0x1b ## ::zes_freq_state_t - OC_CAPABILITIES = 0x1c ## ::zes_oc_capabilities_t - LED_STATE = 0x1d ## ::zes_led_state_t - MEM_STATE = 0x1e ## ::zes_mem_state_t - PSU_STATE = 0x1f ## ::zes_psu_state_t - BASE_STATE = 0x20 ## ::zes_base_state_t - RAS_CONFIG = 0x21 ## ::zes_ras_config_t - RAS_STATE = 0x22 ## ::zes_ras_state_t - TEMP_CONFIG = 0x23 ## ::zes_temp_config_t - PCI_BAR_PROPERTIES_1_2 = 0x24 ## ::zes_pci_bar_properties_1_2_t - DEVICE_ECC_DESC = 0x25 ## ::zes_device_ecc_desc_t - DEVICE_ECC_PROPERTIES = 0x26 ## ::zes_device_ecc_properties_t - POWER_LIMIT_EXT_DESC = 0x27 ## ::zes_power_limit_ext_desc_t - POWER_EXT_PROPERTIES = 0x28 ## ::zes_power_ext_properties_t - OVERCLOCK_PROPERTIES = 0x29 ## ::zes_overclock_properties_t - FABRIC_PORT_ERROR_COUNTERS = 0x2a ## ::zes_fabric_port_error_counters_t - ENGINE_EXT_PROPERTIES = 0x2b ## ::zes_engine_ext_properties_t - RESET_PROPERTIES = 0x2c ## ::zes_reset_properties_t - DEVICE_EXT_PROPERTIES = 0x2d ## ::zes_device_ext_properties_t - DEVICE_UUID = 0x2e ## ::zes_uuid_t - POWER_DOMAIN_EXP_PROPERTIES = 0x00020001 ## ::zes_power_domain_exp_properties_t - MEM_BANDWIDTH_COUNTER_BITS_EXP_PROPERTIES = 0x00020002 ## ::zes_mem_bandwidth_counter_bits_exp_properties_t - MEMORY_PAGE_OFFLINE_STATE_EXP = 0x00020003 ## ::zes_mem_page_offline_state_exp_t - SUBDEVICE_EXP_PROPERTIES = 0x00020004 ## ::zes_subdevice_exp_properties_t - VF_EXP_PROPERTIES = 0x00020005 ## ::zes_vf_exp_properties_t - VF_UTIL_MEM_EXP = 0x00020006 ## ::zes_vf_util_mem_exp_t - VF_UTIL_ENGINE_EXP = 0x00020007 ## ::zes_vf_util_engine_exp_t - VF_EXP_CAPABILITIES = 0x00020008 ## ::zes_vf_exp_capabilities_t - VF_UTIL_MEM_EXP2 = 0x00020009 ## ::zes_vf_util_mem_exp2_t - VF_UTIL_ENGINE_EXP2 = 0x00020010 ## ::zes_vf_util_engine_exp2_t - VF_EXP2_CAPABILITIES = 0x00020011 ## ::zes_vf_exp2_capabilities_t - DEVICE_ECC_DEFAULT_PROPERTIES_EXT = 0x00020012 ## ::zes_device_ecc_default_properties_ext_t - PCI_LINK_SPEED_DOWNGRADE_EXT_STATE = 0x00020013 ## ::zes_pci_link_speed_downgrade_ext_state_t - PCI_LINK_SPEED_DOWNGRADE_EXT_PROPERTIES = 0x00020014 ## ::zes_pci_link_speed_downgrade_ext_properties_t - -class zes_structure_type_t(c_int): - def __str__(self): - return str(zes_structure_type_v(self.value)) - - -############################################################################### -## @brief Base for all properties types -class zes_base_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p) ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ] - -############################################################################### -## @brief Base for all descriptor types -class zes_base_desc_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p) ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ] - -############################################################################### -## @brief Base for all state types -class zes_base_state_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p) ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ] - -############################################################################### -## @brief Base for all config types -class zes_base_config_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p) ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ] - -############################################################################### -## @brief Base for all capability types -class zes_base_capability_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p) ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ] - -############################################################################### -## @brief Supported sysman initialization flags -class zes_init_flags_v(IntEnum): - PLACEHOLDER = ZE_BIT(0) ## placeholder for future use - -class zes_init_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Maximum extension name string size -ZES_MAX_EXTENSION_NAME = 256 - -############################################################################### -## @brief Extension properties queried using ::zesDriverGetExtensionProperties -class zes_driver_extension_properties_t(Structure): - _fields_ = [ - ("name", c_char * ZES_MAX_EXTENSION_NAME), ## [out] extension name - ("version", c_ulong) ## [out] extension version using ::ZE_MAKE_VERSION - ] - -############################################################################### -## @brief Maximum number of characters in string properties. -ZES_STRING_PROPERTY_SIZE = 64 - -############################################################################### -## @brief Maximum device universal unique id (UUID) size in bytes. -ZES_MAX_UUID_SIZE = 16 - -############################################################################### -## @brief Types of accelerator engines -class zes_engine_type_flags_v(IntEnum): - OTHER = ZE_BIT(0) ## Undefined types of accelerators. - COMPUTE = ZE_BIT(1) ## Engines that process compute kernels only (no 3D content). - _3D = ZE_BIT(2) ## Engines that process 3D content only (no compute kernels). - MEDIA = ZE_BIT(3) ## Engines that process media workloads. - DMA = ZE_BIT(4) ## Engines that copy blocks of data. - RENDER = ZE_BIT(5) ## Engines that can process both 3D content and compute kernels. - -class zes_engine_type_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Device repair status -class zes_repair_status_v(IntEnum): - UNSUPPORTED = 0 ## The device does not support in-field repairs. - NOT_PERFORMED = 1 ## The device has never been repaired. - PERFORMED = 2 ## The device has been repaired. - -class zes_repair_status_t(c_int): - def __str__(self): - return str(zes_repair_status_v(self.value)) - - -############################################################################### -## @brief Device reset reasons -class zes_reset_reason_flags_v(IntEnum): - WEDGED = ZE_BIT(0) ## The device needs to be reset because one or more parts of the hardware - ## is wedged - REPAIR = ZE_BIT(1) ## The device needs to be reset in order to complete in-field repairs - -class zes_reset_reason_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Device reset type -class zes_reset_type_v(IntEnum): - WARM = 0 ## Apply warm reset - COLD = 1 ## Apply cold reset - FLR = 2 ## Apply FLR reset - -class zes_reset_type_t(c_int): - def __str__(self): - return str(zes_reset_type_v(self.value)) - - -############################################################################### -## @brief Device state -class zes_device_state_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("reset", zes_reset_reason_flags_t), ## [out] Indicates if the device needs to be reset and for what reasons. - ## returns 0 (none) or combination of ::zes_reset_reason_flag_t - ("repaired", zes_repair_status_t) ## [out] Indicates if the device has been repaired - ] - -############################################################################### -## @brief Device reset properties -class zes_reset_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("force", ze_bool_t), ## [in] If set to true, all applications that are currently using the - ## device will be forcibly killed. - ("resetType", zes_reset_type_t) ## [in] Type of reset needs to be performed - ] - -############################################################################### -## @brief Device universal unique id (UUID) -class zes_uuid_t(Structure): - _fields_ = [ - ("id", c_ubyte * ZES_MAX_UUID_SIZE) ## [out] opaque data representing a device UUID - ] - -############################################################################### -## @brief Supported device types -class zes_device_type_v(IntEnum): - GPU = 1 ## Graphics Processing Unit - CPU = 2 ## Central Processing Unit - FPGA = 3 ## Field Programmable Gate Array - MCA = 4 ## Memory Copy Accelerator - VPU = 5 ## Vision Processing Unit - -class zes_device_type_t(c_int): - def __str__(self): - return str(zes_device_type_v(self.value)) - - -############################################################################### -## @brief Supported device property flags -class zes_device_property_flags_v(IntEnum): - INTEGRATED = ZE_BIT(0) ## Device is integrated with the Host. - SUBDEVICE = ZE_BIT(1) ## Device handle used for query represents a sub-device. - ECC = ZE_BIT(2) ## Device supports error correction memory access. - ONDEMANDPAGING = ZE_BIT(3) ## Device supports on-demand page-faulting. - -class zes_device_property_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Device properties -class zes_device_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("core", ze_device_properties_t), ## [out] (Deprecated, use ::zes_uuid_t in the extended structure) Core - ## device properties - ("numSubdevices", c_ulong), ## [out] Number of sub-devices. A value of 0 indicates that this device - ## doesn't have sub-devices. - ("serialNumber", c_char * ZES_STRING_PROPERTY_SIZE), ## [out] Manufacturing serial number (NULL terminated string value). This - ## value is intended to reflect the Part ID/SoC ID assigned by - ## manufacturer that is unique for a SoC. Will be set to the string - ## "unknown" if this cannot be determined for the device. - ("boardNumber", c_char * ZES_STRING_PROPERTY_SIZE), ## [out] Manufacturing board number (NULL terminated string value). - ## Alternatively "boardSerialNumber", this value is intended to reflect - ## the string printed on board label by manufacturer. Will be set to the - ## string "unknown" if this cannot be determined for the device. - ("brandName", c_char * ZES_STRING_PROPERTY_SIZE), ## [out] Brand name of the device (NULL terminated string value). Will be - ## set to the string "unknown" if this cannot be determined for the - ## device. - ("modelName", c_char * ZES_STRING_PROPERTY_SIZE), ## [out] Model name of the device (NULL terminated string value). Will be - ## set to the string "unknown" if this cannot be determined for the - ## device. - ("vendorName", c_char * ZES_STRING_PROPERTY_SIZE), ## [out] Vendor name of the device (NULL terminated string value). Will - ## be set to the string "unknown" if this cannot be determined for the - ## device. - ("driverVersion", c_char * ZES_STRING_PROPERTY_SIZE) ## [out] Installed driver version (NULL terminated string value). Will be - ## set to the string "unknown" if this cannot be determined for the - ## device. - ] - -############################################################################### -## @brief Device properties -class zes_device_ext_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("uuid", zes_uuid_t), ## [out] universal unique identifier. Note: uuid obtained from Sysman API - ## is the same as from core API. Subdevices will have their own uuid. - ("type", zes_device_type_t), ## [out] generic device type - ("flags", zes_device_property_flags_t) ## [out] 0 (none) or a valid combination of ::zes_device_property_flag_t - ] - -############################################################################### -## @brief Contains information about a process that has an open connection with -## this device -## -## @details -## - The application can use the process ID to query the OS for the owner -## and the path to the executable. -class zes_process_state_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("processId", c_ulong), ## [out] Host OS process ID. - ("memSize", c_ulonglong), ## [out] Device memory size in bytes allocated by this process (may not - ## necessarily be resident on the device at the time of reading). - ("sharedSize", c_ulonglong), ## [out] The size of shared device memory mapped into this process (may - ## not necessarily be resident on the device at the time of reading). - ("engines", zes_engine_type_flags_t) ## [out] Bitfield of accelerator engine types being used by this process. - ] - -############################################################################### -## @brief PCI address -class zes_pci_address_t(Structure): - _fields_ = [ - ("domain", c_ulong), ## [out] BDF domain - ("bus", c_ulong), ## [out] BDF bus - ("device", c_ulong), ## [out] BDF device - ("function", c_ulong) ## [out] BDF function - ] - -############################################################################### -## @brief PCI speed -class zes_pci_speed_t(Structure): - _fields_ = [ - ("gen", c_int32_t), ## [out] The link generation. A value of -1 means that this property is - ## unknown. - ("width", c_int32_t), ## [out] The number of lanes. A value of -1 means that this property is - ## unknown. - ("maxBandwidth", c_int64_t) ## [out] The maximum bandwidth in bytes/sec (sum of all lanes). A value - ## of -1 means that this property is unknown. - ] - -############################################################################### -## @brief Static PCI properties -class zes_pci_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("address", zes_pci_address_t), ## [out] The BDF address - ("maxSpeed", zes_pci_speed_t), ## [out] Fastest port configuration supported by the device (sum of all - ## lanes) - ("haveBandwidthCounters", ze_bool_t), ## [out] Indicates whether the `rxCounter` and `txCounter` members of - ## ::zes_pci_stats_t will have valid values - ("havePacketCounters", ze_bool_t), ## [out] Indicates whether the `packetCounter` member of - ## ::zes_pci_stats_t will have a valid value - ("haveReplayCounters", ze_bool_t) ## [out] Indicates whether the `replayCounter` member of - ## ::zes_pci_stats_t will have a valid value - ] - -############################################################################### -## @brief PCI link status -class zes_pci_link_status_v(IntEnum): - UNKNOWN = 0 ## The link status could not be determined - GOOD = 1 ## The link is up and operating as expected - QUALITY_ISSUES = 2 ## The link is up but has quality and/or bandwidth degradation - STABILITY_ISSUES = 3 ## The link has stability issues and preventing workloads making forward - ## progress - -class zes_pci_link_status_t(c_int): - def __str__(self): - return str(zes_pci_link_status_v(self.value)) - - -############################################################################### -## @brief PCI link quality degradation reasons -class zes_pci_link_qual_issue_flags_v(IntEnum): - REPLAYS = ZE_BIT(0) ## A significant number of replays are occurring - SPEED = ZE_BIT(1) ## There is a degradation in the maximum bandwidth of the link - -class zes_pci_link_qual_issue_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief PCI link stability issues -class zes_pci_link_stab_issue_flags_v(IntEnum): - RETRAINING = ZE_BIT(0) ## Link retraining has occurred to deal with quality issues - -class zes_pci_link_stab_issue_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Dynamic PCI state -class zes_pci_state_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("status", zes_pci_link_status_t), ## [out] The current status of the port - ("qualityIssues", zes_pci_link_qual_issue_flags_t), ## [out] If status is ::ZES_PCI_LINK_STATUS_QUALITY_ISSUES, - ## then this gives a combination of ::zes_pci_link_qual_issue_flag_t for - ## quality issues that have been detected; - ## otherwise, 0 indicates there are no quality issues with the link at - ## this time." - ("stabilityIssues", zes_pci_link_stab_issue_flags_t), ## [out] If status is ::ZES_PCI_LINK_STATUS_STABILITY_ISSUES, - ## then this gives a combination of ::zes_pci_link_stab_issue_flag_t for - ## reasons for the connection instability; - ## otherwise, 0 indicates there are no connection stability issues at - ## this time." - ("speed", zes_pci_speed_t) ## [out] The current port configure speed - ] - -############################################################################### -## @brief PCI bar types -class zes_pci_bar_type_v(IntEnum): - MMIO = 0 ## MMIO registers - ROM = 1 ## ROM aperture - MEM = 2 ## Device memory - -class zes_pci_bar_type_t(c_int): - def __str__(self): - return str(zes_pci_bar_type_v(self.value)) - - -############################################################################### -## @brief Properties of a pci bar -class zes_pci_bar_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("type", zes_pci_bar_type_t), ## [out] The type of bar - ("index", c_ulong), ## [out] The index of the bar - ("base", c_ulonglong), ## [out] Base address of the bar. - ("size", c_ulonglong) ## [out] Size of the bar. - ] - -############################################################################### -## @brief Properties of a pci bar, including the resizable bar. -class zes_pci_bar_properties_1_2_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("type", zes_pci_bar_type_t), ## [out] The type of bar - ("index", c_ulong), ## [out] The index of the bar - ("base", c_ulonglong), ## [out] Base address of the bar. - ("size", c_ulonglong), ## [out] Size of the bar. - ("resizableBarSupported", ze_bool_t), ## [out] Support for Resizable Bar on this device. - ("resizableBarEnabled", ze_bool_t) ## [out] Resizable Bar enabled on this device - ] - -############################################################################### -## @brief PCI stats counters -## -## @details -## - Percent replays is calculated by taking two snapshots (s1, s2) and -## using the equation: %replay = 10^6 * (s2.replayCounter - -## s1.replayCounter) / (s2.maxBandwidth * (s2.timestamp - s1.timestamp)) -## - Percent throughput is calculated by taking two snapshots (s1, s2) and -## using the equation: %bw = 10^6 * ((s2.rxCounter - s1.rxCounter) + -## (s2.txCounter - s1.txCounter)) / (s2.maxBandwidth * (s2.timestamp - -## s1.timestamp)) -class zes_pci_stats_t(Structure): - _fields_ = [ - ("timestamp", c_ulonglong), ## [out] Monotonic timestamp counter in microseconds when the measurement - ## was made. - ## This timestamp should only be used to calculate delta time between - ## snapshots of this structure. - ## Never take the delta of this timestamp with the timestamp from a - ## different structure since they are not guaranteed to have the same base. - ## The absolute value of the timestamp is only valid during within the - ## application and may be different on the next execution. - ("replayCounter", c_ulonglong), ## [out] Monotonic counter for the number of replay packets (sum of all - ## lanes). Will always be 0 when the `haveReplayCounters` member of - ## ::zes_pci_properties_t is FALSE. - ("packetCounter", c_ulonglong), ## [out] Monotonic counter for the number of packets (sum of all lanes). - ## Will always be 0 when the `havePacketCounters` member of - ## ::zes_pci_properties_t is FALSE. - ("rxCounter", c_ulonglong), ## [out] Monotonic counter for the number of bytes received (sum of all - ## lanes). Will always be 0 when the `haveBandwidthCounters` member of - ## ::zes_pci_properties_t is FALSE. - ("txCounter", c_ulonglong), ## [out] Monotonic counter for the number of bytes transmitted (including - ## replays) (sum of all lanes). Will always be 0 when the - ## `haveBandwidthCounters` member of ::zes_pci_properties_t is FALSE. - ("speed", zes_pci_speed_t) ## [out] The current speed of the link (sum of all lanes) - ] - -############################################################################### -## @brief Overclock domains. -class zes_overclock_domain_v(IntEnum): - CARD = 1 ## Overclocking card level properties such as temperature limits. - PACKAGE = 2 ## Overclocking package level properties such as power limits. - GPU_ALL = 4 ## Overclocking a GPU that has all accelerator assets on the same PLL/VR. - GPU_RENDER_COMPUTE = 8 ## Overclocking a GPU with render and compute assets on the same PLL/VR. - GPU_RENDER = 16 ## Overclocking a GPU with render assets on its own PLL/VR. - GPU_COMPUTE = 32 ## Overclocking a GPU with compute assets on its own PLL/VR. - GPU_MEDIA = 64 ## Overclocking a GPU with media assets on its own PLL/VR. - VRAM = 128 ## Overclocking device local memory. - ADM = 256 ## Overclocking LLC/L4 cache. - -class zes_overclock_domain_t(c_int): - def __str__(self): - return str(zes_overclock_domain_v(self.value)) - - -############################################################################### -## @brief Overclock controls. -class zes_overclock_control_v(IntEnum): - VF = 1 ## This control permits setting a custom V-F curve. - FREQ_OFFSET = 2 ## The V-F curve of the overclock domain can be shifted up or down using - ## this control. - VMAX_OFFSET = 4 ## This control is used to increase the permitted voltage above the - ## shipped voltage maximum. - FREQ = 8 ## This control permits direct changes to the operating frequency. - VOLT_LIMIT = 16 ## This control prevents frequencies that would push the voltage above - ## this value, typically used by V-F scanners. - POWER_SUSTAINED_LIMIT = 32 ## This control changes the sustained power limit (PL1). - POWER_BURST_LIMIT = 64 ## This control changes the burst power limit (PL2). - POWER_PEAK_LIMIT = 128 ## his control changes the peak power limit (PL4). - ICCMAX_LIMIT = 256 ## This control changes the value of IccMax.. - TEMP_LIMIT = 512 ## This control changes the value of TjMax. - ITD_DISABLE = 1024 ## This control permits disabling the adaptive voltage feature ITD - ACM_DISABLE = 2048 ## This control permits disabling the adaptive voltage feature ACM. - -class zes_overclock_control_t(c_int): - def __str__(self): - return str(zes_overclock_control_v(self.value)) - - -############################################################################### -## @brief Overclock modes. -class zes_overclock_mode_v(IntEnum): - MODE_OFF = 0 ## Overclock mode is off - MODE_STOCK = 2 ## Stock (manufacturing settings) are being used. - MODE_ON = 3 ## Overclock mode is on. - MODE_UNAVAILABLE = 4 ## Overclocking is unavailable at this time since the system is running - ## on battery. - MODE_DISABLED = 5 ## Overclock mode is disabled. - -class zes_overclock_mode_t(c_int): - def __str__(self): - return str(zes_overclock_mode_v(self.value)) - - -############################################################################### -## @brief Overclock control states. -class zes_control_state_v(IntEnum): - STATE_UNSET = 0 ## No overclock control has not been changed by the driver since the last - ## boot/reset. - STATE_ACTIVE = 2 ## The overclock control has been set and it is active. - STATE_DISABLED = 3 ## The overclock control value has been disabled due to the current power - ## configuration (typically when running on DC). - -class zes_control_state_t(c_int): - def __str__(self): - return str(zes_control_state_v(self.value)) - - -############################################################################### -## @brief Overclock pending actions. -class zes_pending_action_v(IntEnum): - PENDING_NONE = 0 ## There no pending actions. . - PENDING_IMMINENT = 1 ## The requested change is in progress and should complete soon. - PENDING_COLD_RESET = 2 ## The requested change requires a device cold reset (hotplug, system - ## boot). - PENDING_WARM_RESET = 3 ## The requested change requires a device warm reset (PCIe FLR). - -class zes_pending_action_t(c_int): - def __str__(self): - return str(zes_pending_action_v(self.value)) - - -############################################################################### -## @brief Overclock V-F curve programing. -class zes_vf_program_type_v(IntEnum): - VF_ARBITRARY = 0 ## Can program an arbitrary number of V-F points up to the maximum number - ## and each point can have arbitrary voltage and frequency values within - ## the min/max/step limits - VF_FREQ_FIXED = 1 ## Can only program the voltage for the V-F points that it reads back - - ## the frequency of those points cannot be changed - VF_VOLT_FIXED = 2 ## Can only program the frequency for the V-F points that is reads back - - ## the voltage of each point cannot be changed. - -class zes_vf_program_type_t(c_int): - def __str__(self): - return str(zes_vf_program_type_v(self.value)) - - -############################################################################### -## @brief VF type -class zes_vf_type_v(IntEnum): - VOLT = 0 ## VF Voltage point - FREQ = 1 ## VF Frequency point - -class zes_vf_type_t(c_int): - def __str__(self): - return str(zes_vf_type_v(self.value)) - - -############################################################################### -## @brief VF type -class zes_vf_array_type_v(IntEnum): - USER_VF_ARRAY = 0 ## User V-F array - DEFAULT_VF_ARRAY = 1 ## Default V-F array - LIVE_VF_ARRAY = 2 ## Live V-F array - -class zes_vf_array_type_t(c_int): - def __str__(self): - return str(zes_vf_array_type_v(self.value)) - - -############################################################################### -## @brief Overclock properties -## -## @details -## - Information on the overclock domain type and all the contols that are -## part of the domain. -class zes_overclock_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("domainType", zes_overclock_domain_t), ## [out] The hardware block that this overclock domain controls (GPU, - ## VRAM, ...) - ("AvailableControls", c_ulong), ## [out] Returns the overclock controls that are supported (a bit for - ## each of enum ::zes_overclock_control_t). If no bits are set, the - ## domain doesn't support overclocking. - ("VFProgramType", zes_vf_program_type_t), ## [out] Type of V-F curve programming that is permitted:. - ("NumberOfVFPoints", c_ulong) ## [out] Number of VF points that can be programmed - max_num_points - ] - -############################################################################### -## @brief Overclock Control properties -## -## @details -## - Provides all the control capabilities supported by the device for the -## overclock domain. -class zes_control_property_t(Structure): - _fields_ = [ - ("MinValue", c_double), ## [out] This provides information about the limits of the control value - ## so that the driver can calculate the set of valid values. - ("MaxValue", c_double), ## [out] This provides information about the limits of the control value - ## so that the driver can calculate the set of valid values. - ("StepValue", c_double), ## [out] This provides information about the limits of the control value - ## so that the driver can calculate the set of valid values. - ("RefValue", c_double), ## [out] The reference value provides the anchor point, UIs can combine - ## this with the user offset request to show the anticipated improvement. - ("DefaultValue", c_double) ## [out] The shipped out-of-box position of this control. Driver can - ## request this value at any time to return to the out-of-box behavior. - ] - -############################################################################### -## @brief Overclock VF properties -## -## @details -## - Provides all the VF capabilities supported by the device for the -## overclock domain. -class zes_vf_property_t(Structure): - _fields_ = [ - ("MinFreq", c_double), ## [out] Read the minimum frequency that can be be programmed in the - ## custom V-F point.. - ("MaxFreq", c_double), ## [out] Read the maximum frequency that can be be programmed in the - ## custom V-F point.. - ("StepFreq", c_double), ## [out] Read the frequency step that can be be programmed in the custom - ## V-F point.. - ("MinVolt", c_double), ## [out] Read the minimum voltage that can be be programmed in the custom - ## V-F point.. - ("MaxVolt", c_double), ## [out] Read the maximum voltage that can be be programmed in the custom - ## V-F point.. - ("StepVolt", c_double) ## [out] Read the voltage step that can be be programmed in the custom - ## V-F point. - ] - -############################################################################### -## @brief Diagnostic results -class zes_diag_result_v(IntEnum): - NO_ERRORS = 0 ## Diagnostic completed without finding errors to repair - ABORT = 1 ## Diagnostic had problems running tests - FAIL_CANT_REPAIR = 2 ## Diagnostic had problems setting up repairs - REBOOT_FOR_REPAIR = 3 ## Diagnostics found errors, setup for repair and reboot is required to - ## complete the process - -class zes_diag_result_t(c_int): - def __str__(self): - return str(zes_diag_result_v(self.value)) - - -############################################################################### -## @brief Diagnostic test index to use for the very first test. -ZES_DIAG_FIRST_TEST_INDEX = 0x0 - -############################################################################### -## @brief Diagnostic test index to use for the very last test. -ZES_DIAG_LAST_TEST_INDEX = 0xFFFFFFFF - -############################################################################### -## @brief Diagnostic test -class zes_diag_test_t(Structure): - _fields_ = [ - ("index", c_ulong), ## [out] Index of the test - ("name", c_char * ZES_STRING_PROPERTY_SIZE) ## [out] Name of the test - ] - -############################################################################### -## @brief Diagnostics test suite properties -class zes_diag_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("onSubdevice", ze_bool_t), ## [out] True if the resource is located on a sub-device; false means - ## that the resource is on the device of the calling Sysman handle - ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device - ("name", c_char * ZES_STRING_PROPERTY_SIZE), ## [out] Name of the diagnostics test suite - ("haveTests", ze_bool_t) ## [out] Indicates if this test suite has individual tests which can be - ## run separately (use the function ::zesDiagnosticsGetTests() to get the - ## list of these tests) - ] - -############################################################################### -## @brief ECC State -class zes_device_ecc_state_v(IntEnum): - UNAVAILABLE = 0 ## None - ENABLED = 1 ## ECC enabled. - DISABLED = 2 ## ECC disabled. - -class zes_device_ecc_state_t(c_int): - def __str__(self): - return str(zes_device_ecc_state_v(self.value)) - - -############################################################################### -## @brief State Change Requirements -class zes_device_action_v(IntEnum): - NONE = 0 ## No action. - WARM_CARD_RESET = 1 ## Warm reset of the card. - COLD_CARD_RESET = 2 ## Cold reset of the card. - COLD_SYSTEM_REBOOT = 3 ## Cold reboot of the system. - -class zes_device_action_t(c_int): - def __str__(self): - return str(zes_device_action_v(self.value)) - - -############################################################################### -## @brief ECC State Descriptor -class zes_device_ecc_desc_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("state", zes_device_ecc_state_t) ## [out] ECC state - ] - -############################################################################### -## @brief ECC State -class zes_device_ecc_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("currentState", zes_device_ecc_state_t), ## [out] Current ECC state - ("pendingState", zes_device_ecc_state_t), ## [out] Pending ECC state - ("pendingAction", zes_device_action_t) ## [out] Pending action - ] - -############################################################################### -## @brief Accelerator engine groups -class zes_engine_group_v(IntEnum): - ALL = 0 ## Access information about all engines combined. - COMPUTE_ALL = 1 ## Access information about all compute engines combined. Compute engines - ## can only process compute kernels (no 3D content). - MEDIA_ALL = 2 ## Access information about all media engines combined. - COPY_ALL = 3 ## Access information about all copy (blitter) engines combined. - COMPUTE_SINGLE = 4 ## Access information about a single compute engine - this is an engine - ## that can process compute kernels. Note that single engines may share - ## the same underlying accelerator resources as other engines so activity - ## of such an engine may not be indicative of the underlying resource - ## utilization - use ::ZES_ENGINE_GROUP_3D_RENDER_COMPUTE_ALL for that. - RENDER_SINGLE = 5 ## Access information about a single render engine - this is an engine - ## that can process both 3D content and compute kernels. Note that single - ## engines may share the same underlying accelerator resources as other - ## engines so activity of such an engine may not be indicative of the - ## underlying resource utilization - use - ## ::ZES_ENGINE_GROUP_3D_RENDER_COMPUTE_ALL for that. - MEDIA_DECODE_SINGLE = 6 ## [DEPRECATED] No longer supported. - MEDIA_ENCODE_SINGLE = 7 ## [DEPRECATED] No longer supported. - COPY_SINGLE = 8 ## Access information about a single media encode engine. Note that - ## single engines may share the same underlying accelerator resources as - ## other engines so activity of such an engine may not be indicative of - ## the underlying resource utilization - use ::ZES_ENGINE_GROUP_COPY_ALL - ## for that. - MEDIA_ENHANCEMENT_SINGLE = 9 ## Access information about a single media enhancement engine. Note that - ## single engines may share the same underlying accelerator resources as - ## other engines so activity of such an engine may not be indicative of - ## the underlying resource utilization - use ::ZES_ENGINE_GROUP_MEDIA_ALL - ## for that. - _3D_SINGLE = 10 ## [DEPRECATED] No longer supported. - _3D_RENDER_COMPUTE_ALL = 11 ## [DEPRECATED] No longer supported. - RENDER_ALL = 12 ## Access information about all render engines combined. Render engines - ## are those than process both 3D content and compute kernels. - _3D_ALL = 13 ## [DEPRECATED] No longer supported. - MEDIA_CODEC_SINGLE = 14 ## Access information about a single media engine. Note that single - ## engines may share the same underlying accelerator resources as other - ## engines so activity of such an engine may not be indicative of the - ## underlying resource utilization - use ::ZES_ENGINE_GROUP_MEDIA_ALL for - ## that. - -class zes_engine_group_t(c_int): - def __str__(self): - return str(zes_engine_group_v(self.value)) - - -############################################################################### -## @brief Engine group properties -class zes_engine_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("type", zes_engine_group_t), ## [out] The engine group - ("onSubdevice", ze_bool_t), ## [out] True if this resource is located on a sub-device; false means - ## that the resource is on the device of the calling Sysman handle - ("subdeviceId", c_ulong) ## [out] If onSubdevice is true, this gives the ID of the sub-device - ] - -############################################################################### -## @brief Engine activity counters -## -## @details -## - Percent utilization is calculated by taking two snapshots (s1, s2) and -## using the equation: %util = (s2.activeTime - s1.activeTime) / -## (s2.timestamp - s1.timestamp) -## - The `activeTime` time units are implementation-specific since the -## value is only intended to be used for calculating utilization -## percentage. -## - The `timestamp` should only be used to calculate delta between -## snapshots of this structure. -## - The application should never take the delta of `timestamp` with the -## timestamp from a different structure since they are not guaranteed to -## have the same base. -## - When taking the delta, the difference between `timestamp` samples -## could be `0`, if the frequency of sampling the snapshots is higher -## than the frequency of the timestamp update. -## - The absolute value of `timestamp` is only valid during within the -## application and may be different on the next execution. -class zes_engine_stats_t(Structure): - _fields_ = [ - ("activeTime", c_ulonglong), ## [out] Monotonic counter where the resource is actively running - ## workloads. - ("timestamp", c_ulonglong) ## [out] Monotonic counter when activeTime counter was sampled. - ] - -############################################################################### -## @brief Event types -class zes_event_type_flags_v(IntEnum): - DEVICE_DETACH = ZE_BIT(0) ## Event is triggered when the device is no longer available (due to a - ## reset or being disabled). - DEVICE_ATTACH = ZE_BIT(1) ## Event is triggered after the device is available again. - DEVICE_SLEEP_STATE_ENTER = ZE_BIT(2) ## Event is triggered when the driver is about to put the device into a - ## deep sleep state - DEVICE_SLEEP_STATE_EXIT = ZE_BIT(3) ## Event is triggered when the driver is waking the device up from a deep - ## sleep state - FREQ_THROTTLED = ZE_BIT(4) ## Event is triggered when the frequency starts being throttled - ENERGY_THRESHOLD_CROSSED = ZE_BIT(5) ## Event is triggered when the energy consumption threshold is reached - ## (use ::zesPowerSetEnergyThreshold() to configure). - TEMP_CRITICAL = ZE_BIT(6) ## Event is triggered when the critical temperature is reached (use - ## ::zesTemperatureSetConfig() to configure - disabled by default). - TEMP_THRESHOLD1 = ZE_BIT(7) ## Event is triggered when the temperature crosses threshold 1 (use - ## ::zesTemperatureSetConfig() to configure - disabled by default). - TEMP_THRESHOLD2 = ZE_BIT(8) ## Event is triggered when the temperature crosses threshold 2 (use - ## ::zesTemperatureSetConfig() to configure - disabled by default). - MEM_HEALTH = ZE_BIT(9) ## Event is triggered when the health of device memory changes. - FABRIC_PORT_HEALTH = ZE_BIT(10) ## Event is triggered when the health of fabric ports change. - PCI_LINK_HEALTH = ZE_BIT(11) ## Event is triggered when the health of the PCI link changes. - RAS_CORRECTABLE_ERRORS = ZE_BIT(12) ## Event is triggered when accelerator RAS correctable errors cross - ## thresholds (use ::zesRasSetConfig() to configure - disabled by - ## default). - RAS_UNCORRECTABLE_ERRORS = ZE_BIT(13) ## Event is triggered when accelerator RAS uncorrectable errors cross - ## thresholds (use ::zesRasSetConfig() to configure - disabled by - ## default). - DEVICE_RESET_REQUIRED = ZE_BIT(14) ## Event is triggered when the device needs to be reset (use - ## ::zesDeviceGetState() to determine the reasons for the reset). - SURVIVABILITY_MODE_DETECTED = ZE_BIT(15) ## Event is triggered when graphics driver encounter an error condition. - -class zes_event_type_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Maximum Fabric port model string size -ZES_MAX_FABRIC_PORT_MODEL_SIZE = 256 - -############################################################################### -## @brief Maximum size of the buffer that will return information about link -## types -ZES_MAX_FABRIC_LINK_TYPE_SIZE = 256 - -############################################################################### -## @brief Fabric port status -class zes_fabric_port_status_v(IntEnum): - UNKNOWN = 0 ## The port status cannot be determined - HEALTHY = 1 ## The port is up and operating as expected - DEGRADED = 2 ## The port is up but has quality and/or speed degradation - FAILED = 3 ## Port connection instabilities are preventing workloads making forward - ## progress - DISABLED = 4 ## The port is configured down - -class zes_fabric_port_status_t(c_int): - def __str__(self): - return str(zes_fabric_port_status_v(self.value)) - - -############################################################################### -## @brief Fabric port quality degradation reasons -class zes_fabric_port_qual_issue_flags_v(IntEnum): - LINK_ERRORS = ZE_BIT(0) ## Excessive link errors are occurring - SPEED = ZE_BIT(1) ## There is a degradation in the bitrate and/or width of the link - -class zes_fabric_port_qual_issue_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Fabric port failure reasons -class zes_fabric_port_failure_flags_v(IntEnum): - FAILED = ZE_BIT(0) ## A previously operating link has failed. Hardware will automatically - ## retrain this port. This state will persist until either the physical - ## connection is removed or the link trains successfully. - TRAINING_TIMEOUT = ZE_BIT(1) ## A connection has not been established within an expected time. - ## Hardware will continue to attempt port training. This status will - ## persist until either the physical connection is removed or the link - ## successfully trains. - FLAPPING = ZE_BIT(2) ## Port has excessively trained and then transitioned down for some - ## period of time. Driver will allow port to continue to train, but will - ## not enable the port for use until the port has been disabled and - ## subsequently re-enabled using ::zesFabricPortSetConfig(). - -class zes_fabric_port_failure_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Unique identifier for a fabric port -## -## @details -## - This not a universal identifier. The identified is garanteed to be -## unique for the current hardware configuration of the system. Changes -## in the hardware may result in a different identifier for a given port. -## - The main purpose of this identifier to build up an instantaneous -## topology map of system connectivity. An application should enumerate -## all fabric ports and match the `remotePortId` member of -## ::zes_fabric_port_state_t to the `portId` member of -## ::zes_fabric_port_properties_t. -class zes_fabric_port_id_t(Structure): - _fields_ = [ - ("fabricId", c_ulong), ## [out] Unique identifier for the fabric end-point - ("attachId", c_ulong), ## [out] Unique identifier for the device attachment point - ("portNumber", c_ubyte) ## [out] The logical port number (this is typically marked somewhere on - ## the physical device) - ] - -############################################################################### -## @brief Fabric port speed in one direction -class zes_fabric_port_speed_t(Structure): - _fields_ = [ - ("bitRate", c_int64_t), ## [out] Bits/sec that the link is operating at. A value of -1 means that - ## this property is unknown. - ("width", c_int32_t) ## [out] The number of lanes. A value of -1 means that this property is - ## unknown. - ] - -############################################################################### -## @brief Fabric port properties -class zes_fabric_port_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("model", c_char * ZES_MAX_FABRIC_PORT_MODEL_SIZE), ## [out] Description of port technology. Will be set to the string - ## "unkown" if this cannot be determined for this port. - ("onSubdevice", ze_bool_t), ## [out] True if the port is located on a sub-device; false means that - ## the port is on the device of the calling Sysman handle - ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device - ("portId", zes_fabric_port_id_t), ## [out] The unique port identifier - ("maxRxSpeed", zes_fabric_port_speed_t), ## [out] Maximum speed supported by the receive side of the port (sum of - ## all lanes) - ("maxTxSpeed", zes_fabric_port_speed_t) ## [out] Maximum speed supported by the transmit side of the port (sum of - ## all lanes) - ] - -############################################################################### -## @brief Provides information about the fabric link attached to a port -class zes_fabric_link_type_t(Structure): - _fields_ = [ - ("desc", c_char * ZES_MAX_FABRIC_LINK_TYPE_SIZE) ## [out] Description of link technology. Will be set to the string - ## "unkown" if this cannot be determined for this link. - ] - -############################################################################### -## @brief Fabric port configuration -class zes_fabric_port_config_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("enabled", ze_bool_t), ## [in,out] Port is configured up/down - ("beaconing", ze_bool_t) ## [in,out] Beaconing is configured on/off - ] - -############################################################################### -## @brief Fabric port state -class zes_fabric_port_state_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("status", zes_fabric_port_status_t), ## [out] The current status of the port - ("qualityIssues", zes_fabric_port_qual_issue_flags_t), ## [out] If status is ::ZES_FABRIC_PORT_STATUS_DEGRADED, - ## then this gives a combination of ::zes_fabric_port_qual_issue_flag_t - ## for quality issues that have been detected; - ## otherwise, 0 indicates there are no quality issues with the link at - ## this time. - ("failureReasons", zes_fabric_port_failure_flags_t), ## [out] If status is ::ZES_FABRIC_PORT_STATUS_FAILED, - ## then this gives a combination of ::zes_fabric_port_failure_flag_t for - ## reasons for the connection instability; - ## otherwise, 0 indicates there are no connection stability issues at - ## this time. - ("remotePortId", zes_fabric_port_id_t), ## [out] The unique port identifier for the remote connection point if - ## status is ::ZES_FABRIC_PORT_STATUS_HEALTHY, - ## ::ZES_FABRIC_PORT_STATUS_DEGRADED or ::ZES_FABRIC_PORT_STATUS_FAILED - ("rxSpeed", zes_fabric_port_speed_t), ## [out] Current maximum receive speed (sum of all lanes) - ("txSpeed", zes_fabric_port_speed_t) ## [out] Current maximum transmit speed (sum of all lanes) - ] - -############################################################################### -## @brief Fabric port throughput. -class zes_fabric_port_throughput_t(Structure): - _fields_ = [ - ("timestamp", c_ulonglong), ## [out] Monotonic timestamp counter in microseconds when the measurement - ## was made. - ## This timestamp should only be used to calculate delta time between - ## snapshots of this structure. - ## Never take the delta of this timestamp with the timestamp from a - ## different structure since they are not guaranteed to have the same base. - ## The absolute value of the timestamp is only valid during within the - ## application and may be different on the next execution. - ("rxCounter", c_ulonglong), ## [out] Monotonic counter for the number of bytes received (sum of all - ## lanes). This includes all protocol overhead, not only the GPU traffic. - ("txCounter", c_ulonglong) ## [out] Monotonic counter for the number of bytes transmitted (sum of - ## all lanes). This includes all protocol overhead, not only the GPU - ## traffic. - ] - -############################################################################### -## @brief Fabric Port Error Counters -class zes_fabric_port_error_counters_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("linkFailureCount", c_ulonglong), ## [out] Link Failure Error Count reported per port - ("fwCommErrorCount", c_ulonglong), ## [out] Firmware Communication Error Count reported per device - ("fwErrorCount", c_ulonglong), ## [out] Firmware reported Error Count reported per device - ("linkDegradeCount", c_ulonglong) ## [out] Link Degrade Error Count reported per port - ] - -############################################################################### -## @brief Fan resource speed mode -class zes_fan_speed_mode_v(IntEnum): - DEFAULT = 0 ## The fan speed is operating using the hardware default settings - FIXED = 1 ## The fan speed is currently set to a fixed value - TABLE = 2 ## The fan speed is currently controlled dynamically by hardware based on - ## a temp/speed table - -class zes_fan_speed_mode_t(c_int): - def __str__(self): - return str(zes_fan_speed_mode_v(self.value)) - - -############################################################################### -## @brief Fan speed units -class zes_fan_speed_units_v(IntEnum): - RPM = 0 ## The fan speed is in units of revolutions per minute (rpm) - PERCENT = 1 ## The fan speed is a percentage of the maximum speed of the fan - -class zes_fan_speed_units_t(c_int): - def __str__(self): - return str(zes_fan_speed_units_v(self.value)) - - -############################################################################### -## @brief Fan speed -class zes_fan_speed_t(Structure): - _fields_ = [ - ("speed", c_int32_t), ## [in,out] The speed of the fan. On output, a value of -1 indicates that - ## there is no fixed fan speed setting. - ("units", zes_fan_speed_units_t) ## [in,out] The units that the fan speed is expressed in. On output, if - ## fan speed is -1 then units should be ignored. - ] - -############################################################################### -## @brief Fan temperature/speed pair -class zes_fan_temp_speed_t(Structure): - _fields_ = [ - ("temperature", c_ulong), ## [in,out] Temperature in degrees Celsius. - ("speed", zes_fan_speed_t) ## [in,out] The speed of the fan - ] - -############################################################################### -## @brief Maximum number of fan temperature/speed pairs in the fan speed table. -ZES_FAN_TEMP_SPEED_PAIR_COUNT = 32 - -############################################################################### -## @brief Fan speed table -class zes_fan_speed_table_t(Structure): - _fields_ = [ - ("numPoints", c_int32_t), ## [in,out] The number of valid points in the fan speed table. 0 means - ## that there is no fan speed table configured. -1 means that a fan speed - ## table is not supported by the hardware. - ("table", zes_fan_temp_speed_t * ZES_FAN_TEMP_SPEED_PAIR_COUNT) ## [in,out] Array of temperature/fan speed pairs. The table is ordered - ## based on temperature from lowest to highest. - ] - -############################################################################### -## @brief Fan properties -class zes_fan_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("onSubdevice", ze_bool_t), ## [out] True if the resource is located on a sub-device; false means - ## that the resource is on the device of the calling Sysman handle - ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device - ("canControl", ze_bool_t), ## [out] Indicates if software can control the fan speed assuming the - ## user has permissions - ("supportedModes", c_ulong), ## [out] Bitfield of supported fan configuration modes - ## (1<<::zes_fan_speed_mode_t) - ("supportedUnits", c_ulong), ## [out] Bitfield of supported fan speed units - ## (1<<::zes_fan_speed_units_t) - ("maxRPM", c_int32_t), ## [out] The maximum RPM of the fan. A value of -1 means that this - ## property is unknown. - ("maxPoints", c_int32_t) ## [out] The maximum number of points in the fan temp/speed table. A - ## value of -1 means that this fan doesn't support providing a temp/speed - ## table. - ] - -############################################################################### -## @brief Fan configuration -class zes_fan_config_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("mode", zes_fan_speed_mode_t), ## [in,out] The fan speed mode (fixed, temp-speed table) - ("speedFixed", zes_fan_speed_t), ## [in,out] The current fixed fan speed setting - ("speedTable", zes_fan_speed_table_t) ## [out] A table containing temperature/speed pairs - ] - -############################################################################### -## @brief Firmware properties -class zes_firmware_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("onSubdevice", ze_bool_t), ## [out] True if the resource is located on a sub-device; false means - ## that the resource is on the device of the calling Sysman handle - ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device - ("canControl", ze_bool_t), ## [out] Indicates if software can flash the firmware assuming the user - ## has permissions - ("name", c_char * ZES_STRING_PROPERTY_SIZE), ## [out] NULL terminated string value. The string "unknown" will be - ## returned if this property cannot be determined. - ("version", c_char * ZES_STRING_PROPERTY_SIZE) ## [out] NULL terminated string value. The string "unknown" will be - ## returned if this property cannot be determined. - ] - -############################################################################### -## @brief Frequency domains. -class zes_freq_domain_v(IntEnum): - GPU = 0 ## GPU Core Domain. - MEMORY = 1 ## Local Memory Domain. - MEDIA = 2 ## GPU Media Domain. - -class zes_freq_domain_t(c_int): - def __str__(self): - return str(zes_freq_domain_v(self.value)) - - -############################################################################### -## @brief Frequency properties -## -## @details -## - Indicates if this frequency domain can be overclocked (if true, -## functions such as ::zesFrequencyOcSetFrequencyTarget() are supported). -## - The min/max hardware frequencies are specified for non-overclock -## configurations. For overclock configurations, use -## ::zesFrequencyOcGetFrequencyTarget() to determine the maximum -## frequency that can be requested. -class zes_freq_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("type", zes_freq_domain_t), ## [out] The hardware block that this frequency domain controls (GPU, - ## memory, ...) - ("onSubdevice", ze_bool_t), ## [out] True if this resource is located on a sub-device; false means - ## that the resource is on the device of the calling Sysman handle - ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device - ("canControl", ze_bool_t), ## [out] Indicates if software can control the frequency of this domain - ## assuming the user has permissions - ("isThrottleEventSupported", ze_bool_t), ## [out] Indicates if software can register to receive event - ## ::ZES_EVENT_TYPE_FLAG_FREQ_THROTTLED - ("min", c_double), ## [out] The minimum hardware clock frequency in units of MHz. - ("max", c_double) ## [out] The maximum non-overclock hardware clock frequency in units of - ## MHz. - ] - -############################################################################### -## @brief Frequency range between which the hardware can operate. -## -## @details -## - When setting limits, they will be clamped to the hardware limits. -## - When setting limits, ensure that the max frequency is greater than or -## equal to the min frequency specified. -## - When setting limits to return to factory settings, specify -1 for both -## the min and max limit. -class zes_freq_range_t(Structure): - _fields_ = [ - ("min", c_double), ## [in,out] The min frequency in MHz below which hardware frequency - ## management will not request frequencies. On input, setting to 0 will - ## permit the frequency to go down to the hardware minimum while setting - ## to -1 will return the min frequency limit to the factory value (can be - ## larger than the hardware min). On output, a negative value indicates - ## that no external minimum frequency limit is in effect. - ("max", c_double) ## [in,out] The max frequency in MHz above which hardware frequency - ## management will not request frequencies. On input, setting to 0 or a - ## very big number will permit the frequency to go all the way up to the - ## hardware maximum while setting to -1 will return the max frequency to - ## the factory value (which can be less than the hardware max). On - ## output, a negative number indicates that no external maximum frequency - ## limit is in effect. - ] - -############################################################################### -## @brief Frequency throttle reasons -class zes_freq_throttle_reason_flags_v(IntEnum): - AVE_PWR_CAP = ZE_BIT(0) ## frequency throttled due to average power excursion (PL1) - BURST_PWR_CAP = ZE_BIT(1) ## frequency throttled due to burst power excursion (PL2) - CURRENT_LIMIT = ZE_BIT(2) ## frequency throttled due to current excursion (PL4) - THERMAL_LIMIT = ZE_BIT(3) ## frequency throttled due to thermal excursion (T > TjMax) - PSU_ALERT = ZE_BIT(4) ## frequency throttled due to power supply assertion - SW_RANGE = ZE_BIT(5) ## frequency throttled due to software supplied frequency range - HW_RANGE = ZE_BIT(6) ## frequency throttled due to a sub block that has a lower frequency - ## range when it receives clocks - VOLTAGE = ZE_BIT(7) ## frequency throttled due to voltage excursion - THERMAL = ZE_BIT(8) ## frequency throttled due to thermal conditions - POWER = ZE_BIT(9) ## frequency throttled due to power constraints - -class zes_freq_throttle_reason_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Frequency state -class zes_freq_state_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("currentVoltage", c_double), ## [out] Current voltage in Volts. A negative value indicates that this - ## property is not known. - ("request", c_double), ## [out] The current frequency request in MHz. A negative value indicates - ## that this property is not known. - ("tdp", c_double), ## [out] The maximum frequency in MHz supported under the current TDP - ## conditions. This fluctuates dynamically based on the power and thermal - ## limits of the part. A negative value indicates that this property is - ## not known. - ("efficient", c_double), ## [out] The efficient minimum frequency in MHz. A negative value - ## indicates that this property is not known. - ("actual", c_double), ## [out] The resolved frequency in MHz. A negative value indicates that - ## this property is not known. - ("throttleReasons", zes_freq_throttle_reason_flags_t) ## [out] The reasons that the frequency is being limited by the hardware. - ## Returns 0 (frequency not throttled) or a combination of ::zes_freq_throttle_reason_flag_t. - ] - -############################################################################### -## @brief Frequency throttle time snapshot -## -## @details -## - Percent time throttled is calculated by taking two snapshots (s1, s2) -## and using the equation: %throttled = (s2.throttleTime - -## s1.throttleTime) / (s2.timestamp - s1.timestamp) -class zes_freq_throttle_time_t(Structure): - _fields_ = [ - ("throttleTime", c_ulonglong), ## [out] The monotonic counter of time in microseconds that the frequency - ## has been limited by the hardware. - ("timestamp", c_ulonglong) ## [out] Microsecond timestamp when throttleTime was captured. - ## This timestamp should only be used to calculate delta time between - ## snapshots of this structure. - ## Never take the delta of this timestamp with the timestamp from a - ## different structure since they are not guaranteed to have the same base. - ## The absolute value of the timestamp is only valid during within the - ## application and may be different on the next execution. - ] - -############################################################################### -## @brief Overclocking modes -## -## @details -## - [DEPRECATED] No longer supported. -class zes_oc_mode_v(IntEnum): - OFF = 0 ## Overclocking if off - hardware is running using factory default - ## voltages/frequencies. - OVERRIDE = 1 ## Overclock override mode - In this mode, a fixed user-supplied voltage - ## is applied independent of the frequency request. The maximum permitted - ## frequency can also be increased. This mode disables INTERPOLATIVE and - ## FIXED modes. - INTERPOLATIVE = 2 ## Overclock interpolative mode - In this mode, the voltage/frequency - ## curve can be extended with a new voltage/frequency point that will be - ## interpolated. The existing voltage/frequency points can also be offset - ## (up or down) by a fixed voltage. This mode disables FIXED and OVERRIDE - ## modes. - FIXED = 3 ## Overclocking fixed Mode - In this mode, hardware will disable most - ## frequency throttling and lock the frequency and voltage at the - ## specified overclock values. This mode disables OVERRIDE and - ## INTERPOLATIVE modes. This mode can damage the part, most of the - ## protections are disabled on this mode. - -class zes_oc_mode_t(c_int): - def __str__(self): - return str(zes_oc_mode_v(self.value)) - - -############################################################################### -## @brief Overclocking properties -## -## @details -## - Provides all the overclocking capabilities and properties supported by -## the device for the frequency domain. -## - [DEPRECATED] No longer supported. -class zes_oc_capabilities_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("isOcSupported", ze_bool_t), ## [out] Indicates if any overclocking features are supported on this - ## frequency domain. - ("maxFactoryDefaultFrequency", c_double), ## [out] Factory default non-overclock maximum frequency in Mhz. - ("maxFactoryDefaultVoltage", c_double), ## [out] Factory default voltage used for the non-overclock maximum - ## frequency in MHz. - ("maxOcFrequency", c_double), ## [out] Maximum hardware overclocking frequency limit in Mhz. - ("minOcVoltageOffset", c_double), ## [out] The minimum voltage offset that can be applied to the - ## voltage/frequency curve. Note that this number can be negative. - ("maxOcVoltageOffset", c_double), ## [out] The maximum voltage offset that can be applied to the - ## voltage/frequency curve. - ("maxOcVoltage", c_double), ## [out] The maximum overclock voltage that hardware supports. - ("isTjMaxSupported", ze_bool_t), ## [out] Indicates if the maximum temperature limit (TjMax) can be - ## changed for this frequency domain. - ("isIccMaxSupported", ze_bool_t), ## [out] Indicates if the maximum current (IccMax) can be changed for - ## this frequency domain. - ("isHighVoltModeCapable", ze_bool_t), ## [out] Indicates if this frequency domains supports a feature to set - ## very high voltages. - ("isHighVoltModeEnabled", ze_bool_t), ## [out] Indicates if very high voltages are permitted on this frequency - ## domain. - ("isExtendedModeSupported", ze_bool_t), ## [out] Indicates if the extended overclocking features are supported. - ## If this is supported, increments are on 1 Mhz basis. - ("isFixedModeSupported", ze_bool_t) ## [out] Indicates if the fixed mode is supported. In this mode, hardware - ## will disable most frequency throttling and lock the frequency and - ## voltage at the specified overclock values. - ] - -############################################################################### -## @brief LED properties -class zes_led_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("onSubdevice", ze_bool_t), ## [out] True if the resource is located on a sub-device; false means - ## that the resource is on the device of the calling Sysman handle - ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device - ("canControl", ze_bool_t), ## [out] Indicates if software can control the LED assuming the user has - ## permissions - ("haveRGB", ze_bool_t) ## [out] Indicates if the LED is RGB capable - ] - -############################################################################### -## @brief LED color -class zes_led_color_t(Structure): - _fields_ = [ - ("red", c_double), ## [in,out][range(0.0, 1.0)] The LED red value. On output, a value less - ## than 0.0 indicates that the color is not known. - ("green", c_double), ## [in,out][range(0.0, 1.0)] The LED green value. On output, a value less - ## than 0.0 indicates that the color is not known. - ("blue", c_double) ## [in,out][range(0.0, 1.0)] The LED blue value. On output, a value less - ## than 0.0 indicates that the color is not known. - ] - -############################################################################### -## @brief LED state -class zes_led_state_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("isOn", ze_bool_t), ## [out] Indicates if the LED is on or off - ("color", zes_led_color_t) ## [out] Color of the LED - ] - -############################################################################### -## @brief Memory module types -class zes_mem_type_v(IntEnum): - HBM = 0 ## HBM memory - DDR = 1 ## DDR memory - DDR3 = 2 ## DDR3 memory - DDR4 = 3 ## DDR4 memory - DDR5 = 4 ## DDR5 memory - LPDDR = 5 ## LPDDR memory - LPDDR3 = 6 ## LPDDR3 memory - LPDDR4 = 7 ## LPDDR4 memory - LPDDR5 = 8 ## LPDDR5 memory - SRAM = 9 ## SRAM memory - L1 = 10 ## L1 cache - L3 = 11 ## L3 cache - GRF = 12 ## Execution unit register file - SLM = 13 ## Execution unit shared local memory - GDDR4 = 14 ## GDDR4 memory - GDDR5 = 15 ## GDDR5 memory - GDDR5X = 16 ## GDDR5X memory - GDDR6 = 17 ## GDDR6 memory - GDDR6X = 18 ## GDDR6X memory - GDDR7 = 19 ## GDDR7 memory - -class zes_mem_type_t(c_int): - def __str__(self): - return str(zes_mem_type_v(self.value)) - - -############################################################################### -## @brief Memory module location -class zes_mem_loc_v(IntEnum): - SYSTEM = 0 ## System memory - DEVICE = 1 ## On board local device memory - -class zes_mem_loc_t(c_int): - def __str__(self): - return str(zes_mem_loc_v(self.value)) - - -############################################################################### -## @brief Memory health -class zes_mem_health_v(IntEnum): - UNKNOWN = 0 ## The memory health cannot be determined. - OK = 1 ## All memory channels are healthy. - DEGRADED = 2 ## Excessive correctable errors have been detected on one or more - ## channels. Device should be reset. - CRITICAL = 3 ## Operating with reduced memory to cover banks with too many - ## uncorrectable errors. - REPLACE = 4 ## Device should be replaced due to excessive uncorrectable errors. - -class zes_mem_health_t(c_int): - def __str__(self): - return str(zes_mem_health_v(self.value)) - - -############################################################################### -## @brief Memory properties -class zes_mem_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("type", zes_mem_type_t), ## [out] The memory type - ("onSubdevice", ze_bool_t), ## [out] True if this resource is located on a sub-device; false means - ## that the resource is on the device of the calling Sysman handle - ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device - ("location", zes_mem_loc_t), ## [out] Location of this memory (system, device) - ("physicalSize", c_ulonglong), ## [out] Physical memory capacity in bytes. A value of 0 indicates that - ## this property is not known. However, a call to zesMemoryGetState() - ## will return the available free physical memory. - ("busWidth", c_int32_t), ## [out] Width of the memory bus. A value of -1 means that this property - ## is unknown. - ("numChannels", c_int32_t) ## [out] The number of memory channels. A value of -1 means that this - ## property is unknown. - ] - -############################################################################### -## @brief Memory state - health, allocated -## -## @details -## - Percent free is given by 100 * free / pysical mem size. -class zes_mem_state_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("health", zes_mem_health_t), ## [out] Indicates the health of the memory - ("free", c_ulonglong), ## [out] The free physical memory in bytes - ("size", c_ulonglong) ## [out] The total allocatable memory in bytes (can be less than the - ## `physicalSize` member of ::zes_mem_properties_t). *DEPRECATED* - ## This member can no longer track the allocatable memory reliably. - ## Clients depending on this information can use the - ## zeDeviceGetMemoryProperties with - ## ze_device_usablemem_size_ext_properties_t extention to get information - ## of the available usable memory. - ] - -############################################################################### -## @brief Memory bandwidth -## -## @details -## - Percent bandwidth is calculated by taking two snapshots (s1, s2) and -## using the equation: %bw = 10^6 * ((s2.readCounter - s1.readCounter) + -## (s2.writeCounter - s1.writeCounter)) / (s2.maxBandwidth * -## (s2.timestamp - s1.timestamp)) -## - Counter can roll over and rollover needs to be handled by comparing -## the current read against the previous read -## - Counter is a 32 byte transaction count, which means the calculated -## delta (delta = current_value - previous_value or delta = 2^32 - -## previous_value + current_value in case of rollover) needs to be -## multiplied by 32 to get delta between samples in actual byte count -class zes_mem_bandwidth_t(Structure): - _fields_ = [ - ("readCounter", c_ulonglong), ## [out] Total bytes read from memory - ("writeCounter", c_ulonglong), ## [out] Total bytes written to memory - ("maxBandwidth", c_ulonglong), ## [out] Current maximum bandwidth in units of bytes/sec - ("timestamp", c_ulonglong) ## [out] The timestamp in microseconds when these measurements were sampled. - ## This timestamp should only be used to calculate delta time between - ## snapshots of this structure. - ## Never take the delta of this timestamp with the timestamp from a - ## different structure since they are not guaranteed to have the same base. - ## The absolute value of the timestamp is only valid during within the - ## application and may be different on the next execution. - ] - -############################################################################### -## @brief Extension properties for Memory bandwidth -## -## @details -## - Number of counter bits -## - [DEPRECATED] No longer supported. -class zes_mem_ext_bandwidth_t(Structure): - _fields_ = [ - ("memoryTimestampValidBits", c_ulong) ## [out] Returns the number of valid bits in the timestamp values - ] - -############################################################################### -## @brief Static information about a Performance Factor domain -class zes_perf_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("onSubdevice", ze_bool_t), ## [out] True if this Performance Factor affects accelerators located on - ## a sub-device - ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device - ("engines", zes_engine_type_flags_t) ## [out] Bitfield of accelerator engine types that are affected by this - ## Performance Factor. - ] - -############################################################################### -## @brief Power Domain -class zes_power_domain_v(IntEnum): - UNKNOWN = 0 ## The PUnit power domain level cannot be determined. - CARD = 1 ## The PUnit power domain is a card-level power domain. - PACKAGE = 2 ## The PUnit power domain is a package-level power domain. - STACK = 3 ## The PUnit power domain is a stack-level power domain. - MEMORY = 4 ## The PUnit power domain is a memory-level power domain. - GPU = 5 ## The PUnit power domain is a GPU-level power domain. - -class zes_power_domain_t(c_int): - def __str__(self): - return str(zes_power_domain_v(self.value)) - - -############################################################################### -## @brief Power Level Type -class zes_power_level_v(IntEnum): - UNKNOWN = 0 ## The PUnit power monitoring duration cannot be determined. - SUSTAINED = 1 ## The PUnit determines effective power draw by computing a moving - ## average of the actual power draw over a time interval (longer than - ## BURST). - BURST = 2 ## The PUnit determines effective power draw by computing a moving - ## average of the actual power draw over a time interval (longer than - ## PEAK). - PEAK = 3 ## The PUnit determines effective power draw by computing a moving - ## average of the actual power draw over a very short time interval. - INSTANTANEOUS = 4 ## The PUnit predicts effective power draw using the current device - ## configuration (frequency, voltage, etc...) & throttles proactively to - ## stay within the specified limit. - -class zes_power_level_t(c_int): - def __str__(self): - return str(zes_power_level_v(self.value)) - - -############################################################################### -## @brief Power Source Type -class zes_power_source_v(IntEnum): - ANY = 0 ## Limit active no matter whether the power source is mains powered or - ## battery powered. - MAINS = 1 ## Limit active only when the device is mains powered. - BATTERY = 2 ## Limit active only when the device is battery powered. - -class zes_power_source_t(c_int): - def __str__(self): - return str(zes_power_source_v(self.value)) - - -############################################################################### -## @brief Limit Unit -class zes_limit_unit_v(IntEnum): - UNKNOWN = 0 ## The PUnit power monitoring unit cannot be determined. - CURRENT = 1 ## The limit is specified in milliamperes of current drawn. - POWER = 2 ## The limit is specified in milliwatts of power generated. - -class zes_limit_unit_t(c_int): - def __str__(self): - return str(zes_limit_unit_v(self.value)) - - -############################################################################### -## @brief Properties related to device power settings -class zes_power_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("onSubdevice", ze_bool_t), ## [out] True if this resource is located on a sub-device; false means - ## that the resource is on the device of the calling Sysman handle - ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device - ("canControl", ze_bool_t), ## [out] Software can change the power limits of this domain assuming the - ## user has permissions. - ("isEnergyThresholdSupported", ze_bool_t), ## [out] Indicates if this power domain supports the energy threshold - ## event (::ZES_EVENT_TYPE_FLAG_ENERGY_THRESHOLD_CROSSED). - ("defaultLimit", c_int32_t), ## [out] (Deprecated) The factory default TDP power limit of the part in - ## milliwatts. A value of -1 means that this is not known. - ("minLimit", c_int32_t), ## [out] (Deprecated) The minimum power limit in milliwatts that can be - ## requested. A value of -1 means that this is not known. - ("maxLimit", c_int32_t) ## [out] (Deprecated) The maximum power limit in milliwatts that can be - ## requested. A value of -1 means that this is not known. - ] - -############################################################################### -## @brief Energy counter snapshot -## -## @details -## - Average power is calculated by taking two snapshots (s1, s2) and using -## the equation: PowerWatts = (s2.energy - s1.energy) / (s2.timestamp - -## s1.timestamp) -class zes_power_energy_counter_t(Structure): - _fields_ = [ - ("energy", c_ulonglong), ## [out] The monotonic energy counter in microjoules. - ("timestamp", c_ulonglong) ## [out] Microsecond timestamp when energy was captured. - ## This timestamp should only be used to calculate delta time between - ## snapshots of this structure. - ## Never take the delta of this timestamp with the timestamp from a - ## different structure since they are not guaranteed to have the same base. - ## The absolute value of the timestamp is only valid during within the - ## application and may be different on the next execution. - ] - -############################################################################### -## @brief Sustained power limits -## -## @details -## - The power controller (Punit) will throttle the operating frequency if -## the power averaged over a window (typically seconds) exceeds this -## limit. -## - [DEPRECATED] No longer supported. -class zes_power_sustained_limit_t(Structure): - _fields_ = [ - ("enabled", ze_bool_t), ## [in,out] indicates if the limit is enabled (true) or ignored (false) - ("power", c_int32_t), ## [in,out] power limit in milliwatts - ("interval", c_int32_t) ## [in,out] power averaging window (Tau) in milliseconds - ] - -############################################################################### -## @brief Burst power limit -## -## @details -## - The power controller (Punit) will throttle the operating frequency of -## the device if the power averaged over a few milliseconds exceeds a -## limit known as PL2. Typically PL2 > PL1 so that it permits the -## frequency to burst higher for short periods than would be otherwise -## permitted by PL1. -## - [DEPRECATED] No longer supported. -class zes_power_burst_limit_t(Structure): - _fields_ = [ - ("enabled", ze_bool_t), ## [in,out] indicates if the limit is enabled (true) or ignored (false) - ("power", c_int32_t) ## [in,out] power limit in milliwatts - ] - -############################################################################### -## @brief Peak power limit -## -## @details -## - The power controller (Punit) will reactively/proactively throttle the -## operating frequency of the device when the instantaneous/100usec power -## exceeds this limit. The limit is known as PL4 or Psys. It expresses -## the maximum power that can be drawn from the power supply. -## - If this power limit is removed or set too high, the power supply will -## generate an interrupt when it detects an overcurrent condition and the -## power controller will throttle the device frequencies down to min. It -## is thus better to tune the PL4 value in order to avoid such -## excursions. -## - [DEPRECATED] No longer supported. -class zes_power_peak_limit_t(Structure): - _fields_ = [ - ("powerAC", c_int32_t), ## [in,out] power limit in milliwatts for the AC power source. - ("powerDC", c_int32_t) ## [in,out] power limit in milliwatts for the DC power source. On input, - ## this is ignored if the product does not have a battery. On output, - ## this will be -1 if the product does not have a battery. - ] - -############################################################################### -## @brief Energy threshold -## -## @details -## - . -class zes_energy_threshold_t(Structure): - _fields_ = [ - ("enable", ze_bool_t), ## [in,out] Indicates if the energy threshold is enabled. - ("threshold", c_double), ## [in,out] The energy threshold in Joules. Will be 0.0 if no threshold - ## has been set. - ("processId", c_ulong) ## [in,out] The host process ID that set the energy threshold. Will be - ## 0xFFFFFFFF if no threshold has been set. - ] - -############################################################################### -## @brief PSU voltage status -class zes_psu_voltage_status_v(IntEnum): - UNKNOWN = 0 ## The status of the power supply voltage controllers cannot be - ## determined - NORMAL = 1 ## No unusual voltages have been detected - OVER = 2 ## Over-voltage has occurred - UNDER = 3 ## Under-voltage has occurred - -class zes_psu_voltage_status_t(c_int): - def __str__(self): - return str(zes_psu_voltage_status_v(self.value)) - - -############################################################################### -## @brief Static properties of the power supply -class zes_psu_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("onSubdevice", ze_bool_t), ## [out] True if the resource is located on a sub-device; false means - ## that the resource is on the device of the calling Sysman handle - ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device - ("haveFan", ze_bool_t), ## [out] True if the power supply has a fan - ("ampLimit", c_int32_t) ## [out] The maximum electrical current in milliamperes that can be - ## drawn. A value of -1 indicates that this property cannot be - ## determined. - ] - -############################################################################### -## @brief Dynamic state of the power supply -class zes_psu_state_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("voltStatus", zes_psu_voltage_status_t), ## [out] The current PSU voltage status - ("fanFailed", ze_bool_t), ## [out] Indicates if the fan has failed - ("temperature", c_int32_t), ## [out] Read the current heatsink temperature in degrees Celsius. A - ## value of -1 indicates that this property cannot be determined. - ("current", c_int32_t) ## [out] The amps being drawn in milliamperes. A value of -1 indicates - ## that this property cannot be determined. - ] - -############################################################################### -## @brief RAS error type -class zes_ras_error_type_v(IntEnum): - CORRECTABLE = 0 ## Errors were corrected by hardware - UNCORRECTABLE = 1 ## Error were not corrected - -class zes_ras_error_type_t(c_int): - def __str__(self): - return str(zes_ras_error_type_v(self.value)) - - -############################################################################### -## @brief RAS error categories -class zes_ras_error_cat_v(IntEnum): - RESET = 0 ## The number of accelerator engine resets attempted by the driver - PROGRAMMING_ERRORS = 1 ## The number of hardware exceptions generated by the way workloads have - ## programmed the hardware - DRIVER_ERRORS = 2 ## The number of low level driver communication errors have occurred - COMPUTE_ERRORS = 3 ## The number of errors that have occurred in the compute accelerator - ## hardware - NON_COMPUTE_ERRORS = 4 ## The number of errors that have occurred in the fixed-function - ## accelerator hardware - CACHE_ERRORS = 5 ## The number of errors that have occurred in caches (L1/L3/register - ## file/shared local memory/sampler) - DISPLAY_ERRORS = 6 ## The number of errors that have occurred in the display - -class zes_ras_error_cat_t(c_int): - def __str__(self): - return str(zes_ras_error_cat_v(self.value)) - - -############################################################################### -## @brief The maximum number of categories -ZES_MAX_RAS_ERROR_CATEGORY_COUNT = 7 - -############################################################################### -## @brief RAS properties -class zes_ras_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("type", zes_ras_error_type_t), ## [out] The type of RAS error - ("onSubdevice", ze_bool_t), ## [out] True if the resource is located on a sub-device; false means - ## that the resource is on the device of the calling Sysman handle - ("subdeviceId", c_ulong) ## [out] If onSubdevice is true, this gives the ID of the sub-device - ] - -############################################################################### -## @brief RAS error details -class zes_ras_state_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("category", c_ulonglong * ZES_MAX_RAS_ERROR_CATEGORY_COUNT) ## [in][out] Breakdown of error by category - ] - -############################################################################### -## @brief RAS error configuration - thresholds used for triggering RAS events -## (::ZES_EVENT_TYPE_FLAG_RAS_CORRECTABLE_ERRORS, -## ::ZES_EVENT_TYPE_FLAG_RAS_UNCORRECTABLE_ERRORS) -## -## @details -## - The driver maintains a total counter which is updated every time a -## hardware block covered by the corresponding RAS error set notifies -## that an error has occurred. When this total count goes above the -## totalThreshold specified below, a RAS event is triggered. -## - The driver also maintains a counter for each category of RAS error -## (see ::zes_ras_state_t for a breakdown). Each time a hardware block of -## that category notifies that an error has occurred, that corresponding -## category counter is updated. When it goes above the threshold -## specified in detailedThresholds, a RAS event is triggered. -class zes_ras_config_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("totalThreshold", c_ulonglong), ## [in,out] If the total RAS errors exceeds this threshold, the event - ## will be triggered. A value of 0ULL disables triggering the event based - ## on the total counter. - ("detailedThresholds", zes_ras_state_t) ## [in,out] If the RAS errors for each category exceed the threshold for - ## that category, the event will be triggered. A value of 0ULL will - ## disable an event being triggered for that category. - ] - -############################################################################### -## @brief Scheduler mode -class zes_sched_mode_v(IntEnum): - TIMEOUT = 0 ## Multiple applications or contexts are submitting work to the hardware. - ## When higher priority work arrives, the scheduler attempts to pause the - ## current executing work within some timeout interval, then submits the - ## other work. - TIMESLICE = 1 ## The scheduler attempts to fairly timeslice hardware execution time - ## between multiple contexts submitting work to the hardware - ## concurrently. - EXCLUSIVE = 2 ## Any application or context can run indefinitely on the hardware - ## without being preempted or terminated. All pending work for other - ## contexts must wait until the running context completes with no further - ## submitted work. - COMPUTE_UNIT_DEBUG = 3 ## [DEPRECATED] No longer supported. - -class zes_sched_mode_t(c_int): - def __str__(self): - return str(zes_sched_mode_v(self.value)) - - -############################################################################### -## @brief Properties related to scheduler component -class zes_sched_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("onSubdevice", ze_bool_t), ## [out] True if this resource is located on a sub-device; false means - ## that the resource is on the device of the calling Sysman handle - ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device - ("canControl", ze_bool_t), ## [out] Software can change the scheduler component configuration - ## assuming the user has permissions. - ("engines", zes_engine_type_flags_t), ## [out] Bitfield of accelerator engine types that are managed by this - ## scheduler component. Note that there can be more than one scheduler - ## component for the same type of accelerator engine. - ("supportedModes", c_ulong) ## [out] Bitfield of scheduler modes that can be configured for this - ## scheduler component (bitfield of 1<<::zes_sched_mode_t). - ] - -############################################################################### -## @brief Disable forward progress guard timeout. -ZES_SCHED_WATCHDOG_DISABLE = (~(0ULL)) - -############################################################################### -## @brief Configuration for timeout scheduler mode (::ZES_SCHED_MODE_TIMEOUT) -class zes_sched_timeout_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("watchdogTimeout", c_ulonglong) ## [in,out] The maximum time in microseconds that the scheduler will wait - ## for a batch of work submitted to a hardware engine to complete or to - ## be preempted so as to run another context. - ## If this time is exceeded, the hardware engine is reset and the context terminated. - ## If set to ::ZES_SCHED_WATCHDOG_DISABLE, a running workload can run as - ## long as it wants without being terminated, but preemption attempts to - ## run other contexts are permitted but not enforced. - ] - -############################################################################### -## @brief Configuration for timeslice scheduler mode -## (::ZES_SCHED_MODE_TIMESLICE) -class zes_sched_timeslice_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("interval", c_ulonglong), ## [in,out] The average interval in microseconds that a submission for a - ## context will run on a hardware engine before being preempted out to - ## run a pending submission for another context. - ("yieldTimeout", c_ulonglong) ## [in,out] The maximum time in microseconds that the scheduler will wait - ## to preempt a workload running on an engine before deciding to reset - ## the hardware engine and terminating the associated context. - ] - -############################################################################### -## @brief Standby hardware components -class zes_standby_type_v(IntEnum): - GLOBAL = 0 ## Control the overall standby policy of the device/sub-device - -class zes_standby_type_t(c_int): - def __str__(self): - return str(zes_standby_type_v(self.value)) - - -############################################################################### -## @brief Standby hardware component properties -class zes_standby_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("type", zes_standby_type_t), ## [out] Which standby hardware component this controls - ("onSubdevice", ze_bool_t), ## [out] True if the resource is located on a sub-device; false means - ## that the resource is on the device of the calling Sysman handle - ("subdeviceId", c_ulong) ## [out] If onSubdevice is true, this gives the ID of the sub-device - ] - -############################################################################### -## @brief Standby promotion modes -class zes_standby_promo_mode_v(IntEnum): - DEFAULT = 0 ## Best compromise between performance and energy savings. - NEVER = 1 ## The device/component will never shutdown. This can improve performance - ## but uses more energy. - -class zes_standby_promo_mode_t(c_int): - def __str__(self): - return str(zes_standby_promo_mode_v(self.value)) - - -############################################################################### -## @brief Temperature sensors -class zes_temp_sensors_v(IntEnum): - GLOBAL = 0 ## The maximum temperature across all device sensors - GPU = 1 ## The maximum temperature across all sensors in the GPU - MEMORY = 2 ## The maximum temperature across all sensors in the local memory - GLOBAL_MIN = 3 ## The minimum temperature across all device sensors - GPU_MIN = 4 ## The minimum temperature across all sensors in the GPU - MEMORY_MIN = 5 ## The minimum temperature across all sensors in the local device memory - GPU_BOARD = 6 ## The maximum temperature across all sensors in the GPU Board - GPU_BOARD_MIN = 7 ## The minimum temperature across all sensors in the GPU Board - VOLTAGE_REGULATOR = 8 ## The maximum temperature across all sensors in the Voltage Regulator - -class zes_temp_sensors_t(c_int): - def __str__(self): - return str(zes_temp_sensors_v(self.value)) - - -############################################################################### -## @brief Temperature sensor properties -class zes_temp_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("type", zes_temp_sensors_t), ## [out] Which part of the device the temperature sensor measures - ("onSubdevice", ze_bool_t), ## [out] True if the resource is located on a sub-device; false means - ## that the resource is on the device of the calling Sysman handle - ("subdeviceId", c_ulong), ## [out] If onSubdevice is true, this gives the ID of the sub-device - ("maxTemperature", c_double), ## [out] Will contain the maximum temperature for the specific device in - ## degrees Celsius. - ("isCriticalTempSupported", ze_bool_t), ## [out] Indicates if the critical temperature event - ## ::ZES_EVENT_TYPE_FLAG_TEMP_CRITICAL is supported - ("isThreshold1Supported", ze_bool_t), ## [out] Indicates if the temperature threshold 1 event - ## ::ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD1 is supported - ("isThreshold2Supported", ze_bool_t) ## [out] Indicates if the temperature threshold 2 event - ## ::ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD2 is supported - ] - -############################################################################### -## @brief Temperature sensor threshold -class zes_temp_threshold_t(Structure): - _fields_ = [ - ("enableLowToHigh", ze_bool_t), ## [in,out] Trigger an event when the temperature crosses from below the - ## threshold to above. - ("enableHighToLow", ze_bool_t), ## [in,out] Trigger an event when the temperature crosses from above the - ## threshold to below. - ("threshold", c_double) ## [in,out] The threshold in degrees Celsius. - ] - -############################################################################### -## @brief Temperature configuration - which events should be triggered and the -## trigger conditions. -class zes_temp_config_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("enableCritical", ze_bool_t), ## [in,out] Indicates if event ::ZES_EVENT_TYPE_FLAG_TEMP_CRITICAL should - ## be triggered by the driver. - ("threshold1", zes_temp_threshold_t), ## [in,out] Configuration controlling if and when event - ## ::ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD1 should be triggered by the - ## driver. - ("threshold2", zes_temp_threshold_t) ## [in,out] Configuration controlling if and when event - ## ::ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD2 should be triggered by the - ## driver. - ] - -############################################################################### -## @brief Device ECC default properties Extension Name -ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_NAME = "ZES_extension_device_ecc_default_properties" - -############################################################################### -## @brief Device ECC default properties Extension Version(s) -class zes_device_ecc_default_properties_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class zes_device_ecc_default_properties_ext_version_t(c_int): - def __str__(self): - return str(zes_device_ecc_default_properties_ext_version_v(self.value)) - - -############################################################################### -## @brief This structure may be passed to ::zesDeviceGetEccState as pNext member -## of ::zes_device_ecc_properties_t. -class zes_device_ecc_default_properties_ext_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("defaultState", zes_device_ecc_state_t) ## [out] Default ECC state - ] - -############################################################################### -## @brief PCI Link Speed Downgrade Extension Name -ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_NAME = "ZES_extension_pci_link_speed_downgrade" - -############################################################################### -## @brief PCI Link Speed Downgrade Extension Version(s) -class zes_pci_link_speed_downgrade_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class zes_pci_link_speed_downgrade_ext_version_t(c_int): - def __str__(self): - return str(zes_pci_link_speed_downgrade_ext_version_v(self.value)) - - -############################################################################### -## @brief Query PCIe downgrade status. -## -## @details -## - This structure can be passed in the 'pNext' of ::zes_pci_state_t -class zes_pci_link_speed_downgrade_ext_state_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("pciLinkSpeedDowngradeStatus", ze_bool_t) ## [out] Returns the current PCIe downgrade status. - ] - -############################################################################### -## @brief Query PCIe downgrade capability. -## -## @details -## - This structure can be passed in the 'pNext' of ::zes_pci_properties_t -class zes_pci_link_speed_downgrade_ext_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("pciLinkSpeedUpdateCapable", ze_bool_t), ## [out] Returns if PCIe downgrade capability is available. - ("maxPciGenSupported", c_int32_t) ## [out] Returns the max supported PCIe generation of the device. -1 - ## indicates the information is not available - ] - -############################################################################### -## @brief Power Limits Extension Name -ZES_POWER_LIMITS_EXT_NAME = "ZES_extension_power_limits" - -############################################################################### -## @brief Power Limits Extension Version(s) -class zes_power_limits_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class zes_power_limits_ext_version_t(c_int): - def __str__(self): - return str(zes_power_limits_ext_version_v(self.value)) - - -############################################################################### -## @brief Device power/current limit descriptor. -class zes_power_limit_ext_desc_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("level", zes_power_level_t), ## [in,out] duration type over which the power draw is measured, i.e. - ## sustained, burst, peak, or critical. - ("source", zes_power_source_t), ## [out] source of power used by the system, i.e. AC or DC. - ("limitUnit", zes_limit_unit_t), ## [out] unit used for specifying limit, i.e. current units (milliamps) - ## or power units (milliwatts). - ("enabledStateLocked", ze_bool_t), ## [out] indicates if the power limit state (enabled/ignored) can be set - ## (false) or is locked (true). - ("enabled", ze_bool_t), ## [in,out] indicates if the limit is enabled (true) or ignored (false). - ## If enabledStateIsLocked is True, this value is ignored. - ("intervalValueLocked", ze_bool_t), ## [out] indicates if the interval can be modified (false) or is fixed - ## (true). - ("interval", c_int32_t), ## [in,out] power averaging window in milliseconds. If - ## intervalValueLocked is true, this value is ignored. - ("limitValueLocked", ze_bool_t), ## [out] indicates if the limit can be set (false) or if the limit is - ## fixed (true). - ("limit", c_int32_t) ## [in,out] limit value. If limitValueLocked is true, this value is - ## ignored. The value should be provided in the unit specified by - ## limitUnit. - ] - -############################################################################### -## @brief Extension properties related to device power settings -## -## @details -## - This structure may be returned from ::zesPowerGetProperties via the -## `pNext` member of ::zes_power_properties_t. -## - This structure may also be returned from ::zesPowerGetProperties via -## the `pNext` member of ::zes_power_ext_properties_t -## - Used for determining the power domain level, i.e. card-level v/s -## package-level v/s stack-level & the factory default power limits. -class zes_power_ext_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("domain", zes_power_domain_t), ## [out] domain that the power limit belongs to. - ("defaultLimit", POINTER(zes_power_limit_ext_desc_t)) ## [out] the factory default limit of the part. - ] - -############################################################################### -## @brief Engine Activity Extension Name -ZES_ENGINE_ACTIVITY_EXT_NAME = "ZES_extension_engine_activity" - -############################################################################### -## @brief Engine Activity Extension Version(s) -class zes_engine_activity_ext_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class zes_engine_activity_ext_version_t(c_int): - def __str__(self): - return str(zes_engine_activity_ext_version_v(self.value)) - - -############################################################################### -## @brief Extension properties related to Engine Groups -## -## @details -## - This structure may be passed to ::zesEngineGetProperties by having the -## pNext member of ::zes_engine_properties_t point at this struct. -## - Used for SRIOV per Virtual Function device utilization by -## ::zes_engine_group_t -class zes_engine_ext_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("countOfVirtualFunctionInstance", c_ulong) ## [out] Number of Virtual Function(VF) instances associated with engine - ## to monitor the utilization of hardware across all Virtual Function - ## from a Physical Function (PF) instance. - ## These VF-by-VF views should provide engine group and individual engine - ## level granularity. - ## This count represents the number of VF instances that are actively - ## using the resource represented by the engine handle. - ] - -############################################################################### -## @brief RAS Get State Extension Name -ZES_RAS_GET_STATE_EXP_NAME = "ZES_extension_ras_state" - -############################################################################### -## @brief RAS Get State Extension Version(s) -class zes_ras_state_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class zes_ras_state_exp_version_t(c_int): - def __str__(self): - return str(zes_ras_state_exp_version_v(self.value)) - - -############################################################################### -## @brief RAS error categories -class zes_ras_error_category_exp_v(IntEnum): - RESET = 0 ## The number of accelerator engine resets attempted by the driver - PROGRAMMING_ERRORS = 1 ## The number of hardware exceptions generated by the way workloads have - ## programmed the hardware - DRIVER_ERRORS = 2 ## The number of low level driver communication errors have occurred - COMPUTE_ERRORS = 3 ## The number of errors that have occurred in the compute accelerator - ## hardware - NON_COMPUTE_ERRORS = 4 ## The number of errors that have occurred in the fixed-function - ## accelerator hardware - CACHE_ERRORS = 5 ## The number of errors that have occurred in caches (L1/L3/register - ## file/shared local memory/sampler) - DISPLAY_ERRORS = 6 ## The number of errors that have occurred in the display - MEMORY_ERRORS = 7 ## The number of errors that have occurred in Memory - SCALE_ERRORS = 8 ## The number of errors that have occurred in Scale Fabric - L3FABRIC_ERRORS = 9 ## The number of errors that have occurred in L3 Fabric - -class zes_ras_error_category_exp_t(c_int): - def __str__(self): - return str(zes_ras_error_category_exp_v(self.value)) - - -############################################################################### -## @brief Extension structure for providing RAS error counters for different -## error sets -class zes_ras_state_exp_t(Structure): - _fields_ = [ - ("category", zes_ras_error_category_exp_t), ## [out] category for which error counter is provided. - ("errorCounter", c_ulonglong) ## [out] Current value of RAS counter for specific error category. - ] - -############################################################################### -## @brief Memory State Extension Name -ZES_MEM_PAGE_OFFLINE_STATE_EXP_NAME = "ZES_extension_mem_state" - -############################################################################### -## @brief Memory State Extension Version(s) -class zes_mem_page_offline_state_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class zes_mem_page_offline_state_exp_version_t(c_int): - def __str__(self): - return str(zes_mem_page_offline_state_exp_version_v(self.value)) - - -############################################################################### -## @brief Extension properties for Memory State -## -## @details -## - This structure may be returned from ::zesMemoryGetState via the -## `pNext` member of ::zes_mem_state_t -## - These additional parameters get Memory Page Offline Metrics -class zes_mem_page_offline_state_exp_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("memoryPageOffline", c_ulong), ## [out] Returns the number of Memory Pages Offline - ("maxMemoryPageOffline", c_ulong) ## [out] Returns the Allowed Memory Pages Offline - ] - -############################################################################### -## @brief Memory Bandwidth Counter Valid Bits Extension Name -ZES_MEMORY_BANDWIDTH_COUNTER_BITS_EXP_PROPERTIES_NAME = "ZES_extension_mem_bandwidth_counter_bits_properties" - -############################################################################### -## @brief Memory Bandwidth Counter Valid Bits Extension Version(s) -class zes_mem_bandwidth_counter_bits_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class zes_mem_bandwidth_counter_bits_exp_version_t(c_int): - def __str__(self): - return str(zes_mem_bandwidth_counter_bits_exp_version_v(self.value)) - - -############################################################################### -## @brief Extension properties for reporting valid bit count for memory -## bandwidth counter value -## -## @details -## - Number of valid read and write counter bits of memory bandwidth -## - This structure may be returned from ::zesMemoryGetProperties via the -## `pNext` member of ::zes_mem_properties_t. -## - Used for denoting number of valid bits in the counter value returned -## in ::zes_mem_bandwidth_t. -class zes_mem_bandwidth_counter_bits_exp_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("validBitsCount", c_ulong) ## [out] Returns the number of valid bits in the counter values - ] - -############################################################################### -## @brief Power Domain Properties Name -ZES_POWER_DOMAIN_PROPERTIES_EXP_NAME = "ZES_extension_power_domain_properties" - -############################################################################### -## @brief Power Domain Properties Extension Version(s) -class zes_power_domain_properties_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class zes_power_domain_properties_exp_version_t(c_int): - def __str__(self): - return str(zes_power_domain_properties_exp_version_v(self.value)) - - -############################################################################### -## @brief Extension structure for providing power domain information associated -## with a power handle -## -## @details -## - This structure may be returned from ::zesPowerGetProperties via the -## `pNext` member of ::zes_power_properties_t. -## - Used for associating a power handle with a power domain. -class zes_power_domain_exp_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("powerDomain", zes_power_domain_t) ## [out] Power domain associated with the power handle. - ] - -############################################################################### -## @brief Firmware security version -ZES_FIRMWARE_SECURITY_VERSION_EXP_NAME = "ZES_experimental_firmware_security_version" - -############################################################################### -## @brief Firmware security version Extension Version(s) -class zes_firmware_security_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class zes_firmware_security_exp_version_t(c_int): - def __str__(self): - return str(zes_firmware_security_exp_version_v(self.value)) - - -############################################################################### -## @brief Sysman Device Mapping Extension Name -ZES_SYSMAN_DEVICE_MAPPING_EXP_NAME = "ZES_experimental_sysman_device_mapping" - -############################################################################### -## @brief Sysman Device Mapping Extension Version(s) -class zes_sysman_device_mapping_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class zes_sysman_device_mapping_exp_version_t(c_int): - def __str__(self): - return str(zes_sysman_device_mapping_exp_version_v(self.value)) - - -############################################################################### -## @brief Sub Device Properties -class zes_subdevice_exp_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("subdeviceId", c_ulong), ## [out] this gives the ID of the sub device - ("uuid", zes_uuid_t) ## [out] universal unique identifier of the sub device. - ] - -############################################################################### -## @brief Virtual Function Management Extension Name -ZES_VIRTUAL_FUNCTION_MANAGEMENT_EXP_NAME = "ZES_experimental_virtual_function_management" - -############################################################################### -## @brief Virtual Function Management Extension Version(s) -class zes_vf_management_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 (deprecated) - _1_1 = ZE_MAKE_VERSION( 1, 1 ) ## version 1.1 (deprecated) - _1_2 = ZE_MAKE_VERSION( 1, 2 ) ## version 1.2 - CURRENT = ZE_MAKE_VERSION( 1, 2 ) ## latest known version - -class zes_vf_management_exp_version_t(c_int): - def __str__(self): - return str(zes_vf_management_exp_version_v(self.value)) - - -############################################################################### -## @brief Virtual function memory types (deprecated) -class zes_vf_info_mem_type_exp_flags_v(IntEnum): - MEM_TYPE_SYSTEM = ZE_BIT(0) ## System memory - MEM_TYPE_DEVICE = ZE_BIT(1) ## Device local memory - -class zes_vf_info_mem_type_exp_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Virtual function utilization flag bit fields (deprecated) -class zes_vf_info_util_exp_flags_v(IntEnum): - INFO_NONE = ZE_BIT(0) ## No info associated with virtual function - INFO_MEM_CPU = ZE_BIT(1) ## System memory utilization associated with virtual function - INFO_MEM_GPU = ZE_BIT(2) ## Device memory utilization associated with virtual function - INFO_ENGINE = ZE_BIT(3) ## Engine utilization associated with virtual function - -class zes_vf_info_util_exp_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Virtual function management properties (deprecated) -class zes_vf_exp_properties_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("address", zes_pci_address_t), ## [out] Virtual function BDF address - ("uuid", zes_uuid_t), ## [out] universal unique identifier of the device - ("flags", zes_vf_info_util_exp_flags_t) ## [out] utilization flags available. May be 0 or a valid combination of - ## ::zes_vf_info_util_exp_flag_t. - ] - -############################################################################### -## @brief Provides memory utilization values for a virtual function (deprecated) -class zes_vf_util_mem_exp_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("memTypeFlags", zes_vf_info_mem_type_exp_flags_t), ## [out] Memory type flags. - ("free", c_ulonglong), ## [out] Free memory size in bytes. - ("size", c_ulonglong), ## [out] Total allocatable memory in bytes. - ("timestamp", c_ulonglong) ## [out] Wall clock time from VF when value was sampled. - ] - -############################################################################### -## @brief Provides engine utilization values for a virtual function (deprecated) -class zes_vf_util_engine_exp_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("type", zes_engine_group_t), ## [out] The engine group. - ("activeCounterValue", c_ulonglong), ## [out] Represents active counter. - ("samplingCounterValue", c_ulonglong), ## [out] Represents counter value when activeCounterValue was sampled. - ("timestamp", c_ulonglong) ## [out] Wall clock time when the activeCounterValue was sampled. - ] - -############################################################################### -## @brief Virtual function management capabilities (deprecated) -class zes_vf_exp_capabilities_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("address", zes_pci_address_t), ## [out] Virtual function BDF address - ("vfDeviceMemSize", c_ulong), ## [out] Virtual function memory size in kilo bytes - ("vfID", c_ulong) ## [out] Virtual Function ID - ] - -############################################################################### -## @brief Virtual function management capabilities -class zes_vf_exp2_capabilities_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("address", zes_pci_address_t), ## [out] Virtual function BDF address - ("vfDeviceMemSize", c_ulonglong), ## [out] Virtual function memory size in bytes - ("vfID", c_ulong) ## [out] Virtual Function ID - ] - -############################################################################### -## @brief Provides memory utilization values for a virtual function -class zes_vf_util_mem_exp2_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("vfMemLocation", zes_mem_loc_t), ## [out] Location of this memory (system, device) - ("vfMemUtilized", c_ulonglong) ## [out] Utilized memory size in bytes. - ] - -############################################################################### -## @brief Provides engine utilization values for a virtual function -## -## @details -## - Percent utilization is calculated by taking two snapshots (s1, s2) and -## using the equation: %util = (s2.activeCounterValue - -## s1.activeCounterValue) / (s2.samplingCounterValue - -## s1.samplingCounterValue) -class zes_vf_util_engine_exp2_t(Structure): - _fields_ = [ - ("stype", zes_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("vfEngineType", zes_engine_group_t), ## [out] The engine group. - ("activeCounterValue", c_ulonglong), ## [out] Represents active counter. - ("samplingCounterValue", c_ulonglong) ## [out] Represents counter value when activeCounterValue was sampled. - ## Refer to the formulae above for calculating the utilization percent - ] - -############################################################################### -__use_win_types = "Windows" == platform.uname()[0] - -############################################################################### -## @brief Function-pointer for zesInit -if __use_win_types: - _zesInit_t = WINFUNCTYPE( ze_result_t, zes_init_flags_t ) -else: - _zesInit_t = CFUNCTYPE( ze_result_t, zes_init_flags_t ) - - -############################################################################### -## @brief Table of Global functions pointers -class _zes_global_dditable_t(Structure): - _fields_ = [ - ("pfnInit", c_void_p) ## _zesInit_t - ] - -############################################################################### -## @brief Function-pointer for zesDeviceGetProperties -if __use_win_types: - _zesDeviceGetProperties_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_device_properties_t) ) -else: - _zesDeviceGetProperties_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_device_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceGetState -if __use_win_types: - _zesDeviceGetState_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_device_state_t) ) -else: - _zesDeviceGetState_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_device_state_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceReset -if __use_win_types: - _zesDeviceReset_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, ze_bool_t ) -else: - _zesDeviceReset_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, ze_bool_t ) - -############################################################################### -## @brief Function-pointer for zesDeviceProcessesGetState -if __use_win_types: - _zesDeviceProcessesGetState_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_process_state_t) ) -else: - _zesDeviceProcessesGetState_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_process_state_t) ) - -############################################################################### -## @brief Function-pointer for zesDevicePciGetProperties -if __use_win_types: - _zesDevicePciGetProperties_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_pci_properties_t) ) -else: - _zesDevicePciGetProperties_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_pci_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesDevicePciGetState -if __use_win_types: - _zesDevicePciGetState_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_pci_state_t) ) -else: - _zesDevicePciGetState_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_pci_state_t) ) - -############################################################################### -## @brief Function-pointer for zesDevicePciGetBars -if __use_win_types: - _zesDevicePciGetBars_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_pci_bar_properties_t) ) -else: - _zesDevicePciGetBars_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_pci_bar_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesDevicePciGetStats -if __use_win_types: - _zesDevicePciGetStats_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_pci_stats_t) ) -else: - _zesDevicePciGetStats_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_pci_stats_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceEnumDiagnosticTestSuites -if __use_win_types: - _zesDeviceEnumDiagnosticTestSuites_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_diag_handle_t) ) -else: - _zesDeviceEnumDiagnosticTestSuites_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_diag_handle_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceEnumEngineGroups -if __use_win_types: - _zesDeviceEnumEngineGroups_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_engine_handle_t) ) -else: - _zesDeviceEnumEngineGroups_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_engine_handle_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceEventRegister -if __use_win_types: - _zesDeviceEventRegister_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, zes_event_type_flags_t ) -else: - _zesDeviceEventRegister_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, zes_event_type_flags_t ) - -############################################################################### -## @brief Function-pointer for zesDeviceEnumFabricPorts -if __use_win_types: - _zesDeviceEnumFabricPorts_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_fabric_port_handle_t) ) -else: - _zesDeviceEnumFabricPorts_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_fabric_port_handle_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceEnumFans -if __use_win_types: - _zesDeviceEnumFans_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_fan_handle_t) ) -else: - _zesDeviceEnumFans_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_fan_handle_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceEnumFirmwares -if __use_win_types: - _zesDeviceEnumFirmwares_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_firmware_handle_t) ) -else: - _zesDeviceEnumFirmwares_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_firmware_handle_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceEnumFrequencyDomains -if __use_win_types: - _zesDeviceEnumFrequencyDomains_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_freq_handle_t) ) -else: - _zesDeviceEnumFrequencyDomains_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_freq_handle_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceEnumLeds -if __use_win_types: - _zesDeviceEnumLeds_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_led_handle_t) ) -else: - _zesDeviceEnumLeds_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_led_handle_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceEnumMemoryModules -if __use_win_types: - _zesDeviceEnumMemoryModules_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_mem_handle_t) ) -else: - _zesDeviceEnumMemoryModules_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_mem_handle_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceEnumPerformanceFactorDomains -if __use_win_types: - _zesDeviceEnumPerformanceFactorDomains_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_perf_handle_t) ) -else: - _zesDeviceEnumPerformanceFactorDomains_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_perf_handle_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceEnumPowerDomains -if __use_win_types: - _zesDeviceEnumPowerDomains_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_pwr_handle_t) ) -else: - _zesDeviceEnumPowerDomains_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_pwr_handle_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceGetCardPowerDomain -if __use_win_types: - _zesDeviceGetCardPowerDomain_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_pwr_handle_t) ) -else: - _zesDeviceGetCardPowerDomain_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_pwr_handle_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceEnumPsus -if __use_win_types: - _zesDeviceEnumPsus_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_psu_handle_t) ) -else: - _zesDeviceEnumPsus_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_psu_handle_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceEnumRasErrorSets -if __use_win_types: - _zesDeviceEnumRasErrorSets_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_ras_handle_t) ) -else: - _zesDeviceEnumRasErrorSets_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_ras_handle_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceEnumSchedulers -if __use_win_types: - _zesDeviceEnumSchedulers_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_sched_handle_t) ) -else: - _zesDeviceEnumSchedulers_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_sched_handle_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceEnumStandbyDomains -if __use_win_types: - _zesDeviceEnumStandbyDomains_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_standby_handle_t) ) -else: - _zesDeviceEnumStandbyDomains_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_standby_handle_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceEnumTemperatureSensors -if __use_win_types: - _zesDeviceEnumTemperatureSensors_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_temp_handle_t) ) -else: - _zesDeviceEnumTemperatureSensors_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_temp_handle_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceEccAvailable -if __use_win_types: - _zesDeviceEccAvailable_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(ze_bool_t) ) -else: - _zesDeviceEccAvailable_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(ze_bool_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceEccConfigurable -if __use_win_types: - _zesDeviceEccConfigurable_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(ze_bool_t) ) -else: - _zesDeviceEccConfigurable_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(ze_bool_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceGetEccState -if __use_win_types: - _zesDeviceGetEccState_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_device_ecc_properties_t) ) -else: - _zesDeviceGetEccState_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_device_ecc_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceSetEccState -if __use_win_types: - _zesDeviceSetEccState_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_device_ecc_desc_t), POINTER(zes_device_ecc_properties_t) ) -else: - _zesDeviceSetEccState_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_device_ecc_desc_t), POINTER(zes_device_ecc_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceGet -if __use_win_types: - _zesDeviceGet_t = WINFUNCTYPE( ze_result_t, zes_driver_handle_t, POINTER(c_ulong), POINTER(zes_device_handle_t) ) -else: - _zesDeviceGet_t = CFUNCTYPE( ze_result_t, zes_driver_handle_t, POINTER(c_ulong), POINTER(zes_device_handle_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceSetOverclockWaiver -if __use_win_types: - _zesDeviceSetOverclockWaiver_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t ) -else: - _zesDeviceSetOverclockWaiver_t = CFUNCTYPE( ze_result_t, zes_device_handle_t ) - -############################################################################### -## @brief Function-pointer for zesDeviceGetOverclockDomains -if __use_win_types: - _zesDeviceGetOverclockDomains_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong) ) -else: - _zesDeviceGetOverclockDomains_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong) ) - -############################################################################### -## @brief Function-pointer for zesDeviceGetOverclockControls -if __use_win_types: - _zesDeviceGetOverclockControls_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, zes_overclock_domain_t, POINTER(c_ulong) ) -else: - _zesDeviceGetOverclockControls_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, zes_overclock_domain_t, POINTER(c_ulong) ) - -############################################################################### -## @brief Function-pointer for zesDeviceResetOverclockSettings -if __use_win_types: - _zesDeviceResetOverclockSettings_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, ze_bool_t ) -else: - _zesDeviceResetOverclockSettings_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, ze_bool_t ) - -############################################################################### -## @brief Function-pointer for zesDeviceReadOverclockState -if __use_win_types: - _zesDeviceReadOverclockState_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_overclock_mode_t), POINTER(ze_bool_t), POINTER(ze_bool_t), POINTER(zes_pending_action_t), POINTER(ze_bool_t) ) -else: - _zesDeviceReadOverclockState_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_overclock_mode_t), POINTER(ze_bool_t), POINTER(ze_bool_t), POINTER(zes_pending_action_t), POINTER(ze_bool_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceEnumOverclockDomains -if __use_win_types: - _zesDeviceEnumOverclockDomains_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_overclock_handle_t) ) -else: - _zesDeviceEnumOverclockDomains_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_overclock_handle_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceResetExt -if __use_win_types: - _zesDeviceResetExt_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_reset_properties_t) ) -else: - _zesDeviceResetExt_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(zes_reset_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesDevicePciLinkSpeedUpdateExt -if __use_win_types: - _zesDevicePciLinkSpeedUpdateExt_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, ze_bool_t, POINTER(zes_device_action_t) ) -else: - _zesDevicePciLinkSpeedUpdateExt_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, ze_bool_t, POINTER(zes_device_action_t) ) - - -############################################################################### -## @brief Table of Device functions pointers -class _zes_device_dditable_t(Structure): - _fields_ = [ - ("pfnGetProperties", c_void_p), ## _zesDeviceGetProperties_t - ("pfnGetState", c_void_p), ## _zesDeviceGetState_t - ("pfnReset", c_void_p), ## _zesDeviceReset_t - ("pfnProcessesGetState", c_void_p), ## _zesDeviceProcessesGetState_t - ("pfnPciGetProperties", c_void_p), ## _zesDevicePciGetProperties_t - ("pfnPciGetState", c_void_p), ## _zesDevicePciGetState_t - ("pfnPciGetBars", c_void_p), ## _zesDevicePciGetBars_t - ("pfnPciGetStats", c_void_p), ## _zesDevicePciGetStats_t - ("pfnEnumDiagnosticTestSuites", c_void_p), ## _zesDeviceEnumDiagnosticTestSuites_t - ("pfnEnumEngineGroups", c_void_p), ## _zesDeviceEnumEngineGroups_t - ("pfnEventRegister", c_void_p), ## _zesDeviceEventRegister_t - ("pfnEnumFabricPorts", c_void_p), ## _zesDeviceEnumFabricPorts_t - ("pfnEnumFans", c_void_p), ## _zesDeviceEnumFans_t - ("pfnEnumFirmwares", c_void_p), ## _zesDeviceEnumFirmwares_t - ("pfnEnumFrequencyDomains", c_void_p), ## _zesDeviceEnumFrequencyDomains_t - ("pfnEnumLeds", c_void_p), ## _zesDeviceEnumLeds_t - ("pfnEnumMemoryModules", c_void_p), ## _zesDeviceEnumMemoryModules_t - ("pfnEnumPerformanceFactorDomains", c_void_p), ## _zesDeviceEnumPerformanceFactorDomains_t - ("pfnEnumPowerDomains", c_void_p), ## _zesDeviceEnumPowerDomains_t - ("pfnGetCardPowerDomain", c_void_p), ## _zesDeviceGetCardPowerDomain_t - ("pfnEnumPsus", c_void_p), ## _zesDeviceEnumPsus_t - ("pfnEnumRasErrorSets", c_void_p), ## _zesDeviceEnumRasErrorSets_t - ("pfnEnumSchedulers", c_void_p), ## _zesDeviceEnumSchedulers_t - ("pfnEnumStandbyDomains", c_void_p), ## _zesDeviceEnumStandbyDomains_t - ("pfnEnumTemperatureSensors", c_void_p), ## _zesDeviceEnumTemperatureSensors_t - ("pfnEccAvailable", c_void_p), ## _zesDeviceEccAvailable_t - ("pfnEccConfigurable", c_void_p), ## _zesDeviceEccConfigurable_t - ("pfnGetEccState", c_void_p), ## _zesDeviceGetEccState_t - ("pfnSetEccState", c_void_p), ## _zesDeviceSetEccState_t - ("pfnGet", c_void_p), ## _zesDeviceGet_t - ("pfnSetOverclockWaiver", c_void_p), ## _zesDeviceSetOverclockWaiver_t - ("pfnGetOverclockDomains", c_void_p), ## _zesDeviceGetOverclockDomains_t - ("pfnGetOverclockControls", c_void_p), ## _zesDeviceGetOverclockControls_t - ("pfnResetOverclockSettings", c_void_p), ## _zesDeviceResetOverclockSettings_t - ("pfnReadOverclockState", c_void_p), ## _zesDeviceReadOverclockState_t - ("pfnEnumOverclockDomains", c_void_p), ## _zesDeviceEnumOverclockDomains_t - ("pfnResetExt", c_void_p), ## _zesDeviceResetExt_t - ("pfnPciLinkSpeedUpdateExt", c_void_p) ## _zesDevicePciLinkSpeedUpdateExt_t - ] - -############################################################################### -## @brief Function-pointer for zesDeviceGetSubDevicePropertiesExp -if __use_win_types: - _zesDeviceGetSubDevicePropertiesExp_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_subdevice_exp_properties_t) ) -else: - _zesDeviceGetSubDevicePropertiesExp_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_subdevice_exp_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceEnumActiveVFExp -if __use_win_types: - _zesDeviceEnumActiveVFExp_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_vf_handle_t) ) -else: - _zesDeviceEnumActiveVFExp_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_vf_handle_t) ) - -############################################################################### -## @brief Function-pointer for zesDeviceEnumEnabledVFExp -if __use_win_types: - _zesDeviceEnumEnabledVFExp_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_vf_handle_t) ) -else: - _zesDeviceEnumEnabledVFExp_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, POINTER(c_ulong), POINTER(zes_vf_handle_t) ) - - -############################################################################### -## @brief Table of DeviceExp functions pointers -class _zes_device_exp_dditable_t(Structure): - _fields_ = [ - ("pfnGetSubDevicePropertiesExp", c_void_p), ## _zesDeviceGetSubDevicePropertiesExp_t - ("pfnEnumActiveVFExp", c_void_p), ## _zesDeviceEnumActiveVFExp_t - ("pfnEnumEnabledVFExp", c_void_p) ## _zesDeviceEnumEnabledVFExp_t - ] - -############################################################################### -## @brief Function-pointer for zesDriverEventListen -if __use_win_types: - _zesDriverEventListen_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, c_ulong, c_ulong, POINTER(zes_device_handle_t), POINTER(c_ulong), POINTER(zes_event_type_flags_t) ) -else: - _zesDriverEventListen_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, c_ulong, c_ulong, POINTER(zes_device_handle_t), POINTER(c_ulong), POINTER(zes_event_type_flags_t) ) - -############################################################################### -## @brief Function-pointer for zesDriverEventListenEx -if __use_win_types: - _zesDriverEventListenEx_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, c_ulonglong, c_ulong, POINTER(zes_device_handle_t), POINTER(c_ulong), POINTER(zes_event_type_flags_t) ) -else: - _zesDriverEventListenEx_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, c_ulonglong, c_ulong, POINTER(zes_device_handle_t), POINTER(c_ulong), POINTER(zes_event_type_flags_t) ) - -############################################################################### -## @brief Function-pointer for zesDriverGet -if __use_win_types: - _zesDriverGet_t = WINFUNCTYPE( ze_result_t, POINTER(c_ulong), POINTER(zes_driver_handle_t) ) -else: - _zesDriverGet_t = CFUNCTYPE( ze_result_t, POINTER(c_ulong), POINTER(zes_driver_handle_t) ) - -############################################################################### -## @brief Function-pointer for zesDriverGetExtensionProperties -if __use_win_types: - _zesDriverGetExtensionProperties_t = WINFUNCTYPE( ze_result_t, zes_driver_handle_t, POINTER(c_ulong), POINTER(zes_driver_extension_properties_t) ) -else: - _zesDriverGetExtensionProperties_t = CFUNCTYPE( ze_result_t, zes_driver_handle_t, POINTER(c_ulong), POINTER(zes_driver_extension_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesDriverGetExtensionFunctionAddress -if __use_win_types: - _zesDriverGetExtensionFunctionAddress_t = WINFUNCTYPE( ze_result_t, zes_driver_handle_t, c_char_p, POINTER(c_void_p) ) -else: - _zesDriverGetExtensionFunctionAddress_t = CFUNCTYPE( ze_result_t, zes_driver_handle_t, c_char_p, POINTER(c_void_p) ) - - -############################################################################### -## @brief Table of Driver functions pointers -class _zes_driver_dditable_t(Structure): - _fields_ = [ - ("pfnEventListen", c_void_p), ## _zesDriverEventListen_t - ("pfnEventListenEx", c_void_p), ## _zesDriverEventListenEx_t - ("pfnGet", c_void_p), ## _zesDriverGet_t - ("pfnGetExtensionProperties", c_void_p), ## _zesDriverGetExtensionProperties_t - ("pfnGetExtensionFunctionAddress", c_void_p) ## _zesDriverGetExtensionFunctionAddress_t - ] - -############################################################################### -## @brief Function-pointer for zesDriverGetDeviceByUuidExp -if __use_win_types: - _zesDriverGetDeviceByUuidExp_t = WINFUNCTYPE( ze_result_t, zes_driver_handle_t, zes_uuid_t, POINTER(zes_device_handle_t), POINTER(ze_bool_t), POINTER(c_ulong) ) -else: - _zesDriverGetDeviceByUuidExp_t = CFUNCTYPE( ze_result_t, zes_driver_handle_t, zes_uuid_t, POINTER(zes_device_handle_t), POINTER(ze_bool_t), POINTER(c_ulong) ) - - -############################################################################### -## @brief Table of DriverExp functions pointers -class _zes_driver_exp_dditable_t(Structure): - _fields_ = [ - ("pfnGetDeviceByUuidExp", c_void_p) ## _zesDriverGetDeviceByUuidExp_t - ] - -############################################################################### -## @brief Function-pointer for zesOverclockGetDomainProperties -if __use_win_types: - _zesOverclockGetDomainProperties_t = WINFUNCTYPE( ze_result_t, zes_overclock_handle_t, POINTER(zes_overclock_properties_t) ) -else: - _zesOverclockGetDomainProperties_t = CFUNCTYPE( ze_result_t, zes_overclock_handle_t, POINTER(zes_overclock_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesOverclockGetDomainVFProperties -if __use_win_types: - _zesOverclockGetDomainVFProperties_t = WINFUNCTYPE( ze_result_t, zes_overclock_handle_t, POINTER(zes_vf_property_t) ) -else: - _zesOverclockGetDomainVFProperties_t = CFUNCTYPE( ze_result_t, zes_overclock_handle_t, POINTER(zes_vf_property_t) ) - -############################################################################### -## @brief Function-pointer for zesOverclockGetDomainControlProperties -if __use_win_types: - _zesOverclockGetDomainControlProperties_t = WINFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_overclock_control_t, POINTER(zes_control_property_t) ) -else: - _zesOverclockGetDomainControlProperties_t = CFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_overclock_control_t, POINTER(zes_control_property_t) ) - -############################################################################### -## @brief Function-pointer for zesOverclockGetControlCurrentValue -if __use_win_types: - _zesOverclockGetControlCurrentValue_t = WINFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_overclock_control_t, POINTER(c_double) ) -else: - _zesOverclockGetControlCurrentValue_t = CFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_overclock_control_t, POINTER(c_double) ) - -############################################################################### -## @brief Function-pointer for zesOverclockGetControlPendingValue -if __use_win_types: - _zesOverclockGetControlPendingValue_t = WINFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_overclock_control_t, POINTER(c_double) ) -else: - _zesOverclockGetControlPendingValue_t = CFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_overclock_control_t, POINTER(c_double) ) - -############################################################################### -## @brief Function-pointer for zesOverclockSetControlUserValue -if __use_win_types: - _zesOverclockSetControlUserValue_t = WINFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_overclock_control_t, c_double, POINTER(zes_pending_action_t) ) -else: - _zesOverclockSetControlUserValue_t = CFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_overclock_control_t, c_double, POINTER(zes_pending_action_t) ) - -############################################################################### -## @brief Function-pointer for zesOverclockGetControlState -if __use_win_types: - _zesOverclockGetControlState_t = WINFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_overclock_control_t, POINTER(zes_control_state_t), POINTER(zes_pending_action_t) ) -else: - _zesOverclockGetControlState_t = CFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_overclock_control_t, POINTER(zes_control_state_t), POINTER(zes_pending_action_t) ) - -############################################################################### -## @brief Function-pointer for zesOverclockGetVFPointValues -if __use_win_types: - _zesOverclockGetVFPointValues_t = WINFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_vf_type_t, zes_vf_array_type_t, c_ulong, POINTER(c_ulong) ) -else: - _zesOverclockGetVFPointValues_t = CFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_vf_type_t, zes_vf_array_type_t, c_ulong, POINTER(c_ulong) ) - -############################################################################### -## @brief Function-pointer for zesOverclockSetVFPointValues -if __use_win_types: - _zesOverclockSetVFPointValues_t = WINFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_vf_type_t, c_ulong, c_ulong ) -else: - _zesOverclockSetVFPointValues_t = CFUNCTYPE( ze_result_t, zes_overclock_handle_t, zes_vf_type_t, c_ulong, c_ulong ) - - -############################################################################### -## @brief Table of Overclock functions pointers -class _zes_overclock_dditable_t(Structure): - _fields_ = [ - ("pfnGetDomainProperties", c_void_p), ## _zesOverclockGetDomainProperties_t - ("pfnGetDomainVFProperties", c_void_p), ## _zesOverclockGetDomainVFProperties_t - ("pfnGetDomainControlProperties", c_void_p), ## _zesOverclockGetDomainControlProperties_t - ("pfnGetControlCurrentValue", c_void_p), ## _zesOverclockGetControlCurrentValue_t - ("pfnGetControlPendingValue", c_void_p), ## _zesOverclockGetControlPendingValue_t - ("pfnSetControlUserValue", c_void_p), ## _zesOverclockSetControlUserValue_t - ("pfnGetControlState", c_void_p), ## _zesOverclockGetControlState_t - ("pfnGetVFPointValues", c_void_p), ## _zesOverclockGetVFPointValues_t - ("pfnSetVFPointValues", c_void_p) ## _zesOverclockSetVFPointValues_t - ] - -############################################################################### -## @brief Function-pointer for zesSchedulerGetProperties -if __use_win_types: - _zesSchedulerGetProperties_t = WINFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(zes_sched_properties_t) ) -else: - _zesSchedulerGetProperties_t = CFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(zes_sched_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesSchedulerGetCurrentMode -if __use_win_types: - _zesSchedulerGetCurrentMode_t = WINFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(zes_sched_mode_t) ) -else: - _zesSchedulerGetCurrentMode_t = CFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(zes_sched_mode_t) ) - -############################################################################### -## @brief Function-pointer for zesSchedulerGetTimeoutModeProperties -if __use_win_types: - _zesSchedulerGetTimeoutModeProperties_t = WINFUNCTYPE( ze_result_t, zes_sched_handle_t, ze_bool_t, POINTER(zes_sched_timeout_properties_t) ) -else: - _zesSchedulerGetTimeoutModeProperties_t = CFUNCTYPE( ze_result_t, zes_sched_handle_t, ze_bool_t, POINTER(zes_sched_timeout_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesSchedulerGetTimesliceModeProperties -if __use_win_types: - _zesSchedulerGetTimesliceModeProperties_t = WINFUNCTYPE( ze_result_t, zes_sched_handle_t, ze_bool_t, POINTER(zes_sched_timeslice_properties_t) ) -else: - _zesSchedulerGetTimesliceModeProperties_t = CFUNCTYPE( ze_result_t, zes_sched_handle_t, ze_bool_t, POINTER(zes_sched_timeslice_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesSchedulerSetTimeoutMode -if __use_win_types: - _zesSchedulerSetTimeoutMode_t = WINFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(zes_sched_timeout_properties_t), POINTER(ze_bool_t) ) -else: - _zesSchedulerSetTimeoutMode_t = CFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(zes_sched_timeout_properties_t), POINTER(ze_bool_t) ) - -############################################################################### -## @brief Function-pointer for zesSchedulerSetTimesliceMode -if __use_win_types: - _zesSchedulerSetTimesliceMode_t = WINFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(zes_sched_timeslice_properties_t), POINTER(ze_bool_t) ) -else: - _zesSchedulerSetTimesliceMode_t = CFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(zes_sched_timeslice_properties_t), POINTER(ze_bool_t) ) - -############################################################################### -## @brief Function-pointer for zesSchedulerSetExclusiveMode -if __use_win_types: - _zesSchedulerSetExclusiveMode_t = WINFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(ze_bool_t) ) -else: - _zesSchedulerSetExclusiveMode_t = CFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(ze_bool_t) ) - -############################################################################### -## @brief Function-pointer for zesSchedulerSetComputeUnitDebugMode -if __use_win_types: - _zesSchedulerSetComputeUnitDebugMode_t = WINFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(ze_bool_t) ) -else: - _zesSchedulerSetComputeUnitDebugMode_t = CFUNCTYPE( ze_result_t, zes_sched_handle_t, POINTER(ze_bool_t) ) - - -############################################################################### -## @brief Table of Scheduler functions pointers -class _zes_scheduler_dditable_t(Structure): - _fields_ = [ - ("pfnGetProperties", c_void_p), ## _zesSchedulerGetProperties_t - ("pfnGetCurrentMode", c_void_p), ## _zesSchedulerGetCurrentMode_t - ("pfnGetTimeoutModeProperties", c_void_p), ## _zesSchedulerGetTimeoutModeProperties_t - ("pfnGetTimesliceModeProperties", c_void_p), ## _zesSchedulerGetTimesliceModeProperties_t - ("pfnSetTimeoutMode", c_void_p), ## _zesSchedulerSetTimeoutMode_t - ("pfnSetTimesliceMode", c_void_p), ## _zesSchedulerSetTimesliceMode_t - ("pfnSetExclusiveMode", c_void_p), ## _zesSchedulerSetExclusiveMode_t - ("pfnSetComputeUnitDebugMode", c_void_p) ## _zesSchedulerSetComputeUnitDebugMode_t - ] - -############################################################################### -## @brief Function-pointer for zesPerformanceFactorGetProperties -if __use_win_types: - _zesPerformanceFactorGetProperties_t = WINFUNCTYPE( ze_result_t, zes_perf_handle_t, POINTER(zes_perf_properties_t) ) -else: - _zesPerformanceFactorGetProperties_t = CFUNCTYPE( ze_result_t, zes_perf_handle_t, POINTER(zes_perf_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesPerformanceFactorGetConfig -if __use_win_types: - _zesPerformanceFactorGetConfig_t = WINFUNCTYPE( ze_result_t, zes_perf_handle_t, POINTER(c_double) ) -else: - _zesPerformanceFactorGetConfig_t = CFUNCTYPE( ze_result_t, zes_perf_handle_t, POINTER(c_double) ) - -############################################################################### -## @brief Function-pointer for zesPerformanceFactorSetConfig -if __use_win_types: - _zesPerformanceFactorSetConfig_t = WINFUNCTYPE( ze_result_t, zes_perf_handle_t, c_double ) -else: - _zesPerformanceFactorSetConfig_t = CFUNCTYPE( ze_result_t, zes_perf_handle_t, c_double ) - - -############################################################################### -## @brief Table of PerformanceFactor functions pointers -class _zes_performance_factor_dditable_t(Structure): - _fields_ = [ - ("pfnGetProperties", c_void_p), ## _zesPerformanceFactorGetProperties_t - ("pfnGetConfig", c_void_p), ## _zesPerformanceFactorGetConfig_t - ("pfnSetConfig", c_void_p) ## _zesPerformanceFactorSetConfig_t - ] - -############################################################################### -## @brief Function-pointer for zesPowerGetProperties -if __use_win_types: - _zesPowerGetProperties_t = WINFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(zes_power_properties_t) ) -else: - _zesPowerGetProperties_t = CFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(zes_power_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesPowerGetEnergyCounter -if __use_win_types: - _zesPowerGetEnergyCounter_t = WINFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(zes_power_energy_counter_t) ) -else: - _zesPowerGetEnergyCounter_t = CFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(zes_power_energy_counter_t) ) - -############################################################################### -## @brief Function-pointer for zesPowerGetLimits -if __use_win_types: - _zesPowerGetLimits_t = WINFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(zes_power_sustained_limit_t), POINTER(zes_power_burst_limit_t), POINTER(zes_power_peak_limit_t) ) -else: - _zesPowerGetLimits_t = CFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(zes_power_sustained_limit_t), POINTER(zes_power_burst_limit_t), POINTER(zes_power_peak_limit_t) ) - -############################################################################### -## @brief Function-pointer for zesPowerSetLimits -if __use_win_types: - _zesPowerSetLimits_t = WINFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(zes_power_sustained_limit_t), POINTER(zes_power_burst_limit_t), POINTER(zes_power_peak_limit_t) ) -else: - _zesPowerSetLimits_t = CFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(zes_power_sustained_limit_t), POINTER(zes_power_burst_limit_t), POINTER(zes_power_peak_limit_t) ) - -############################################################################### -## @brief Function-pointer for zesPowerGetEnergyThreshold -if __use_win_types: - _zesPowerGetEnergyThreshold_t = WINFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(zes_energy_threshold_t) ) -else: - _zesPowerGetEnergyThreshold_t = CFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(zes_energy_threshold_t) ) - -############################################################################### -## @brief Function-pointer for zesPowerSetEnergyThreshold -if __use_win_types: - _zesPowerSetEnergyThreshold_t = WINFUNCTYPE( ze_result_t, zes_pwr_handle_t, c_double ) -else: - _zesPowerSetEnergyThreshold_t = CFUNCTYPE( ze_result_t, zes_pwr_handle_t, c_double ) - -############################################################################### -## @brief Function-pointer for zesPowerGetLimitsExt -if __use_win_types: - _zesPowerGetLimitsExt_t = WINFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(c_ulong), POINTER(zes_power_limit_ext_desc_t) ) -else: - _zesPowerGetLimitsExt_t = CFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(c_ulong), POINTER(zes_power_limit_ext_desc_t) ) - -############################################################################### -## @brief Function-pointer for zesPowerSetLimitsExt -if __use_win_types: - _zesPowerSetLimitsExt_t = WINFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(c_ulong), POINTER(zes_power_limit_ext_desc_t) ) -else: - _zesPowerSetLimitsExt_t = CFUNCTYPE( ze_result_t, zes_pwr_handle_t, POINTER(c_ulong), POINTER(zes_power_limit_ext_desc_t) ) - - -############################################################################### -## @brief Table of Power functions pointers -class _zes_power_dditable_t(Structure): - _fields_ = [ - ("pfnGetProperties", c_void_p), ## _zesPowerGetProperties_t - ("pfnGetEnergyCounter", c_void_p), ## _zesPowerGetEnergyCounter_t - ("pfnGetLimits", c_void_p), ## _zesPowerGetLimits_t - ("pfnSetLimits", c_void_p), ## _zesPowerSetLimits_t - ("pfnGetEnergyThreshold", c_void_p), ## _zesPowerGetEnergyThreshold_t - ("pfnSetEnergyThreshold", c_void_p), ## _zesPowerSetEnergyThreshold_t - ("pfnGetLimitsExt", c_void_p), ## _zesPowerGetLimitsExt_t - ("pfnSetLimitsExt", c_void_p) ## _zesPowerSetLimitsExt_t - ] - -############################################################################### -## @brief Function-pointer for zesFrequencyGetProperties -if __use_win_types: - _zesFrequencyGetProperties_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_freq_properties_t) ) -else: - _zesFrequencyGetProperties_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_freq_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesFrequencyGetAvailableClocks -if __use_win_types: - _zesFrequencyGetAvailableClocks_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(c_ulong), POINTER(c_double) ) -else: - _zesFrequencyGetAvailableClocks_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(c_ulong), POINTER(c_double) ) - -############################################################################### -## @brief Function-pointer for zesFrequencyGetRange -if __use_win_types: - _zesFrequencyGetRange_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_freq_range_t) ) -else: - _zesFrequencyGetRange_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_freq_range_t) ) - -############################################################################### -## @brief Function-pointer for zesFrequencySetRange -if __use_win_types: - _zesFrequencySetRange_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_freq_range_t) ) -else: - _zesFrequencySetRange_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_freq_range_t) ) - -############################################################################### -## @brief Function-pointer for zesFrequencyGetState -if __use_win_types: - _zesFrequencyGetState_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_freq_state_t) ) -else: - _zesFrequencyGetState_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_freq_state_t) ) - -############################################################################### -## @brief Function-pointer for zesFrequencyGetThrottleTime -if __use_win_types: - _zesFrequencyGetThrottleTime_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_freq_throttle_time_t) ) -else: - _zesFrequencyGetThrottleTime_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_freq_throttle_time_t) ) - -############################################################################### -## @brief Function-pointer for zesFrequencyOcGetCapabilities -if __use_win_types: - _zesFrequencyOcGetCapabilities_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_oc_capabilities_t) ) -else: - _zesFrequencyOcGetCapabilities_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_oc_capabilities_t) ) - -############################################################################### -## @brief Function-pointer for zesFrequencyOcGetFrequencyTarget -if __use_win_types: - _zesFrequencyOcGetFrequencyTarget_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(c_double) ) -else: - _zesFrequencyOcGetFrequencyTarget_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(c_double) ) - -############################################################################### -## @brief Function-pointer for zesFrequencyOcSetFrequencyTarget -if __use_win_types: - _zesFrequencyOcSetFrequencyTarget_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, c_double ) -else: - _zesFrequencyOcSetFrequencyTarget_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, c_double ) - -############################################################################### -## @brief Function-pointer for zesFrequencyOcGetVoltageTarget -if __use_win_types: - _zesFrequencyOcGetVoltageTarget_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(c_double), POINTER(c_double) ) -else: - _zesFrequencyOcGetVoltageTarget_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(c_double), POINTER(c_double) ) - -############################################################################### -## @brief Function-pointer for zesFrequencyOcSetVoltageTarget -if __use_win_types: - _zesFrequencyOcSetVoltageTarget_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, c_double, c_double ) -else: - _zesFrequencyOcSetVoltageTarget_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, c_double, c_double ) - -############################################################################### -## @brief Function-pointer for zesFrequencyOcSetMode -if __use_win_types: - _zesFrequencyOcSetMode_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, zes_oc_mode_t ) -else: - _zesFrequencyOcSetMode_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, zes_oc_mode_t ) - -############################################################################### -## @brief Function-pointer for zesFrequencyOcGetMode -if __use_win_types: - _zesFrequencyOcGetMode_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_oc_mode_t) ) -else: - _zesFrequencyOcGetMode_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(zes_oc_mode_t) ) - -############################################################################### -## @brief Function-pointer for zesFrequencyOcGetIccMax -if __use_win_types: - _zesFrequencyOcGetIccMax_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(c_double) ) -else: - _zesFrequencyOcGetIccMax_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(c_double) ) - -############################################################################### -## @brief Function-pointer for zesFrequencyOcSetIccMax -if __use_win_types: - _zesFrequencyOcSetIccMax_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, c_double ) -else: - _zesFrequencyOcSetIccMax_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, c_double ) - -############################################################################### -## @brief Function-pointer for zesFrequencyOcGetTjMax -if __use_win_types: - _zesFrequencyOcGetTjMax_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(c_double) ) -else: - _zesFrequencyOcGetTjMax_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, POINTER(c_double) ) - -############################################################################### -## @brief Function-pointer for zesFrequencyOcSetTjMax -if __use_win_types: - _zesFrequencyOcSetTjMax_t = WINFUNCTYPE( ze_result_t, zes_freq_handle_t, c_double ) -else: - _zesFrequencyOcSetTjMax_t = CFUNCTYPE( ze_result_t, zes_freq_handle_t, c_double ) - - -############################################################################### -## @brief Table of Frequency functions pointers -class _zes_frequency_dditable_t(Structure): - _fields_ = [ - ("pfnGetProperties", c_void_p), ## _zesFrequencyGetProperties_t - ("pfnGetAvailableClocks", c_void_p), ## _zesFrequencyGetAvailableClocks_t - ("pfnGetRange", c_void_p), ## _zesFrequencyGetRange_t - ("pfnSetRange", c_void_p), ## _zesFrequencySetRange_t - ("pfnGetState", c_void_p), ## _zesFrequencyGetState_t - ("pfnGetThrottleTime", c_void_p), ## _zesFrequencyGetThrottleTime_t - ("pfnOcGetCapabilities", c_void_p), ## _zesFrequencyOcGetCapabilities_t - ("pfnOcGetFrequencyTarget", c_void_p), ## _zesFrequencyOcGetFrequencyTarget_t - ("pfnOcSetFrequencyTarget", c_void_p), ## _zesFrequencyOcSetFrequencyTarget_t - ("pfnOcGetVoltageTarget", c_void_p), ## _zesFrequencyOcGetVoltageTarget_t - ("pfnOcSetVoltageTarget", c_void_p), ## _zesFrequencyOcSetVoltageTarget_t - ("pfnOcSetMode", c_void_p), ## _zesFrequencyOcSetMode_t - ("pfnOcGetMode", c_void_p), ## _zesFrequencyOcGetMode_t - ("pfnOcGetIccMax", c_void_p), ## _zesFrequencyOcGetIccMax_t - ("pfnOcSetIccMax", c_void_p), ## _zesFrequencyOcSetIccMax_t - ("pfnOcGetTjMax", c_void_p), ## _zesFrequencyOcGetTjMax_t - ("pfnOcSetTjMax", c_void_p) ## _zesFrequencyOcSetTjMax_t - ] - -############################################################################### -## @brief Function-pointer for zesEngineGetProperties -if __use_win_types: - _zesEngineGetProperties_t = WINFUNCTYPE( ze_result_t, zes_engine_handle_t, POINTER(zes_engine_properties_t) ) -else: - _zesEngineGetProperties_t = CFUNCTYPE( ze_result_t, zes_engine_handle_t, POINTER(zes_engine_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesEngineGetActivity -if __use_win_types: - _zesEngineGetActivity_t = WINFUNCTYPE( ze_result_t, zes_engine_handle_t, POINTER(zes_engine_stats_t) ) -else: - _zesEngineGetActivity_t = CFUNCTYPE( ze_result_t, zes_engine_handle_t, POINTER(zes_engine_stats_t) ) - -############################################################################### -## @brief Function-pointer for zesEngineGetActivityExt -if __use_win_types: - _zesEngineGetActivityExt_t = WINFUNCTYPE( ze_result_t, zes_engine_handle_t, POINTER(c_ulong), POINTER(zes_engine_stats_t) ) -else: - _zesEngineGetActivityExt_t = CFUNCTYPE( ze_result_t, zes_engine_handle_t, POINTER(c_ulong), POINTER(zes_engine_stats_t) ) - - -############################################################################### -## @brief Table of Engine functions pointers -class _zes_engine_dditable_t(Structure): - _fields_ = [ - ("pfnGetProperties", c_void_p), ## _zesEngineGetProperties_t - ("pfnGetActivity", c_void_p), ## _zesEngineGetActivity_t - ("pfnGetActivityExt", c_void_p) ## _zesEngineGetActivityExt_t - ] - -############################################################################### -## @brief Function-pointer for zesStandbyGetProperties -if __use_win_types: - _zesStandbyGetProperties_t = WINFUNCTYPE( ze_result_t, zes_standby_handle_t, POINTER(zes_standby_properties_t) ) -else: - _zesStandbyGetProperties_t = CFUNCTYPE( ze_result_t, zes_standby_handle_t, POINTER(zes_standby_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesStandbyGetMode -if __use_win_types: - _zesStandbyGetMode_t = WINFUNCTYPE( ze_result_t, zes_standby_handle_t, POINTER(zes_standby_promo_mode_t) ) -else: - _zesStandbyGetMode_t = CFUNCTYPE( ze_result_t, zes_standby_handle_t, POINTER(zes_standby_promo_mode_t) ) - -############################################################################### -## @brief Function-pointer for zesStandbySetMode -if __use_win_types: - _zesStandbySetMode_t = WINFUNCTYPE( ze_result_t, zes_standby_handle_t, zes_standby_promo_mode_t ) -else: - _zesStandbySetMode_t = CFUNCTYPE( ze_result_t, zes_standby_handle_t, zes_standby_promo_mode_t ) - - -############################################################################### -## @brief Table of Standby functions pointers -class _zes_standby_dditable_t(Structure): - _fields_ = [ - ("pfnGetProperties", c_void_p), ## _zesStandbyGetProperties_t - ("pfnGetMode", c_void_p), ## _zesStandbyGetMode_t - ("pfnSetMode", c_void_p) ## _zesStandbySetMode_t - ] - -############################################################################### -## @brief Function-pointer for zesFirmwareGetProperties -if __use_win_types: - _zesFirmwareGetProperties_t = WINFUNCTYPE( ze_result_t, zes_firmware_handle_t, POINTER(zes_firmware_properties_t) ) -else: - _zesFirmwareGetProperties_t = CFUNCTYPE( ze_result_t, zes_firmware_handle_t, POINTER(zes_firmware_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesFirmwareFlash -if __use_win_types: - _zesFirmwareFlash_t = WINFUNCTYPE( ze_result_t, zes_firmware_handle_t, c_void_p, c_ulong ) -else: - _zesFirmwareFlash_t = CFUNCTYPE( ze_result_t, zes_firmware_handle_t, c_void_p, c_ulong ) - -############################################################################### -## @brief Function-pointer for zesFirmwareGetFlashProgress -if __use_win_types: - _zesFirmwareGetFlashProgress_t = WINFUNCTYPE( ze_result_t, zes_firmware_handle_t, POINTER(c_ulong) ) -else: - _zesFirmwareGetFlashProgress_t = CFUNCTYPE( ze_result_t, zes_firmware_handle_t, POINTER(c_ulong) ) - -############################################################################### -## @brief Function-pointer for zesFirmwareGetConsoleLogs -if __use_win_types: - _zesFirmwareGetConsoleLogs_t = WINFUNCTYPE( ze_result_t, zes_firmware_handle_t, POINTER(c_size_t), c_char_p ) -else: - _zesFirmwareGetConsoleLogs_t = CFUNCTYPE( ze_result_t, zes_firmware_handle_t, POINTER(c_size_t), c_char_p ) - - -############################################################################### -## @brief Table of Firmware functions pointers -class _zes_firmware_dditable_t(Structure): - _fields_ = [ - ("pfnGetProperties", c_void_p), ## _zesFirmwareGetProperties_t - ("pfnFlash", c_void_p), ## _zesFirmwareFlash_t - ("pfnGetFlashProgress", c_void_p), ## _zesFirmwareGetFlashProgress_t - ("pfnGetConsoleLogs", c_void_p) ## _zesFirmwareGetConsoleLogs_t - ] - -############################################################################### -## @brief Function-pointer for zesFirmwareGetSecurityVersionExp -if __use_win_types: - _zesFirmwareGetSecurityVersionExp_t = WINFUNCTYPE( ze_result_t, zes_firmware_handle_t, c_char_p ) -else: - _zesFirmwareGetSecurityVersionExp_t = CFUNCTYPE( ze_result_t, zes_firmware_handle_t, c_char_p ) - -############################################################################### -## @brief Function-pointer for zesFirmwareSetSecurityVersionExp -if __use_win_types: - _zesFirmwareSetSecurityVersionExp_t = WINFUNCTYPE( ze_result_t, zes_firmware_handle_t ) -else: - _zesFirmwareSetSecurityVersionExp_t = CFUNCTYPE( ze_result_t, zes_firmware_handle_t ) - - -############################################################################### -## @brief Table of FirmwareExp functions pointers -class _zes_firmware_exp_dditable_t(Structure): - _fields_ = [ - ("pfnGetSecurityVersionExp", c_void_p), ## _zesFirmwareGetSecurityVersionExp_t - ("pfnSetSecurityVersionExp", c_void_p) ## _zesFirmwareSetSecurityVersionExp_t - ] - -############################################################################### -## @brief Function-pointer for zesMemoryGetProperties -if __use_win_types: - _zesMemoryGetProperties_t = WINFUNCTYPE( ze_result_t, zes_mem_handle_t, POINTER(zes_mem_properties_t) ) -else: - _zesMemoryGetProperties_t = CFUNCTYPE( ze_result_t, zes_mem_handle_t, POINTER(zes_mem_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesMemoryGetState -if __use_win_types: - _zesMemoryGetState_t = WINFUNCTYPE( ze_result_t, zes_mem_handle_t, POINTER(zes_mem_state_t) ) -else: - _zesMemoryGetState_t = CFUNCTYPE( ze_result_t, zes_mem_handle_t, POINTER(zes_mem_state_t) ) - -############################################################################### -## @brief Function-pointer for zesMemoryGetBandwidth -if __use_win_types: - _zesMemoryGetBandwidth_t = WINFUNCTYPE( ze_result_t, zes_mem_handle_t, POINTER(zes_mem_bandwidth_t) ) -else: - _zesMemoryGetBandwidth_t = CFUNCTYPE( ze_result_t, zes_mem_handle_t, POINTER(zes_mem_bandwidth_t) ) - - -############################################################################### -## @brief Table of Memory functions pointers -class _zes_memory_dditable_t(Structure): - _fields_ = [ - ("pfnGetProperties", c_void_p), ## _zesMemoryGetProperties_t - ("pfnGetState", c_void_p), ## _zesMemoryGetState_t - ("pfnGetBandwidth", c_void_p) ## _zesMemoryGetBandwidth_t - ] - -############################################################################### -## @brief Function-pointer for zesFabricPortGetProperties -if __use_win_types: - _zesFabricPortGetProperties_t = WINFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_properties_t) ) -else: - _zesFabricPortGetProperties_t = CFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesFabricPortGetLinkType -if __use_win_types: - _zesFabricPortGetLinkType_t = WINFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_link_type_t) ) -else: - _zesFabricPortGetLinkType_t = CFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_link_type_t) ) - -############################################################################### -## @brief Function-pointer for zesFabricPortGetConfig -if __use_win_types: - _zesFabricPortGetConfig_t = WINFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_config_t) ) -else: - _zesFabricPortGetConfig_t = CFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_config_t) ) - -############################################################################### -## @brief Function-pointer for zesFabricPortSetConfig -if __use_win_types: - _zesFabricPortSetConfig_t = WINFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_config_t) ) -else: - _zesFabricPortSetConfig_t = CFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_config_t) ) - -############################################################################### -## @brief Function-pointer for zesFabricPortGetState -if __use_win_types: - _zesFabricPortGetState_t = WINFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_state_t) ) -else: - _zesFabricPortGetState_t = CFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_state_t) ) - -############################################################################### -## @brief Function-pointer for zesFabricPortGetThroughput -if __use_win_types: - _zesFabricPortGetThroughput_t = WINFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_throughput_t) ) -else: - _zesFabricPortGetThroughput_t = CFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_throughput_t) ) - -############################################################################### -## @brief Function-pointer for zesFabricPortGetFabricErrorCounters -if __use_win_types: - _zesFabricPortGetFabricErrorCounters_t = WINFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_error_counters_t) ) -else: - _zesFabricPortGetFabricErrorCounters_t = CFUNCTYPE( ze_result_t, zes_fabric_port_handle_t, POINTER(zes_fabric_port_error_counters_t) ) - -############################################################################### -## @brief Function-pointer for zesFabricPortGetMultiPortThroughput -if __use_win_types: - _zesFabricPortGetMultiPortThroughput_t = WINFUNCTYPE( ze_result_t, zes_device_handle_t, c_ulong, POINTER(zes_fabric_port_handle_t), POINTER(zes_fabric_port_throughput_t*) ) -else: - _zesFabricPortGetMultiPortThroughput_t = CFUNCTYPE( ze_result_t, zes_device_handle_t, c_ulong, POINTER(zes_fabric_port_handle_t), POINTER(zes_fabric_port_throughput_t*) ) - - -############################################################################### -## @brief Table of FabricPort functions pointers -class _zes_fabric_port_dditable_t(Structure): - _fields_ = [ - ("pfnGetProperties", c_void_p), ## _zesFabricPortGetProperties_t - ("pfnGetLinkType", c_void_p), ## _zesFabricPortGetLinkType_t - ("pfnGetConfig", c_void_p), ## _zesFabricPortGetConfig_t - ("pfnSetConfig", c_void_p), ## _zesFabricPortSetConfig_t - ("pfnGetState", c_void_p), ## _zesFabricPortGetState_t - ("pfnGetThroughput", c_void_p), ## _zesFabricPortGetThroughput_t - ("pfnGetFabricErrorCounters", c_void_p), ## _zesFabricPortGetFabricErrorCounters_t - ("pfnGetMultiPortThroughput", c_void_p) ## _zesFabricPortGetMultiPortThroughput_t - ] - -############################################################################### -## @brief Function-pointer for zesTemperatureGetProperties -if __use_win_types: - _zesTemperatureGetProperties_t = WINFUNCTYPE( ze_result_t, zes_temp_handle_t, POINTER(zes_temp_properties_t) ) -else: - _zesTemperatureGetProperties_t = CFUNCTYPE( ze_result_t, zes_temp_handle_t, POINTER(zes_temp_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesTemperatureGetConfig -if __use_win_types: - _zesTemperatureGetConfig_t = WINFUNCTYPE( ze_result_t, zes_temp_handle_t, POINTER(zes_temp_config_t) ) -else: - _zesTemperatureGetConfig_t = CFUNCTYPE( ze_result_t, zes_temp_handle_t, POINTER(zes_temp_config_t) ) - -############################################################################### -## @brief Function-pointer for zesTemperatureSetConfig -if __use_win_types: - _zesTemperatureSetConfig_t = WINFUNCTYPE( ze_result_t, zes_temp_handle_t, POINTER(zes_temp_config_t) ) -else: - _zesTemperatureSetConfig_t = CFUNCTYPE( ze_result_t, zes_temp_handle_t, POINTER(zes_temp_config_t) ) - -############################################################################### -## @brief Function-pointer for zesTemperatureGetState -if __use_win_types: - _zesTemperatureGetState_t = WINFUNCTYPE( ze_result_t, zes_temp_handle_t, POINTER(c_double) ) -else: - _zesTemperatureGetState_t = CFUNCTYPE( ze_result_t, zes_temp_handle_t, POINTER(c_double) ) - - -############################################################################### -## @brief Table of Temperature functions pointers -class _zes_temperature_dditable_t(Structure): - _fields_ = [ - ("pfnGetProperties", c_void_p), ## _zesTemperatureGetProperties_t - ("pfnGetConfig", c_void_p), ## _zesTemperatureGetConfig_t - ("pfnSetConfig", c_void_p), ## _zesTemperatureSetConfig_t - ("pfnGetState", c_void_p) ## _zesTemperatureGetState_t - ] - -############################################################################### -## @brief Function-pointer for zesPsuGetProperties -if __use_win_types: - _zesPsuGetProperties_t = WINFUNCTYPE( ze_result_t, zes_psu_handle_t, POINTER(zes_psu_properties_t) ) -else: - _zesPsuGetProperties_t = CFUNCTYPE( ze_result_t, zes_psu_handle_t, POINTER(zes_psu_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesPsuGetState -if __use_win_types: - _zesPsuGetState_t = WINFUNCTYPE( ze_result_t, zes_psu_handle_t, POINTER(zes_psu_state_t) ) -else: - _zesPsuGetState_t = CFUNCTYPE( ze_result_t, zes_psu_handle_t, POINTER(zes_psu_state_t) ) - - -############################################################################### -## @brief Table of Psu functions pointers -class _zes_psu_dditable_t(Structure): - _fields_ = [ - ("pfnGetProperties", c_void_p), ## _zesPsuGetProperties_t - ("pfnGetState", c_void_p) ## _zesPsuGetState_t - ] - -############################################################################### -## @brief Function-pointer for zesFanGetProperties -if __use_win_types: - _zesFanGetProperties_t = WINFUNCTYPE( ze_result_t, zes_fan_handle_t, POINTER(zes_fan_properties_t) ) -else: - _zesFanGetProperties_t = CFUNCTYPE( ze_result_t, zes_fan_handle_t, POINTER(zes_fan_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesFanGetConfig -if __use_win_types: - _zesFanGetConfig_t = WINFUNCTYPE( ze_result_t, zes_fan_handle_t, POINTER(zes_fan_config_t) ) -else: - _zesFanGetConfig_t = CFUNCTYPE( ze_result_t, zes_fan_handle_t, POINTER(zes_fan_config_t) ) - -############################################################################### -## @brief Function-pointer for zesFanSetDefaultMode -if __use_win_types: - _zesFanSetDefaultMode_t = WINFUNCTYPE( ze_result_t, zes_fan_handle_t ) -else: - _zesFanSetDefaultMode_t = CFUNCTYPE( ze_result_t, zes_fan_handle_t ) - -############################################################################### -## @brief Function-pointer for zesFanSetFixedSpeedMode -if __use_win_types: - _zesFanSetFixedSpeedMode_t = WINFUNCTYPE( ze_result_t, zes_fan_handle_t, POINTER(zes_fan_speed_t) ) -else: - _zesFanSetFixedSpeedMode_t = CFUNCTYPE( ze_result_t, zes_fan_handle_t, POINTER(zes_fan_speed_t) ) - -############################################################################### -## @brief Function-pointer for zesFanSetSpeedTableMode -if __use_win_types: - _zesFanSetSpeedTableMode_t = WINFUNCTYPE( ze_result_t, zes_fan_handle_t, POINTER(zes_fan_speed_table_t) ) -else: - _zesFanSetSpeedTableMode_t = CFUNCTYPE( ze_result_t, zes_fan_handle_t, POINTER(zes_fan_speed_table_t) ) - -############################################################################### -## @brief Function-pointer for zesFanGetState -if __use_win_types: - _zesFanGetState_t = WINFUNCTYPE( ze_result_t, zes_fan_handle_t, zes_fan_speed_units_t, POINTER(c_int32_t) ) -else: - _zesFanGetState_t = CFUNCTYPE( ze_result_t, zes_fan_handle_t, zes_fan_speed_units_t, POINTER(c_int32_t) ) - - -############################################################################### -## @brief Table of Fan functions pointers -class _zes_fan_dditable_t(Structure): - _fields_ = [ - ("pfnGetProperties", c_void_p), ## _zesFanGetProperties_t - ("pfnGetConfig", c_void_p), ## _zesFanGetConfig_t - ("pfnSetDefaultMode", c_void_p), ## _zesFanSetDefaultMode_t - ("pfnSetFixedSpeedMode", c_void_p), ## _zesFanSetFixedSpeedMode_t - ("pfnSetSpeedTableMode", c_void_p), ## _zesFanSetSpeedTableMode_t - ("pfnGetState", c_void_p) ## _zesFanGetState_t - ] - -############################################################################### -## @brief Function-pointer for zesLedGetProperties -if __use_win_types: - _zesLedGetProperties_t = WINFUNCTYPE( ze_result_t, zes_led_handle_t, POINTER(zes_led_properties_t) ) -else: - _zesLedGetProperties_t = CFUNCTYPE( ze_result_t, zes_led_handle_t, POINTER(zes_led_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesLedGetState -if __use_win_types: - _zesLedGetState_t = WINFUNCTYPE( ze_result_t, zes_led_handle_t, POINTER(zes_led_state_t) ) -else: - _zesLedGetState_t = CFUNCTYPE( ze_result_t, zes_led_handle_t, POINTER(zes_led_state_t) ) - -############################################################################### -## @brief Function-pointer for zesLedSetState -if __use_win_types: - _zesLedSetState_t = WINFUNCTYPE( ze_result_t, zes_led_handle_t, ze_bool_t ) -else: - _zesLedSetState_t = CFUNCTYPE( ze_result_t, zes_led_handle_t, ze_bool_t ) - -############################################################################### -## @brief Function-pointer for zesLedSetColor -if __use_win_types: - _zesLedSetColor_t = WINFUNCTYPE( ze_result_t, zes_led_handle_t, POINTER(zes_led_color_t) ) -else: - _zesLedSetColor_t = CFUNCTYPE( ze_result_t, zes_led_handle_t, POINTER(zes_led_color_t) ) - - -############################################################################### -## @brief Table of Led functions pointers -class _zes_led_dditable_t(Structure): - _fields_ = [ - ("pfnGetProperties", c_void_p), ## _zesLedGetProperties_t - ("pfnGetState", c_void_p), ## _zesLedGetState_t - ("pfnSetState", c_void_p), ## _zesLedSetState_t - ("pfnSetColor", c_void_p) ## _zesLedSetColor_t - ] - -############################################################################### -## @brief Function-pointer for zesRasGetProperties -if __use_win_types: - _zesRasGetProperties_t = WINFUNCTYPE( ze_result_t, zes_ras_handle_t, POINTER(zes_ras_properties_t) ) -else: - _zesRasGetProperties_t = CFUNCTYPE( ze_result_t, zes_ras_handle_t, POINTER(zes_ras_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesRasGetConfig -if __use_win_types: - _zesRasGetConfig_t = WINFUNCTYPE( ze_result_t, zes_ras_handle_t, POINTER(zes_ras_config_t) ) -else: - _zesRasGetConfig_t = CFUNCTYPE( ze_result_t, zes_ras_handle_t, POINTER(zes_ras_config_t) ) - -############################################################################### -## @brief Function-pointer for zesRasSetConfig -if __use_win_types: - _zesRasSetConfig_t = WINFUNCTYPE( ze_result_t, zes_ras_handle_t, POINTER(zes_ras_config_t) ) -else: - _zesRasSetConfig_t = CFUNCTYPE( ze_result_t, zes_ras_handle_t, POINTER(zes_ras_config_t) ) - -############################################################################### -## @brief Function-pointer for zesRasGetState -if __use_win_types: - _zesRasGetState_t = WINFUNCTYPE( ze_result_t, zes_ras_handle_t, ze_bool_t, POINTER(zes_ras_state_t) ) -else: - _zesRasGetState_t = CFUNCTYPE( ze_result_t, zes_ras_handle_t, ze_bool_t, POINTER(zes_ras_state_t) ) - - -############################################################################### -## @brief Table of Ras functions pointers -class _zes_ras_dditable_t(Structure): - _fields_ = [ - ("pfnGetProperties", c_void_p), ## _zesRasGetProperties_t - ("pfnGetConfig", c_void_p), ## _zesRasGetConfig_t - ("pfnSetConfig", c_void_p), ## _zesRasSetConfig_t - ("pfnGetState", c_void_p) ## _zesRasGetState_t - ] - -############################################################################### -## @brief Function-pointer for zesRasGetStateExp -if __use_win_types: - _zesRasGetStateExp_t = WINFUNCTYPE( ze_result_t, zes_ras_handle_t, POINTER(c_ulong), POINTER(zes_ras_state_exp_t) ) -else: - _zesRasGetStateExp_t = CFUNCTYPE( ze_result_t, zes_ras_handle_t, POINTER(c_ulong), POINTER(zes_ras_state_exp_t) ) - -############################################################################### -## @brief Function-pointer for zesRasClearStateExp -if __use_win_types: - _zesRasClearStateExp_t = WINFUNCTYPE( ze_result_t, zes_ras_handle_t, zes_ras_error_category_exp_t ) -else: - _zesRasClearStateExp_t = CFUNCTYPE( ze_result_t, zes_ras_handle_t, zes_ras_error_category_exp_t ) - - -############################################################################### -## @brief Table of RasExp functions pointers -class _zes_ras_exp_dditable_t(Structure): - _fields_ = [ - ("pfnGetStateExp", c_void_p), ## _zesRasGetStateExp_t - ("pfnClearStateExp", c_void_p) ## _zesRasClearStateExp_t - ] - -############################################################################### -## @brief Function-pointer for zesDiagnosticsGetProperties -if __use_win_types: - _zesDiagnosticsGetProperties_t = WINFUNCTYPE( ze_result_t, zes_diag_handle_t, POINTER(zes_diag_properties_t) ) -else: - _zesDiagnosticsGetProperties_t = CFUNCTYPE( ze_result_t, zes_diag_handle_t, POINTER(zes_diag_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesDiagnosticsGetTests -if __use_win_types: - _zesDiagnosticsGetTests_t = WINFUNCTYPE( ze_result_t, zes_diag_handle_t, POINTER(c_ulong), POINTER(zes_diag_test_t) ) -else: - _zesDiagnosticsGetTests_t = CFUNCTYPE( ze_result_t, zes_diag_handle_t, POINTER(c_ulong), POINTER(zes_diag_test_t) ) - -############################################################################### -## @brief Function-pointer for zesDiagnosticsRunTests -if __use_win_types: - _zesDiagnosticsRunTests_t = WINFUNCTYPE( ze_result_t, zes_diag_handle_t, c_ulong, c_ulong, POINTER(zes_diag_result_t) ) -else: - _zesDiagnosticsRunTests_t = CFUNCTYPE( ze_result_t, zes_diag_handle_t, c_ulong, c_ulong, POINTER(zes_diag_result_t) ) - - -############################################################################### -## @brief Table of Diagnostics functions pointers -class _zes_diagnostics_dditable_t(Structure): - _fields_ = [ - ("pfnGetProperties", c_void_p), ## _zesDiagnosticsGetProperties_t - ("pfnGetTests", c_void_p), ## _zesDiagnosticsGetTests_t - ("pfnRunTests", c_void_p) ## _zesDiagnosticsRunTests_t - ] - -############################################################################### -## @brief Function-pointer for zesVFManagementGetVFPropertiesExp -if __use_win_types: - _zesVFManagementGetVFPropertiesExp_t = WINFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(zes_vf_exp_properties_t) ) -else: - _zesVFManagementGetVFPropertiesExp_t = CFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(zes_vf_exp_properties_t) ) - -############################################################################### -## @brief Function-pointer for zesVFManagementGetVFMemoryUtilizationExp -if __use_win_types: - _zesVFManagementGetVFMemoryUtilizationExp_t = WINFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(c_ulong), POINTER(zes_vf_util_mem_exp_t) ) -else: - _zesVFManagementGetVFMemoryUtilizationExp_t = CFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(c_ulong), POINTER(zes_vf_util_mem_exp_t) ) - -############################################################################### -## @brief Function-pointer for zesVFManagementGetVFEngineUtilizationExp -if __use_win_types: - _zesVFManagementGetVFEngineUtilizationExp_t = WINFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(c_ulong), POINTER(zes_vf_util_engine_exp_t) ) -else: - _zesVFManagementGetVFEngineUtilizationExp_t = CFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(c_ulong), POINTER(zes_vf_util_engine_exp_t) ) - -############################################################################### -## @brief Function-pointer for zesVFManagementSetVFTelemetryModeExp -if __use_win_types: - _zesVFManagementSetVFTelemetryModeExp_t = WINFUNCTYPE( ze_result_t, zes_vf_handle_t, zes_vf_info_util_exp_flags_t, ze_bool_t ) -else: - _zesVFManagementSetVFTelemetryModeExp_t = CFUNCTYPE( ze_result_t, zes_vf_handle_t, zes_vf_info_util_exp_flags_t, ze_bool_t ) - -############################################################################### -## @brief Function-pointer for zesVFManagementSetVFTelemetrySamplingIntervalExp -if __use_win_types: - _zesVFManagementSetVFTelemetrySamplingIntervalExp_t = WINFUNCTYPE( ze_result_t, zes_vf_handle_t, zes_vf_info_util_exp_flags_t, c_ulonglong ) -else: - _zesVFManagementSetVFTelemetrySamplingIntervalExp_t = CFUNCTYPE( ze_result_t, zes_vf_handle_t, zes_vf_info_util_exp_flags_t, c_ulonglong ) - -############################################################################### -## @brief Function-pointer for zesVFManagementGetVFCapabilitiesExp -if __use_win_types: - _zesVFManagementGetVFCapabilitiesExp_t = WINFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(zes_vf_exp_capabilities_t) ) -else: - _zesVFManagementGetVFCapabilitiesExp_t = CFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(zes_vf_exp_capabilities_t) ) - -############################################################################### -## @brief Function-pointer for zesVFManagementGetVFMemoryUtilizationExp2 -if __use_win_types: - _zesVFManagementGetVFMemoryUtilizationExp2_t = WINFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(c_ulong), POINTER(zes_vf_util_mem_exp2_t) ) -else: - _zesVFManagementGetVFMemoryUtilizationExp2_t = CFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(c_ulong), POINTER(zes_vf_util_mem_exp2_t) ) - -############################################################################### -## @brief Function-pointer for zesVFManagementGetVFEngineUtilizationExp2 -if __use_win_types: - _zesVFManagementGetVFEngineUtilizationExp2_t = WINFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(c_ulong), POINTER(zes_vf_util_engine_exp2_t) ) -else: - _zesVFManagementGetVFEngineUtilizationExp2_t = CFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(c_ulong), POINTER(zes_vf_util_engine_exp2_t) ) - -############################################################################### -## @brief Function-pointer for zesVFManagementGetVFCapabilitiesExp2 -if __use_win_types: - _zesVFManagementGetVFCapabilitiesExp2_t = WINFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(zes_vf_exp2_capabilities_t) ) -else: - _zesVFManagementGetVFCapabilitiesExp2_t = CFUNCTYPE( ze_result_t, zes_vf_handle_t, POINTER(zes_vf_exp2_capabilities_t) ) - - -############################################################################### -## @brief Table of VFManagementExp functions pointers -class _zes_vf_management_exp_dditable_t(Structure): - _fields_ = [ - ("pfnGetVFPropertiesExp", c_void_p), ## _zesVFManagementGetVFPropertiesExp_t - ("pfnGetVFMemoryUtilizationExp", c_void_p), ## _zesVFManagementGetVFMemoryUtilizationExp_t - ("pfnGetVFEngineUtilizationExp", c_void_p), ## _zesVFManagementGetVFEngineUtilizationExp_t - ("pfnSetVFTelemetryModeExp", c_void_p), ## _zesVFManagementSetVFTelemetryModeExp_t - ("pfnSetVFTelemetrySamplingIntervalExp", c_void_p), ## _zesVFManagementSetVFTelemetrySamplingIntervalExp_t - ("pfnGetVFCapabilitiesExp", c_void_p), ## _zesVFManagementGetVFCapabilitiesExp_t - ("pfnGetVFMemoryUtilizationExp2", c_void_p), ## _zesVFManagementGetVFMemoryUtilizationExp2_t - ("pfnGetVFEngineUtilizationExp2", c_void_p), ## _zesVFManagementGetVFEngineUtilizationExp2_t - ("pfnGetVFCapabilitiesExp2", c_void_p) ## _zesVFManagementGetVFCapabilitiesExp2_t - ] - -############################################################################### -class _zes_dditable_t(Structure): - _fields_ = [ - ("Global", _zes_global_dditable_t), - ("Device", _zes_device_dditable_t), - ("DeviceExp", _zes_device_exp_dditable_t), - ("Driver", _zes_driver_dditable_t), - ("DriverExp", _zes_driver_exp_dditable_t), - ("Overclock", _zes_overclock_dditable_t), - ("Scheduler", _zes_scheduler_dditable_t), - ("PerformanceFactor", _zes_performance_factor_dditable_t), - ("Power", _zes_power_dditable_t), - ("Frequency", _zes_frequency_dditable_t), - ("Engine", _zes_engine_dditable_t), - ("Standby", _zes_standby_dditable_t), - ("Firmware", _zes_firmware_dditable_t), - ("FirmwareExp", _zes_firmware_exp_dditable_t), - ("Memory", _zes_memory_dditable_t), - ("FabricPort", _zes_fabric_port_dditable_t), - ("Temperature", _zes_temperature_dditable_t), - ("Psu", _zes_psu_dditable_t), - ("Fan", _zes_fan_dditable_t), - ("Led", _zes_led_dditable_t), - ("Ras", _zes_ras_dditable_t), - ("RasExp", _zes_ras_exp_dditable_t), - ("Diagnostics", _zes_diagnostics_dditable_t), - ("VFManagementExp", _zes_vf_management_exp_dditable_t) - ] - -############################################################################### -## @brief zes device-driver interfaces -class ZES_DDI: - def __init__(self, version : ze_api_version_t): - # load the ze_loader library - if "Windows" == platform.uname()[0]: - self.__dll = WinDLL("ze_loader.dll") - else: - self.__dll = CDLL("ze_loader.so") - - # fill the ddi tables - self.__dditable = _zes_dditable_t() - - # call driver to get function pointers - _Global = _zes_global_dditable_t() - r = ze_result_v(self.__dll.zesGetGlobalProcAddrTable(version, byref(_Global))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Global = _Global - - # attach function interface to function address - self.zesInit = _zesInit_t(self.__dditable.Global.pfnInit) - - # call driver to get function pointers - _Device = _zes_device_dditable_t() - r = ze_result_v(self.__dll.zesGetDeviceProcAddrTable(version, byref(_Device))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Device = _Device - - # attach function interface to function address - self.zesDeviceGetProperties = _zesDeviceGetProperties_t(self.__dditable.Device.pfnGetProperties) - self.zesDeviceGetState = _zesDeviceGetState_t(self.__dditable.Device.pfnGetState) - self.zesDeviceReset = _zesDeviceReset_t(self.__dditable.Device.pfnReset) - self.zesDeviceProcessesGetState = _zesDeviceProcessesGetState_t(self.__dditable.Device.pfnProcessesGetState) - self.zesDevicePciGetProperties = _zesDevicePciGetProperties_t(self.__dditable.Device.pfnPciGetProperties) - self.zesDevicePciGetState = _zesDevicePciGetState_t(self.__dditable.Device.pfnPciGetState) - self.zesDevicePciGetBars = _zesDevicePciGetBars_t(self.__dditable.Device.pfnPciGetBars) - self.zesDevicePciGetStats = _zesDevicePciGetStats_t(self.__dditable.Device.pfnPciGetStats) - self.zesDeviceEnumDiagnosticTestSuites = _zesDeviceEnumDiagnosticTestSuites_t(self.__dditable.Device.pfnEnumDiagnosticTestSuites) - self.zesDeviceEnumEngineGroups = _zesDeviceEnumEngineGroups_t(self.__dditable.Device.pfnEnumEngineGroups) - self.zesDeviceEventRegister = _zesDeviceEventRegister_t(self.__dditable.Device.pfnEventRegister) - self.zesDeviceEnumFabricPorts = _zesDeviceEnumFabricPorts_t(self.__dditable.Device.pfnEnumFabricPorts) - self.zesDeviceEnumFans = _zesDeviceEnumFans_t(self.__dditable.Device.pfnEnumFans) - self.zesDeviceEnumFirmwares = _zesDeviceEnumFirmwares_t(self.__dditable.Device.pfnEnumFirmwares) - self.zesDeviceEnumFrequencyDomains = _zesDeviceEnumFrequencyDomains_t(self.__dditable.Device.pfnEnumFrequencyDomains) - self.zesDeviceEnumLeds = _zesDeviceEnumLeds_t(self.__dditable.Device.pfnEnumLeds) - self.zesDeviceEnumMemoryModules = _zesDeviceEnumMemoryModules_t(self.__dditable.Device.pfnEnumMemoryModules) - self.zesDeviceEnumPerformanceFactorDomains = _zesDeviceEnumPerformanceFactorDomains_t(self.__dditable.Device.pfnEnumPerformanceFactorDomains) - self.zesDeviceEnumPowerDomains = _zesDeviceEnumPowerDomains_t(self.__dditable.Device.pfnEnumPowerDomains) - self.zesDeviceGetCardPowerDomain = _zesDeviceGetCardPowerDomain_t(self.__dditable.Device.pfnGetCardPowerDomain) - self.zesDeviceEnumPsus = _zesDeviceEnumPsus_t(self.__dditable.Device.pfnEnumPsus) - self.zesDeviceEnumRasErrorSets = _zesDeviceEnumRasErrorSets_t(self.__dditable.Device.pfnEnumRasErrorSets) - self.zesDeviceEnumSchedulers = _zesDeviceEnumSchedulers_t(self.__dditable.Device.pfnEnumSchedulers) - self.zesDeviceEnumStandbyDomains = _zesDeviceEnumStandbyDomains_t(self.__dditable.Device.pfnEnumStandbyDomains) - self.zesDeviceEnumTemperatureSensors = _zesDeviceEnumTemperatureSensors_t(self.__dditable.Device.pfnEnumTemperatureSensors) - self.zesDeviceEccAvailable = _zesDeviceEccAvailable_t(self.__dditable.Device.pfnEccAvailable) - self.zesDeviceEccConfigurable = _zesDeviceEccConfigurable_t(self.__dditable.Device.pfnEccConfigurable) - self.zesDeviceGetEccState = _zesDeviceGetEccState_t(self.__dditable.Device.pfnGetEccState) - self.zesDeviceSetEccState = _zesDeviceSetEccState_t(self.__dditable.Device.pfnSetEccState) - self.zesDeviceGet = _zesDeviceGet_t(self.__dditable.Device.pfnGet) - self.zesDeviceSetOverclockWaiver = _zesDeviceSetOverclockWaiver_t(self.__dditable.Device.pfnSetOverclockWaiver) - self.zesDeviceGetOverclockDomains = _zesDeviceGetOverclockDomains_t(self.__dditable.Device.pfnGetOverclockDomains) - self.zesDeviceGetOverclockControls = _zesDeviceGetOverclockControls_t(self.__dditable.Device.pfnGetOverclockControls) - self.zesDeviceResetOverclockSettings = _zesDeviceResetOverclockSettings_t(self.__dditable.Device.pfnResetOverclockSettings) - self.zesDeviceReadOverclockState = _zesDeviceReadOverclockState_t(self.__dditable.Device.pfnReadOverclockState) - self.zesDeviceEnumOverclockDomains = _zesDeviceEnumOverclockDomains_t(self.__dditable.Device.pfnEnumOverclockDomains) - self.zesDeviceResetExt = _zesDeviceResetExt_t(self.__dditable.Device.pfnResetExt) - self.zesDevicePciLinkSpeedUpdateExt = _zesDevicePciLinkSpeedUpdateExt_t(self.__dditable.Device.pfnPciLinkSpeedUpdateExt) - - # call driver to get function pointers - _DeviceExp = _zes_device_exp_dditable_t() - r = ze_result_v(self.__dll.zesGetDeviceExpProcAddrTable(version, byref(_DeviceExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.DeviceExp = _DeviceExp - - # attach function interface to function address - self.zesDeviceGetSubDevicePropertiesExp = _zesDeviceGetSubDevicePropertiesExp_t(self.__dditable.DeviceExp.pfnGetSubDevicePropertiesExp) - self.zesDeviceEnumActiveVFExp = _zesDeviceEnumActiveVFExp_t(self.__dditable.DeviceExp.pfnEnumActiveVFExp) - self.zesDeviceEnumEnabledVFExp = _zesDeviceEnumEnabledVFExp_t(self.__dditable.DeviceExp.pfnEnumEnabledVFExp) - - # call driver to get function pointers - _Driver = _zes_driver_dditable_t() - r = ze_result_v(self.__dll.zesGetDriverProcAddrTable(version, byref(_Driver))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Driver = _Driver - - # attach function interface to function address - self.zesDriverEventListen = _zesDriverEventListen_t(self.__dditable.Driver.pfnEventListen) - self.zesDriverEventListenEx = _zesDriverEventListenEx_t(self.__dditable.Driver.pfnEventListenEx) - self.zesDriverGet = _zesDriverGet_t(self.__dditable.Driver.pfnGet) - self.zesDriverGetExtensionProperties = _zesDriverGetExtensionProperties_t(self.__dditable.Driver.pfnGetExtensionProperties) - self.zesDriverGetExtensionFunctionAddress = _zesDriverGetExtensionFunctionAddress_t(self.__dditable.Driver.pfnGetExtensionFunctionAddress) - - # call driver to get function pointers - _DriverExp = _zes_driver_exp_dditable_t() - r = ze_result_v(self.__dll.zesGetDriverExpProcAddrTable(version, byref(_DriverExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.DriverExp = _DriverExp - - # attach function interface to function address - self.zesDriverGetDeviceByUuidExp = _zesDriverGetDeviceByUuidExp_t(self.__dditable.DriverExp.pfnGetDeviceByUuidExp) - - # call driver to get function pointers - _Overclock = _zes_overclock_dditable_t() - r = ze_result_v(self.__dll.zesGetOverclockProcAddrTable(version, byref(_Overclock))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Overclock = _Overclock - - # attach function interface to function address - self.zesOverclockGetDomainProperties = _zesOverclockGetDomainProperties_t(self.__dditable.Overclock.pfnGetDomainProperties) - self.zesOverclockGetDomainVFProperties = _zesOverclockGetDomainVFProperties_t(self.__dditable.Overclock.pfnGetDomainVFProperties) - self.zesOverclockGetDomainControlProperties = _zesOverclockGetDomainControlProperties_t(self.__dditable.Overclock.pfnGetDomainControlProperties) - self.zesOverclockGetControlCurrentValue = _zesOverclockGetControlCurrentValue_t(self.__dditable.Overclock.pfnGetControlCurrentValue) - self.zesOverclockGetControlPendingValue = _zesOverclockGetControlPendingValue_t(self.__dditable.Overclock.pfnGetControlPendingValue) - self.zesOverclockSetControlUserValue = _zesOverclockSetControlUserValue_t(self.__dditable.Overclock.pfnSetControlUserValue) - self.zesOverclockGetControlState = _zesOverclockGetControlState_t(self.__dditable.Overclock.pfnGetControlState) - self.zesOverclockGetVFPointValues = _zesOverclockGetVFPointValues_t(self.__dditable.Overclock.pfnGetVFPointValues) - self.zesOverclockSetVFPointValues = _zesOverclockSetVFPointValues_t(self.__dditable.Overclock.pfnSetVFPointValues) - - # call driver to get function pointers - _Scheduler = _zes_scheduler_dditable_t() - r = ze_result_v(self.__dll.zesGetSchedulerProcAddrTable(version, byref(_Scheduler))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Scheduler = _Scheduler - - # attach function interface to function address - self.zesSchedulerGetProperties = _zesSchedulerGetProperties_t(self.__dditable.Scheduler.pfnGetProperties) - self.zesSchedulerGetCurrentMode = _zesSchedulerGetCurrentMode_t(self.__dditable.Scheduler.pfnGetCurrentMode) - self.zesSchedulerGetTimeoutModeProperties = _zesSchedulerGetTimeoutModeProperties_t(self.__dditable.Scheduler.pfnGetTimeoutModeProperties) - self.zesSchedulerGetTimesliceModeProperties = _zesSchedulerGetTimesliceModeProperties_t(self.__dditable.Scheduler.pfnGetTimesliceModeProperties) - self.zesSchedulerSetTimeoutMode = _zesSchedulerSetTimeoutMode_t(self.__dditable.Scheduler.pfnSetTimeoutMode) - self.zesSchedulerSetTimesliceMode = _zesSchedulerSetTimesliceMode_t(self.__dditable.Scheduler.pfnSetTimesliceMode) - self.zesSchedulerSetExclusiveMode = _zesSchedulerSetExclusiveMode_t(self.__dditable.Scheduler.pfnSetExclusiveMode) - self.zesSchedulerSetComputeUnitDebugMode = _zesSchedulerSetComputeUnitDebugMode_t(self.__dditable.Scheduler.pfnSetComputeUnitDebugMode) - - # call driver to get function pointers - _PerformanceFactor = _zes_performance_factor_dditable_t() - r = ze_result_v(self.__dll.zesGetPerformanceFactorProcAddrTable(version, byref(_PerformanceFactor))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.PerformanceFactor = _PerformanceFactor - - # attach function interface to function address - self.zesPerformanceFactorGetProperties = _zesPerformanceFactorGetProperties_t(self.__dditable.PerformanceFactor.pfnGetProperties) - self.zesPerformanceFactorGetConfig = _zesPerformanceFactorGetConfig_t(self.__dditable.PerformanceFactor.pfnGetConfig) - self.zesPerformanceFactorSetConfig = _zesPerformanceFactorSetConfig_t(self.__dditable.PerformanceFactor.pfnSetConfig) - - # call driver to get function pointers - _Power = _zes_power_dditable_t() - r = ze_result_v(self.__dll.zesGetPowerProcAddrTable(version, byref(_Power))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Power = _Power - - # attach function interface to function address - self.zesPowerGetProperties = _zesPowerGetProperties_t(self.__dditable.Power.pfnGetProperties) - self.zesPowerGetEnergyCounter = _zesPowerGetEnergyCounter_t(self.__dditable.Power.pfnGetEnergyCounter) - self.zesPowerGetLimits = _zesPowerGetLimits_t(self.__dditable.Power.pfnGetLimits) - self.zesPowerSetLimits = _zesPowerSetLimits_t(self.__dditable.Power.pfnSetLimits) - self.zesPowerGetEnergyThreshold = _zesPowerGetEnergyThreshold_t(self.__dditable.Power.pfnGetEnergyThreshold) - self.zesPowerSetEnergyThreshold = _zesPowerSetEnergyThreshold_t(self.__dditable.Power.pfnSetEnergyThreshold) - self.zesPowerGetLimitsExt = _zesPowerGetLimitsExt_t(self.__dditable.Power.pfnGetLimitsExt) - self.zesPowerSetLimitsExt = _zesPowerSetLimitsExt_t(self.__dditable.Power.pfnSetLimitsExt) - - # call driver to get function pointers - _Frequency = _zes_frequency_dditable_t() - r = ze_result_v(self.__dll.zesGetFrequencyProcAddrTable(version, byref(_Frequency))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Frequency = _Frequency - - # attach function interface to function address - self.zesFrequencyGetProperties = _zesFrequencyGetProperties_t(self.__dditable.Frequency.pfnGetProperties) - self.zesFrequencyGetAvailableClocks = _zesFrequencyGetAvailableClocks_t(self.__dditable.Frequency.pfnGetAvailableClocks) - self.zesFrequencyGetRange = _zesFrequencyGetRange_t(self.__dditable.Frequency.pfnGetRange) - self.zesFrequencySetRange = _zesFrequencySetRange_t(self.__dditable.Frequency.pfnSetRange) - self.zesFrequencyGetState = _zesFrequencyGetState_t(self.__dditable.Frequency.pfnGetState) - self.zesFrequencyGetThrottleTime = _zesFrequencyGetThrottleTime_t(self.__dditable.Frequency.pfnGetThrottleTime) - self.zesFrequencyOcGetCapabilities = _zesFrequencyOcGetCapabilities_t(self.__dditable.Frequency.pfnOcGetCapabilities) - self.zesFrequencyOcGetFrequencyTarget = _zesFrequencyOcGetFrequencyTarget_t(self.__dditable.Frequency.pfnOcGetFrequencyTarget) - self.zesFrequencyOcSetFrequencyTarget = _zesFrequencyOcSetFrequencyTarget_t(self.__dditable.Frequency.pfnOcSetFrequencyTarget) - self.zesFrequencyOcGetVoltageTarget = _zesFrequencyOcGetVoltageTarget_t(self.__dditable.Frequency.pfnOcGetVoltageTarget) - self.zesFrequencyOcSetVoltageTarget = _zesFrequencyOcSetVoltageTarget_t(self.__dditable.Frequency.pfnOcSetVoltageTarget) - self.zesFrequencyOcSetMode = _zesFrequencyOcSetMode_t(self.__dditable.Frequency.pfnOcSetMode) - self.zesFrequencyOcGetMode = _zesFrequencyOcGetMode_t(self.__dditable.Frequency.pfnOcGetMode) - self.zesFrequencyOcGetIccMax = _zesFrequencyOcGetIccMax_t(self.__dditable.Frequency.pfnOcGetIccMax) - self.zesFrequencyOcSetIccMax = _zesFrequencyOcSetIccMax_t(self.__dditable.Frequency.pfnOcSetIccMax) - self.zesFrequencyOcGetTjMax = _zesFrequencyOcGetTjMax_t(self.__dditable.Frequency.pfnOcGetTjMax) - self.zesFrequencyOcSetTjMax = _zesFrequencyOcSetTjMax_t(self.__dditable.Frequency.pfnOcSetTjMax) - - # call driver to get function pointers - _Engine = _zes_engine_dditable_t() - r = ze_result_v(self.__dll.zesGetEngineProcAddrTable(version, byref(_Engine))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Engine = _Engine - - # attach function interface to function address - self.zesEngineGetProperties = _zesEngineGetProperties_t(self.__dditable.Engine.pfnGetProperties) - self.zesEngineGetActivity = _zesEngineGetActivity_t(self.__dditable.Engine.pfnGetActivity) - self.zesEngineGetActivityExt = _zesEngineGetActivityExt_t(self.__dditable.Engine.pfnGetActivityExt) - - # call driver to get function pointers - _Standby = _zes_standby_dditable_t() - r = ze_result_v(self.__dll.zesGetStandbyProcAddrTable(version, byref(_Standby))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Standby = _Standby - - # attach function interface to function address - self.zesStandbyGetProperties = _zesStandbyGetProperties_t(self.__dditable.Standby.pfnGetProperties) - self.zesStandbyGetMode = _zesStandbyGetMode_t(self.__dditable.Standby.pfnGetMode) - self.zesStandbySetMode = _zesStandbySetMode_t(self.__dditable.Standby.pfnSetMode) - - # call driver to get function pointers - _Firmware = _zes_firmware_dditable_t() - r = ze_result_v(self.__dll.zesGetFirmwareProcAddrTable(version, byref(_Firmware))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Firmware = _Firmware - - # attach function interface to function address - self.zesFirmwareGetProperties = _zesFirmwareGetProperties_t(self.__dditable.Firmware.pfnGetProperties) - self.zesFirmwareFlash = _zesFirmwareFlash_t(self.__dditable.Firmware.pfnFlash) - self.zesFirmwareGetFlashProgress = _zesFirmwareGetFlashProgress_t(self.__dditable.Firmware.pfnGetFlashProgress) - self.zesFirmwareGetConsoleLogs = _zesFirmwareGetConsoleLogs_t(self.__dditable.Firmware.pfnGetConsoleLogs) - - # call driver to get function pointers - _FirmwareExp = _zes_firmware_exp_dditable_t() - r = ze_result_v(self.__dll.zesGetFirmwareExpProcAddrTable(version, byref(_FirmwareExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.FirmwareExp = _FirmwareExp - - # attach function interface to function address - self.zesFirmwareGetSecurityVersionExp = _zesFirmwareGetSecurityVersionExp_t(self.__dditable.FirmwareExp.pfnGetSecurityVersionExp) - self.zesFirmwareSetSecurityVersionExp = _zesFirmwareSetSecurityVersionExp_t(self.__dditable.FirmwareExp.pfnSetSecurityVersionExp) - - # call driver to get function pointers - _Memory = _zes_memory_dditable_t() - r = ze_result_v(self.__dll.zesGetMemoryProcAddrTable(version, byref(_Memory))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Memory = _Memory - - # attach function interface to function address - self.zesMemoryGetProperties = _zesMemoryGetProperties_t(self.__dditable.Memory.pfnGetProperties) - self.zesMemoryGetState = _zesMemoryGetState_t(self.__dditable.Memory.pfnGetState) - self.zesMemoryGetBandwidth = _zesMemoryGetBandwidth_t(self.__dditable.Memory.pfnGetBandwidth) - - # call driver to get function pointers - _FabricPort = _zes_fabric_port_dditable_t() - r = ze_result_v(self.__dll.zesGetFabricPortProcAddrTable(version, byref(_FabricPort))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.FabricPort = _FabricPort - - # attach function interface to function address - self.zesFabricPortGetProperties = _zesFabricPortGetProperties_t(self.__dditable.FabricPort.pfnGetProperties) - self.zesFabricPortGetLinkType = _zesFabricPortGetLinkType_t(self.__dditable.FabricPort.pfnGetLinkType) - self.zesFabricPortGetConfig = _zesFabricPortGetConfig_t(self.__dditable.FabricPort.pfnGetConfig) - self.zesFabricPortSetConfig = _zesFabricPortSetConfig_t(self.__dditable.FabricPort.pfnSetConfig) - self.zesFabricPortGetState = _zesFabricPortGetState_t(self.__dditable.FabricPort.pfnGetState) - self.zesFabricPortGetThroughput = _zesFabricPortGetThroughput_t(self.__dditable.FabricPort.pfnGetThroughput) - self.zesFabricPortGetFabricErrorCounters = _zesFabricPortGetFabricErrorCounters_t(self.__dditable.FabricPort.pfnGetFabricErrorCounters) - self.zesFabricPortGetMultiPortThroughput = _zesFabricPortGetMultiPortThroughput_t(self.__dditable.FabricPort.pfnGetMultiPortThroughput) - - # call driver to get function pointers - _Temperature = _zes_temperature_dditable_t() - r = ze_result_v(self.__dll.zesGetTemperatureProcAddrTable(version, byref(_Temperature))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Temperature = _Temperature - - # attach function interface to function address - self.zesTemperatureGetProperties = _zesTemperatureGetProperties_t(self.__dditable.Temperature.pfnGetProperties) - self.zesTemperatureGetConfig = _zesTemperatureGetConfig_t(self.__dditable.Temperature.pfnGetConfig) - self.zesTemperatureSetConfig = _zesTemperatureSetConfig_t(self.__dditable.Temperature.pfnSetConfig) - self.zesTemperatureGetState = _zesTemperatureGetState_t(self.__dditable.Temperature.pfnGetState) - - # call driver to get function pointers - _Psu = _zes_psu_dditable_t() - r = ze_result_v(self.__dll.zesGetPsuProcAddrTable(version, byref(_Psu))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Psu = _Psu - - # attach function interface to function address - self.zesPsuGetProperties = _zesPsuGetProperties_t(self.__dditable.Psu.pfnGetProperties) - self.zesPsuGetState = _zesPsuGetState_t(self.__dditable.Psu.pfnGetState) - - # call driver to get function pointers - _Fan = _zes_fan_dditable_t() - r = ze_result_v(self.__dll.zesGetFanProcAddrTable(version, byref(_Fan))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Fan = _Fan - - # attach function interface to function address - self.zesFanGetProperties = _zesFanGetProperties_t(self.__dditable.Fan.pfnGetProperties) - self.zesFanGetConfig = _zesFanGetConfig_t(self.__dditable.Fan.pfnGetConfig) - self.zesFanSetDefaultMode = _zesFanSetDefaultMode_t(self.__dditable.Fan.pfnSetDefaultMode) - self.zesFanSetFixedSpeedMode = _zesFanSetFixedSpeedMode_t(self.__dditable.Fan.pfnSetFixedSpeedMode) - self.zesFanSetSpeedTableMode = _zesFanSetSpeedTableMode_t(self.__dditable.Fan.pfnSetSpeedTableMode) - self.zesFanGetState = _zesFanGetState_t(self.__dditable.Fan.pfnGetState) - - # call driver to get function pointers - _Led = _zes_led_dditable_t() - r = ze_result_v(self.__dll.zesGetLedProcAddrTable(version, byref(_Led))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Led = _Led - - # attach function interface to function address - self.zesLedGetProperties = _zesLedGetProperties_t(self.__dditable.Led.pfnGetProperties) - self.zesLedGetState = _zesLedGetState_t(self.__dditable.Led.pfnGetState) - self.zesLedSetState = _zesLedSetState_t(self.__dditable.Led.pfnSetState) - self.zesLedSetColor = _zesLedSetColor_t(self.__dditable.Led.pfnSetColor) - - # call driver to get function pointers - _Ras = _zes_ras_dditable_t() - r = ze_result_v(self.__dll.zesGetRasProcAddrTable(version, byref(_Ras))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Ras = _Ras - - # attach function interface to function address - self.zesRasGetProperties = _zesRasGetProperties_t(self.__dditable.Ras.pfnGetProperties) - self.zesRasGetConfig = _zesRasGetConfig_t(self.__dditable.Ras.pfnGetConfig) - self.zesRasSetConfig = _zesRasSetConfig_t(self.__dditable.Ras.pfnSetConfig) - self.zesRasGetState = _zesRasGetState_t(self.__dditable.Ras.pfnGetState) - - # call driver to get function pointers - _RasExp = _zes_ras_exp_dditable_t() - r = ze_result_v(self.__dll.zesGetRasExpProcAddrTable(version, byref(_RasExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.RasExp = _RasExp - - # attach function interface to function address - self.zesRasGetStateExp = _zesRasGetStateExp_t(self.__dditable.RasExp.pfnGetStateExp) - self.zesRasClearStateExp = _zesRasClearStateExp_t(self.__dditable.RasExp.pfnClearStateExp) - - # call driver to get function pointers - _Diagnostics = _zes_diagnostics_dditable_t() - r = ze_result_v(self.__dll.zesGetDiagnosticsProcAddrTable(version, byref(_Diagnostics))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Diagnostics = _Diagnostics - - # attach function interface to function address - self.zesDiagnosticsGetProperties = _zesDiagnosticsGetProperties_t(self.__dditable.Diagnostics.pfnGetProperties) - self.zesDiagnosticsGetTests = _zesDiagnosticsGetTests_t(self.__dditable.Diagnostics.pfnGetTests) - self.zesDiagnosticsRunTests = _zesDiagnosticsRunTests_t(self.__dditable.Diagnostics.pfnRunTests) - - # call driver to get function pointers - _VFManagementExp = _zes_vf_management_exp_dditable_t() - r = ze_result_v(self.__dll.zesGetVFManagementExpProcAddrTable(version, byref(_VFManagementExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.VFManagementExp = _VFManagementExp - - # attach function interface to function address - self.zesVFManagementGetVFPropertiesExp = _zesVFManagementGetVFPropertiesExp_t(self.__dditable.VFManagementExp.pfnGetVFPropertiesExp) - self.zesVFManagementGetVFMemoryUtilizationExp = _zesVFManagementGetVFMemoryUtilizationExp_t(self.__dditable.VFManagementExp.pfnGetVFMemoryUtilizationExp) - self.zesVFManagementGetVFEngineUtilizationExp = _zesVFManagementGetVFEngineUtilizationExp_t(self.__dditable.VFManagementExp.pfnGetVFEngineUtilizationExp) - self.zesVFManagementSetVFTelemetryModeExp = _zesVFManagementSetVFTelemetryModeExp_t(self.__dditable.VFManagementExp.pfnSetVFTelemetryModeExp) - self.zesVFManagementSetVFTelemetrySamplingIntervalExp = _zesVFManagementSetVFTelemetrySamplingIntervalExp_t(self.__dditable.VFManagementExp.pfnSetVFTelemetrySamplingIntervalExp) - self.zesVFManagementGetVFCapabilitiesExp = _zesVFManagementGetVFCapabilitiesExp_t(self.__dditable.VFManagementExp.pfnGetVFCapabilitiesExp) - self.zesVFManagementGetVFMemoryUtilizationExp2 = _zesVFManagementGetVFMemoryUtilizationExp2_t(self.__dditable.VFManagementExp.pfnGetVFMemoryUtilizationExp2) - self.zesVFManagementGetVFEngineUtilizationExp2 = _zesVFManagementGetVFEngineUtilizationExp2_t(self.__dditable.VFManagementExp.pfnGetVFEngineUtilizationExp2) - self.zesVFManagementGetVFCapabilitiesExp2 = _zesVFManagementGetVFCapabilitiesExp2_t(self.__dditable.VFManagementExp.pfnGetVFCapabilitiesExp2) - - # success! diff --git a/backends/ze/include/zet.py b/backends/ze/include/zet.py deleted file mode 100644 index 9bd77585c..000000000 --- a/backends/ze/include/zet.py +++ /dev/null @@ -1,1973 +0,0 @@ -""" - Copyright (C) 2019-2025 Intel Corporation - - SPDX-License-Identifier: MIT - - @file zet.py - @version v1.15-r1.13.73 - - """ -import platform -from ctypes import * -from enum import * - -############################################################################### -__version__ = "1.0" - -############################################################################### -## @brief Handle to a driver instance -class zet_driver_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of device object -class zet_device_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of context object -class zet_context_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of command list object -class zet_command_list_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of module object -class zet_module_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of function object -class zet_kernel_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of metric group's object -class zet_metric_group_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of metric's object -class zet_metric_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of metric streamer's object -class zet_metric_streamer_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of metric query pool's object -class zet_metric_query_pool_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of metric query's object -class zet_metric_query_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of tracer object -class zet_tracer_exp_handle_t(c_void_p): - pass - -############################################################################### -## @brief Debug session handle -class zet_debug_session_handle_t(c_void_p): - pass - -############################################################################### -## @brief Defines structure types -class zet_structure_type_v(IntEnum): - METRIC_GROUP_PROPERTIES = 0x1 ## ::zet_metric_group_properties_t - METRIC_PROPERTIES = 0x2 ## ::zet_metric_properties_t - METRIC_STREAMER_DESC = 0x3 ## ::zet_metric_streamer_desc_t - METRIC_QUERY_POOL_DESC = 0x4 ## ::zet_metric_query_pool_desc_t - PROFILE_PROPERTIES = 0x5 ## ::zet_profile_properties_t - DEVICE_DEBUG_PROPERTIES = 0x6 ## ::zet_device_debug_properties_t - DEBUG_MEMORY_SPACE_DESC = 0x7 ## ::zet_debug_memory_space_desc_t - DEBUG_REGSET_PROPERTIES = 0x8 ## ::zet_debug_regset_properties_t - GLOBAL_METRICS_TIMESTAMPS_EXP_PROPERTIES = 0x9 ## ::zet_metric_global_timestamps_resolution_exp_t. Deprecated, use - ## ::ZET_STRUCTURE_TYPE_METRIC_GLOBAL_TIMESTAMPS_RESOLUTION_EXP. - METRIC_GLOBAL_TIMESTAMPS_RESOLUTION_EXP = 0x9 ## ::zet_metric_global_timestamps_resolution_exp_t - TRACER_EXP_DESC = 0x00010001 ## ::zet_tracer_exp_desc_t - METRICS_CALCULATE_EXP_DESC = 0x00010002 ## ::zet_metric_calculate_exp_desc_t. Deprecated, use - ## ::ZET_STRUCTURE_TYPE_METRIC_CALCULATE_EXP_DESC. - METRIC_CALCULATE_EXP_DESC = 0x00010002 ## ::zet_metric_calculate_exp_desc_t - METRIC_PROGRAMMABLE_EXP_PROPERTIES = 0x00010003 ## ::zet_metric_programmable_exp_properties_t - METRIC_PROGRAMMABLE_PARAM_INFO_EXP = 0x00010004 ## ::zet_metric_programmable_param_info_exp_t - METRIC_PROGRAMMABLE_PARAM_VALUE_INFO_EXP = 0x00010005 ## ::zet_metric_programmable_param_value_info_exp_t - METRIC_GROUP_TYPE_EXP = 0x00010006 ## ::zet_metric_group_type_exp_t - EXPORT_DMA_EXP_PROPERTIES = 0x00010007 ## ::zet_export_dma_buf_exp_properties_t - METRIC_TRACER_EXP_DESC = 0x00010008 ## ::zet_metric_tracer_exp_desc_t - METRIC_SOURCE_ID_EXP = 0x00010009 ## ::zet_metric_source_id_exp_t - -class zet_structure_type_t(c_int): - def __str__(self): - return str(zet_structure_type_v(self.value)) - - -############################################################################### -## @brief Base for all properties types -class zet_base_properties_t(Structure): - _fields_ = [ - ("stype", zet_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p) ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ] - -############################################################################### -## @brief Base for all descriptor types -class zet_base_desc_t(Structure): - _fields_ = [ - ("stype", zet_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p) ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ] - -############################################################################### -## @brief Supported value types -class zet_value_type_v(IntEnum): - UINT32 = 0 ## 32-bit unsigned-integer - UINT64 = 1 ## 64-bit unsigned-integer - FLOAT32 = 2 ## 32-bit floating-point - FLOAT64 = 3 ## 64-bit floating-point - BOOL8 = 4 ## 8-bit boolean - STRING = 5 ## C string - UINT8 = 6 ## 8-bit unsigned-integer - UINT16 = 7 ## 16-bit unsigned-integer - -class zet_value_type_t(c_int): - def __str__(self): - return str(zet_value_type_v(self.value)) - - -############################################################################### -## @brief Union of values -class zet_value_t(Structure): - _fields_ = [ - ("ui32", c_ulong), ## [out] 32-bit unsigned-integer - ("ui64", c_ulonglong), ## [out] 64-bit unsigned-integer - ("fp32", c_float), ## [out] 32-bit floating-point - ("fp64", c_double), ## [out] 64-bit floating-point - ("b8", ze_bool_t) ## [out] 8-bit boolean - ] - -############################################################################### -## @brief Typed value -class zet_typed_value_t(Structure): - _fields_ = [ - ("type", zet_value_type_t), ## [out] type of value - ("value", zet_value_t) ## [out] value - ] - -############################################################################### -## @brief Enables driver instrumentation and dependencies for device metrics - -############################################################################### -## @brief Enables driver instrumentation and dependencies for program -## instrumentation - -############################################################################### -## @brief Enables driver instrumentation and dependencies for program debugging - -############################################################################### -## @brief Supported module debug info formats. -class zet_module_debug_info_format_v(IntEnum): - ELF_DWARF = 0 ## Format is ELF/DWARF - -class zet_module_debug_info_format_t(c_int): - def __str__(self): - return str(zet_module_debug_info_format_v(self.value)) - - -############################################################################### -## @brief Supported device debug property flags -class zet_device_debug_property_flags_v(IntEnum): - ATTACH = ZE_BIT(0) ## the device supports attaching for debug - -class zet_device_debug_property_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Device debug properties queried using ::zetDeviceGetDebugProperties. -class zet_device_debug_properties_t(Structure): - _fields_ = [ - ("stype", zet_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", zet_device_debug_property_flags_t) ## [out] returns 0 (none) or a valid combination of - ## ::zet_device_debug_property_flag_t - ] - -############################################################################### -## @brief Debug configuration provided to ::zetDebugAttach -class zet_debug_config_t(Structure): - _fields_ = [ - ("pid", c_ulong) ## [in] the host process identifier - ] - -############################################################################### -## @brief Supported debug event flags. -class zet_debug_event_flags_v(IntEnum): - NEED_ACK = ZE_BIT(0) ## The event needs to be acknowledged by calling - ## ::zetDebugAcknowledgeEvent. - -class zet_debug_event_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Supported debug event types. -class zet_debug_event_type_v(IntEnum): - INVALID = 0 ## The event is invalid - DETACHED = 1 ## The tool was detached - PROCESS_ENTRY = 2 ## The debuggee process created command queues on the device - PROCESS_EXIT = 3 ## The debuggee process destroyed all command queues on the device - MODULE_LOAD = 4 ## An in-memory module was loaded onto the device - MODULE_UNLOAD = 5 ## An in-memory module is about to get unloaded from the device - THREAD_STOPPED = 6 ## The thread stopped due to a device exception - THREAD_UNAVAILABLE = 7 ## The thread is not available to be stopped - PAGE_FAULT = 8 ## A page request could not be completed on the device - -class zet_debug_event_type_t(c_int): - def __str__(self): - return str(zet_debug_event_type_v(self.value)) - - -############################################################################### -## @brief Supported debug detach reasons. -class zet_debug_detach_reason_v(IntEnum): - INVALID = 0 ## The detach reason is not valid - HOST_EXIT = 1 ## The host process exited - -class zet_debug_detach_reason_t(c_int): - def __str__(self): - return str(zet_debug_detach_reason_v(self.value)) - - -############################################################################### -## @brief Event information for ::ZET_DEBUG_EVENT_TYPE_DETACHED -class zet_debug_event_info_detached_t(Structure): - _fields_ = [ - ("reason", zet_debug_detach_reason_t) ## [out] the detach reason - ] - -############################################################################### -## @brief Event information for ::ZET_DEBUG_EVENT_TYPE_MODULE_LOAD and -## ::ZET_DEBUG_EVENT_TYPE_MODULE_UNLOAD -class zet_debug_event_info_module_t(Structure): - _fields_ = [ - ("format", zet_module_debug_info_format_t), ## [out] the module format - ("moduleBegin", c_ulonglong), ## [out] the begin address of the in-memory module (inclusive) - ("moduleEnd", c_ulonglong), ## [out] the end address of the in-memory module (exclusive) - ("load", c_ulonglong) ## [out] the load address of the module on the device - ] - -############################################################################### -## @brief Event information for ::ZET_DEBUG_EVENT_TYPE_THREAD_STOPPED and -## ::ZET_DEBUG_EVENT_TYPE_THREAD_UNAVAILABLE -class zet_debug_event_info_thread_stopped_t(Structure): - _fields_ = [ - ("thread", ze_device_thread_t) ## [out] the stopped/unavailable thread - ] - -############################################################################### -## @brief Page fault reasons. -class zet_debug_page_fault_reason_v(IntEnum): - INVALID = 0 ## The page fault reason is not valid - MAPPING_ERROR = 1 ## The address is not mapped - PERMISSION_ERROR = 2 ## Invalid access permissions - -class zet_debug_page_fault_reason_t(c_int): - def __str__(self): - return str(zet_debug_page_fault_reason_v(self.value)) - - -############################################################################### -## @brief Event information for ::ZET_DEBUG_EVENT_TYPE_PAGE_FAULT -class zet_debug_event_info_page_fault_t(Structure): - _fields_ = [ - ("address", c_ulonglong), ## [out] the faulting address - ("mask", c_ulonglong), ## [out] the alignment mask - ("reason", zet_debug_page_fault_reason_t) ## [out] the page fault reason - ] - -############################################################################### -## @brief Event type-specific information -class zet_debug_event_info_t(Structure): - _fields_ = [ - ("detached", zet_debug_event_info_detached_t), ## [out] type == ::ZET_DEBUG_EVENT_TYPE_DETACHED - ("module", zet_debug_event_info_module_t), ## [out] type == ::ZET_DEBUG_EVENT_TYPE_MODULE_LOAD or - ## ::ZET_DEBUG_EVENT_TYPE_MODULE_UNLOAD - ("thread", zet_debug_event_info_thread_stopped_t), ## [out] type == ::ZET_DEBUG_EVENT_TYPE_THREAD_STOPPED or - ## ::ZET_DEBUG_EVENT_TYPE_THREAD_UNAVAILABLE - ("page_fault", zet_debug_event_info_page_fault_t) ## [out] type == ::ZET_DEBUG_EVENT_TYPE_PAGE_FAULT - ] - -############################################################################### -## @brief A debug event on the device. -class zet_debug_event_t(Structure): - _fields_ = [ - ("type", zet_debug_event_type_t), ## [out] the event type - ("flags", zet_debug_event_flags_t), ## [out] returns 0 (none) or a combination of ::zet_debug_event_flag_t - ("info", zet_debug_event_info_t) ## [out] event type specific information - ] - -############################################################################### -## @brief Supported device memory space types. -class zet_debug_memory_space_type_v(IntEnum): - DEFAULT = 0 ## default memory space (attribute may be omitted) - SLM = 1 ## shared local memory space (GPU-only) - ELF = 2 ## ELF file memory space - BARRIER = 3 ## Barrier memory space - -class zet_debug_memory_space_type_t(c_int): - def __str__(self): - return str(zet_debug_memory_space_type_v(self.value)) - - -############################################################################### -## @brief Device memory space descriptor -class zet_debug_memory_space_desc_t(Structure): - _fields_ = [ - ("stype", zet_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("type", zet_debug_memory_space_type_t), ## [in] type of memory space - ("address", c_ulonglong) ## [in] the virtual address within the memory space - ] - -############################################################################### -## @brief Supported general register set flags. -class zet_debug_regset_flags_v(IntEnum): - READABLE = ZE_BIT(0) ## register set is readable - WRITEABLE = ZE_BIT(1) ## register set is writeable - -class zet_debug_regset_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Device register set properties queried using -## ::zetDebugGetRegisterSetProperties. -class zet_debug_regset_properties_t(Structure): - _fields_ = [ - ("stype", zet_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("type", c_ulong), ## [out] device-specific register set type - ("version", c_ulong), ## [out] device-specific version of this register set - ("generalFlags", zet_debug_regset_flags_t), ## [out] general register set flags - ("deviceFlags", c_ulong), ## [out] device-specific register set flags - ("count", c_ulong), ## [out] number of registers in the set - ("bitSize", c_ulong), ## [out] the size of a register in bits - ("byteSize", c_ulong) ## [out] the size required for reading or writing a register in bytes - ] - -############################################################################### -## @brief Maximum metric group name string size -ZET_MAX_METRIC_GROUP_NAME = 256 - -############################################################################### -## @brief Maximum metric group description string size -ZET_MAX_METRIC_GROUP_DESCRIPTION = 256 - -############################################################################### -## @brief Metric group sampling type -class zet_metric_group_sampling_type_flags_v(IntEnum): - EVENT_BASED = ZE_BIT(0) ## Event based sampling - TIME_BASED = ZE_BIT(1) ## Time based sampling - EXP_TRACER_BASED = ZE_BIT(2) ## Experimental Tracer based sampling - -class zet_metric_group_sampling_type_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Metric group properties queried using ::zetMetricGroupGetProperties -class zet_metric_group_properties_t(Structure): - _fields_ = [ - ("stype", zet_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("name", c_char * ZET_MAX_METRIC_GROUP_NAME), ## [out] metric group name - ("description", c_char * ZET_MAX_METRIC_GROUP_DESCRIPTION), ## [out] metric group description - ("samplingType", zet_metric_group_sampling_type_flags_t), ## [out] metric group sampling type. - ## returns a combination of ::zet_metric_group_sampling_type_flag_t. - ("domain", c_ulong), ## [out] metric group domain number. Cannot use multiple, simultaneous - ## metric groups from the same domain. - ("metricCount", c_ulong) ## [out] metric count belonging to this group - ] - -############################################################################### -## @brief Metric types -class zet_metric_type_v(IntEnum): - DURATION = 0 ## Metric type: duration - EVENT = 1 ## Metric type: event - EVENT_WITH_RANGE = 2 ## Metric type: event with range - THROUGHPUT = 3 ## Metric type: throughput - TIMESTAMP = 4 ## Metric type: timestamp - FLAG = 5 ## Metric type: flag - RATIO = 6 ## Metric type: ratio - RAW = 7 ## Metric type: raw - EVENT_EXP_TIMESTAMP = 0x7ffffff9 ## Metric type: event with only timestamp and value has no meaning - EVENT_EXP_START = 0x7ffffffa ## Metric type: the first event of a start/end event pair - EVENT_EXP_END = 0x7ffffffb ## Metric type: the second event of a start/end event pair - EVENT_EXP_MONOTONIC_WRAPS_VALUE = 0x7ffffffc ## Metric type: value of the event is a monotonically increasing value - ## that can wrap around - EXP_EXPORT_DMA_BUF = 0x7ffffffd ## Metric which exports linux dma_buf, which could be imported/mapped to - ## the host process - IP_EXP = 0x7ffffffe ## Metric type: instruction pointer. Deprecated, use - ## ::ZET_METRIC_TYPE_IP. - IP = 0x7ffffffe ## Metric type: instruction pointer - -class zet_metric_type_t(c_int): - def __str__(self): - return str(zet_metric_type_v(self.value)) - - -############################################################################### -## @brief Metric group calculation type -class zet_metric_group_calculation_type_v(IntEnum): - METRIC_VALUES = 0 ## Calculated metric values from raw data. - MAX_METRIC_VALUES = 1 ## Maximum metric values. - -class zet_metric_group_calculation_type_t(c_int): - def __str__(self): - return str(zet_metric_group_calculation_type_v(self.value)) - - -############################################################################### -## @brief Maximum metric name string size -ZET_MAX_METRIC_NAME = 256 - -############################################################################### -## @brief Maximum metric description string size -ZET_MAX_METRIC_DESCRIPTION = 256 - -############################################################################### -## @brief Maximum metric component string size -ZET_MAX_METRIC_COMPONENT = 256 - -############################################################################### -## @brief Maximum metric result units string size -ZET_MAX_METRIC_RESULT_UNITS = 256 - -############################################################################### -## @brief Metric properties queried using ::zetMetricGetProperties -class zet_metric_properties_t(Structure): - _fields_ = [ - ("stype", zet_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("name", c_char * ZET_MAX_METRIC_NAME), ## [out] metric name - ("description", c_char * ZET_MAX_METRIC_DESCRIPTION), ## [out] metric description - ("component", c_char * ZET_MAX_METRIC_COMPONENT), ## [out] metric component - ("tierNumber", c_ulong), ## [out] number of tier - ("metricType", zet_metric_type_t), ## [out] metric type - ("resultType", zet_value_type_t), ## [out] metric result type - ("resultUnits", c_char * ZET_MAX_METRIC_RESULT_UNITS) ## [out] metric result units - ] - -############################################################################### -## @brief Metric streamer descriptor -class zet_metric_streamer_desc_t(Structure): - _fields_ = [ - ("stype", zet_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("notifyEveryNReports", c_ulong), ## [in,out] number of collected reports after which notification event - ## will be signaled. If the requested value is not supported exactly, - ## then the driver may use a value that is the closest supported - ## approximation and shall update this member during ::zetMetricStreamerOpen. - ("samplingPeriod", c_ulong) ## [in,out] streamer sampling period in nanoseconds. If the requested - ## value is not supported exactly, then the driver may use a value that - ## is the closest supported approximation and shall update this member - ## during ::zetMetricStreamerOpen. - ] - -############################################################################### -## @brief Metric query pool types -class zet_metric_query_pool_type_v(IntEnum): - PERFORMANCE = 0 ## Performance metric query pool. - EXECUTION = 1 ## Skips workload execution between begin/end calls. - -class zet_metric_query_pool_type_t(c_int): - def __str__(self): - return str(zet_metric_query_pool_type_v(self.value)) - - -############################################################################### -## @brief Metric query pool description -class zet_metric_query_pool_desc_t(Structure): - _fields_ = [ - ("stype", zet_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("type", zet_metric_query_pool_type_t), ## [in] Query pool type. - ("count", c_ulong) ## [in] Internal slots count within query pool object. - ] - -############################################################################### -## @brief Supportted profile features -class zet_profile_flags_v(IntEnum): - REGISTER_REALLOCATION = ZE_BIT(0) ## request the compiler attempt to minimize register usage as much as - ## possible to allow for instrumentation - FREE_REGISTER_INFO = ZE_BIT(1) ## request the compiler generate free register info - -class zet_profile_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Profiling meta-data for instrumentation -class zet_profile_properties_t(Structure): - _fields_ = [ - ("stype", zet_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("flags", zet_profile_flags_t), ## [out] indicates which flags were enabled during compilation. - ## returns 0 (none) or a combination of ::zet_profile_flag_t - ("numTokens", c_ulong) ## [out] number of tokens immediately following this structure - ] - -############################################################################### -## @brief Supported profile token types -class zet_profile_token_type_v(IntEnum): - FREE_REGISTER = 0 ## GRF info - -class zet_profile_token_type_t(c_int): - def __str__(self): - return str(zet_profile_token_type_v(self.value)) - - -############################################################################### -## @brief Profile free register token detailing unused registers in the current -## function -class zet_profile_free_register_token_t(Structure): - _fields_ = [ - ("type", zet_profile_token_type_t), ## [out] type of token - ("size", c_ulong), ## [out] total size of the token, in bytes - ("count", c_ulong) ## [out] number of register sequences immediately following this - ## structure - ] - -############################################################################### -## @brief Profile register sequence detailing consecutive bytes, all of which -## are unused -class zet_profile_register_sequence_t(Structure): - _fields_ = [ - ("start", c_ulong), ## [out] starting byte in the register table, representing the start of - ## unused bytes in the current function - ("count", c_ulong) ## [out] number of consecutive bytes in the sequence, starting from start - ] - -############################################################################### -## @brief API Tracing Experimental Extension Name -ZET_API_TRACING_EXP_NAME = "ZET_experimental_api_tracing" - -############################################################################### -## @brief API Tracing Experimental Extension Version(s) -class zet_api_tracing_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class zet_api_tracing_exp_version_t(c_int): - def __str__(self): - return str(zet_api_tracing_exp_version_v(self.value)) - - -############################################################################### -## @brief Alias the existing callbacks definition for 'core' callbacks -class zet_core_callbacks_t(ze_callbacks_t): - pass - -############################################################################### -## @brief Tracer descriptor -class zet_tracer_exp_desc_t(Structure): - _fields_ = [ - ("stype", zet_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("pUserData", c_void_p) ## [in] pointer passed to every tracer's callbacks - ] - -############################################################################### -## @brief Concurrent Metric Groups Experimental Extension Name -ZET_CONCURRENT_METRIC_GROUPS_EXP_NAME = "ZET_experimental_concurrent_metric_groups" - -############################################################################### -## @brief Concurrent Metric Groups Experimental Extension Version(s) -class zet_concurrent_metric_groups_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class zet_concurrent_metric_groups_exp_version_t(c_int): - def __str__(self): - return str(zet_concurrent_metric_groups_exp_version_v(self.value)) - - -############################################################################### -## @brief Metric Tracer Experimental Extension Name -ZET_METRICS_TRACER_EXP_NAME = "ZET_experimental_metric_tracer" - -############################################################################### -## @brief Metric Tracer Experimental Extension Version(s) -class zet_metric_tracer_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class zet_metric_tracer_exp_version_t(c_int): - def __str__(self): - return str(zet_metric_tracer_exp_version_v(self.value)) - - -############################################################################### -## @brief Handle of metric tracer's object -class zet_metric_tracer_exp_handle_t(c_void_p): - pass - -############################################################################### -## @brief Handle of metric decoder's object -class zet_metric_decoder_exp_handle_t(c_void_p): - pass - -############################################################################### -## @brief Metric tracer descriptor -class zet_metric_tracer_exp_desc_t(Structure): - _fields_ = [ - ("stype", zet_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("notifyEveryNBytes", c_ulong) ## [in,out] number of collected bytes after which notification event will - ## be signaled. If the requested value is not supported exactly, then the - ## driver may use a value that is the closest supported approximation and - ## shall update this member during ::zetMetricTracerCreateExp. - ] - -############################################################################### -## @brief Decoded metric entry -class zet_metric_entry_exp_t(Structure): - _fields_ = [ - ("value", zet_value_t), ## [out] value of the decodable metric entry or event. Number is - ## meaningful based on the metric type. - ("timeStamp", c_ulonglong), ## [out] timestamp at which the event happened. - ("metricIndex", c_ulong), ## [out] index to the decodable metric handle in the input array - ## (phMetric) in ::zetMetricTracerDecodeExp(). - ("onSubdevice", ze_bool_t), ## [out] True if the event occurred on a sub-device; false means the - ## device on which the metric tracer was opened does not have - ## sub-devices. - ("subdeviceId", c_ulong) ## [out] If onSubdevice is true, this gives the ID of the sub-device. - ] - -############################################################################### -## @brief Metric group type -class zet_metric_group_type_exp_flags_v(IntEnum): - EXPORT_DMA_BUF = ZE_BIT(0) ## Metric group and metrics exports memory using linux dma-buf, which - ## could be imported/mapped to the host process. Properties of the - ## dma_buf could be queried using ::zet_export_dma_buf_exp_properties_t. - USER_CREATED = ZE_BIT(1) ## Metric group created using ::zetDeviceCreateMetricGroupsFromMetricsExp - OTHER = ZE_BIT(2) ## Metric group which has a collection of metrics - MARKER = ZE_BIT(3) ## Metric group is capable of generating Marker metric - -class zet_metric_group_type_exp_flags_t(c_int): - def __str__(self): - return hex(self.value) - - -############################################################################### -## @brief Query the metric group type using `pNext` of -## ::zet_metric_group_properties_t -class zet_metric_group_type_exp_t(Structure): - _fields_ = [ - ("stype", zet_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("type", zet_metric_group_type_exp_flags_t) ## [out] metric group type. - ## returns a combination of ::zet_metric_group_type_exp_flags_t. - ] - -############################################################################### -## @brief Exported dma_buf properties queried using `pNext` of -## ::zet_metric_group_properties_t or ::zet_metric_properties_t -class zet_export_dma_buf_exp_properties_t(Structure): - _fields_ = [ - ("stype", zet_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("fd", c_int), ## [out] the file descriptor handle that could be used to import the - ## memory by the host process. - ("size", c_size_t) ## [out] size in bytes of the dma_buf - ] - -############################################################################### -## @brief Marker Support Using MetricGroup Experimental Extension Name -ZET_METRIC_GROUP_MARKER_EXP_NAME = "ZET_experimental_metric_group_marker" - -############################################################################### -## @brief Marker Support Using MetricGroup Experimental Extension Version(s) -class zet_metric_group_marker_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class zet_metric_group_marker_exp_version_t(c_int): - def __str__(self): - return str(zet_metric_group_marker_exp_version_v(self.value)) - - -############################################################################### -## @brief Query the metric source unique identifier using `pNext` of -## ::zet_metric_group_properties_t -class zet_metric_source_id_exp_t(Structure): - _fields_ = [ - ("stype", zet_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("sourceId", c_ulong) ## [out] unique number representing the Metric Source. - ] - -############################################################################### -## @brief Runtime Enabling and Disabling Metrics Extension Name -ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_NAME = "ZET_experimental_metrics_runtime_enable_disable" - -############################################################################### -## @brief Runtime Enabling and Disabling Metrics Extension Version(s) -class zet_metrics_runtime_enable_disable_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class zet_metrics_runtime_enable_disable_exp_version_t(c_int): - def __str__(self): - return str(zet_metrics_runtime_enable_disable_exp_version_v(self.value)) - - -############################################################################### -## @brief Calculating Multiple Metrics Experimental Extension Name -ZET_MULTI_METRICS_EXP_NAME = "ZET_experimental_calculate_multiple_metrics" - -############################################################################### -## @brief Calculating Multiple Metrics Experimental Extension Version(s) -class ze_calculate_multiple_metrics_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_calculate_multiple_metrics_exp_version_t(c_int): - def __str__(self): - return str(ze_calculate_multiple_metrics_exp_version_v(self.value)) - - -############################################################################### -## @brief Global Metric Timestamps Experimental Extension Name -ZET_GLOBAL_METRICS_TIMESTAMPS_EXP_NAME = "ZET_experimental_global_metric_timestamps" - -############################################################################### -## @brief Global Metric Timestamps Experimental Extension Version(s) -class ze_metric_global_timestamps_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class ze_metric_global_timestamps_exp_version_t(c_int): - def __str__(self): - return str(ze_metric_global_timestamps_exp_version_v(self.value)) - - -############################################################################### -## @brief Metric timestamps resolution -## -## @details -## - This structure may be returned from ::zetMetricGroupGetProperties via -## the `pNext` member of ::zet_metric_group_properties_t. -## - Used for mapping metric timestamps to other timers. -class zet_metric_global_timestamps_resolution_exp_t(Structure): - _fields_ = [ - ("stype", zet_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("timerResolution", c_ulonglong), ## [out] Returns the resolution of metrics timer (used for timestamps) in - ## cycles/sec. - ("timestampValidBits", c_ulonglong) ## [out] Returns the number of valid bits in the timestamp value. - ] - -############################################################################### -## @brief Exporting Metrics Data Experimental Extension Name -ZET_EXPORT_METRICS_DATA_EXP_NAME = "ZET_experimental_metric_export_data" - -############################################################################### -## @brief Exporting Metrics Data Experimental Extension Version(s) -class zet_export_metric_data_exp_version_v(IntEnum): - _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 - CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version - -class zet_export_metric_data_exp_version_t(c_int): - def __str__(self): - return str(zet_export_metric_data_exp_version_v(self.value)) - - -############################################################################### -## @brief Maximum count of characters in export data element name -ZET_MAX_METRIC_EXPORT_DATA_ELEMENT_NAME_EXP = 256 - -############################################################################### -## @brief Maximum export data element description string size -ZET_MAX_METRIC_EXPORT_DATA_ELEMENT_DESCRIPTION_EXP = 256 - -############################################################################### -## @brief Metrics calculation descriptor -class zet_metric_calculate_exp_desc_t(Structure): - _fields_ = [ - ("stype", zet_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("rawReportSkipCount", c_ulong) ## [in] number of reports to skip during calculation - ] - -############################################################################### -## @brief Programmable Metrics Experimental Extension Name -ZET_PROGRAMMABLE_METRICS_EXP_NAME = "ZET_experimental_programmable_metrics" - -############################################################################### -## @brief Programmable Metrics Experimental Extension Version(s) -class zet_metric_programmable_exp_version_v(IntEnum): - _1_1 = ZE_MAKE_VERSION( 1, 1 ) ## version 1.1 - CURRENT = ZE_MAKE_VERSION( 1, 1 ) ## latest known version - -class zet_metric_programmable_exp_version_t(c_int): - def __str__(self): - return str(zet_metric_programmable_exp_version_v(self.value)) - - -############################################################################### -## @brief Maximum count of characters in export data element name -ZET_MAX_PROGRAMMABLE_METRICS_ELEMENT_NAME_EXP = 256 - -############################################################################### -## @brief Maximum export data element description string size -ZET_MAX_PROGRAMMABLE_METRICS_ELEMENT_DESCRIPTION_EXP = 256 - -############################################################################### -## @brief Maximum count of characters in metric group name prefix -ZET_MAX_METRIC_GROUP_NAME_PREFIX_EXP = 64 - -############################################################################### -## @brief Maximum metric programmable name string size -ZET_MAX_METRIC_PROGRAMMABLE_NAME_EXP = 128 - -############################################################################### -## @brief Maximum metric programmable description string size -ZET_MAX_METRIC_PROGRAMMABLE_DESCRIPTION_EXP = 128 - -############################################################################### -## @brief Maximum metric programmable component string size -ZET_MAX_METRIC_PROGRAMMABLE_COMPONENT_EXP = 128 - -############################################################################### -## @brief Maximum metric programmable parameter string size -ZET_MAX_METRIC_PROGRAMMABLE_PARAMETER_NAME_EXP = 128 - -############################################################################### -## @brief Maximum value for programmable value description -ZET_MAX_METRIC_PROGRAMMABLE_VALUE_DESCRIPTION_EXP = 128 - -############################################################################### -## @brief Maximum value metric group name prefix -ZE_MAX_METRIC_GROUP_NAME_PREFIX = 64 - -############################################################################### -## @brief Handle of metric programmable's object -class zet_metric_programmable_exp_handle_t(c_void_p): - pass - -############################################################################### -## @brief Metric Programmable properties queried using -## ::zetMetricProgrammableGetPropertiesExp -class zet_metric_programmable_exp_properties_t(Structure): - _fields_ = [ - ("stype", zet_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("name", c_char * ZET_MAX_METRIC_PROGRAMMABLE_NAME_EXP), ## [out] metric programmable name - ("description", c_char * ZET_MAX_METRIC_PROGRAMMABLE_DESCRIPTION_EXP), ## [out] metric programmable description - ("component", c_char * ZET_MAX_METRIC_PROGRAMMABLE_COMPONENT_EXP), ## [out] metric programmable component - ("tierNumber", c_ulong), ## [out] tier number - ("domain", c_ulong), ## [out] metric domain number. - ("parameterCount", c_ulong), ## [out] number of parameters in the programmable - ("samplingType", zet_metric_group_sampling_type_flags_t), ## [out] metric sampling type. - ## returns a combination of ::zet_metric_group_sampling_type_flag_t. - ("sourceId", c_ulong) ## [out] unique metric source identifier(within platform)to identify the - ## HW block where the metric is collected. - ] - -############################################################################### -## @brief Metric Programmable Parameter types -class zet_metric_programmable_param_type_exp_v(IntEnum): - DISAGGREGATION = 0 ## Metric is disaggregated. - LATENCY = 1 ## Metric for latency measurement. - NORMALIZATION_UTILIZATION = 2 ## Produces normalization in percent using raw_metric * 100 / cycles / HW - ## instance_count. - NORMALIZATION_AVERAGE = 3 ## Produces normalization using raw_metric / HW instance_count. - NORMALIZATION_RATE = 4 ## Produces normalization average using raw_metric / timestamp. - NORMALIZATION_BYTES = 5 ## Produces normalization average using raw_metric * n bytes. - GENERIC = 6 ## Generic Parameter type. Please refer the parameter's description. - -class zet_metric_programmable_param_type_exp_t(c_int): - def __str__(self): - return str(zet_metric_programmable_param_type_exp_v(self.value)) - - -############################################################################### -## @brief Supported value info types -class zet_value_info_type_exp_v(IntEnum): - UINT32 = 0 ## 32-bit unsigned-integer - UINT64 = 1 ## 64-bit unsigned-integer - FLOAT32 = 2 ## 32-bit floating-point - FLOAT64 = 3 ## 64-bit floating-point - BOOL8 = 4 ## 8-bit boolean - UINT8 = 5 ## 8-bit unsigned-integer - UINT16 = 6 ## 16-bit unsigned-integer - UINT64_RANGE = 7 ## 64-bit unsigned-integer range (minimum and maximum) - FLOAT64_RANGE = 8 ## 64-bit floating point range (minimum and maximum) - -class zet_value_info_type_exp_t(c_int): - def __str__(self): - return str(zet_value_info_type_exp_v(self.value)) - - -############################################################################### -## @brief Value info of type uint64_t range -class zet_value_uint64_range_exp_t(Structure): - _fields_ = [ - ("ui64Min", c_ulonglong), ## [out] minimum value of the range - ("ui64Max", c_ulonglong) ## [out] maximum value of the range - ] - -############################################################################### -## @brief Value info of type float64 range -class zet_value_fp64_range_exp_t(Structure): - _fields_ = [ - ("fp64Min", c_double), ## [out] minimum value of the range - ("fp64Max", c_double) ## [out] maximum value of the range - ] - -############################################################################### -## @brief Union of value information -class zet_value_info_exp_t(Structure): - _fields_ = [ - ("ui32", c_ulong), ## [out] 32-bit unsigned-integer - ("ui64", c_ulonglong), ## [out] 64-bit unsigned-integer - ("fp32", c_float), ## [out] 32-bit floating-point - ("fp64", c_double), ## [out] 64-bit floating-point - ("b8", ze_bool_t), ## [out] 8-bit boolean - ("ui8", c_ubyte), ## [out] 8-bit unsigned integer - ("ui16", c_ushort), ## [out] 16-bit unsigned integer - ("ui64Range", zet_value_uint64_range_exp_t), ## [out] minimum and maximum value of the range - ("fp64Range", zet_value_fp64_range_exp_t) ## [out] minimum and maximum value of the range - ] - -############################################################################### -## @brief Metric Programmable parameter information -class zet_metric_programmable_param_info_exp_t(Structure): - _fields_ = [ - ("stype", zet_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("type", zet_metric_programmable_param_type_exp_t), ## [out] programmable parameter type - ("name", c_char * ZET_MAX_METRIC_PROGRAMMABLE_PARAMETER_NAME_EXP), ## [out] metric programmable parameter name - ("valueInfoType", zet_value_info_type_exp_t), ## [out] value info type - ("defaultValue", zet_value_t), ## [out] default value for the parameter - ("valueInfoCount", c_ulong) ## [out] count of ::zet_metric_programmable_param_value_info_exp_t - ] - -############################################################################### -## @brief Metric Programmable parameter value information -class zet_metric_programmable_param_value_info_exp_t(Structure): - _fields_ = [ - ("stype", zet_structure_type_t), ## [in] type of this structure - ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific - ## structure (i.e. contains stype and pNext). - ("valueInfo", zet_value_info_exp_t), ## [out] information about the parameter value - ("description", c_char * ZET_MAX_METRIC_PROGRAMMABLE_VALUE_DESCRIPTION_EXP) ## [out] description about the value - ] - -############################################################################### -## @brief Metric Programmable parameter value -class zet_metric_programmable_param_value_exp_t(Structure): - _fields_ = [ - ("value", zet_value_t) ## [in] parameter value - ] - -############################################################################### -__use_win_types = "Windows" == platform.uname()[0] - -############################################################################### -## @brief Function-pointer for zetMetricProgrammableGetExp -if __use_win_types: - _zetMetricProgrammableGetExp_t = WINFUNCTYPE( ze_result_t, zet_device_handle_t, POINTER(c_ulong), POINTER(zet_metric_programmable_exp_handle_t) ) -else: - _zetMetricProgrammableGetExp_t = CFUNCTYPE( ze_result_t, zet_device_handle_t, POINTER(c_ulong), POINTER(zet_metric_programmable_exp_handle_t) ) - -############################################################################### -## @brief Function-pointer for zetMetricProgrammableGetPropertiesExp -if __use_win_types: - _zetMetricProgrammableGetPropertiesExp_t = WINFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, POINTER(zet_metric_programmable_exp_properties_t) ) -else: - _zetMetricProgrammableGetPropertiesExp_t = CFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, POINTER(zet_metric_programmable_exp_properties_t) ) - -############################################################################### -## @brief Function-pointer for zetMetricProgrammableGetParamInfoExp -if __use_win_types: - _zetMetricProgrammableGetParamInfoExp_t = WINFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, POINTER(c_ulong), POINTER(zet_metric_programmable_param_info_exp_t) ) -else: - _zetMetricProgrammableGetParamInfoExp_t = CFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, POINTER(c_ulong), POINTER(zet_metric_programmable_param_info_exp_t) ) - -############################################################################### -## @brief Function-pointer for zetMetricProgrammableGetParamValueInfoExp -if __use_win_types: - _zetMetricProgrammableGetParamValueInfoExp_t = WINFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, c_ulong, POINTER(c_ulong), POINTER(zet_metric_programmable_param_value_info_exp_t) ) -else: - _zetMetricProgrammableGetParamValueInfoExp_t = CFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, c_ulong, POINTER(c_ulong), POINTER(zet_metric_programmable_param_value_info_exp_t) ) - - -############################################################################### -## @brief Table of MetricProgrammableExp functions pointers -class _zet_metric_programmable_exp_dditable_t(Structure): - _fields_ = [ - ("pfnGetExp", c_void_p), ## _zetMetricProgrammableGetExp_t - ("pfnGetPropertiesExp", c_void_p), ## _zetMetricProgrammableGetPropertiesExp_t - ("pfnGetParamInfoExp", c_void_p), ## _zetMetricProgrammableGetParamInfoExp_t - ("pfnGetParamValueInfoExp", c_void_p) ## _zetMetricProgrammableGetParamValueInfoExp_t - ] - -############################################################################### -## @brief Function-pointer for zetMetricTracerCreateExp -if __use_win_types: - _zetMetricTracerCreateExp_t = WINFUNCTYPE( ze_result_t, zet_context_handle_t, zet_device_handle_t, c_ulong, POINTER(zet_metric_group_handle_t), POINTER(zet_metric_tracer_exp_desc_t), ze_event_handle_t, POINTER(zet_metric_tracer_exp_handle_t) ) -else: - _zetMetricTracerCreateExp_t = CFUNCTYPE( ze_result_t, zet_context_handle_t, zet_device_handle_t, c_ulong, POINTER(zet_metric_group_handle_t), POINTER(zet_metric_tracer_exp_desc_t), ze_event_handle_t, POINTER(zet_metric_tracer_exp_handle_t) ) - -############################################################################### -## @brief Function-pointer for zetMetricTracerDestroyExp -if __use_win_types: - _zetMetricTracerDestroyExp_t = WINFUNCTYPE( ze_result_t, zet_metric_tracer_exp_handle_t ) -else: - _zetMetricTracerDestroyExp_t = CFUNCTYPE( ze_result_t, zet_metric_tracer_exp_handle_t ) - -############################################################################### -## @brief Function-pointer for zetMetricTracerEnableExp -if __use_win_types: - _zetMetricTracerEnableExp_t = WINFUNCTYPE( ze_result_t, zet_metric_tracer_exp_handle_t, ze_bool_t ) -else: - _zetMetricTracerEnableExp_t = CFUNCTYPE( ze_result_t, zet_metric_tracer_exp_handle_t, ze_bool_t ) - -############################################################################### -## @brief Function-pointer for zetMetricTracerDisableExp -if __use_win_types: - _zetMetricTracerDisableExp_t = WINFUNCTYPE( ze_result_t, zet_metric_tracer_exp_handle_t, ze_bool_t ) -else: - _zetMetricTracerDisableExp_t = CFUNCTYPE( ze_result_t, zet_metric_tracer_exp_handle_t, ze_bool_t ) - -############################################################################### -## @brief Function-pointer for zetMetricTracerReadDataExp -if __use_win_types: - _zetMetricTracerReadDataExp_t = WINFUNCTYPE( ze_result_t, zet_metric_tracer_exp_handle_t, POINTER(c_size_t), POINTER(c_ubyte) ) -else: - _zetMetricTracerReadDataExp_t = CFUNCTYPE( ze_result_t, zet_metric_tracer_exp_handle_t, POINTER(c_size_t), POINTER(c_ubyte) ) - -############################################################################### -## @brief Function-pointer for zetMetricTracerDecodeExp -if __use_win_types: - _zetMetricTracerDecodeExp_t = WINFUNCTYPE( ze_result_t, zet_metric_decoder_exp_handle_t, POINTER(c_size_t), POINTER(c_ubyte), c_ulong, POINTER(zet_metric_handle_t), POINTER(c_ulong), POINTER(c_ulong), POINTER(c_ulong), POINTER(zet_metric_entry_exp_t) ) -else: - _zetMetricTracerDecodeExp_t = CFUNCTYPE( ze_result_t, zet_metric_decoder_exp_handle_t, POINTER(c_size_t), POINTER(c_ubyte), c_ulong, POINTER(zet_metric_handle_t), POINTER(c_ulong), POINTER(c_ulong), POINTER(c_ulong), POINTER(zet_metric_entry_exp_t) ) - - -############################################################################### -## @brief Table of MetricTracerExp functions pointers -class _zet_metric_tracer_exp_dditable_t(Structure): - _fields_ = [ - ("pfnCreateExp", c_void_p), ## _zetMetricTracerCreateExp_t - ("pfnDestroyExp", c_void_p), ## _zetMetricTracerDestroyExp_t - ("pfnEnableExp", c_void_p), ## _zetMetricTracerEnableExp_t - ("pfnDisableExp", c_void_p), ## _zetMetricTracerDisableExp_t - ("pfnReadDataExp", c_void_p), ## _zetMetricTracerReadDataExp_t - ("pfnDecodeExp", c_void_p) ## _zetMetricTracerDecodeExp_t - ] - -############################################################################### -## @brief Function-pointer for zetMetricDecoderCreateExp -if __use_win_types: - _zetMetricDecoderCreateExp_t = WINFUNCTYPE( ze_result_t, zet_metric_tracer_exp_handle_t, POINTER(zet_metric_decoder_exp_handle_t) ) -else: - _zetMetricDecoderCreateExp_t = CFUNCTYPE( ze_result_t, zet_metric_tracer_exp_handle_t, POINTER(zet_metric_decoder_exp_handle_t) ) - -############################################################################### -## @brief Function-pointer for zetMetricDecoderDestroyExp -if __use_win_types: - _zetMetricDecoderDestroyExp_t = WINFUNCTYPE( ze_result_t, zet_metric_decoder_exp_handle_t ) -else: - _zetMetricDecoderDestroyExp_t = CFUNCTYPE( ze_result_t, zet_metric_decoder_exp_handle_t ) - -############################################################################### -## @brief Function-pointer for zetMetricDecoderGetDecodableMetricsExp -if __use_win_types: - _zetMetricDecoderGetDecodableMetricsExp_t = WINFUNCTYPE( ze_result_t, zet_metric_decoder_exp_handle_t, POINTER(c_ulong), POINTER(zet_metric_handle_t) ) -else: - _zetMetricDecoderGetDecodableMetricsExp_t = CFUNCTYPE( ze_result_t, zet_metric_decoder_exp_handle_t, POINTER(c_ulong), POINTER(zet_metric_handle_t) ) - - -############################################################################### -## @brief Table of MetricDecoderExp functions pointers -class _zet_metric_decoder_exp_dditable_t(Structure): - _fields_ = [ - ("pfnCreateExp", c_void_p), ## _zetMetricDecoderCreateExp_t - ("pfnDestroyExp", c_void_p), ## _zetMetricDecoderDestroyExp_t - ("pfnGetDecodableMetricsExp", c_void_p) ## _zetMetricDecoderGetDecodableMetricsExp_t - ] - -############################################################################### -## @brief Function-pointer for zetDeviceGetDebugProperties -if __use_win_types: - _zetDeviceGetDebugProperties_t = WINFUNCTYPE( ze_result_t, zet_device_handle_t, POINTER(zet_device_debug_properties_t) ) -else: - _zetDeviceGetDebugProperties_t = CFUNCTYPE( ze_result_t, zet_device_handle_t, POINTER(zet_device_debug_properties_t) ) - - -############################################################################### -## @brief Table of Device functions pointers -class _zet_device_dditable_t(Structure): - _fields_ = [ - ("pfnGetDebugProperties", c_void_p) ## _zetDeviceGetDebugProperties_t - ] - -############################################################################### -## @brief Function-pointer for zetDeviceGetConcurrentMetricGroupsExp -if __use_win_types: - _zetDeviceGetConcurrentMetricGroupsExp_t = WINFUNCTYPE( ze_result_t, zet_device_handle_t, c_ulong, *, *, * ) -else: - _zetDeviceGetConcurrentMetricGroupsExp_t = CFUNCTYPE( ze_result_t, zet_device_handle_t, c_ulong, *, *, * ) - -############################################################################### -## @brief Function-pointer for zetDeviceCreateMetricGroupsFromMetricsExp -if __use_win_types: - _zetDeviceCreateMetricGroupsFromMetricsExp_t = WINFUNCTYPE( ze_result_t, zet_device_handle_t, c_ulong, *, *, *, *, POINTER(zet_metric_group_handle_t) ) -else: - _zetDeviceCreateMetricGroupsFromMetricsExp_t = CFUNCTYPE( ze_result_t, zet_device_handle_t, c_ulong, *, *, *, *, POINTER(zet_metric_group_handle_t) ) - -############################################################################### -## @brief Function-pointer for zetDeviceEnableMetricsExp -if __use_win_types: - _zetDeviceEnableMetricsExp_t = WINFUNCTYPE( ze_result_t, zet_device_handle_t ) -else: - _zetDeviceEnableMetricsExp_t = CFUNCTYPE( ze_result_t, zet_device_handle_t ) - -############################################################################### -## @brief Function-pointer for zetDeviceDisableMetricsExp -if __use_win_types: - _zetDeviceDisableMetricsExp_t = WINFUNCTYPE( ze_result_t, zet_device_handle_t ) -else: - _zetDeviceDisableMetricsExp_t = CFUNCTYPE( ze_result_t, zet_device_handle_t ) - - -############################################################################### -## @brief Table of DeviceExp functions pointers -class _zet_device_exp_dditable_t(Structure): - _fields_ = [ - ("pfnGetConcurrentMetricGroupsExp", c_void_p), ## _zetDeviceGetConcurrentMetricGroupsExp_t - ("pfnCreateMetricGroupsFromMetricsExp", c_void_p), ## _zetDeviceCreateMetricGroupsFromMetricsExp_t - ("pfnEnableMetricsExp", c_void_p), ## _zetDeviceEnableMetricsExp_t - ("pfnDisableMetricsExp", c_void_p) ## _zetDeviceDisableMetricsExp_t - ] - -############################################################################### -## @brief Function-pointer for zetContextActivateMetricGroups -if __use_win_types: - _zetContextActivateMetricGroups_t = WINFUNCTYPE( ze_result_t, zet_context_handle_t, zet_device_handle_t, c_ulong, POINTER(zet_metric_group_handle_t) ) -else: - _zetContextActivateMetricGroups_t = CFUNCTYPE( ze_result_t, zet_context_handle_t, zet_device_handle_t, c_ulong, POINTER(zet_metric_group_handle_t) ) - - -############################################################################### -## @brief Table of Context functions pointers -class _zet_context_dditable_t(Structure): - _fields_ = [ - ("pfnActivateMetricGroups", c_void_p) ## _zetContextActivateMetricGroups_t - ] - -############################################################################### -## @brief Function-pointer for zetCommandListAppendMetricStreamerMarker -if __use_win_types: - _zetCommandListAppendMetricStreamerMarker_t = WINFUNCTYPE( ze_result_t, zet_command_list_handle_t, zet_metric_streamer_handle_t, c_ulong ) -else: - _zetCommandListAppendMetricStreamerMarker_t = CFUNCTYPE( ze_result_t, zet_command_list_handle_t, zet_metric_streamer_handle_t, c_ulong ) - -############################################################################### -## @brief Function-pointer for zetCommandListAppendMetricQueryBegin -if __use_win_types: - _zetCommandListAppendMetricQueryBegin_t = WINFUNCTYPE( ze_result_t, zet_command_list_handle_t, zet_metric_query_handle_t ) -else: - _zetCommandListAppendMetricQueryBegin_t = CFUNCTYPE( ze_result_t, zet_command_list_handle_t, zet_metric_query_handle_t ) - -############################################################################### -## @brief Function-pointer for zetCommandListAppendMetricQueryEnd -if __use_win_types: - _zetCommandListAppendMetricQueryEnd_t = WINFUNCTYPE( ze_result_t, zet_command_list_handle_t, zet_metric_query_handle_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) -else: - _zetCommandListAppendMetricQueryEnd_t = CFUNCTYPE( ze_result_t, zet_command_list_handle_t, zet_metric_query_handle_t, ze_event_handle_t, c_ulong, POINTER(ze_event_handle_t) ) - -############################################################################### -## @brief Function-pointer for zetCommandListAppendMetricMemoryBarrier -if __use_win_types: - _zetCommandListAppendMetricMemoryBarrier_t = WINFUNCTYPE( ze_result_t, zet_command_list_handle_t ) -else: - _zetCommandListAppendMetricMemoryBarrier_t = CFUNCTYPE( ze_result_t, zet_command_list_handle_t ) - - -############################################################################### -## @brief Table of CommandList functions pointers -class _zet_command_list_dditable_t(Structure): - _fields_ = [ - ("pfnAppendMetricStreamerMarker", c_void_p), ## _zetCommandListAppendMetricStreamerMarker_t - ("pfnAppendMetricQueryBegin", c_void_p), ## _zetCommandListAppendMetricQueryBegin_t - ("pfnAppendMetricQueryEnd", c_void_p), ## _zetCommandListAppendMetricQueryEnd_t - ("pfnAppendMetricMemoryBarrier", c_void_p) ## _zetCommandListAppendMetricMemoryBarrier_t - ] - -############################################################################### -## @brief Function-pointer for zetCommandListAppendMarkerExp -if __use_win_types: - _zetCommandListAppendMarkerExp_t = WINFUNCTYPE( ze_result_t, zet_command_list_handle_t, zet_metric_group_handle_t, c_ulong ) -else: - _zetCommandListAppendMarkerExp_t = CFUNCTYPE( ze_result_t, zet_command_list_handle_t, zet_metric_group_handle_t, c_ulong ) - - -############################################################################### -## @brief Table of CommandListExp functions pointers -class _zet_command_list_exp_dditable_t(Structure): - _fields_ = [ - ("pfnAppendMarkerExp", c_void_p) ## _zetCommandListAppendMarkerExp_t - ] - -############################################################################### -## @brief Function-pointer for zetModuleGetDebugInfo -if __use_win_types: - _zetModuleGetDebugInfo_t = WINFUNCTYPE( ze_result_t, zet_module_handle_t, zet_module_debug_info_format_t, POINTER(c_size_t), POINTER(c_ubyte) ) -else: - _zetModuleGetDebugInfo_t = CFUNCTYPE( ze_result_t, zet_module_handle_t, zet_module_debug_info_format_t, POINTER(c_size_t), POINTER(c_ubyte) ) - - -############################################################################### -## @brief Table of Module functions pointers -class _zet_module_dditable_t(Structure): - _fields_ = [ - ("pfnGetDebugInfo", c_void_p) ## _zetModuleGetDebugInfo_t - ] - -############################################################################### -## @brief Function-pointer for zetKernelGetProfileInfo -if __use_win_types: - _zetKernelGetProfileInfo_t = WINFUNCTYPE( ze_result_t, zet_kernel_handle_t, POINTER(zet_profile_properties_t) ) -else: - _zetKernelGetProfileInfo_t = CFUNCTYPE( ze_result_t, zet_kernel_handle_t, POINTER(zet_profile_properties_t) ) - - -############################################################################### -## @brief Table of Kernel functions pointers -class _zet_kernel_dditable_t(Structure): - _fields_ = [ - ("pfnGetProfileInfo", c_void_p) ## _zetKernelGetProfileInfo_t - ] - -############################################################################### -## @brief Function-pointer for zetMetricGet -if __use_win_types: - _zetMetricGet_t = WINFUNCTYPE( ze_result_t, zet_metric_group_handle_t, POINTER(c_ulong), POINTER(zet_metric_handle_t) ) -else: - _zetMetricGet_t = CFUNCTYPE( ze_result_t, zet_metric_group_handle_t, POINTER(c_ulong), POINTER(zet_metric_handle_t) ) - -############################################################################### -## @brief Function-pointer for zetMetricGetProperties -if __use_win_types: - _zetMetricGetProperties_t = WINFUNCTYPE( ze_result_t, zet_metric_handle_t, POINTER(zet_metric_properties_t) ) -else: - _zetMetricGetProperties_t = CFUNCTYPE( ze_result_t, zet_metric_handle_t, POINTER(zet_metric_properties_t) ) - - -############################################################################### -## @brief Table of Metric functions pointers -class _zet_metric_dditable_t(Structure): - _fields_ = [ - ("pfnGet", c_void_p), ## _zetMetricGet_t - ("pfnGetProperties", c_void_p) ## _zetMetricGetProperties_t - ] - -############################################################################### -## @brief Function-pointer for zetMetricCreateFromProgrammableExp -if __use_win_types: - _zetMetricCreateFromProgrammableExp_t = WINFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, POINTER(zet_metric_programmable_param_value_exp_t), c_ulong, c_char_p, c_char_p, POINTER(c_ulong), POINTER(zet_metric_handle_t) ) -else: - _zetMetricCreateFromProgrammableExp_t = CFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, POINTER(zet_metric_programmable_param_value_exp_t), c_ulong, c_char_p, c_char_p, POINTER(c_ulong), POINTER(zet_metric_handle_t) ) - -############################################################################### -## @brief Function-pointer for zetMetricDestroyExp -if __use_win_types: - _zetMetricDestroyExp_t = WINFUNCTYPE( ze_result_t, zet_metric_handle_t ) -else: - _zetMetricDestroyExp_t = CFUNCTYPE( ze_result_t, zet_metric_handle_t ) - -############################################################################### -## @brief Function-pointer for zetMetricCreateFromProgrammableExp2 -if __use_win_types: - _zetMetricCreateFromProgrammableExp2_t = WINFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, c_ulong, POINTER(zet_metric_programmable_param_value_exp_t), c_char_p, c_char_p, POINTER(c_ulong), POINTER(zet_metric_handle_t) ) -else: - _zetMetricCreateFromProgrammableExp2_t = CFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, c_ulong, POINTER(zet_metric_programmable_param_value_exp_t), c_char_p, c_char_p, POINTER(c_ulong), POINTER(zet_metric_handle_t) ) - - -############################################################################### -## @brief Table of MetricExp functions pointers -class _zet_metric_exp_dditable_t(Structure): - _fields_ = [ - ("pfnCreateFromProgrammableExp", c_void_p), ## _zetMetricCreateFromProgrammableExp_t - ("pfnDestroyExp", c_void_p), ## _zetMetricDestroyExp_t - ("pfnCreateFromProgrammableExp2", c_void_p) ## _zetMetricCreateFromProgrammableExp2_t - ] - -############################################################################### -## @brief Function-pointer for zetMetricGroupGet -if __use_win_types: - _zetMetricGroupGet_t = WINFUNCTYPE( ze_result_t, zet_device_handle_t, POINTER(c_ulong), POINTER(zet_metric_group_handle_t) ) -else: - _zetMetricGroupGet_t = CFUNCTYPE( ze_result_t, zet_device_handle_t, POINTER(c_ulong), POINTER(zet_metric_group_handle_t) ) - -############################################################################### -## @brief Function-pointer for zetMetricGroupGetProperties -if __use_win_types: - _zetMetricGroupGetProperties_t = WINFUNCTYPE( ze_result_t, zet_metric_group_handle_t, POINTER(zet_metric_group_properties_t) ) -else: - _zetMetricGroupGetProperties_t = CFUNCTYPE( ze_result_t, zet_metric_group_handle_t, POINTER(zet_metric_group_properties_t) ) - -############################################################################### -## @brief Function-pointer for zetMetricGroupCalculateMetricValues -if __use_win_types: - _zetMetricGroupCalculateMetricValues_t = WINFUNCTYPE( ze_result_t, zet_metric_group_handle_t, zet_metric_group_calculation_type_t, c_size_t, POINTER(c_ubyte), POINTER(c_ulong), POINTER(zet_typed_value_t) ) -else: - _zetMetricGroupCalculateMetricValues_t = CFUNCTYPE( ze_result_t, zet_metric_group_handle_t, zet_metric_group_calculation_type_t, c_size_t, POINTER(c_ubyte), POINTER(c_ulong), POINTER(zet_typed_value_t) ) - - -############################################################################### -## @brief Table of MetricGroup functions pointers -class _zet_metric_group_dditable_t(Structure): - _fields_ = [ - ("pfnGet", c_void_p), ## _zetMetricGroupGet_t - ("pfnGetProperties", c_void_p), ## _zetMetricGroupGetProperties_t - ("pfnCalculateMetricValues", c_void_p) ## _zetMetricGroupCalculateMetricValues_t - ] - -############################################################################### -## @brief Function-pointer for zetMetricGroupCalculateMultipleMetricValuesExp -if __use_win_types: - _zetMetricGroupCalculateMultipleMetricValuesExp_t = WINFUNCTYPE( ze_result_t, zet_metric_group_handle_t, zet_metric_group_calculation_type_t, c_size_t, POINTER(c_ubyte), POINTER(c_ulong), POINTER(c_ulong), POINTER(c_ulong), POINTER(zet_typed_value_t) ) -else: - _zetMetricGroupCalculateMultipleMetricValuesExp_t = CFUNCTYPE( ze_result_t, zet_metric_group_handle_t, zet_metric_group_calculation_type_t, c_size_t, POINTER(c_ubyte), POINTER(c_ulong), POINTER(c_ulong), POINTER(c_ulong), POINTER(zet_typed_value_t) ) - -############################################################################### -## @brief Function-pointer for zetMetricGroupGetGlobalTimestampsExp -if __use_win_types: - _zetMetricGroupGetGlobalTimestampsExp_t = WINFUNCTYPE( ze_result_t, zet_metric_group_handle_t, ze_bool_t, POINTER(c_ulonglong), POINTER(c_ulonglong) ) -else: - _zetMetricGroupGetGlobalTimestampsExp_t = CFUNCTYPE( ze_result_t, zet_metric_group_handle_t, ze_bool_t, POINTER(c_ulonglong), POINTER(c_ulonglong) ) - -############################################################################### -## @brief Function-pointer for zetMetricGroupGetExportDataExp -if __use_win_types: - _zetMetricGroupGetExportDataExp_t = WINFUNCTYPE( ze_result_t, zet_metric_group_handle_t, POINTER(c_ubyte), c_size_t, POINTER(c_size_t), * ) -else: - _zetMetricGroupGetExportDataExp_t = CFUNCTYPE( ze_result_t, zet_metric_group_handle_t, POINTER(c_ubyte), c_size_t, POINTER(c_size_t), * ) - -############################################################################### -## @brief Function-pointer for zetMetricGroupCalculateMetricExportDataExp -if __use_win_types: - _zetMetricGroupCalculateMetricExportDataExp_t = WINFUNCTYPE( ze_result_t, ze_driver_handle_t, zet_metric_group_calculation_type_t, c_size_t, POINTER(c_ubyte), POINTER(zet_metric_calculate_exp_desc_t), POINTER(c_ulong), POINTER(c_ulong), POINTER(c_ulong), POINTER(zet_typed_value_t) ) -else: - _zetMetricGroupCalculateMetricExportDataExp_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, zet_metric_group_calculation_type_t, c_size_t, POINTER(c_ubyte), POINTER(zet_metric_calculate_exp_desc_t), POINTER(c_ulong), POINTER(c_ulong), POINTER(c_ulong), POINTER(zet_typed_value_t) ) - -############################################################################### -## @brief Function-pointer for zetMetricGroupCreateExp -if __use_win_types: - _zetMetricGroupCreateExp_t = WINFUNCTYPE( ze_result_t, zet_device_handle_t, c_char_p, c_char_p, zet_metric_group_sampling_type_flags_t, POINTER(zet_metric_group_handle_t) ) -else: - _zetMetricGroupCreateExp_t = CFUNCTYPE( ze_result_t, zet_device_handle_t, c_char_p, c_char_p, zet_metric_group_sampling_type_flags_t, POINTER(zet_metric_group_handle_t) ) - -############################################################################### -## @brief Function-pointer for zetMetricGroupAddMetricExp -if __use_win_types: - _zetMetricGroupAddMetricExp_t = WINFUNCTYPE( ze_result_t, zet_metric_group_handle_t, zet_metric_handle_t, *, c_char_p ) -else: - _zetMetricGroupAddMetricExp_t = CFUNCTYPE( ze_result_t, zet_metric_group_handle_t, zet_metric_handle_t, *, c_char_p ) - -############################################################################### -## @brief Function-pointer for zetMetricGroupRemoveMetricExp -if __use_win_types: - _zetMetricGroupRemoveMetricExp_t = WINFUNCTYPE( ze_result_t, zet_metric_group_handle_t, zet_metric_handle_t ) -else: - _zetMetricGroupRemoveMetricExp_t = CFUNCTYPE( ze_result_t, zet_metric_group_handle_t, zet_metric_handle_t ) - -############################################################################### -## @brief Function-pointer for zetMetricGroupCloseExp -if __use_win_types: - _zetMetricGroupCloseExp_t = WINFUNCTYPE( ze_result_t, zet_metric_group_handle_t ) -else: - _zetMetricGroupCloseExp_t = CFUNCTYPE( ze_result_t, zet_metric_group_handle_t ) - -############################################################################### -## @brief Function-pointer for zetMetricGroupDestroyExp -if __use_win_types: - _zetMetricGroupDestroyExp_t = WINFUNCTYPE( ze_result_t, zet_metric_group_handle_t ) -else: - _zetMetricGroupDestroyExp_t = CFUNCTYPE( ze_result_t, zet_metric_group_handle_t ) - - -############################################################################### -## @brief Table of MetricGroupExp functions pointers -class _zet_metric_group_exp_dditable_t(Structure): - _fields_ = [ - ("pfnCalculateMultipleMetricValuesExp", c_void_p), ## _zetMetricGroupCalculateMultipleMetricValuesExp_t - ("pfnGetGlobalTimestampsExp", c_void_p), ## _zetMetricGroupGetGlobalTimestampsExp_t - ("pfnGetExportDataExp", c_void_p), ## _zetMetricGroupGetExportDataExp_t - ("pfnCalculateMetricExportDataExp", c_void_p), ## _zetMetricGroupCalculateMetricExportDataExp_t - ("pfnCreateExp", c_void_p), ## _zetMetricGroupCreateExp_t - ("pfnAddMetricExp", c_void_p), ## _zetMetricGroupAddMetricExp_t - ("pfnRemoveMetricExp", c_void_p), ## _zetMetricGroupRemoveMetricExp_t - ("pfnCloseExp", c_void_p), ## _zetMetricGroupCloseExp_t - ("pfnDestroyExp", c_void_p) ## _zetMetricGroupDestroyExp_t - ] - -############################################################################### -## @brief Function-pointer for zetMetricStreamerOpen -if __use_win_types: - _zetMetricStreamerOpen_t = WINFUNCTYPE( ze_result_t, zet_context_handle_t, zet_device_handle_t, zet_metric_group_handle_t, POINTER(zet_metric_streamer_desc_t), ze_event_handle_t, POINTER(zet_metric_streamer_handle_t) ) -else: - _zetMetricStreamerOpen_t = CFUNCTYPE( ze_result_t, zet_context_handle_t, zet_device_handle_t, zet_metric_group_handle_t, POINTER(zet_metric_streamer_desc_t), ze_event_handle_t, POINTER(zet_metric_streamer_handle_t) ) - -############################################################################### -## @brief Function-pointer for zetMetricStreamerClose -if __use_win_types: - _zetMetricStreamerClose_t = WINFUNCTYPE( ze_result_t, zet_metric_streamer_handle_t ) -else: - _zetMetricStreamerClose_t = CFUNCTYPE( ze_result_t, zet_metric_streamer_handle_t ) - -############################################################################### -## @brief Function-pointer for zetMetricStreamerReadData -if __use_win_types: - _zetMetricStreamerReadData_t = WINFUNCTYPE( ze_result_t, zet_metric_streamer_handle_t, c_ulong, POINTER(c_size_t), POINTER(c_ubyte) ) -else: - _zetMetricStreamerReadData_t = CFUNCTYPE( ze_result_t, zet_metric_streamer_handle_t, c_ulong, POINTER(c_size_t), POINTER(c_ubyte) ) - - -############################################################################### -## @brief Table of MetricStreamer functions pointers -class _zet_metric_streamer_dditable_t(Structure): - _fields_ = [ - ("pfnOpen", c_void_p), ## _zetMetricStreamerOpen_t - ("pfnClose", c_void_p), ## _zetMetricStreamerClose_t - ("pfnReadData", c_void_p) ## _zetMetricStreamerReadData_t - ] - -############################################################################### -## @brief Function-pointer for zetMetricQueryPoolCreate -if __use_win_types: - _zetMetricQueryPoolCreate_t = WINFUNCTYPE( ze_result_t, zet_context_handle_t, zet_device_handle_t, zet_metric_group_handle_t, POINTER(zet_metric_query_pool_desc_t), POINTER(zet_metric_query_pool_handle_t) ) -else: - _zetMetricQueryPoolCreate_t = CFUNCTYPE( ze_result_t, zet_context_handle_t, zet_device_handle_t, zet_metric_group_handle_t, POINTER(zet_metric_query_pool_desc_t), POINTER(zet_metric_query_pool_handle_t) ) - -############################################################################### -## @brief Function-pointer for zetMetricQueryPoolDestroy -if __use_win_types: - _zetMetricQueryPoolDestroy_t = WINFUNCTYPE( ze_result_t, zet_metric_query_pool_handle_t ) -else: - _zetMetricQueryPoolDestroy_t = CFUNCTYPE( ze_result_t, zet_metric_query_pool_handle_t ) - - -############################################################################### -## @brief Table of MetricQueryPool functions pointers -class _zet_metric_query_pool_dditable_t(Structure): - _fields_ = [ - ("pfnCreate", c_void_p), ## _zetMetricQueryPoolCreate_t - ("pfnDestroy", c_void_p) ## _zetMetricQueryPoolDestroy_t - ] - -############################################################################### -## @brief Function-pointer for zetMetricQueryCreate -if __use_win_types: - _zetMetricQueryCreate_t = WINFUNCTYPE( ze_result_t, zet_metric_query_pool_handle_t, c_ulong, POINTER(zet_metric_query_handle_t) ) -else: - _zetMetricQueryCreate_t = CFUNCTYPE( ze_result_t, zet_metric_query_pool_handle_t, c_ulong, POINTER(zet_metric_query_handle_t) ) - -############################################################################### -## @brief Function-pointer for zetMetricQueryDestroy -if __use_win_types: - _zetMetricQueryDestroy_t = WINFUNCTYPE( ze_result_t, zet_metric_query_handle_t ) -else: - _zetMetricQueryDestroy_t = CFUNCTYPE( ze_result_t, zet_metric_query_handle_t ) - -############################################################################### -## @brief Function-pointer for zetMetricQueryReset -if __use_win_types: - _zetMetricQueryReset_t = WINFUNCTYPE( ze_result_t, zet_metric_query_handle_t ) -else: - _zetMetricQueryReset_t = CFUNCTYPE( ze_result_t, zet_metric_query_handle_t ) - -############################################################################### -## @brief Function-pointer for zetMetricQueryGetData -if __use_win_types: - _zetMetricQueryGetData_t = WINFUNCTYPE( ze_result_t, zet_metric_query_handle_t, POINTER(c_size_t), POINTER(c_ubyte) ) -else: - _zetMetricQueryGetData_t = CFUNCTYPE( ze_result_t, zet_metric_query_handle_t, POINTER(c_size_t), POINTER(c_ubyte) ) - - -############################################################################### -## @brief Table of MetricQuery functions pointers -class _zet_metric_query_dditable_t(Structure): - _fields_ = [ - ("pfnCreate", c_void_p), ## _zetMetricQueryCreate_t - ("pfnDestroy", c_void_p), ## _zetMetricQueryDestroy_t - ("pfnReset", c_void_p), ## _zetMetricQueryReset_t - ("pfnGetData", c_void_p) ## _zetMetricQueryGetData_t - ] - -############################################################################### -## @brief Function-pointer for zetTracerExpCreate -if __use_win_types: - _zetTracerExpCreate_t = WINFUNCTYPE( ze_result_t, zet_context_handle_t, POINTER(zet_tracer_exp_desc_t), POINTER(zet_tracer_exp_handle_t) ) -else: - _zetTracerExpCreate_t = CFUNCTYPE( ze_result_t, zet_context_handle_t, POINTER(zet_tracer_exp_desc_t), POINTER(zet_tracer_exp_handle_t) ) - -############################################################################### -## @brief Function-pointer for zetTracerExpDestroy -if __use_win_types: - _zetTracerExpDestroy_t = WINFUNCTYPE( ze_result_t, zet_tracer_exp_handle_t ) -else: - _zetTracerExpDestroy_t = CFUNCTYPE( ze_result_t, zet_tracer_exp_handle_t ) - -############################################################################### -## @brief Function-pointer for zetTracerExpSetPrologues -if __use_win_types: - _zetTracerExpSetPrologues_t = WINFUNCTYPE( ze_result_t, zet_tracer_exp_handle_t, POINTER(zet_core_callbacks_t) ) -else: - _zetTracerExpSetPrologues_t = CFUNCTYPE( ze_result_t, zet_tracer_exp_handle_t, POINTER(zet_core_callbacks_t) ) - -############################################################################### -## @brief Function-pointer for zetTracerExpSetEpilogues -if __use_win_types: - _zetTracerExpSetEpilogues_t = WINFUNCTYPE( ze_result_t, zet_tracer_exp_handle_t, POINTER(zet_core_callbacks_t) ) -else: - _zetTracerExpSetEpilogues_t = CFUNCTYPE( ze_result_t, zet_tracer_exp_handle_t, POINTER(zet_core_callbacks_t) ) - -############################################################################### -## @brief Function-pointer for zetTracerExpSetEnabled -if __use_win_types: - _zetTracerExpSetEnabled_t = WINFUNCTYPE( ze_result_t, zet_tracer_exp_handle_t, ze_bool_t ) -else: - _zetTracerExpSetEnabled_t = CFUNCTYPE( ze_result_t, zet_tracer_exp_handle_t, ze_bool_t ) - - -############################################################################### -## @brief Table of TracerExp functions pointers -class _zet_tracer_exp_dditable_t(Structure): - _fields_ = [ - ("pfnCreate", c_void_p), ## _zetTracerExpCreate_t - ("pfnDestroy", c_void_p), ## _zetTracerExpDestroy_t - ("pfnSetPrologues", c_void_p), ## _zetTracerExpSetPrologues_t - ("pfnSetEpilogues", c_void_p), ## _zetTracerExpSetEpilogues_t - ("pfnSetEnabled", c_void_p) ## _zetTracerExpSetEnabled_t - ] - -############################################################################### -## @brief Function-pointer for zetDebugAttach -if __use_win_types: - _zetDebugAttach_t = WINFUNCTYPE( ze_result_t, zet_device_handle_t, POINTER(zet_debug_config_t), POINTER(zet_debug_session_handle_t) ) -else: - _zetDebugAttach_t = CFUNCTYPE( ze_result_t, zet_device_handle_t, POINTER(zet_debug_config_t), POINTER(zet_debug_session_handle_t) ) - -############################################################################### -## @brief Function-pointer for zetDebugDetach -if __use_win_types: - _zetDebugDetach_t = WINFUNCTYPE( ze_result_t, zet_debug_session_handle_t ) -else: - _zetDebugDetach_t = CFUNCTYPE( ze_result_t, zet_debug_session_handle_t ) - -############################################################################### -## @brief Function-pointer for zetDebugReadEvent -if __use_win_types: - _zetDebugReadEvent_t = WINFUNCTYPE( ze_result_t, zet_debug_session_handle_t, c_ulonglong, POINTER(zet_debug_event_t) ) -else: - _zetDebugReadEvent_t = CFUNCTYPE( ze_result_t, zet_debug_session_handle_t, c_ulonglong, POINTER(zet_debug_event_t) ) - -############################################################################### -## @brief Function-pointer for zetDebugAcknowledgeEvent -if __use_win_types: - _zetDebugAcknowledgeEvent_t = WINFUNCTYPE( ze_result_t, zet_debug_session_handle_t, POINTER(zet_debug_event_t) ) -else: - _zetDebugAcknowledgeEvent_t = CFUNCTYPE( ze_result_t, zet_debug_session_handle_t, POINTER(zet_debug_event_t) ) - -############################################################################### -## @brief Function-pointer for zetDebugInterrupt -if __use_win_types: - _zetDebugInterrupt_t = WINFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t ) -else: - _zetDebugInterrupt_t = CFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t ) - -############################################################################### -## @brief Function-pointer for zetDebugResume -if __use_win_types: - _zetDebugResume_t = WINFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t ) -else: - _zetDebugResume_t = CFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t ) - -############################################################################### -## @brief Function-pointer for zetDebugReadMemory -if __use_win_types: - _zetDebugReadMemory_t = WINFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t, POINTER(zet_debug_memory_space_desc_t), c_size_t, c_void_p ) -else: - _zetDebugReadMemory_t = CFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t, POINTER(zet_debug_memory_space_desc_t), c_size_t, c_void_p ) - -############################################################################### -## @brief Function-pointer for zetDebugWriteMemory -if __use_win_types: - _zetDebugWriteMemory_t = WINFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t, POINTER(zet_debug_memory_space_desc_t), c_size_t, c_void_p ) -else: - _zetDebugWriteMemory_t = CFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t, POINTER(zet_debug_memory_space_desc_t), c_size_t, c_void_p ) - -############################################################################### -## @brief Function-pointer for zetDebugGetRegisterSetProperties -if __use_win_types: - _zetDebugGetRegisterSetProperties_t = WINFUNCTYPE( ze_result_t, zet_device_handle_t, POINTER(c_ulong), POINTER(zet_debug_regset_properties_t) ) -else: - _zetDebugGetRegisterSetProperties_t = CFUNCTYPE( ze_result_t, zet_device_handle_t, POINTER(c_ulong), POINTER(zet_debug_regset_properties_t) ) - -############################################################################### -## @brief Function-pointer for zetDebugReadRegisters -if __use_win_types: - _zetDebugReadRegisters_t = WINFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t, c_ulong, c_ulong, c_ulong, c_void_p ) -else: - _zetDebugReadRegisters_t = CFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t, c_ulong, c_ulong, c_ulong, c_void_p ) - -############################################################################### -## @brief Function-pointer for zetDebugWriteRegisters -if __use_win_types: - _zetDebugWriteRegisters_t = WINFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t, c_ulong, c_ulong, c_ulong, c_void_p ) -else: - _zetDebugWriteRegisters_t = CFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t, c_ulong, c_ulong, c_ulong, c_void_p ) - -############################################################################### -## @brief Function-pointer for zetDebugGetThreadRegisterSetProperties -if __use_win_types: - _zetDebugGetThreadRegisterSetProperties_t = WINFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t, POINTER(c_ulong), POINTER(zet_debug_regset_properties_t) ) -else: - _zetDebugGetThreadRegisterSetProperties_t = CFUNCTYPE( ze_result_t, zet_debug_session_handle_t, ze_device_thread_t, POINTER(c_ulong), POINTER(zet_debug_regset_properties_t) ) - - -############################################################################### -## @brief Table of Debug functions pointers -class _zet_debug_dditable_t(Structure): - _fields_ = [ - ("pfnAttach", c_void_p), ## _zetDebugAttach_t - ("pfnDetach", c_void_p), ## _zetDebugDetach_t - ("pfnReadEvent", c_void_p), ## _zetDebugReadEvent_t - ("pfnAcknowledgeEvent", c_void_p), ## _zetDebugAcknowledgeEvent_t - ("pfnInterrupt", c_void_p), ## _zetDebugInterrupt_t - ("pfnResume", c_void_p), ## _zetDebugResume_t - ("pfnReadMemory", c_void_p), ## _zetDebugReadMemory_t - ("pfnWriteMemory", c_void_p), ## _zetDebugWriteMemory_t - ("pfnGetRegisterSetProperties", c_void_p), ## _zetDebugGetRegisterSetProperties_t - ("pfnReadRegisters", c_void_p), ## _zetDebugReadRegisters_t - ("pfnWriteRegisters", c_void_p), ## _zetDebugWriteRegisters_t - ("pfnGetThreadRegisterSetProperties", c_void_p) ## _zetDebugGetThreadRegisterSetProperties_t - ] - -############################################################################### -class _zet_dditable_t(Structure): - _fields_ = [ - ("MetricProgrammableExp", _zet_metric_programmable_exp_dditable_t), - ("MetricTracerExp", _zet_metric_tracer_exp_dditable_t), - ("MetricDecoderExp", _zet_metric_decoder_exp_dditable_t), - ("Device", _zet_device_dditable_t), - ("DeviceExp", _zet_device_exp_dditable_t), - ("Context", _zet_context_dditable_t), - ("CommandList", _zet_command_list_dditable_t), - ("CommandListExp", _zet_command_list_exp_dditable_t), - ("Module", _zet_module_dditable_t), - ("Kernel", _zet_kernel_dditable_t), - ("Metric", _zet_metric_dditable_t), - ("MetricExp", _zet_metric_exp_dditable_t), - ("MetricGroup", _zet_metric_group_dditable_t), - ("MetricGroupExp", _zet_metric_group_exp_dditable_t), - ("MetricStreamer", _zet_metric_streamer_dditable_t), - ("MetricQueryPool", _zet_metric_query_pool_dditable_t), - ("MetricQuery", _zet_metric_query_dditable_t), - ("TracerExp", _zet_tracer_exp_dditable_t), - ("Debug", _zet_debug_dditable_t) - ] - -############################################################################### -## @brief zet device-driver interfaces -class ZET_DDI: - def __init__(self, version : ze_api_version_t): - # load the ze_loader library - if "Windows" == platform.uname()[0]: - self.__dll = WinDLL("ze_loader.dll") - else: - self.__dll = CDLL("ze_loader.so") - - # fill the ddi tables - self.__dditable = _zet_dditable_t() - - # call driver to get function pointers - _MetricProgrammableExp = _zet_metric_programmable_exp_dditable_t() - r = ze_result_v(self.__dll.zetGetMetricProgrammableExpProcAddrTable(version, byref(_MetricProgrammableExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.MetricProgrammableExp = _MetricProgrammableExp - - # attach function interface to function address - self.zetMetricProgrammableGetExp = _zetMetricProgrammableGetExp_t(self.__dditable.MetricProgrammableExp.pfnGetExp) - self.zetMetricProgrammableGetPropertiesExp = _zetMetricProgrammableGetPropertiesExp_t(self.__dditable.MetricProgrammableExp.pfnGetPropertiesExp) - self.zetMetricProgrammableGetParamInfoExp = _zetMetricProgrammableGetParamInfoExp_t(self.__dditable.MetricProgrammableExp.pfnGetParamInfoExp) - self.zetMetricProgrammableGetParamValueInfoExp = _zetMetricProgrammableGetParamValueInfoExp_t(self.__dditable.MetricProgrammableExp.pfnGetParamValueInfoExp) - - # call driver to get function pointers - _MetricTracerExp = _zet_metric_tracer_exp_dditable_t() - r = ze_result_v(self.__dll.zetGetMetricTracerExpProcAddrTable(version, byref(_MetricTracerExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.MetricTracerExp = _MetricTracerExp - - # attach function interface to function address - self.zetMetricTracerCreateExp = _zetMetricTracerCreateExp_t(self.__dditable.MetricTracerExp.pfnCreateExp) - self.zetMetricTracerDestroyExp = _zetMetricTracerDestroyExp_t(self.__dditable.MetricTracerExp.pfnDestroyExp) - self.zetMetricTracerEnableExp = _zetMetricTracerEnableExp_t(self.__dditable.MetricTracerExp.pfnEnableExp) - self.zetMetricTracerDisableExp = _zetMetricTracerDisableExp_t(self.__dditable.MetricTracerExp.pfnDisableExp) - self.zetMetricTracerReadDataExp = _zetMetricTracerReadDataExp_t(self.__dditable.MetricTracerExp.pfnReadDataExp) - self.zetMetricTracerDecodeExp = _zetMetricTracerDecodeExp_t(self.__dditable.MetricTracerExp.pfnDecodeExp) - - # call driver to get function pointers - _MetricDecoderExp = _zet_metric_decoder_exp_dditable_t() - r = ze_result_v(self.__dll.zetGetMetricDecoderExpProcAddrTable(version, byref(_MetricDecoderExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.MetricDecoderExp = _MetricDecoderExp - - # attach function interface to function address - self.zetMetricDecoderCreateExp = _zetMetricDecoderCreateExp_t(self.__dditable.MetricDecoderExp.pfnCreateExp) - self.zetMetricDecoderDestroyExp = _zetMetricDecoderDestroyExp_t(self.__dditable.MetricDecoderExp.pfnDestroyExp) - self.zetMetricDecoderGetDecodableMetricsExp = _zetMetricDecoderGetDecodableMetricsExp_t(self.__dditable.MetricDecoderExp.pfnGetDecodableMetricsExp) - - # call driver to get function pointers - _Device = _zet_device_dditable_t() - r = ze_result_v(self.__dll.zetGetDeviceProcAddrTable(version, byref(_Device))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Device = _Device - - # attach function interface to function address - self.zetDeviceGetDebugProperties = _zetDeviceGetDebugProperties_t(self.__dditable.Device.pfnGetDebugProperties) - - # call driver to get function pointers - _DeviceExp = _zet_device_exp_dditable_t() - r = ze_result_v(self.__dll.zetGetDeviceExpProcAddrTable(version, byref(_DeviceExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.DeviceExp = _DeviceExp - - # attach function interface to function address - self.zetDeviceGetConcurrentMetricGroupsExp = _zetDeviceGetConcurrentMetricGroupsExp_t(self.__dditable.DeviceExp.pfnGetConcurrentMetricGroupsExp) - self.zetDeviceCreateMetricGroupsFromMetricsExp = _zetDeviceCreateMetricGroupsFromMetricsExp_t(self.__dditable.DeviceExp.pfnCreateMetricGroupsFromMetricsExp) - self.zetDeviceEnableMetricsExp = _zetDeviceEnableMetricsExp_t(self.__dditable.DeviceExp.pfnEnableMetricsExp) - self.zetDeviceDisableMetricsExp = _zetDeviceDisableMetricsExp_t(self.__dditable.DeviceExp.pfnDisableMetricsExp) - - # call driver to get function pointers - _Context = _zet_context_dditable_t() - r = ze_result_v(self.__dll.zetGetContextProcAddrTable(version, byref(_Context))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Context = _Context - - # attach function interface to function address - self.zetContextActivateMetricGroups = _zetContextActivateMetricGroups_t(self.__dditable.Context.pfnActivateMetricGroups) - - # call driver to get function pointers - _CommandList = _zet_command_list_dditable_t() - r = ze_result_v(self.__dll.zetGetCommandListProcAddrTable(version, byref(_CommandList))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.CommandList = _CommandList - - # attach function interface to function address - self.zetCommandListAppendMetricStreamerMarker = _zetCommandListAppendMetricStreamerMarker_t(self.__dditable.CommandList.pfnAppendMetricStreamerMarker) - self.zetCommandListAppendMetricQueryBegin = _zetCommandListAppendMetricQueryBegin_t(self.__dditable.CommandList.pfnAppendMetricQueryBegin) - self.zetCommandListAppendMetricQueryEnd = _zetCommandListAppendMetricQueryEnd_t(self.__dditable.CommandList.pfnAppendMetricQueryEnd) - self.zetCommandListAppendMetricMemoryBarrier = _zetCommandListAppendMetricMemoryBarrier_t(self.__dditable.CommandList.pfnAppendMetricMemoryBarrier) - - # call driver to get function pointers - _CommandListExp = _zet_command_list_exp_dditable_t() - r = ze_result_v(self.__dll.zetGetCommandListExpProcAddrTable(version, byref(_CommandListExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.CommandListExp = _CommandListExp - - # attach function interface to function address - self.zetCommandListAppendMarkerExp = _zetCommandListAppendMarkerExp_t(self.__dditable.CommandListExp.pfnAppendMarkerExp) - - # call driver to get function pointers - _Module = _zet_module_dditable_t() - r = ze_result_v(self.__dll.zetGetModuleProcAddrTable(version, byref(_Module))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Module = _Module - - # attach function interface to function address - self.zetModuleGetDebugInfo = _zetModuleGetDebugInfo_t(self.__dditable.Module.pfnGetDebugInfo) - - # call driver to get function pointers - _Kernel = _zet_kernel_dditable_t() - r = ze_result_v(self.__dll.zetGetKernelProcAddrTable(version, byref(_Kernel))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Kernel = _Kernel - - # attach function interface to function address - self.zetKernelGetProfileInfo = _zetKernelGetProfileInfo_t(self.__dditable.Kernel.pfnGetProfileInfo) - - # call driver to get function pointers - _Metric = _zet_metric_dditable_t() - r = ze_result_v(self.__dll.zetGetMetricProcAddrTable(version, byref(_Metric))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Metric = _Metric - - # attach function interface to function address - self.zetMetricGet = _zetMetricGet_t(self.__dditable.Metric.pfnGet) - self.zetMetricGetProperties = _zetMetricGetProperties_t(self.__dditable.Metric.pfnGetProperties) - - # call driver to get function pointers - _MetricExp = _zet_metric_exp_dditable_t() - r = ze_result_v(self.__dll.zetGetMetricExpProcAddrTable(version, byref(_MetricExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.MetricExp = _MetricExp - - # attach function interface to function address - self.zetMetricCreateFromProgrammableExp = _zetMetricCreateFromProgrammableExp_t(self.__dditable.MetricExp.pfnCreateFromProgrammableExp) - self.zetMetricDestroyExp = _zetMetricDestroyExp_t(self.__dditable.MetricExp.pfnDestroyExp) - self.zetMetricCreateFromProgrammableExp2 = _zetMetricCreateFromProgrammableExp2_t(self.__dditable.MetricExp.pfnCreateFromProgrammableExp2) - - # call driver to get function pointers - _MetricGroup = _zet_metric_group_dditable_t() - r = ze_result_v(self.__dll.zetGetMetricGroupProcAddrTable(version, byref(_MetricGroup))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.MetricGroup = _MetricGroup - - # attach function interface to function address - self.zetMetricGroupGet = _zetMetricGroupGet_t(self.__dditable.MetricGroup.pfnGet) - self.zetMetricGroupGetProperties = _zetMetricGroupGetProperties_t(self.__dditable.MetricGroup.pfnGetProperties) - self.zetMetricGroupCalculateMetricValues = _zetMetricGroupCalculateMetricValues_t(self.__dditable.MetricGroup.pfnCalculateMetricValues) - - # call driver to get function pointers - _MetricGroupExp = _zet_metric_group_exp_dditable_t() - r = ze_result_v(self.__dll.zetGetMetricGroupExpProcAddrTable(version, byref(_MetricGroupExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.MetricGroupExp = _MetricGroupExp - - # attach function interface to function address - self.zetMetricGroupCalculateMultipleMetricValuesExp = _zetMetricGroupCalculateMultipleMetricValuesExp_t(self.__dditable.MetricGroupExp.pfnCalculateMultipleMetricValuesExp) - self.zetMetricGroupGetGlobalTimestampsExp = _zetMetricGroupGetGlobalTimestampsExp_t(self.__dditable.MetricGroupExp.pfnGetGlobalTimestampsExp) - self.zetMetricGroupGetExportDataExp = _zetMetricGroupGetExportDataExp_t(self.__dditable.MetricGroupExp.pfnGetExportDataExp) - self.zetMetricGroupCalculateMetricExportDataExp = _zetMetricGroupCalculateMetricExportDataExp_t(self.__dditable.MetricGroupExp.pfnCalculateMetricExportDataExp) - self.zetMetricGroupCreateExp = _zetMetricGroupCreateExp_t(self.__dditable.MetricGroupExp.pfnCreateExp) - self.zetMetricGroupAddMetricExp = _zetMetricGroupAddMetricExp_t(self.__dditable.MetricGroupExp.pfnAddMetricExp) - self.zetMetricGroupRemoveMetricExp = _zetMetricGroupRemoveMetricExp_t(self.__dditable.MetricGroupExp.pfnRemoveMetricExp) - self.zetMetricGroupCloseExp = _zetMetricGroupCloseExp_t(self.__dditable.MetricGroupExp.pfnCloseExp) - self.zetMetricGroupDestroyExp = _zetMetricGroupDestroyExp_t(self.__dditable.MetricGroupExp.pfnDestroyExp) - - # call driver to get function pointers - _MetricStreamer = _zet_metric_streamer_dditable_t() - r = ze_result_v(self.__dll.zetGetMetricStreamerProcAddrTable(version, byref(_MetricStreamer))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.MetricStreamer = _MetricStreamer - - # attach function interface to function address - self.zetMetricStreamerOpen = _zetMetricStreamerOpen_t(self.__dditable.MetricStreamer.pfnOpen) - self.zetMetricStreamerClose = _zetMetricStreamerClose_t(self.__dditable.MetricStreamer.pfnClose) - self.zetMetricStreamerReadData = _zetMetricStreamerReadData_t(self.__dditable.MetricStreamer.pfnReadData) - - # call driver to get function pointers - _MetricQueryPool = _zet_metric_query_pool_dditable_t() - r = ze_result_v(self.__dll.zetGetMetricQueryPoolProcAddrTable(version, byref(_MetricQueryPool))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.MetricQueryPool = _MetricQueryPool - - # attach function interface to function address - self.zetMetricQueryPoolCreate = _zetMetricQueryPoolCreate_t(self.__dditable.MetricQueryPool.pfnCreate) - self.zetMetricQueryPoolDestroy = _zetMetricQueryPoolDestroy_t(self.__dditable.MetricQueryPool.pfnDestroy) - - # call driver to get function pointers - _MetricQuery = _zet_metric_query_dditable_t() - r = ze_result_v(self.__dll.zetGetMetricQueryProcAddrTable(version, byref(_MetricQuery))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.MetricQuery = _MetricQuery - - # attach function interface to function address - self.zetMetricQueryCreate = _zetMetricQueryCreate_t(self.__dditable.MetricQuery.pfnCreate) - self.zetMetricQueryDestroy = _zetMetricQueryDestroy_t(self.__dditable.MetricQuery.pfnDestroy) - self.zetMetricQueryReset = _zetMetricQueryReset_t(self.__dditable.MetricQuery.pfnReset) - self.zetMetricQueryGetData = _zetMetricQueryGetData_t(self.__dditable.MetricQuery.pfnGetData) - - # call driver to get function pointers - _TracerExp = _zet_tracer_exp_dditable_t() - r = ze_result_v(self.__dll.zetGetTracerExpProcAddrTable(version, byref(_TracerExp))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.TracerExp = _TracerExp - - # attach function interface to function address - self.zetTracerExpCreate = _zetTracerExpCreate_t(self.__dditable.TracerExp.pfnCreate) - self.zetTracerExpDestroy = _zetTracerExpDestroy_t(self.__dditable.TracerExp.pfnDestroy) - self.zetTracerExpSetPrologues = _zetTracerExpSetPrologues_t(self.__dditable.TracerExp.pfnSetPrologues) - self.zetTracerExpSetEpilogues = _zetTracerExpSetEpilogues_t(self.__dditable.TracerExp.pfnSetEpilogues) - self.zetTracerExpSetEnabled = _zetTracerExpSetEnabled_t(self.__dditable.TracerExp.pfnSetEnabled) - - # call driver to get function pointers - _Debug = _zet_debug_dditable_t() - r = ze_result_v(self.__dll.zetGetDebugProcAddrTable(version, byref(_Debug))) - if r != ze_result_v.SUCCESS: - raise Exception(r) - self.__dditable.Debug = _Debug - - # attach function interface to function address - self.zetDebugAttach = _zetDebugAttach_t(self.__dditable.Debug.pfnAttach) - self.zetDebugDetach = _zetDebugDetach_t(self.__dditable.Debug.pfnDetach) - self.zetDebugReadEvent = _zetDebugReadEvent_t(self.__dditable.Debug.pfnReadEvent) - self.zetDebugAcknowledgeEvent = _zetDebugAcknowledgeEvent_t(self.__dditable.Debug.pfnAcknowledgeEvent) - self.zetDebugInterrupt = _zetDebugInterrupt_t(self.__dditable.Debug.pfnInterrupt) - self.zetDebugResume = _zetDebugResume_t(self.__dditable.Debug.pfnResume) - self.zetDebugReadMemory = _zetDebugReadMemory_t(self.__dditable.Debug.pfnReadMemory) - self.zetDebugWriteMemory = _zetDebugWriteMemory_t(self.__dditable.Debug.pfnWriteMemory) - self.zetDebugGetRegisterSetProperties = _zetDebugGetRegisterSetProperties_t(self.__dditable.Debug.pfnGetRegisterSetProperties) - self.zetDebugReadRegisters = _zetDebugReadRegisters_t(self.__dditable.Debug.pfnReadRegisters) - self.zetDebugWriteRegisters = _zetDebugWriteRegisters_t(self.__dditable.Debug.pfnWriteRegisters) - self.zetDebugGetThreadRegisterSetProperties = _zetDebugGetThreadRegisterSetProperties_t(self.__dditable.Debug.pfnGetThreadRegisterSetProperties) - - # success! From e66573ac3377df5989022146d38fe0bce01e4c0d Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Fri, 27 Feb 2026 23:25:20 +0000 Subject: [PATCH 12/30] Update xprof --- xprof/xprof.rb.in | 1 + 1 file changed, 1 insertion(+) diff --git a/xprof/xprof.rb.in b/xprof/xprof.rb.in index 9d07a2c2d..868690c4f 100755 --- a/xprof/xprof.rb.in +++ b/xprof/xprof.rb.in @@ -563,6 +563,7 @@ def enable_events_ze(channel_name, tracing_mode: 'default', profiling: true) exec("#{lttng_enable} lttng_ust_ze_properties:*") exec("#{lttng_enable} lttng_ust_ze:*") exec("#{lttng_enable} lttng_ust_zes:*") + exec("#{lttng_enable} lttng_ust_zer:*") exec("#{lttng_enable} lttng_ust_zet:*") exec("#{lttng_enable} lttng_ust_zex:*") when 'default' From 52c623438267003f073e24e5fc3463d698fecbfe Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Mon, 2 Mar 2026 21:55:18 +0000 Subject: [PATCH 13/30] Add helper --- backends/ze/README.md | 4 +-- backends/ze/find_level_zero_tag.sh | 58 ++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 2 deletions(-) create mode 100755 backends/ze/find_level_zero_tag.sh diff --git a/backends/ze/README.md b/backends/ze/README.md index 4b6a5b639..25bad1993 100644 --- a/backends/ze/README.md +++ b/backends/ze/README.md @@ -24,8 +24,8 @@ grep "define ZE_API_VERSION_CURRENT_M" ../include/ze_api.h - Now header have been generated in `level-zero-spec/include`. Copy that in `$THAPI_ROOT/backend/ze/include` (carefull for removed file) - This does contain the layers/loader: - - We got those from `https://github.com/oneapi-src/level-zero/tags` (find the tags who correspond the spec version. Something like -`API Headers, Loader, & Validation Layer based on oneAPI Level Zero Specification v1.15.31` in the release name + - We got those from `https://github.com/oneapi-src/level-zero/tags` + - Use `find_level_zero_tag.sh $version` to help. - This does contain the `zex`: - Found in `https://github.com/intel/compute-runtime/blob/master/level_zero/include/level_zero/driver_experimental/zex_api.h` - Try to compile diff --git a/backends/ze/find_level_zero_tag.sh b/backends/ze/find_level_zero_tag.sh new file mode 100755 index 000000000..dba55695f --- /dev/null +++ b/backends/ze/find_level_zero_tag.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash +# find_level_zero_tag_git.sh +# Find the most recent level-zero tag whose history contains a commit +# referencing a given L0 Spec version (e.g. v1.15). +# +# Usage: +# ./find_level_zero_tag_git.sh [repo_url] +# +# Examples: +# ./find_level_zero_tag_git.sh 1.15 +# ./find_level_zero_tag_git.sh 1.15 https://github.com/myorg/level-zero + +set -euo pipefail + +SPEC_VERSION="${1:-}" +REPO_URL="${2:-https://github.com/oneapi-src/level-zero.git}" + +if [[ -z "$SPEC_VERSION" ]]; then + echo "Usage: $0 [repo_url]" >&2 + echo " e.g. $0 1.15" >&2 + exit 1 +fi + +# Escape dots and add the string to search +ESCAPED=$(printf '%s' "$SPEC_VERSION" | sed 's/\./\\./g') +GREP_PATTERN="L0 Spec v${ESCAPED}" + +WORK_DIR=$(mktemp -d) +trap 'rm -rf "$WORK_DIR"' EXIT + +echo "Cloning $REPO_URL" >&2 +# --bare + --filter=blob:none → fetch commits & tags but skip file blobs +git clone --bare --filter=blob:none --quiet "$REPO_URL" "$WORK_DIR/repo.git" +cd "$WORK_DIR/repo.git" + +echo "Searching commit history for: ${GREP_PATTERN=}" >&2 + +# ── Step 1: find all commits whose message matches the spec version ─────────── +# In case of pre-release, or not yet tagget we keep multiple of them +MATCHING_COMMITS=$(git log --all --oneline --grep="$GREP_PATTERN" --format="%H %s") + +if [[ -z "$MATCHING_COMMITS" ]]; then + echo "✘ No commit found referencing spec version: ${SPEC_VERSION}" >&2 + exit 1 +fi +echo "${MATCHING_COMMITS}" >&2 + +# ── Step 3: find the most recent v* tag containing any of those commits ────── +CONTAINS_ARGS=$(awk '{print "--contains " $1}' <<<"$MATCHING_COMMITS") +MOST_RECENT=$(git tag -l --sort=-version:refname $CONTAINS_ARGS -- 'v*' | head -1) + +if [[ -z "$MOST_RECENT" ]]; then + echo "Matching commit(s) found but no v* tags contain them yet." >&2 + exit 1 +fi + +echo "Latest maching tag containing any of those commit" >&2 +echo "$MOST_RECENT" From 7e0c7c81a8993cf528eddc166f14a391dfffa955 Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Mon, 2 Mar 2026 22:01:02 +0000 Subject: [PATCH 14/30] Indent --- backends/ze/find_level_zero_tag.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/backends/ze/find_level_zero_tag.sh b/backends/ze/find_level_zero_tag.sh index dba55695f..cd28ccea1 100755 --- a/backends/ze/find_level_zero_tag.sh +++ b/backends/ze/find_level_zero_tag.sh @@ -16,9 +16,9 @@ SPEC_VERSION="${1:-}" REPO_URL="${2:-https://github.com/oneapi-src/level-zero.git}" if [[ -z "$SPEC_VERSION" ]]; then - echo "Usage: $0 [repo_url]" >&2 - echo " e.g. $0 1.15" >&2 - exit 1 + echo "Usage: $0 [repo_url]" >&2 + echo " e.g. $0 1.15" >&2 + exit 1 fi # Escape dots and add the string to search @@ -40,8 +40,8 @@ echo "Searching commit history for: ${GREP_PATTERN=}" >&2 MATCHING_COMMITS=$(git log --all --oneline --grep="$GREP_PATTERN" --format="%H %s") if [[ -z "$MATCHING_COMMITS" ]]; then - echo "✘ No commit found referencing spec version: ${SPEC_VERSION}" >&2 - exit 1 + echo "✘ No commit found referencing spec version: ${SPEC_VERSION}" >&2 + exit 1 fi echo "${MATCHING_COMMITS}" >&2 @@ -50,8 +50,8 @@ CONTAINS_ARGS=$(awk '{print "--contains " $1}' <<<"$MATCHING_COMMITS") MOST_RECENT=$(git tag -l --sort=-version:refname $CONTAINS_ARGS -- 'v*' | head -1) if [[ -z "$MOST_RECENT" ]]; then - echo "Matching commit(s) found but no v* tags contain them yet." >&2 - exit 1 + echo "Matching commit(s) found but no v* tags contain them yet." >&2 + exit 1 fi echo "Latest maching tag containing any of those commit" >&2 From d01b87826bcc9081ecd0f505b46405fc4b263d44 Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Mon, 2 Mar 2026 22:22:16 +0000 Subject: [PATCH 15/30] Fix warning --- xprof/xprof.rb.in | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/xprof/xprof.rb.in b/xprof/xprof.rb.in index 868690c4f..eb66666fe 100755 --- a/xprof/xprof.rb.in +++ b/xprof/xprof.rb.in @@ -423,6 +423,7 @@ class SyncDaemon < SpawnDaemon end def initialize + super daemon_type = env_fetch_first('THAPI_SYNC_DAEMON') daemon = case daemon_type when nil @@ -499,6 +500,7 @@ class SamplingDaemon < SpawnDaemon end def initialize(h = {}) + super daemon_path = "#{BINDIR}/thapi_sampling_daemon" raise "No sampling_daemon binary found at #{daemon_path}" unless File.exist?(daemon_path) @@ -627,6 +629,7 @@ end def enable_events_hip(channel_name, tracing_mode: 'default', profiling: true) lttng_enable = "lttng enable-event --userspace --session=#{lttng_session_uuid} --channel=#{channel_name}" exec("#{lttng_enable} lttng_ust_hip:*") + LOGGER.debug('Profiling is ignored for hip') if profiling LOGGER.debug("Tracing mode #{tracing_mode} similar to default for hip") unless tracing_mode == 'default' end @@ -641,6 +644,7 @@ def enable_events_omp(channel_name, tracing_mode: 'default', profiling: true) else raise("Tracing mode #{tracing_mode} not supported") end + LOGGER.debug('Profiling is ignored for omp') if profiling end def enable_events_mpi(channel_name, tracing_mode: 'default', profiling: true) @@ -654,6 +658,7 @@ def enable_events_mpi(channel_name, tracing_mode: 'default', profiling: true) else raise("Tracing mode #{tracing_mode} not supported") end + LOGGER.debug('Profiling is ignored for mpi') if profiling exec("#{lttng_enable} lttng_ust_mpi_type:*") end @@ -663,11 +668,14 @@ def enable_events_itt(channel_name, tracing_mode: 'default', profiling: true) lttng_enable = "lttng enable-event --userspace --session=#{lttng_session_uuid} --channel=#{channel_name}" exec("#{lttng_enable} lttng_ust_itt:*") exec("#{lttng_enable} lttng_ust_itt_metadata:*") + LOGGER.debug('Profiling is ignored for itt') if profiling LOGGER.debug("Tracing mode #{tracing_mode} similar to default for itt") unless tracing_mode == 'default' end def enable_events_metadata(channel_name, tracing_mode: 'default', profiling: true) lttng_enable = "lttng enable-event --userspace --session=#{lttng_session_uuid} --channel=#{channel_name}" + LOGGER.debug('Profiling is ignored for metadata') if profiling + LOGGER.debug("#{tracing_mode} is ignored for metadata") exec("#{lttng_enable} lttng_ust_thapi:*") end @@ -732,7 +740,7 @@ module LocalMaster # /!\ If babeltrace moved the file the `lttng_trace_dir_tmp` no longer exist LOGGER.debug("Deleting #{lttng_trace_dir_tmp}") - FileUtils.remove_dir(lttng_trace_dir_tmp) if File.exist?(lttng_trace_dir_tmp) + FileUtils.FileUtils.rm_rf(lttng_trace_dir_tmp) end end From f04cf52a1ca9458d4bb2041935b29c19f336bb96 Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Mon, 2 Mar 2026 22:35:27 +0000 Subject: [PATCH 16/30] Nice little utils --- utils/get_missing_metadata.py | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 utils/get_missing_metadata.py diff --git a/utils/get_missing_metadata.py b/utils/get_missing_metadata.py new file mode 100644 index 000000000..3f3ceebbe --- /dev/null +++ b/utils/get_missing_metadata.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python3 +import sys +import yaml + +def main(): + if len(sys.argv) != 3: + print(f"Usage: {sys.argv[0]} ") + sys.exit(1) + + with open(sys.argv[1]) as f: + meta = yaml.safe_load(f)["meta_parameters"] + + with open(sys.argv[2]) as f: + model = yaml.safe_load(f)["functions"] + + for fn in model: + name = fn["name"] + + # Only pointer-typed params matter + ptr_params = [ + p["name"] for p in fn.get("params", []) + if p["type"]["kind"] == "pointer" + ] + + if not ptr_params: + continue + + # Param names covered by metadata (index 1 of each [Tag, paramName, ...] entry) + covered = {entry[1] for entry in meta.get(name, [])} + + missing = [p for p in ptr_params if p not in covered] + + if missing: + print(f"{name}:") + for p in missing: + print(f" - {p}") + +if __name__ == "__main__": + main() From f0b24b6f50438bf45eb3174a800a9e9106415aba Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Tue, 3 Mar 2026 20:12:04 +0000 Subject: [PATCH 17/30] Add readme --- backends/ze/README.md | 89 ++++++++++++++----- .../ze/utils_spec_update/query_ze_version.cpp | 47 ++++++++++ 2 files changed, 116 insertions(+), 20 deletions(-) create mode 100644 backends/ze/utils_spec_update/query_ze_version.cpp diff --git a/backends/ze/README.md b/backends/ze/README.md index 25bad1993..006aecf05 100644 --- a/backends/ze/README.md +++ b/backends/ze/README.md @@ -1,36 +1,81 @@ # Header Location -Standard: `https://github.com/argonne-lcf/level-zero-spec/tree/ddi_ver` -Loader: `https://github.com/oneapi-src/level-zero/tags` -Extension: `https://github.com/intel/compute-runtime/blob/master/level_zero/include/level_zero/driver_experimental/zex_api.h` +- Standard: `https://github.com/argonne-lcf/level-zero-spec/tree/ddi_ver` +- Loader: `https://github.com/oneapi-src/level-zero/tags` +- Extension: `https://github.com/intel/compute-runtime/blob/master/level_zero/include/level_zero/driver_experimental/zex_api.h` -# Step: +# Steps: -- Sync the fork (`github.com/argonne-lcf/level-zero-spec`) with original remote +## 1/ Loader Repo + +- We will use the loader repo to get most of the headers. The loader contains the spec header (`ze_api.h`) and the loader-specific API (`loader/ze_loader.h`). + + - Note: It is preferable to have a loader already installed on your system: + - We may need it to check for symbols that are "defined in the header but not exported by the lib" + - We are wary of exposing a newer loader than the system one, as users may request symbols that we cannot forward + + - If you have access to a Level Zero lib, compile and run: +```bash +$ icpx -lze_loader query_ze_version.cpp && ./a.out +Driver version: 259.33578 +API version: 1.13 +Loader component versions: + [0] Name: loader + Spec: 1.13 + Lib version: 1.24.0 + [1] Name: tracing layer + Spec: 1.13 + Lib version: 1.24.0 +``` + - This will give you the loader version. + +- If you have access to a loader, copy/paste the `/usr/include/level_zero/` folder into `$THAPI_ROOT/backend/ze/include/`. + If not, use `git clone --depth 1 --branch $(lib_version) https://github.com/oneapi-src/level-zero.git`, where `lib_version` is the version you want. + To find the latest version, run: +```bash +$ git ls-remote --sort="v:refname" --tags https://github.com/oneapi-src/level-zero.git | tail -1 +6369d8d642e9c7625e67f38664267f171b8e42dc refs/tags/v1.28.2 +``` + +## 2/ DDI Ver + +### Sync +- Sync the fork (`github.com/argonne-lcf/level-zero-spec`) with the original remote - Sync the branch `ddi_ver` -Then we will build the header (assume `uv`). +### Building `ddi_table` +Then we will build the `ddi_table` corresponding to the Level Zero API version (assumed `uv`). +If you don't know the Header/API version associated with the driver, you can grep for `ZE_API_VERSION_CURRENT`: +```bash +$ grep ZE_API_VERSION_CURRENT ./level_zero/ze_api.h | head -1 + ZE_API_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 12 ), ///< latest known version ``` + +Now it's time to generate `ddi_ver.h`: +```bash git clone -b ddi_ver https://github.com/argonne-lcf/level-zero-spec.git cd level-zero-spec/scripts/ uv pip install -r third_party/requirements.txt cd script -version=$(grep -oP "version \d+\.\d+" core/driver.yml | tail -1 | awk '{print $2}') -echo $version python run.py --ver $version --\!debug --\!html grep "define ZE_API_VERSION_CURRENT_M" ../include/ze_api.h ``` -- Now header have been generated in `level-zero-spec/include`. Copy that in `$THAPI_ROOT/backend/ze/include` (carefull for removed file) -- This does contain the layers/loader: - - We got those from `https://github.com/oneapi-src/level-zero/tags` - - Use `find_level_zero_tag.sh $version` to help. -- This does contain the `zex`: - - Found in `https://github.com/intel/compute-runtime/blob/master/level_zero/include/level_zero/driver_experimental/zex_api.h` +- The headers will be generated in `level-zero-spec/include/`. Copy `ddi_ver.h` into `$THAPI_ROOT/backend/ze/include/`. +- You can sanity-check that the headers are the same. + +## 3/ Optional: ZEX +- We are missing the `zex` header: + - Found at `https://github.com/intel/compute-runtime/blob/master/level_zero/include/level_zero/driver_experimental/zex_api.h` + +## Now Try to Compile: + - Try to compile -## Problem +# Potential Problems + +## 1 ``` tracer_ze.c:197:8: error: use of undeclared identifier 'ZE_STRUCTURE_TYPE_DEVICE_CACHE_LINE_SIZE_EXT'; did you mean 'ZE_STRUCTURE_TYPE_DEVICE_CACHELINE_SIZE_EXT'? @@ -39,20 +84,24 @@ tracer_ze.c:197:8: error: use of undeclared identifier 'ZE_STRUCTURE_TYPE_DEVICE | ZE_STRUCTURE_TYPE_DEVICE_CACHELINE_SIZE_EXT ``` -- Due to intel lack of naming consistancy, maybe need to update `struct_type_conversion_table` in `ze_model.rb` +Due to Intel's lack of naming consistency, you may need to update the `struct_type_conversion_table` in `ze_model.rb`. + +## 2 ``` tracer_ze.c:8456:20: error: unused function 'zelTracerResetAllCallbacks_hid' [-Werror,-Wunused-function] 8456 | static ze_result_t zelTracerResetAllCallbacks_hid(zel_tracer_handle_t hTracer)__attribute__ ((alias ("zelTracerResetAllCallbacks"))); | ^~~~~~~~~~~~~~~~~ ``` -Need to modify the `$zel_commands.each` who generate `#{c.decl_hidden_alias};` in `gen_ze.rb` +Need to modify the `$zel_commands.each` block that generates `#{c.decl_hidden_alias};` in `gen_ze.rb`. + +## 3 -Run time error: When running `babeltrace_thapi` (`iprof -t`) constant error +Runtime error: When running `babeltrace_thapi` (`iprof -t`), constant error: ``` PogrammableParamValueInfoExp>': uninitialized constant ZE::ZETMetricProgrammableParamValueInfoExp::ZET_MAX_METRIC_PROGRAMMABLE_VALUE_DESCRIPTION_EXP (NameError) :description, [ :char, ZET_MAX_METRIC_PROGRAMMABLE_VALUE_DESCRIPTION_EXP ] ``` -Update in `backends/ze/gen_ze_library.rb` Moduel ZE. -TODO: h2yaml should be able to find all the constant defined +Update in `backends/ze/gen_ze_library.rb`, Module ZE. +TODO: `h2yaml` should be able to find all the constants defined. diff --git a/backends/ze/utils_spec_update/query_ze_version.cpp b/backends/ze/utils_spec_update/query_ze_version.cpp new file mode 100644 index 000000000..56d882974 --- /dev/null +++ b/backends/ze/utils_spec_update/query_ze_version.cpp @@ -0,0 +1,47 @@ +#include +#include +#include +#include + +int main() { + // Initialize Level Zero + zeInit(ZE_INIT_FLAG_GPU_ONLY); + + // Get the driver + uint32_t driverCount = 1; + ze_driver_handle_t driver; + zeDriverGet(&driverCount, &driver); + + // Query driver properties + ze_driver_properties_t driverProps{.stype = + ZE_STRUCTURE_TYPE_DRIVER_PROPERTIES}; + zeDriverGetProperties(driver, &driverProps); + + std::cout << "Driver version: " << ZE_MAJOR_VERSION(driverProps.driverVersion) + << "." << ZE_MINOR_VERSION(driverProps.driverVersion) << std::endl; + + // Compare with header version + std::cout << "API version: " << ZE_MAJOR_VERSION(ZE_API_VERSION_CURRENT) + << "." << ZE_MINOR_VERSION(ZE_API_VERSION_CURRENT) << std::endl; + + // Query loader component versions + size_t numElems = 0; + zelLoaderGetVersions(&numElems, nullptr); + std::vector versions(numElems); + zelLoaderGetVersions(&numElems, versions.data()); + + std::cout << "Loader component versions:" << std::endl; + for (size_t i = 0; i < numElems; ++i) { + std::cout << " [" << i << "] Name: " << versions[i].component_name + << std::endl + << " Spec: " + << ZE_MAJOR_VERSION(versions[i].spec_version) << "." + << ZE_MINOR_VERSION(versions[i].spec_version) << std::endl + << " Lib version: " + << versions[i].component_lib_version.major << "." + << versions[i].component_lib_version.minor << "." + << versions[i].component_lib_version.patch << std::endl; + } + + return 0; +} From 5b83698ad0ecbeed12fe11024ef04198320a3a6b Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Tue, 3 Mar 2026 21:44:57 +0000 Subject: [PATCH 18/30] update readme --- backends/ze/README.md | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/backends/ze/README.md b/backends/ze/README.md index 006aecf05..a56e14d39 100644 --- a/backends/ze/README.md +++ b/backends/ze/README.md @@ -16,7 +16,7 @@ - If you have access to a Level Zero lib, compile and run: ```bash -$ icpx -lze_loader query_ze_version.cpp && ./a.out +$ icpx -lze_loader utils_spec_update/query_ze_version.cpp && ./a.out Driver version: 259.33578 API version: 1.13 Loader component versions: @@ -29,7 +29,7 @@ Loader component versions: ``` - This will give you the loader version. -- If you have access to a loader, copy/paste the `/usr/include/level_zero/` folder into `$THAPI_ROOT/backend/ze/include/`. +- If you have access to a loader, don't copy/paste the `/usr/include/level_zero/` folder into `$THAPI_ROOT/backend/ze/include/`. If not, use `git clone --depth 1 --branch $(lib_version) https://github.com/oneapi-src/level-zero.git`, where `lib_version` is the version you want. To find the latest version, run: ```bash @@ -40,16 +40,17 @@ $ git ls-remote --sort="v:refname" --tags https://github.com/oneapi-src/level- ## 2/ DDI Ver ### Sync -- Sync the fork (`github.com/argonne-lcf/level-zero-spec`) with the original remote -- Sync the branch `ddi_ver` +- Sync the fork (` https://github.com/argonne-lcf/level-zero-spec.git`) with the original remote +- Sync the `ddi_ver` branch ### Building `ddi_table` -Then we will build the `ddi_table` corresponding to the Level Zero API version (assumed `uv`). -If you don't know the Header/API version associated with the driver, you can grep for `ZE_API_VERSION_CURRENT`: +Then we will build the `ddi_table` corresponding to the Level Zero API version. + +If you don't know the Header/API version associated with the driver previously used, you can grep for `ZE_API_VERSION_CURRENT`: ```bash -$ grep ZE_API_VERSION_CURRENT ./level_zero/ze_api.h | head -1 - ZE_API_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 12 ), ///< latest known version +$ grep define ZE_API_VERSION_CURRENT ./level_zero/ze_api.h | head -1 +ZE_API_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 13 ), ///< latest known version ``` Now it's time to generate `ddi_ver.h`: @@ -57,13 +58,21 @@ Now it's time to generate `ddi_ver.h`: git clone -b ddi_ver https://github.com/argonne-lcf/level-zero-spec.git cd level-zero-spec/scripts/ uv pip install -r third_party/requirements.txt -cd script python run.py --ver $version --\!debug --\!html -grep "define ZE_API_VERSION_CURRENT_M" ../include/ze_api.h ``` -- The headers will be generated in `level-zero-spec/include/`. Copy `ddi_ver.h` into `$THAPI_ROOT/backend/ze/include/`. -- You can sanity-check that the headers are the same. +- The headers will be generated in `level-zero-spec/include/`. Copy `../include/*_ddi_ver.h` into `$THAPI_ROOT/backend/ze/include/`. +- You can sanity-check that the headers are the same And that `ZE_API_VERSION_CURRENT_M` define the same version +``` +grep "ZE_API_VERSION_CURRENT" ../include/ze_api.h # Sanity check + ZE_API_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 13 ), ///< latest known version +#ifndef ZE_API_VERSION_CURRENT_M +#define ZE_API_VERSION_CURRENT_M ZE_MAKE_VERSION( 1, 15 ) +#endif // ZE_API_VERSION_CURRENT_M +``` +(We don't talk about `ZE_API_VERSION_CURRENT_M`...) + +- Note that `layers/zel_tracing_ddi_ver.h` is not generated manually, and need manual update. ## 3/ Optional: ZEX - We are missing the `zex` header: @@ -75,7 +84,7 @@ grep "define ZE_API_VERSION_CURRENT_M" ../include/ze_api.h # Potential Problems -## 1 +## 1 ``` tracer_ze.c:197:8: error: use of undeclared identifier 'ZE_STRUCTURE_TYPE_DEVICE_CACHE_LINE_SIZE_EXT'; did you mean 'ZE_STRUCTURE_TYPE_DEVICE_CACHELINE_SIZE_EXT'? From 31f13fc4107fb8188111734ac763a3fb21ef3f54 Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Tue, 3 Mar 2026 23:41:13 +0000 Subject: [PATCH 19/30] Update header --- backends/ze/Makefile.am | 10 +- backends/ze/README.md | 8 +- backends/ze/gen_ze.rb | 4 + .../include/layers/zel_tracing_register_cb.h | 605 +-- backends/ze/include/loader/ze_loader.h | 466 +-- backends/ze/include/ze_api.h | 3278 ++--------------- backends/ze/include/ze_ddi.h | 125 +- backends/ze/include/ze_ddi_common.h | 4 +- backends/ze/include/ze_ddi_ver.h | 180 +- backends/ze/include/zer_api.h | 162 - backends/ze/include/zer_ddi.h | 96 - backends/ze/include/zer_ddi_ver.h | 13 +- backends/ze/include/zes_api.h | 1361 +------ backends/ze/include/zes_ddi.h | 13 +- backends/ze/include/zes_ddi_ver.h | 37 +- backends/ze/include/zet_api.h | 627 +--- backends/ze/include/zet_ddi.h | 4 +- backends/ze/include/zet_ddi_ver.h | 2 +- backends/ze/ze.h.include | 2 + backends/ze/ze_model.rb | 6 +- 20 files changed, 461 insertions(+), 6542 deletions(-) delete mode 100644 backends/ze/include/zer_api.h delete mode 100644 backends/ze/include/zer_ddi.h diff --git a/backends/ze/Makefile.am b/backends/ze/Makefile.am index c2326aa3e..03192bc57 100644 --- a/backends/ze/Makefile.am +++ b/backends/ze/Makefile.am @@ -13,7 +13,7 @@ if STRICT WERROR = -Werror -Wno-error=nonnull endif -ZE_NAMESPACES = ze zet zes zel zer zex +ZE_NAMESPACES = ze zet zes zel zex # zer ZE_STRUCTS_NAMESPACES = $(ZE_NAMESPACES:=_structs) ZE_HDR_ROOT = \ @@ -26,9 +26,9 @@ ZE_HDR_ROOT = \ zet_api.h \ zet_ddi.h \ zet_ddi_ver.h \ - zer_api.h \ - zer_ddi.h \ - zer_ddi_ver.h \ + #zer_api.h \ + #zer_ddi.h \ + #zer_ddi_ver.h \ zex_api.h \ layers/zel_tracing_api.h \ layers/zel_tracing_ddi.h \ @@ -63,7 +63,7 @@ $(MODIFIED_ZE_HDR) &: $(ZE_HDR) $(srcdir)/headers.patch $(RM) -r modified_include/ cp -r $(srcdir)/include/ modified_include/ chmod -R u+w modified_include/ - cat $(srcdir)/headers.patch | patch -i - -d modified_include/ -s -p1 +#cat $(srcdir)/headers.patch | patch -i - -d modified_include/ -s -p1 clean-local: $(RM) -r modified_include diff --git a/backends/ze/README.md b/backends/ze/README.md index a56e14d39..493b1c845 100644 --- a/backends/ze/README.md +++ b/backends/ze/README.md @@ -29,9 +29,9 @@ Loader component versions: ``` - This will give you the loader version. -- If you have access to a loader, don't copy/paste the `/usr/include/level_zero/` folder into `$THAPI_ROOT/backend/ze/include/`. +- If you have access to a loader, you can copy/paste the `/usr/include/level_zero/` folder into `$THAPI_ROOT/backend/ze/include/`. If not, use `git clone --depth 1 --branch $(lib_version) https://github.com/oneapi-src/level-zero.git`, where `lib_version` is the version you want. - To find the latest version, run: + To find the latest lib version of the loader released, run: ```bash $ git ls-remote --sort="v:refname" --tags https://github.com/oneapi-src/level-zero.git | tail -1 6369d8d642e9c7625e67f38664267f171b8e42dc refs/tags/v1.28.2 @@ -40,6 +40,7 @@ $ git ls-remote --sort="v:refname" --tags https://github.com/oneapi-src/level- ## 2/ DDI Ver ### Sync + - Sync the fork (` https://github.com/argonne-lcf/level-zero-spec.git`) with the original remote - Sync the `ddi_ver` branch @@ -75,8 +76,9 @@ grep "ZE_API_VERSION_CURRENT" ../include/ze_api.h # Sanity check - Note that `layers/zel_tracing_ddi_ver.h` is not generated manually, and need manual update. ## 3/ Optional: ZEX + - We are missing the `zex` header: - - Found at `https://github.com/intel/compute-runtime/blob/master/level_zero/include/level_zero/driver_experimental/zex_api.h` +- Found at `https://github.com/intel/compute-runtime/blob/master/level_zero/include/level_zero/driver_experimental/zex_api.h` ## Now Try to Compile: diff --git a/backends/ze/gen_ze.rb b/backends/ze/gen_ze.rb index 1ec722ae9..5c0a5c9df 100644 --- a/backends/ze/gen_ze.rb +++ b/backends/ze/gen_ze.rb @@ -20,13 +20,17 @@ #include "zet_tracepoints.h" #include "zes_tracepoints.h" #include "zel_tracepoints.h" +#ifdef NEW_VERSION_WITH_ZER #include "zer_tracepoints.h" +#endif #include "zex_tracepoints.h" #include "ze_structs_tracepoints.h" #include "zet_structs_tracepoints.h" #include "zes_structs_tracepoints.h" #include "zel_structs_tracepoints.h" +#ifdef NEW_VERSION_WITH_ZER #include "zer_structs_tracepoints.h" +#endif #include "zex_structs_tracepoints.h" #include "ze_sampling.h" #include "ze_profiling.h" diff --git a/backends/ze/include/layers/zel_tracing_register_cb.h b/backends/ze/include/layers/zel_tracing_register_cb.h index d76d77fd6..18b795d94 100644 --- a/backends/ze/include/layers/zel_tracing_register_cb.h +++ b/backends/ze/include/layers/zel_tracing_register_cb.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2021-2025 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -27,10 +27,6 @@ typedef struct _zel_tracer_handle_t *zel_tracer_handle_t; /// Callback definitions for all API released in LevelZero spec 1.1 or newer /// Callbacks for APIs included in spec 1.0 are contained in ze_api.helper -#if !defined(__GNUC__) -#pragma region callbacks -#endif - /////////////////////////////////////////////////////////////////////////////// /// @brief Callback function parameters for zeInitDrivers /// @details Each entry is a pointer to the parameter passed to the function; @@ -573,31 +569,6 @@ typedef void (ZE_APICALL *ze_pfnDriverRTASFormatCompatibilityCheckExtCb_t)( void** ppTracerInstanceUserData ); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeDriverGetDefaultContext -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value - -typedef struct _ze_driver_get_default_context_params_t -{ - ze_driver_handle_t* phDriver; -} ze_driver_get_default_context_params_t; - - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeDriverGetDefaultContext -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data - -typedef void (ZE_APICALL *ze_pfnDriverGetDefaultContextCb_t)( - ze_driver_get_default_context_params_t* params, - ze_context_handle_t result, - void* pTracerUserData, - void** ppTracerInstanceUserData - ); - /////////////////////////////////////////////////////////////////////////////// /// @brief Callback function parameters for zeDriverGetLastErrorDescription /// @details Each entry is a pointer to the parameter passed to the function; @@ -757,57 +728,6 @@ typedef void (ZE_APICALL *ze_pfnDeviceGetVectorWidthPropertiesExtCb_t)( void** ppTracerInstanceUserData ); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeDeviceSynchronize -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value - -typedef struct _ze_device_synchronize_params_t -{ - ze_device_handle_t* phDevice; -} ze_device_synchronize_params_t; - - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeDeviceSynchronize -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data - -typedef void (ZE_APICALL *ze_pfnDeviceSynchronizeCb_t)( - ze_device_synchronize_params_t* params, - ze_result_t result, - void* pTracerUserData, - void** ppTracerInstanceUserData - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeDeviceGetAggregatedCopyOffloadIncrementValue -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value - -typedef struct _ze_device_get_aggregated_copy_offload_increment_value_params_t -{ - ze_device_handle_t* phDevice; - uint32_t** pincrementValue; -} ze_device_get_aggregated_copy_offload_increment_value_params_t; - - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeDeviceGetAggregatedCopyOffloadIncrementValue -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data - -typedef void (ZE_APICALL *ze_pfnDeviceGetAggregatedCopyOffloadIncrementValueCb_t)( - ze_device_get_aggregated_copy_offload_increment_value_params_t* params, - ze_result_t result, - void* pTracerUserData, - void** ppTracerInstanceUserData - ); - /////////////////////////////////////////////////////////////////////////////// /// @brief Callback function parameters for zeDeviceReserveCacheExt /// @details Each entry is a pointer to the parameter passed to the function; @@ -1141,70 +1061,6 @@ typedef void (ZE_APICALL *ze_pfnCommandListAppendWaitExternalSemaphoreExtCb_t)( void** ppTracerInstanceUserData ); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeCommandListAppendLaunchKernelWithParameters -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value - -typedef struct _ze_command_list_append_launch_kernel_with_parameters_params_t -{ - ze_command_list_handle_t* phCommandList; - ze_kernel_handle_t* phKernel; - const ze_group_count_t** ppGroupCounts; - const void ** ppNext; - ze_event_handle_t* phSignalEvent; - uint32_t* pnumWaitEvents; - ze_event_handle_t** pphWaitEvents; -} ze_command_list_append_launch_kernel_with_parameters_params_t; - - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeCommandListAppendLaunchKernelWithParameters -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data - -typedef void (ZE_APICALL *ze_pfnCommandListAppendLaunchKernelWithParametersCb_t)( - ze_command_list_append_launch_kernel_with_parameters_params_t* params, - ze_result_t result, - void* pTracerUserData, - void** ppTracerInstanceUserData - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeCommandListAppendLaunchKernelWithArguments -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value - -typedef struct _ze_command_list_append_launch_kernel_with_arguments_params_t -{ - ze_command_list_handle_t* phCommandList; - ze_kernel_handle_t* phKernel; - const ze_group_count_t* pgroupCounts; - const ze_group_size_t* pgroupSizes; - void *** ppArguments; - const void ** ppNext; - ze_event_handle_t* phSignalEvent; - uint32_t* pnumWaitEvents; - ze_event_handle_t** pphWaitEvents; -} ze_command_list_append_launch_kernel_with_arguments_params_t; - - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeCommandListAppendLaunchKernelWithArguments -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data - -typedef void (ZE_APICALL *ze_pfnCommandListAppendLaunchKernelWithArgumentsCb_t)( - ze_command_list_append_launch_kernel_with_arguments_params_t* params, - ze_result_t result, - void* pTracerUserData, - void** ppTracerInstanceUserData - ); - /////////////////////////////////////////////////////////////////////////////// /// @brief Callback function parameters for zeCommandListAppendImageCopyToMemoryExt /// @details Each entry is a pointer to the parameter passed to the function; @@ -1591,139 +1447,6 @@ typedef void (ZE_APICALL *ze_pfnCommandListUpdateMutableCommandWaitEventsExpCb_t void** ppTracerInstanceUserData ); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeEventCounterBasedCreate -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value - -typedef struct _ze_event_counter_based_create_params_t -{ - ze_context_handle_t* phContext; - ze_device_handle_t* phDevice; - const ze_event_counter_based_desc_t** pdesc; - ze_event_handle_t** pphEvent; -} ze_event_counter_based_create_params_t; - - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeEventCounterBasedCreate -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data - -typedef void (ZE_APICALL *ze_pfnEventCounterBasedCreateCb_t)( - ze_event_counter_based_create_params_t* params, - ze_result_t result, - void* pTracerUserData, - void** ppTracerInstanceUserData - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeEventCounterBasedGetIpcHandle -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value - -typedef struct _ze_event_counter_based_get_ipc_handle_params_t -{ - ze_event_handle_t* phEvent; - ze_ipc_event_counter_based_handle_t** pphIpc; -} ze_event_counter_based_get_ipc_handle_params_t; - - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeEventCounterBasedGetIpcHandle -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data - -typedef void (ZE_APICALL *ze_pfnEventCounterBasedGetIpcHandleCb_t)( - ze_event_counter_based_get_ipc_handle_params_t* params, - ze_result_t result, - void* pTracerUserData, - void** ppTracerInstanceUserData - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeEventCounterBasedOpenIpcHandle -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value - -typedef struct _ze_event_counter_based_open_ipc_handle_params_t -{ - ze_context_handle_t* phContext; - ze_ipc_event_counter_based_handle_t* phIpc; - ze_event_handle_t** pphEvent; -} ze_event_counter_based_open_ipc_handle_params_t; - - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeEventCounterBasedOpenIpcHandle -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data - -typedef void (ZE_APICALL *ze_pfnEventCounterBasedOpenIpcHandleCb_t)( - ze_event_counter_based_open_ipc_handle_params_t* params, - ze_result_t result, - void* pTracerUserData, - void** ppTracerInstanceUserData - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeEventCounterBasedCloseIpcHandle -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value - -typedef struct _ze_event_counter_based_close_ipc_handle_params_t -{ - ze_event_handle_t* phEvent; -} ze_event_counter_based_close_ipc_handle_params_t; - - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeEventCounterBasedCloseIpcHandle -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data - -typedef void (ZE_APICALL *ze_pfnEventCounterBasedCloseIpcHandleCb_t)( - ze_event_counter_based_close_ipc_handle_params_t* params, - ze_result_t result, - void* pTracerUserData, - void** ppTracerInstanceUserData - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeEventCounterBasedGetDeviceAddress -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value - -typedef struct _ze_event_counter_based_get_device_address_params_t -{ - ze_event_handle_t* phEvent; - uint64_t** pcompletionValue; - uint64_t** pdeviceAddress; -} ze_event_counter_based_get_device_address_params_t; - - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeEventCounterBasedGetDeviceAddress -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data - -typedef void (ZE_APICALL *ze_pfnEventCounterBasedGetDeviceAddressCb_t)( - ze_event_counter_based_get_device_address_params_t* params, - ze_result_t result, - void* pTracerUserData, - void** ppTracerInstanceUserData - ); - /////////////////////////////////////////////////////////////////////////////// /// @brief Callback function parameters for zeEventQueryTimestampsExp /// @details Each entry is a pointer to the parameter passed to the function; @@ -2128,33 +1851,6 @@ typedef void (ZE_APICALL *ze_pfnKernelGetBinaryExpCb_t)( void** ppTracerInstanceUserData ); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeKernelGetAllocationPropertiesExp -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value - -typedef struct _ze_kernel_get_allocation_properties_exp_params_t -{ - ze_kernel_handle_t* phKernel; - uint32_t** ppCount; - ze_kernel_allocation_exp_properties_t** ppAllocationProperties; -} ze_kernel_get_allocation_properties_exp_params_t; - - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeKernelGetAllocationPropertiesExp -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data - -typedef void (ZE_APICALL *ze_pfnKernelGetAllocationPropertiesExpCb_t)( - ze_kernel_get_allocation_properties_exp_params_t* params, - ze_result_t result, - void* pTracerUserData, - void** ppTracerInstanceUserData - ); - /////////////////////////////////////////////////////////////////////////////// /// @brief Callback function parameters for zeKernelSchedulingHintExp /// @details Each entry is a pointer to the parameter passed to the function; @@ -2181,34 +1877,6 @@ typedef void (ZE_APICALL *ze_pfnKernelSchedulingHintExpCb_t)( void** ppTracerInstanceUserData ); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zeMemGetIpcHandleWithProperties -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value - -typedef struct _ze_mem_get_ipc_handle_with_properties_params_t -{ - ze_context_handle_t* phContext; - const void** pptr; - void** ppNext; - ze_ipc_mem_handle_t** ppIpcHandle; -} ze_mem_get_ipc_handle_with_properties_params_t; - - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zeMemGetIpcHandleWithProperties -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data - -typedef void (ZE_APICALL *ze_pfnMemGetIpcHandleWithPropertiesCb_t)( - ze_mem_get_ipc_handle_with_properties_params_t* params, - ze_result_t result, - void* pTracerUserData, - void** ppTracerInstanceUserData - ); - /////////////////////////////////////////////////////////////////////////////// /// @brief Callback function parameters for zeMemFreeExt /// @details Each entry is a pointer to the parameter passed to the function; @@ -2432,33 +2100,6 @@ typedef void (ZE_APICALL *ze_pfnModuleInspectLinkageExtCb_t)( void** ppTracerInstanceUserData ); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zePhysicalMemGetProperties -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value - -typedef struct _ze_physical_mem_get_properties_params_t -{ - ze_context_handle_t* phContext; - ze_physical_mem_handle_t* phPhysicalMem; - ze_physical_mem_properties_t** ppMemProperties; -} ze_physical_mem_get_properties_params_t; - - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zePhysicalMemGetProperties -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data - -typedef void (ZE_APICALL *ze_pfnPhysicalMemGetPropertiesCb_t)( - ze_physical_mem_get_properties_params_t* params, - ze_result_t result, - void* pTracerUserData, - void** ppTracerInstanceUserData - ); - /////////////////////////////////////////////////////////////////////////////// /// @brief Callback function parameters for zeFabricEdgeGetExp /// @details Each entry is a pointer to the parameter passed to the function; @@ -2646,108 +2287,6 @@ typedef void (ZE_APICALL *ze_pfnFabricVertexGetDeviceExpCb_t)( void** ppTracerInstanceUserData ); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zerGetLastErrorDescription -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value - -typedef struct _zer_get_last_error_description_params_t -{ - const char*** pppString; -} zer_get_last_error_description_params_t; - - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zerGetLastErrorDescription -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data - -typedef void (ZE_APICALL *zer_pfnGetLastErrorDescriptionCb_t)( - zer_get_last_error_description_params_t* params, - ze_result_t result, - void* pTracerUserData, - void** ppTracerInstanceUserData - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zerTranslateDeviceHandleToIdentifier -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value - -typedef struct _zer_translate_device_handle_to_identifier_params_t -{ - ze_device_handle_t* phDevice; -} zer_translate_device_handle_to_identifier_params_t; - - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zerTranslateDeviceHandleToIdentifier -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data - -typedef void (ZE_APICALL *zer_pfnTranslateDeviceHandleToIdentifierCb_t)( - zer_translate_device_handle_to_identifier_params_t* params, - uint32_t result, - void* pTracerUserData, - void** ppTracerInstanceUserData - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zerTranslateIdentifierToDeviceHandle -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value - -typedef struct _zer_translate_identifier_to_device_handle_params_t -{ - uint32_t* pidentifier; -} zer_translate_identifier_to_device_handle_params_t; - - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zerTranslateIdentifierToDeviceHandle -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data - -typedef void (ZE_APICALL *zer_pfnTranslateIdentifierToDeviceHandleCb_t)( - zer_translate_identifier_to_device_handle_params_t* params, - ze_device_handle_t result, - void* pTracerUserData, - void** ppTracerInstanceUserData - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function parameters for zerGetDefaultContext -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value - -typedef struct _zer_get_default_context_params_t -{ -} zer_get_default_context_params_t; - - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Callback function-pointer for zerGetDefaultContext -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data - -typedef void (ZE_APICALL *zer_pfnGetDefaultContextCb_t)( - zer_get_default_context_params_t* params, - ze_context_handle_t result, - void* pTracerUserData, - void** ppTracerInstanceUserData - ); - -#if !defined(__GNUC__) -#pragma endregion -#endif typedef enum _zel_tracer_reg_t { @@ -2757,10 +2296,6 @@ typedef enum _zel_tracer_reg_t /// APIs to register callbacks for each core API -#if !defined(__GNUC__) -#pragma region register_callbacks -#endif - ZE_APIEXPORT ze_result_t ZE_APICALL zelTracerInitRegisterCallback( zel_tracer_handle_t hTracer, @@ -2833,14 +2368,6 @@ zelTracerDriverGetLastErrorDescriptionRegisterCallback( ); -ZE_APIEXPORT ze_result_t ZE_APICALL -zelTracerDriverGetDefaultContextRegisterCallback( - zel_tracer_handle_t hTracer, - zel_tracer_reg_t callback_type, - ze_pfnDriverGetDefaultContextCb_t pfnGetDefaultContextCb - ); - - ZE_APIEXPORT ze_result_t ZE_APICALL zelTracerDeviceGetRegisterCallback( zel_tracer_handle_t hTracer, @@ -2969,22 +2496,6 @@ zelTracerDeviceGetGlobalTimestampsRegisterCallback( ); -ZE_APIEXPORT ze_result_t ZE_APICALL -zelTracerDeviceSynchronizeRegisterCallback( - zel_tracer_handle_t hTracer, - zel_tracer_reg_t callback_type, - ze_pfnDeviceSynchronizeCb_t pfnSynchronizeCb - ); - - -ZE_APIEXPORT ze_result_t ZE_APICALL -zelTracerDeviceGetAggregatedCopyOffloadIncrementValueRegisterCallback( - zel_tracer_handle_t hTracer, - zel_tracer_reg_t callback_type, - ze_pfnDeviceGetAggregatedCopyOffloadIncrementValueCb_t pfnGetAggregatedCopyOffloadIncrementValueCb - ); - - ZE_APIEXPORT ze_result_t ZE_APICALL zelTracerContextCreateRegisterCallback( zel_tracer_handle_t hTracer, @@ -3289,14 +2800,6 @@ zelTracerEventCreateRegisterCallback( ); -ZE_APIEXPORT ze_result_t ZE_APICALL -zelTracerEventCounterBasedCreateRegisterCallback( - zel_tracer_handle_t hTracer, - zel_tracer_reg_t callback_type, - ze_pfnEventCounterBasedCreateCb_t pfnCounterBasedCreateCb - ); - - ZE_APIEXPORT ze_result_t ZE_APICALL zelTracerEventDestroyRegisterCallback( zel_tracer_handle_t hTracer, @@ -3337,38 +2840,6 @@ zelTracerEventPoolCloseIpcHandleRegisterCallback( ); -ZE_APIEXPORT ze_result_t ZE_APICALL -zelTracerEventCounterBasedGetIpcHandleRegisterCallback( - zel_tracer_handle_t hTracer, - zel_tracer_reg_t callback_type, - ze_pfnEventCounterBasedGetIpcHandleCb_t pfnCounterBasedGetIpcHandleCb - ); - - -ZE_APIEXPORT ze_result_t ZE_APICALL -zelTracerEventCounterBasedOpenIpcHandleRegisterCallback( - zel_tracer_handle_t hTracer, - zel_tracer_reg_t callback_type, - ze_pfnEventCounterBasedOpenIpcHandleCb_t pfnCounterBasedOpenIpcHandleCb - ); - - -ZE_APIEXPORT ze_result_t ZE_APICALL -zelTracerEventCounterBasedCloseIpcHandleRegisterCallback( - zel_tracer_handle_t hTracer, - zel_tracer_reg_t callback_type, - ze_pfnEventCounterBasedCloseIpcHandleCb_t pfnCounterBasedCloseIpcHandleCb - ); - - -ZE_APIEXPORT ze_result_t ZE_APICALL -zelTracerEventCounterBasedGetDeviceAddressRegisterCallback( - zel_tracer_handle_t hTracer, - zel_tracer_reg_t callback_type, - ze_pfnEventCounterBasedGetDeviceAddressCb_t pfnCounterBasedGetDeviceAddressCb - ); - - ZE_APIEXPORT ze_result_t ZE_APICALL zelTracerCommandListAppendSignalEventRegisterCallback( zel_tracer_handle_t hTracer, @@ -3841,22 +3312,6 @@ zelTracerCommandListAppendLaunchKernelRegisterCallback( ); -ZE_APIEXPORT ze_result_t ZE_APICALL -zelTracerCommandListAppendLaunchKernelWithParametersRegisterCallback( - zel_tracer_handle_t hTracer, - zel_tracer_reg_t callback_type, - ze_pfnCommandListAppendLaunchKernelWithParametersCb_t pfnAppendLaunchKernelWithParametersCb - ); - - -ZE_APIEXPORT ze_result_t ZE_APICALL -zelTracerCommandListAppendLaunchKernelWithArgumentsRegisterCallback( - zel_tracer_handle_t hTracer, - zel_tracer_reg_t callback_type, - ze_pfnCommandListAppendLaunchKernelWithArgumentsCb_t pfnAppendLaunchKernelWithArgumentsCb - ); - - ZE_APIEXPORT ze_result_t ZE_APICALL zelTracerCommandListAppendLaunchCooperativeKernelRegisterCallback( zel_tracer_handle_t hTracer, @@ -3953,14 +3408,6 @@ zelTracerVirtualMemQueryPageSizeRegisterCallback( ); -ZE_APIEXPORT ze_result_t ZE_APICALL -zelTracerPhysicalMemGetPropertiesRegisterCallback( - zel_tracer_handle_t hTracer, - zel_tracer_reg_t callback_type, - ze_pfnPhysicalMemGetPropertiesCb_t pfnGetPropertiesCb - ); - - ZE_APIEXPORT ze_result_t ZE_APICALL zelTracerPhysicalMemCreateRegisterCallback( zel_tracer_handle_t hTracer, @@ -4145,22 +3592,6 @@ zelTracerDeviceGetVectorWidthPropertiesExtRegisterCallback( ); -ZE_APIEXPORT ze_result_t ZE_APICALL -zelTracerKernelGetAllocationPropertiesExpRegisterCallback( - zel_tracer_handle_t hTracer, - zel_tracer_reg_t callback_type, - ze_pfnKernelGetAllocationPropertiesExpCb_t pfnGetAllocationPropertiesExpCb - ); - - -ZE_APIEXPORT ze_result_t ZE_APICALL -zelTracerMemGetIpcHandleWithPropertiesRegisterCallback( - zel_tracer_handle_t hTracer, - zel_tracer_reg_t callback_type, - ze_pfnMemGetIpcHandleWithPropertiesCb_t pfnGetIpcHandleWithPropertiesCb - ); - - ZE_APIEXPORT ze_result_t ZE_APICALL zelTracerDeviceReserveCacheExtRegisterCallback( zel_tracer_handle_t hTracer, @@ -4488,40 +3919,6 @@ zelTracerCommandListUpdateMutableCommandKernelsExpRegisterCallback( ze_pfnCommandListUpdateMutableCommandKernelsExpCb_t pfnUpdateMutableCommandKernelsExpCb ); -ZE_APIEXPORT ze_result_t ZE_APICALL -zelTracerGetLastErrorDescriptionRegisterCallback( - zel_tracer_handle_t hTracer, - zel_tracer_reg_t callback_type, - zer_pfnGetLastErrorDescriptionCb_t pfnGetLastErrorDescriptionCb - ); - - -ZE_APIEXPORT ze_result_t ZE_APICALL -zelTracerTranslateDeviceHandleToIdentifierRegisterCallback( - zel_tracer_handle_t hTracer, - zel_tracer_reg_t callback_type, - zer_pfnTranslateDeviceHandleToIdentifierCb_t pfnTranslateDeviceHandleToIdentifierCb - ); - - -ZE_APIEXPORT ze_result_t ZE_APICALL -zelTracerTranslateIdentifierToDeviceHandleRegisterCallback( - zel_tracer_handle_t hTracer, - zel_tracer_reg_t callback_type, - zer_pfnTranslateIdentifierToDeviceHandleCb_t pfnTranslateIdentifierToDeviceHandleCb - ); - - -ZE_APIEXPORT ze_result_t ZE_APICALL -zelTracerGetDefaultContextRegisterCallback( - zel_tracer_handle_t hTracer, - zel_tracer_reg_t callback_type, - zer_pfnGetDefaultContextCb_t pfnGetDefaultContextCb - ); - -#if !defined(__GNUC__) -#pragma endregion -#endif ZE_APIEXPORT ze_result_t ZE_APICALL zelTracerResetAllCallbacks(zel_tracer_handle_t hTracer); diff --git a/backends/ze/include/loader/ze_loader.h b/backends/ze/include/loader/ze_loader.h index 6d3b64600..5b6261e29 100644 --- a/backends/ze/include/loader/ze_loader.h +++ b/backends/ze/include/loader/ze_loader.h @@ -34,75 +34,11 @@ extern "C" { } zel_component_version_t; -/** - * @brief Retrieves version information for all components of the Level Zero loader. - * - * This function returns the versions of all loader components. It requires that - * the driver initialization routine has been called prior to use. - * - * Preconditions: - * - `zeInitDrivers()` must be successfully invoked before calling this function. - * - * Usage: - * - If `versions` is `NULL`, the function writes the number of available component - * versions to `*num_elems` and returns. - * - If `versions` is non-NULL, provide an array large enough to hold `*num_elems` - * entries; the function fills the array with the versions of all loader components. - * - * @param[out] num_elems - * Pointer to a size_t that receives the number of available component version entries. - * When `versions` is non-NULL, on success it may be updated to reflect the number - * of entries written. - * - * @param[out] versions - * Pointer to an array of `zel_component_version_t` to be filled with version data. - * If set to `NULL`, no version data is returned and only `*num_elems` is populated. - * - * @return ze_result_t - * - `ZE_RESULT_SUCCESS` on successful retrieval. - * - `ZE_RESULT_ERROR_UNINITIALIZED` if `zeInitDrivers()` was not called. - * - `ZE_RESULT_ERROR_INVALID_NULL_POINTER` if required pointers are `NULL`. - * - `ZE_RESULT_ERROR_INVALID_SIZE` if the provided array is too small. - * - Other `ze_result_t` error codes as appropriate. - */ ZE_APIEXPORT ze_result_t ZE_APICALL zelLoaderGetVersions( size_t *num_elems, //Pointer to num versions to get. zel_component_version_t *versions); //Pointer to array of versions. If set to NULL, num_elems is returned - -/** - * @brief Retrieves the Level Zero loader's version information. - * - * Populates the provided zel_component_version_t structure with the loader's - * version details (e.g., major, minor, patch), allowing applications to - * query and validate the loader's compatibility at runtime. - * - * Does not require zeInit() or zeInitDrivers() to be called prior to invocation. - * Works with both static and dynamic loader builds without initialization. - * - * Thread-safety: This function is safe to call from multiple threads. - * The implementation does not modify global state other than filling the - * supplied version structure. - * - * @param[out] version - * Pointer to a zel_component_version_t structure that will be filled with - * the loader's version information. Must be a valid, non-null pointer. - * - * @return - * - ZE_RESULT_SUCCESS on successful retrieval of the loader version. - * - ZE_RESULT_ERROR_INVALID_NULL_POINTER if version is nullptr. - * - ZE_RESULT_ERROR_UNINITIALIZED if the loader library cannot be found or loaded - * (only possible in static builds with misconfigured library paths). - * - Other ze_result_t error codes on failure conditions as defined by the API. - * - * @note The caller owns the memory for the version structure and must ensure - * it remains valid for the duration of the call. - */ -ZE_DLLEXPORT ze_result_t ZE_APICALL -zelGetLoaderVersion(zel_component_version_t *version -); - typedef enum _zel_handle_type_t { ZEL_HANDLE_DRIVER, ZEL_HANDLE_DEVICE, @@ -120,385 +56,45 @@ typedef enum _zel_handle_type_t { ZEL_HANDLE_PHYSICAL_MEM } zel_handle_type_t; -/** - * @brief Translates loader handles to driver handles when handle interception is enabled. - * - * This function provides handle translation for scenarios where the loader intercepts - * and wraps driver handles. When handle interception is enabled, the loader maintains - * a mapping between loader-visible handles and underlying driver handles. This function - * performs the translation from loader handles to their corresponding driver handles. - * - * Handle interception is typically used by validation layers, tracing layers, or other - * middleware that needs to track handle lifecycles and API usage patterns. - * - * Behavior: - * - If handle interception is enabled: Translates handleIn to the corresponding driver handle - * and stores the result in *handleOut. - * - If handle interception is disabled: Sets *handleOut equal to handleIn (pass-through). - * - * Thread-safety: This function is thread-safe and can be called concurrently from multiple - * threads with different handle values. - * - * @param[in] handleType - * The type of handle being translated, specified using zel_handle_type_t enumeration. - * This indicates whether the handle is a driver, device, context, command queue, etc. - * - * @param[in] handleIn - * The loader handle to translate. This is the handle visible to the application or layer. - * Must be a valid handle of the type specified by handleType, or NULL. - * - * @param[out] handleOut - * Pointer to a void* that will receive the driver handle. If handle interception is enabled, - * this will be set to the underlying driver handle. If disabled, it will be set to handleIn. - * Must be a valid, non-null pointer. - * - * @return - * - ZE_RESULT_SUCCESS if the translation was successful. - * - ZE_RESULT_ERROR_INVALID_NULL_POINTER if handleOut is null. - * - ZE_RESULT_ERROR_INVALID_ARGUMENT if handleType is invalid or handleIn is invalid. - * - Other ze_result_t error codes as appropriate. - * - * @note If handleIn is NULL, *handleOut will be set to NULL regardless of interception state. - */ +//Translates Loader Handles to Driver Handles if loader handle intercept is enabled. +//If handle intercept is not enabled handleOut is set to handleIn ZE_APIEXPORT ze_result_t ZE_APICALL zelLoaderTranslateHandle( - zel_handle_type_t handleType, - void *handleIn, - void **handleOut); + zel_handle_type_t handleType, //Handle Type + void *handleIn, //Input: handle to translate from loader handle to driver handle + void **handleOut); //Output: Pointer to handleOut is set to driver handle if successful -/** - * @brief Notifies the loader that a driver has been removed and forces prevention of subsequent API calls. - * - * This function is intended to be called ONLY by Level Zero drivers, not by applications. - * It signals to the loader that at least one driver has been removed from the application - * environment, forcing the loader into a protective state that will prevent subsequent calls - * to Level Zero APIs to avoid crashes or undefined behavior when accessing freed driver resources. - * - * When a driver calls this function, the loader will: - * - Enter a special teardown state that blocks new API calls - * - Track that at least one driver has been removed from the environment - * - Return appropriate error codes (typically ZE_RESULT_ERROR_UNINITIALIZED) for subsequent API calls - * - Prevent crashes from accessing freed driver resources during teardown - * - * Use Case: - * This function exists to handle scenarios where drivers are dynamically unloaded or released - * (e.g., during process teardown, driver updates, or hot-plugging) while the application may - * still attempt to make Level Zero API calls. By forcing the loader into this protective state, - * drivers can ensure safe shutdown even when application threads are not fully synchronized. - * - * This function should be called by the driver after zeInit() or zeInitDrivers() has been - * successfully invoked, typically during the driver's own teardown or cleanup sequence. - * - * Typical usage (by driver implementation): - * // In driver teardown code: - * zelSetDriverTeardown(); // Signal loader that driver is being removed - * // Continue with driver cleanup... - * - * Thread-safety: This function is thread-safe and can be called from any thread. Once called, - * the loader state change is global and affects all subsequent API calls across all threads. - * - * @return - * - ZE_RESULT_SUCCESS if the loader was successfully placed into teardown prevention mode. - * - ZE_RESULT_ERROR_UNINITIALIZED if zeInit() or zeInitDrivers() was not called. - * - ZE_RESULT_ERROR_UNSUPPORTED if the current loader configuration does not support this feature. - * - Other ze_result_t error codes as appropriate. - * - * @warning This function is for DRIVER USE ONLY. Applications should NOT call this function. - * Calling this from application code will cause all subsequent Level Zero API calls - * to fail, effectively disabling Level Zero functionality for the remainder of the - * process lifetime. - * - * @note Once this function is called, the loader enters an irreversible state where API calls - * are prevented. The loader cannot be re-initialized after this function has been invoked. - * - * @note This function only affects the loader's handling of API calls. It does not directly - * manage driver resources or perform driver cleanup. - */ +/////////////////////////////////////////////////////////////////////////////// +/// @brief Exported function for handling calls to released drivers in teardown. +/// ZE_DLLEXPORT ze_result_t ZE_APICALL zelSetDriverTeardown(); -/** - * @brief Delays automatic loader context teardown until explicitly requested. - * - * This function instructs the loader to postpone its automatic context teardown sequence, - * allowing the application to continue using Level Zero APIs during the application's - * own teardown process. The loader context will remain active until explicitly torn down - * via a call to zelLoaderContextTeardown(). - * - * Applicability: - * - This function ONLY applies to static loader builds. - * - In dynamic loader builds, this function has no effect. - * - * Use Cases: - * This is a workaround for legacy software stacks that: - * - Use Level Zero APIs during application teardown (e.g., in global destructors) - * - Have complex teardown sequences where L0 resources need to outlive other components - * - Cannot easily be refactored to complete all L0 API calls before teardown - * - * Without this function, the static loader's context may be automatically destroyed during - * process teardown (e.g., via atexit handlers or destructor ordering), potentially before - * the application has finished using Level Zero APIs. This can lead to crashes or undefined - * behavior if L0 APIs are called after the context is destroyed. - * - * Call Sequence: - * zelSetDelayLoaderContextTeardown(); // Delay automatic teardown - * // Application uses L0 APIs during teardown... - * zelLoaderContextTeardown(); // Explicitly tear down when done - * - * Thread-safety: This function should be called from the main thread before any teardown - * begins. It is not thread-safe to call this concurrently with other loader operations. - * - * @warning This function is a workaround for legacy code and should NOT be used in new - * applications. The recommended practice is to ensure all Level Zero API calls - * complete before application teardown begins. Delaying loader teardown can - * complicate resource cleanup and may mask underlying architectural issues. - * - * @note This function does not return a result. Once called, the loader context will - * remain active until zelLoaderContextTeardown() is explicitly invoked. - */ +/////////////////////////////////////////////////////////////////////////////// +/// @brief Exported function for informing the loader to delay teardown of its context until the call to zelLoaderContextTeardown().Only applies during static loader usage. +/// NOTE: This function is a work around for legacy stacks that use L0 apis after the application is already in teardown. Unless you need to use the L0 apis during teardown, do not use this function. ZE_DLLEXPORT void ZE_APICALL zelSetDelayLoaderContextTeardown(); -/** - * @brief Explicitly tears down the loader's context and releases all associated resources. - * - * This function performs a complete teardown of the loader's internal context, including: - * - Releasing all driver handles and associated resources - * - Unloading driver libraries - * - Freeing internal data structures and caches - * - Invoking registered teardown callbacks - * - Cleaning up inter-process communication resources (if applicable) - * - * Applicability: - * - This function ONLY applies to static loader builds. - * - In dynamic loader builds, teardown occurs automatically when the loader library is unloaded. - * - * Preconditions: - * - This function should only be called after zelSetDelayLoaderContextTeardown() has been invoked. - * - All Level Zero API calls must be completed before calling this function. - * - All application threads using Level Zero APIs must have finished execution. - * - * Post-conditions: - * - After this function returns, no Level Zero APIs can be called. - * - Attempting to use L0 APIs after teardown results in undefined behavior (typically crashes). - * - The loader context cannot be re-initialized after teardown. - * - * Typical Usage Pattern: - * // During application initialization: - * zelSetDelayLoaderContextTeardown(); - * - * // Use Level Zero APIs throughout application lifetime... - * - * // During application teardown: - * // Ensure all L0 operations complete - * // Wait for all threads using L0 to finish - * zelLoaderContextTeardown(); // Explicit teardown - * - * Thread-safety: This function is NOT thread-safe and must be called from a single thread - * when no other threads are executing Level Zero APIs. Calling this function concurrently - * with L0 API usage will result in undefined behavior. - * - * @warning This function is a workaround for legacy code patterns and should NOT be used - * in new applications. Modern applications should rely on automatic teardown by - * ensuring all L0 API usage completes before process termination. Using explicit - * teardown requires careful coordination of application shutdown sequences. - * - * @note This function does not return a result. Errors during teardown are logged but - * do not prevent the teardown from completing. Once called, the loader context - * is considered invalid regardless of any internal errors encountered. - */ +/////////////////////////////////////////////////////////////////////////////// +/// @brief Exported function for explicitly tearing down the loader's context. Only applies during static loader usage. +/// NOTE: This function is a work around for legacy stacks that use L0 apis after the application is already in teardown. Unless you need to use the L0 apis during teardown, do not use this function. ZE_DLLEXPORT void ZE_APICALL zelLoaderContextTeardown(); -/** - * @brief Enables the Level Zero tracing layer at runtime. - * - * This function activates the tracing layer, which intercepts and logs Level Zero API calls. - * The tracing layer is useful for debugging, performance analysis, and understanding the - * sequence and parameters of API calls made by an application. - * - * When enabled, the tracing layer: - * - Intercepts all Level Zero API calls (ze*, zes*, zet*, zer* functions) - * - Logs function entry and exit points - * - Records function parameters and return values - * - Measures API call timing and performance metrics - * - Provides hooks for custom tracing callbacks (if registered) - * - * The tracing layer can be enabled at any point during application execution, but is most - * commonly enabled during initialization or before a specific code region of interest. - * - * Runtime vs Build-time Configuration: - * - This function enables tracing at runtime, overriding build-time or environment settings. - * - Tracing can also be enabled via environment variables (e.g., ZE_ENABLE_TRACING_LAYER). - * - Runtime enabling via this function takes precedence over environment configuration. - * - * Preconditions: - * - The tracing layer library must be available and loadable by the loader. - * - For best results, call this function after zeInit() or zeInitDrivers() and around the specific code region of interest. - * - Can be called after initialization, but will only affect subsequent API calls. - * - * Performance Considerations: - * - Enabling tracing adds overhead to every API call (typically 1-10 microseconds per call). - * - Applications should disable tracing in performance-critical production code. - * - Tracing overhead varies based on logging verbosity and callback complexity. - * - * Thread-safety: This function is thread-safe and can be called from any thread. However, - * enabling tracing while other threads are actively making API calls may result in some - * calls not being traced if they were already in progress. - * - * @return - * - ZE_RESULT_SUCCESS if the tracing layer was successfully enabled. - * - ZE_RESULT_ERROR_UNINITIALIZED if the loader has not been properly initialized. - * - ZE_RESULT_ERROR_UNSUPPORTED if the tracing layer is not available (missing library). - * - ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE if tracing dependencies cannot be loaded. - * - ZE_RESULT_SUCCESS if tracing is already enabled (idempotent operation). - * - Other ze_result_t error codes as appropriate. - * - * @see zelDisableTracingLayer() to disable tracing - * @see zelGetTracingLayerState() to query current tracing state - */ +/////////////////////////////////////////////////////////////////////////////// +/// @brief Exported function for Enabling the Tracing Layer During Runtime. +/// ZE_DLLEXPORT ze_result_t ZE_APICALL zelEnableTracingLayer(); -/** - * @brief Checks whether the loader is currently in teardown state. - * - * This function provides a way for applications, layers, and drivers to query whether - * the loader is currently executing its teardown sequence. This information is useful - * for making decisions about resource cleanup, avoiding operations that may fail during - * teardown, and implementing safe shutdown logic in complex multi-threaded applications. - * - * Teardown State: - * The loader enters teardown state when: - * - The process is terminating (exit() called or main() returns) - * - zelLoaderContextTeardown() has been explicitly called - * - atexit handlers or global destructors are executing - * - Dynamic loader library is being unloaded (dlclose() or FreeLibrary()) - * - * Use Cases: - * - Preventing new API calls during shutdown to avoid crashes - * - Implementing conditional cleanup logic in global destructors - * - Deciding whether to log errors or silently fail during teardown - * - Coordinating shutdown sequences across multiple components - * - Avoiding deadlocks by skipping synchronization during teardown - * - * Typical Usage: - * if (zelCheckIsLoaderInTearDown()) { - * // Loader is shutting down - skip operation or use simplified cleanup - * return; - * } - * // Normal operation - proceed with API calls - * zeDeviceGet(...); - * - * Thread-safety: This function is thread-safe and can be called from any thread at any - * time. It provides a snapshot of the loader's teardown state at the moment of the call. - * The state may change immediately after the function returns if teardown begins on - * another thread. - * - * Performance: This is a lightweight query operation with minimal overhead, suitable for - * frequent checking in performance-sensitive code paths. - * - * @return - * - true if the loader is currently in teardown state or has completed teardown. - * - false if the loader is in normal operational state. - * - * @note Race conditions: In multi-threaded scenarios, teardown may begin immediately - * after this function returns false. Callers should be prepared to handle errors - * from subsequent API calls even if this function returns false. - * - * @note During teardown, most Level Zero API calls will return error codes or exhibit - * undefined behavior. Applications should avoid making API calls when this function - * returns true. - */ +/////////////////////////////////////////////////////////////////////////////// +/// @brief Exported function for Checking if the Loader is torndown. +/// ZE_DLLEXPORT bool ZE_APICALL zelCheckIsLoaderInTearDown(); -/** - * @brief Function pointer type for application-provided teardown callbacks. - * - * This typedef defines the signature for callback functions that applications can register - * to be notified when the loader begins its teardown sequence. The loader invokes these - * callbacks to give applications an opportunity to perform cleanup, save state, or prepare - * for shutdown before the loader's internal resources are released. - * - * Callback Requirements: - * - Must not take any parameters - * - Must not return any value (void return type) - * - Must be thread-safe (may be called from any thread) - * - Must not block or take locks that could deadlock the teardown sequence - * - Should complete quickly (ideally < 100 microseconds) - * - Must not call Level Zero APIs (may result in undefined behavior or deadlock) - * - * Implementation Guidelines: - * The callback should perform minimal work, typically limited to: - * - Setting flags or updating state variables - * - Signaling condition variables or event objects - * - Initiating asynchronous cleanup on other threads - * - Logging or diagnostic output - * - * What NOT to do in callbacks: - * - DO NOT call Level Zero APIs (ze*, zes*, zet*, zer* functions) - * - DO NOT allocate or free memory (may deadlock during process teardown) - * - DO NOT acquire locks (risk of deadlock with loader's internal locks) - * - DO NOT perform I/O operations (may block or fail during shutdown) - * - DO NOT start new threads or wait for thread completion - * - * Example Implementation: - * static volatile bool loader_teardown_started = false; - * - * void myTeardownCallback() { - * loader_teardown_started = true; // Simple flag update - * } - * - * @see zelRegisterTeardownCallback() for registering callbacks - */ typedef void (*zel_loader_teardown_callback_t)(); - -/** - * @brief Function pointer type for loader-provided callbacks to notify application of teardown. - * - * This typedef defines the signature for callbacks that the loader provides to applications - * during teardown callback registration. The loader uses this callback mechanism to notify - * the application when teardown is complete or to coordinate multi-stage shutdown sequences. - * - * Unlike zel_loader_teardown_callback_t (which applications provide to the loader), this - * callback type is implemented by the loader and given to the application. The application - * stores this callback and may invoke it at appropriate points during its own shutdown. - * - * Parameter: - * @param index - * The index value assigned to the registered callback during zelRegisterTeardownCallback(). - * This allows the loader to identify which callback invocation is being acknowledged or - * to coordinate multiple registered callbacks in a specific order. - * - * Usage Pattern: - * zel_application_teardown_callback_t loader_callback; - * uint32_t callback_index; - * - * zelRegisterTeardownCallback(my_callback, &loader_callback, &callback_index); - * - * // Later, during application teardown: - * if (loader_callback != nullptr) { - * loader_callback(callback_index); // Notify loader of application teardown progress - * } - * - * Thread-safety: The implementation of this callback (provided by the loader) is thread-safe - * and can be called from any thread. However, applications should typically call it from - * the same thread that is coordinating shutdown. - * - * Callback Requirements: - * - Must be safe to call during application teardown - * - Must not block indefinitely - * - May be called multiple times with the same index (idempotent) - * - May be nullptr if the loader does not require application notification - * - * @note This callback is part of the bidirectional communication mechanism between the - * application and loader during teardown. The loader calls the application's callback - * (zel_loader_teardown_callback_t) to signal loader teardown, and the application - * calls the loader's callback (this type) to acknowledge or coordinate its own teardown. - * - * @see zelRegisterTeardownCallback() for the complete callback registration mechanism - */ typedef void (*zel_application_teardown_callback_t)(uint32_t index); /** @@ -539,28 +135,6 @@ zelRegisterTeardownCallback( ZE_DLLEXPORT ze_result_t ZE_APICALL zelDisableTracingLayer(); -/** - * @brief Retrieves the current enabled state of the Level Zero tracing layer. - * - * This function queries whether the tracing layer is active and writes the result - * to the provided boolean pointer. - * - * @param enabled - * Pointer to a boolean that will be set to true if the tracing layer is - * currently enabled, or false if it is disabled. Must be a valid, non-null - * pointer. - * - * @return - * ZE_RESULT_SUCCESS on success. - * ZE_RESULT_ERROR_INVALID_NULL_POINTER if `enabled` is null. - * Other ze_result_t error codes may be returned for implementation-specific failures. - * - * @note The tracing layer state is global to the process. The function is read-only - * and thread-safe; multiple callers can query the state concurrently. - */ -ZE_DLLEXPORT ze_result_t ZE_APICALL -zelGetTracingLayerState(bool* enabled); // Pointer to bool to receive tracing layer state - #if defined(__cplusplus) } // extern "C" #endif diff --git a/backends/ze/include/ze_api.h b/backends/ze/include/ze_api.h index 55bd811dc..03d12d036 100644 --- a/backends/ze/include/ze_api.h +++ b/backends/ze/include/ze_api.h @@ -1,11 +1,11 @@ /* * - * Copyright (C) 2019-2025 Intel Corporation + * Copyright (C) 2019-2021 Intel Corporation * * SPDX-License-Identifier: MIT * * @file ze_api.h - * @version v1.15-r1.13.73 + * @version v1.13-r1.13.1 * */ #ifndef _ZE_API_H @@ -256,9 +256,8 @@ typedef enum _ze_result_t ///< deferred to parallel operation join ZE_RESULT_EXT_ERROR_OPERANDS_INCOMPATIBLE = 0x7800001f, ///< [Core, Extension] operands of comparison are not compatible ZE_RESULT_ERROR_SURVIVABILITY_MODE_DETECTED = 0x78000020, ///< [Sysman] device is in survivability mode, firmware update needed - ZE_RESULT_ERROR_ADDRESS_NOT_FOUND = 0x78000021, ///< [Core] address not found within specified or current context ZE_RESULT_ERROR_UNKNOWN = 0x7ffffffe, ///< [Core] unknown or internal error - ZE_RESULT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RESULT_* ENUMs + ZE_RESULT_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RESULT_* ENUMs } ze_result_t; @@ -320,7 +319,6 @@ typedef enum _ze_structure_type_t ZE_STRUCTURE_TYPE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_PROPERTIES = 0x10011, ///< ::ze_event_query_kernel_timestamps_ext_properties_t ZE_STRUCTURE_TYPE_EVENT_QUERY_KERNEL_TIMESTAMPS_RESULTS_EXT_PROPERTIES = 0x10012, ///< ::ze_event_query_kernel_timestamps_results_ext_properties_t ZE_STRUCTURE_TYPE_KERNEL_MAX_GROUP_SIZE_EXT_PROPERTIES = 0x10013, ///< ::ze_kernel_max_group_size_ext_properties_t - ZE_STRUCTURE_TYPE_IMAGE_FORMAT_SUPPORT_EXT_PROPERTIES = 0x10014, ///< ::ze_image_format_support_ext_properties_t ZE_STRUCTURE_TYPE_RELAXED_ALLOCATION_LIMITS_EXP_DESC = 0x00020001, ///< ::ze_relaxed_allocation_limits_exp_desc_t ZE_STRUCTURE_TYPE_MODULE_PROGRAM_EXP_DESC = 0x00020002, ///< ::ze_module_program_exp_desc_t ZE_STRUCTURE_TYPE_SCHEDULING_HINT_EXP_PROPERTIES = 0x00020003, ///< ::ze_scheduling_hint_exp_properties_t @@ -368,20 +366,7 @@ typedef enum _ze_structure_type_t ZE_STRUCTURE_TYPE_RTAS_PARALLEL_OPERATION_EXT_PROPERTIES = 0x00020033, ///< ::ze_rtas_parallel_operation_ext_properties_t ZE_STRUCTURE_TYPE_RTAS_DEVICE_EXT_PROPERTIES = 0x00020034, ///< ::ze_rtas_device_ext_properties_t ZE_STRUCTURE_TYPE_RTAS_GEOMETRY_AABBS_EXT_CB_PARAMS = 0x00020035, ///< ::ze_rtas_geometry_aabbs_ext_cb_params_t - ZE_STRUCTURE_TYPE_COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC = 0x00020036, ///< ::ze_command_list_append_launch_kernel_param_cooperative_desc_t - ZE_STRUCTURE_TYPE_EXTERNAL_MEMMAP_SYSMEM_EXT_DESC = 0x00020037, ///< ::ze_external_memmap_sysmem_ext_desc_t - ZE_STRUCTURE_TYPE_PITCHED_ALLOC_2DIMAGE_LINEAR_PITCH_EXP_INFO = 0x00020038, ///< ::ze_pitched_alloc_2dimage_linear_pitch_exp_info_t - ZE_STRUCTURE_TYPE_KERNEL_ALLOCATION_PROPERTIES = 0x00020039, ///< ::ze_kernel_allocation_exp_properties_t - ZE_STRUCTURE_TYPE_EVENT_COUNTER_BASED_DESC = 0x0002003A, ///< ::ze_event_counter_based_desc_t - ZE_STRUCTURE_TYPE_EVENT_COUNTER_BASED_EXTERNAL_SYNC_ALLOCATION_DESC = 0x0002003B, ///< ::ze_event_counter_based_external_sync_allocation_desc_t - ZE_STRUCTURE_TYPE_EVENT_SYNC_MODE_DESC = 0x0002003C, ///< ::ze_event_sync_mode_desc_t - ZE_STRUCTURE_TYPE_IPC_MEM_HANDLE_TYPE_EXT_DESC = 0x0002003D, ///< ::ze_ipc_mem_handle_type_ext_desc_t - ZE_STRUCTURE_TYPE_DEVICE_EVENT_PROPERTIES = 0x0002003E, ///< ::ze_device_event_properties_t - ZE_STRUCTURE_TYPE_EVENT_COUNTER_BASED_EXTERNAL_AGGREGATE_STORAGE_DESC = 0x0002003F, ///< ::ze_event_counter_based_external_aggregate_storage_desc_t - ZE_STRUCTURE_TYPE_PHYSICAL_MEM_PROPERTIES = 0x00020040, ///< ::ze_physical_mem_properties_t - ZE_STRUCTURE_TYPE_DEVICE_USABLEMEM_SIZE_EXT_PROPERTIES = 0x00020041, ///< ::ze_device_usablemem_size_ext_properties_t - ZE_STRUCTURE_TYPE_CUSTOM_PITCH_EXP_DESC = 0x00020042, ///< ::ze_custom_pitch_exp_desc_t - ZE_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_STRUCTURE_TYPE_* ENUMs + ZE_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_STRUCTURE_TYPE_* ENUMs } ze_structure_type_t; @@ -399,7 +384,7 @@ typedef enum _ze_external_memory_type_flag_t ///< resource ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D12_HEAP = ZE_BIT(6), ///< an NT handle referring to a Direct3D 12 heap resource ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D12_RESOURCE = ZE_BIT(7), ///< an NT handle referring to a Direct3D 12 committed resource - ZE_EXTERNAL_MEMORY_TYPE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EXTERNAL_MEMORY_TYPE_FLAG_* ENUMs + ZE_EXTERNAL_MEMORY_TYPE_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_EXTERNAL_MEMORY_TYPE_FLAG_* ENUMs } ze_external_memory_type_flag_t; @@ -410,7 +395,7 @@ typedef enum _ze_bandwidth_unit_t ZE_BANDWIDTH_UNIT_UNKNOWN = 0, ///< The unit used for bandwidth is unknown ZE_BANDWIDTH_UNIT_BYTES_PER_NANOSEC = 1, ///< Bandwidth is provided in bytes/nanosec ZE_BANDWIDTH_UNIT_BYTES_PER_CLOCK = 2, ///< Bandwidth is provided in bytes/clock - ZE_BANDWIDTH_UNIT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_BANDWIDTH_UNIT_* ENUMs + ZE_BANDWIDTH_UNIT_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_BANDWIDTH_UNIT_* ENUMs } ze_bandwidth_unit_t; @@ -423,7 +408,7 @@ typedef enum _ze_latency_unit_t ZE_LATENCY_UNIT_CLOCK = 2, ///< Latency is provided in clocks ZE_LATENCY_UNIT_HOP = 3, ///< Latency is provided in hops (normalized so that the lowest latency ///< link has a latency of 1 hop) - ZE_LATENCY_UNIT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_LATENCY_UNIT_* ENUMs + ZE_LATENCY_UNIT_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_LATENCY_UNIT_* ENUMs } ze_latency_unit_t; @@ -471,14 +456,6 @@ typedef struct _ze_base_desc_t } ze_base_desc_t; -/////////////////////////////////////////////////////////////////////////////// -/// @brief IPC handle to counter based event -typedef struct _ze_ipc_event_counter_based_handle_t -{ - char data[ZE_MAX_IPC_HANDLE_SIZE]; ///< [out] Opaque data representing an IPC handle - -} ze_ipc_event_counter_based_handle_t; - /////////////////////////////////////////////////////////////////////////////// /// @brief Forces driver to only report devices (and sub-devices) as specified by /// values @@ -493,9 +470,6 @@ typedef struct _ze_ipc_event_counter_based_handle_t /// @brief Defines the device hierarchy model exposed by Level Zero driver /// implementation -/////////////////////////////////////////////////////////////////////////////// -/// @brief Defines/Refines ordering of drivers reported to user - /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare ze_ipc_mem_handle_t typedef struct _ze_ipc_mem_handle_t ze_ipc_mem_handle_t; @@ -520,10 +494,6 @@ typedef struct _ze_base_properties_t ze_base_properties_t; /// @brief Forward-declare ze_base_desc_t typedef struct _ze_base_desc_t ze_base_desc_t; -/////////////////////////////////////////////////////////////////////////////// -/// @brief Forward-declare ze_ipc_event_counter_based_handle_t -typedef struct _ze_ipc_event_counter_based_handle_t ze_ipc_event_counter_based_handle_t; - /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare ze_init_driver_type_desc_t typedef struct _ze_init_driver_type_desc_t ze_init_driver_type_desc_t; @@ -596,10 +566,6 @@ typedef struct _ze_device_external_memory_properties_t ze_device_external_memory /// @brief Forward-declare ze_device_p2p_properties_t typedef struct _ze_device_p2p_properties_t ze_device_p2p_properties_t; -/////////////////////////////////////////////////////////////////////////////// -/// @brief Forward-declare ze_device_event_properties_t -typedef struct _ze_device_event_properties_t ze_device_event_properties_t; - /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare ze_context_desc_t typedef struct _ze_context_desc_t ze_context_desc_t; @@ -624,26 +590,10 @@ typedef struct _ze_image_region_t ze_image_region_t; /// @brief Forward-declare ze_event_pool_desc_t typedef struct _ze_event_pool_desc_t ze_event_pool_desc_t; -/////////////////////////////////////////////////////////////////////////////// -/// @brief Forward-declare ze_event_sync_mode_desc_t -typedef struct _ze_event_sync_mode_desc_t ze_event_sync_mode_desc_t; - /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare ze_event_desc_t typedef struct _ze_event_desc_t ze_event_desc_t; -/////////////////////////////////////////////////////////////////////////////// -/// @brief Forward-declare ze_event_counter_based_desc_t -typedef struct _ze_event_counter_based_desc_t ze_event_counter_based_desc_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Forward-declare ze_event_counter_based_external_sync_allocation_desc_t -typedef struct _ze_event_counter_based_external_sync_allocation_desc_t ze_event_counter_based_external_sync_allocation_desc_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Forward-declare ze_event_counter_based_external_aggregate_storage_desc_t -typedef struct _ze_event_counter_based_external_aggregate_storage_desc_t ze_event_counter_based_external_aggregate_storage_desc_t; - /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare ze_kernel_timestamp_data_t typedef struct _ze_kernel_timestamp_data_t ze_kernel_timestamp_data_t; @@ -708,10 +658,6 @@ typedef struct _ze_module_constants_t ze_module_constants_t; /// @brief Forward-declare ze_module_desc_t typedef struct _ze_module_desc_t ze_module_desc_t; -/////////////////////////////////////////////////////////////////////////////// -/// @brief Forward-declare ze_command_list_append_launch_kernel_param_cooperative_desc_t -typedef struct _ze_command_list_append_launch_kernel_param_cooperative_desc_t ze_command_list_append_launch_kernel_param_cooperative_desc_t; - /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare ze_module_properties_t typedef struct _ze_module_properties_t ze_module_properties_t; @@ -736,10 +682,6 @@ typedef struct _ze_kernel_preferred_group_size_properties_t ze_kernel_preferred_ /// @brief Forward-declare ze_group_count_t typedef struct _ze_group_count_t ze_group_count_t; -/////////////////////////////////////////////////////////////////////////////// -/// @brief Forward-declare ze_group_size_t -typedef struct _ze_group_size_t ze_group_size_t; - /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare ze_module_program_exp_desc_t typedef struct _ze_module_program_exp_desc_t ze_module_program_exp_desc_t; @@ -760,10 +702,6 @@ typedef struct _ze_sampler_desc_t ze_sampler_desc_t; /// @brief Forward-declare ze_physical_mem_desc_t typedef struct _ze_physical_mem_desc_t ze_physical_mem_desc_t; -/////////////////////////////////////////////////////////////////////////////// -/// @brief Forward-declare ze_physical_mem_properties_t -typedef struct _ze_physical_mem_properties_t ze_physical_mem_properties_t; - /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare ze_float_atomic_ext_properties_t typedef struct _ze_float_atomic_ext_properties_t ze_float_atomic_ext_properties_t; @@ -876,26 +814,6 @@ typedef struct _ze_rtas_builder_build_op_ext_desc_t ze_rtas_builder_build_op_ext /// @brief Forward-declare ze_device_vector_width_properties_ext_t typedef struct _ze_device_vector_width_properties_ext_t ze_device_vector_width_properties_ext_t; -/////////////////////////////////////////////////////////////////////////////// -/// @brief Forward-declare ze_external_memmap_sysmem_ext_desc_t -typedef struct _ze_external_memmap_sysmem_ext_desc_t ze_external_memmap_sysmem_ext_desc_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Forward-declare ze_kernel_allocation_exp_properties_t -typedef struct _ze_kernel_allocation_exp_properties_t ze_kernel_allocation_exp_properties_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Forward-declare ze_device_usablemem_size_ext_properties_t -typedef struct _ze_device_usablemem_size_ext_properties_t ze_device_usablemem_size_ext_properties_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Forward-declare ze_image_format_support_ext_properties_t -typedef struct _ze_image_format_support_ext_properties_t ze_image_format_support_ext_properties_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Forward-declare ze_ipc_mem_handle_type_ext_desc_t -typedef struct _ze_ipc_mem_handle_type_ext_desc_t ze_ipc_mem_handle_type_ext_desc_t; - /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare ze_cache_reservation_ext_desc_t typedef struct _ze_cache_reservation_ext_desc_t ze_cache_reservation_ext_desc_t; @@ -1116,14 +1034,6 @@ typedef struct _ze_image_pitched_exp_desc_t ze_image_pitched_exp_desc_t; /// @brief Forward-declare ze_device_pitched_alloc_exp_properties_t typedef struct _ze_device_pitched_alloc_exp_properties_t ze_device_pitched_alloc_exp_properties_t; -/////////////////////////////////////////////////////////////////////////////// -/// @brief Forward-declare ze_pitched_alloc_2dimage_linear_pitch_exp_info_t -typedef struct _ze_pitched_alloc_2dimage_linear_pitch_exp_info_t ze_pitched_alloc_2dimage_linear_pitch_exp_info_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Forward-declare ze_custom_pitch_exp_desc_t -typedef struct _ze_custom_pitch_exp_desc_t ze_custom_pitch_exp_desc_t; - /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare ze_mutable_command_id_exp_desc_t typedef struct _ze_mutable_command_id_exp_desc_t ze_mutable_command_id_exp_desc_t; @@ -1175,7 +1085,7 @@ typedef enum _ze_init_flag_t { ZE_INIT_FLAG_GPU_ONLY = ZE_BIT(0), ///< only initialize GPU drivers ZE_INIT_FLAG_VPU_ONLY = ZE_BIT(1), ///< only initialize VPU drivers - ZE_INIT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_INIT_FLAG_* ENUMs + ZE_INIT_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_INIT_FLAG_* ENUMs } ze_init_flag_t; @@ -1203,17 +1113,8 @@ typedef enum _ze_init_flag_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x3 < flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeInit( ze_init_flags_t flags ///< [in] initialization flags. @@ -1246,14 +1147,6 @@ zeInit( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pCount` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -1289,7 +1182,7 @@ typedef enum _ze_init_driver_type_flag_t { ZE_INIT_DRIVER_TYPE_FLAG_GPU = ZE_BIT(0), ///< initialize and retrieve GPU drivers ZE_INIT_DRIVER_TYPE_FLAG_NPU = ZE_BIT(1), ///< initialize and retrieve NPU drivers - ZE_INIT_DRIVER_TYPE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_INIT_DRIVER_TYPE_FLAG_* ENUMs + ZE_INIT_DRIVER_TYPE_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_INIT_DRIVER_TYPE_FLAG_* ENUMs } ze_init_driver_type_flag_t; @@ -1348,20 +1241,11 @@ typedef struct _ze_init_driver_type_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pCount` /// + `nullptr == desc` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x0 == desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeInitDrivers( uint32_t* pCount, ///< [in,out] pointer to the number of driver instances. @@ -1398,17 +1282,15 @@ typedef enum _ze_api_version_t ZE_API_VERSION_1_11 = ZE_MAKE_VERSION( 1, 11 ), ///< version 1.11 ZE_API_VERSION_1_12 = ZE_MAKE_VERSION( 1, 12 ), ///< version 1.12 ZE_API_VERSION_1_13 = ZE_MAKE_VERSION( 1, 13 ), ///< version 1.13 - ZE_API_VERSION_1_14 = ZE_MAKE_VERSION( 1, 14 ), ///< version 1.14 - ZE_API_VERSION_1_15 = ZE_MAKE_VERSION( 1, 15 ), ///< version 1.15 - ZE_API_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 15 ), ///< latest known version - ZE_API_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_API_VERSION_* ENUMs + ZE_API_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 13 ), ///< latest known version + ZE_API_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_API_VERSION_* ENUMs } ze_api_version_t; /////////////////////////////////////////////////////////////////////////////// #ifndef ZE_API_VERSION_CURRENT_M /// @brief Current API version as a macro -#define ZE_API_VERSION_CURRENT_M ZE_MAKE_VERSION( 1, 15 ) +#define ZE_API_VERSION_CURRENT_M ZE_MAKE_VERSION( 1, 13 ) #endif // ZE_API_VERSION_CURRENT_M /////////////////////////////////////////////////////////////////////////////// @@ -1424,14 +1306,6 @@ typedef enum _ze_api_version_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1487,14 +1361,6 @@ typedef struct _ze_driver_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1514,7 +1380,7 @@ typedef enum _ze_ipc_property_flag_t ///< ::zeMemGetIpcHandle. ZE_IPC_PROPERTY_FLAG_EVENT_POOL = ZE_BIT(1), ///< Supports passing event pools between processes. See ///< ::zeEventPoolGetIpcHandle. - ZE_IPC_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IPC_PROPERTY_FLAG_* ENUMs + ZE_IPC_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_IPC_PROPERTY_FLAG_* ENUMs } ze_ipc_property_flag_t; @@ -1542,14 +1408,6 @@ typedef struct _ze_driver_ipc_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1592,14 +1450,6 @@ typedef struct _ze_driver_extension_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1633,14 +1483,6 @@ zeDriverGetExtensionProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1672,14 +1514,6 @@ zeDriverGetExtensionFunctionAddress( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1691,27 +1525,6 @@ zeDriverGetLastErrorDescription( ///< cause of error. ); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Retrieves handle to default context from the driver. -/// -/// @details -/// - The implementation of this function should be lock-free. -/// - This returned context contains all the devices available in the -/// driver. -/// - This function does not return error code, to get info about failure -/// user may use ::zeDriverGetLastErrorDescription function. -/// - In case of failure, this function returns null. -/// - Details on the error can be retrieved using -/// ::zeDriverGetLastErrorDescription function. -/// -/// @returns -/// - handle of the default context -/// - nullptr -ZE_APIEXPORT ze_context_handle_t ZE_APICALL -zeDriverGetDefaultContext( - ze_driver_handle_t hDriver ///< [in] handle of the driver instance - ); - #if !defined(__GNUC__) #pragma endregion #endif @@ -1726,7 +1539,7 @@ zeDriverGetDefaultContext( /// - Multiple calls to this function will return identical device handles, /// in the same order. /// - The number and order of handles returned from this function is -/// affected by the `ZE_AFFINITY_MASK` and `ZE_ENABLE_PCI_ID_DEVICE_ORDER` +/// affected by the ::ZE_AFFINITY_MASK and ::ZE_ENABLE_PCI_ID_DEVICE_ORDER /// environment variables. /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. @@ -1737,14 +1550,6 @@ zeDriverGetDefaultContext( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1783,14 +1588,6 @@ zeDeviceGet( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1810,7 +1607,7 @@ zeDeviceGetRootDevice( /// - Multiple calls to this function will return identical device handles, /// in the same order. /// - The number of handles returned from this function is affected by the -/// `ZE_AFFINITY_MASK` environment variable. +/// ::ZE_AFFINITY_MASK environment variable. /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. /// @@ -1824,14 +1621,6 @@ zeDeviceGetRootDevice( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1858,7 +1647,7 @@ typedef enum _ze_device_type_t ZE_DEVICE_TYPE_FPGA = 3, ///< Field Programmable Gate Array ZE_DEVICE_TYPE_MCA = 4, ///< Memory Copy Accelerator ZE_DEVICE_TYPE_VPU = 5, ///< Vision Processing Unit - ZE_DEVICE_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_TYPE_* ENUMs + ZE_DEVICE_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_DEVICE_TYPE_* ENUMs } ze_device_type_t; @@ -1891,7 +1680,7 @@ typedef enum _ze_device_property_flag_t ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE = ZE_BIT(1), ///< Device handle used for query represents a sub-device. ZE_DEVICE_PROPERTY_FLAG_ECC = ZE_BIT(2), ///< Device supports error correction memory access. ZE_DEVICE_PROPERTY_FLAG_ONDEMANDPAGING = ZE_BIT(3), ///< Device supports on-demand page-faulting. - ZE_DEVICE_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_PROPERTY_FLAG_* ENUMs + ZE_DEVICE_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_DEVICE_PROPERTY_FLAG_* ENUMs } ze_device_property_flag_t; @@ -1967,14 +1756,6 @@ typedef struct _ze_device_thread_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2030,14 +1811,6 @@ typedef struct _ze_device_compute_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2071,7 +1844,7 @@ typedef enum _ze_device_module_flag_t ZE_DEVICE_MODULE_FLAG_FP64 = ZE_BIT(1), ///< Device supports 64-bit floating-point operations ZE_DEVICE_MODULE_FLAG_INT64_ATOMICS = ZE_BIT(2), ///< Device supports 64-bit atomic operations ZE_DEVICE_MODULE_FLAG_DP4A = ZE_BIT(3), ///< Device supports four component dot product and accumulate operations - ZE_DEVICE_MODULE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_MODULE_FLAG_* ENUMs + ZE_DEVICE_MODULE_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_DEVICE_MODULE_FLAG_* ENUMs } ze_device_module_flag_t; @@ -2089,7 +1862,7 @@ typedef enum _ze_device_fp_flag_t ZE_DEVICE_FP_FLAG_ROUNDED_DIVIDE_SQRT = ZE_BIT(6), ///< Supports rounding as defined by IEEE754 for divide and sqrt ///< operations. ZE_DEVICE_FP_FLAG_SOFT_FLOAT = ZE_BIT(7), ///< Uses software implementation for basic floating-point operations. - ZE_DEVICE_FP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_FP_FLAG_* ENUMs + ZE_DEVICE_FP_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_DEVICE_FP_FLAG_* ENUMs } ze_device_fp_flag_t; @@ -2137,14 +1910,6 @@ typedef struct _ze_device_module_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2165,7 +1930,7 @@ typedef enum _ze_command_queue_group_property_flag_t ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS = ZE_BIT(2), ///< Command queue group supports cooperative kernels. ///< See ::zeCommandListAppendLaunchCooperativeKernel for more details. ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_METRICS = ZE_BIT(3), ///< Command queue groups supports metric queries. - ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_* ENUMs + ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_* ENUMs } ze_command_queue_group_property_flag_t; @@ -2189,12 +1954,12 @@ typedef struct _ze_command_queue_group_properties_t /// @brief Retrieves command queue group properties of the device. /// /// @details -/// - Properties are reported for each physical command queue group -/// available on the device. +/// - Properties are reported for each physical command queue type supported +/// by the device. /// - Multiple calls to this function will return properties in the same /// order. -/// - The order in which the properties are returned is defined by the -/// command queue group's ordinal. +/// - The order in which the properties are returned defines the command +/// queue group's ordinal. /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. /// @@ -2208,14 +1973,6 @@ typedef struct _ze_command_queue_group_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2223,21 +1980,17 @@ typedef struct _ze_command_queue_group_properties_t ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceGetCommandQueueGroupProperties( ze_device_handle_t hDevice, ///< [in] handle of the device - uint32_t* pCount, ///< [in,out] pointer to the number of available command queue groups. - ///< If count is zero, then the driver shall update the value with the - ///< total number of command queue groups available. - ///< If count is less than the number of command queue groups available, - ///< then the driver shall only retrieve command queue group properties for - ///< the given number of command queue groups. - ///< If count is greater than or equal to the number of command queue - ///< groups available, then the driver shall retrieve command queue group - ///< properties for all available command queue groups. + uint32_t* pCount, ///< [in,out] pointer to the number of command queue group properties. + ///< if count is zero, then the driver shall update the value with the + ///< total number of command queue group properties available. + ///< if count is greater than the number of command queue group properties + ///< available, then the driver shall update the value with the correct + ///< number of command queue group properties available. ze_command_queue_group_properties_t* pCommandQueueGroupProperties ///< [in,out][optional][range(0, *pCount)] array of query results for ///< command queue group properties. - ///< If count is less than the number of command queue groups available, - ///< then the driver shall only retrieve that number of command queue group properties. - ///< The order of properties in the array corresponds to the command queue - ///< group ordinal. + ///< if count is less than the number of command queue group properties + ///< available, then driver shall only retrieve that number of command + ///< queue group properties. ); /////////////////////////////////////////////////////////////////////////////// @@ -2246,7 +1999,7 @@ typedef uint32_t ze_device_memory_property_flags_t; typedef enum _ze_device_memory_property_flag_t { ZE_DEVICE_MEMORY_PROPERTY_FLAG_TBD = ZE_BIT(0), ///< reserved for future use - ZE_DEVICE_MEMORY_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_MEMORY_PROPERTY_FLAG_* ENUMs + ZE_DEVICE_MEMORY_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_DEVICE_MEMORY_PROPERTY_FLAG_* ENUMs } ze_device_memory_property_flag_t; @@ -2290,14 +2043,6 @@ typedef struct _ze_device_memory_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2330,7 +2075,7 @@ typedef enum _ze_memory_access_cap_flag_t ZE_MEMORY_ACCESS_CAP_FLAG_ATOMIC = ZE_BIT(1), ///< Supports atomic access ZE_MEMORY_ACCESS_CAP_FLAG_CONCURRENT = ZE_BIT(2), ///< Supports concurrent access ZE_MEMORY_ACCESS_CAP_FLAG_CONCURRENT_ATOMIC = ZE_BIT(3), ///< Supports concurrent atomic access - ZE_MEMORY_ACCESS_CAP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MEMORY_ACCESS_CAP_FLAG_* ENUMs + ZE_MEMORY_ACCESS_CAP_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_MEMORY_ACCESS_CAP_FLAG_* ENUMs } ze_memory_access_cap_flag_t; @@ -2372,14 +2117,6 @@ typedef struct _ze_device_memory_access_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2396,7 +2133,7 @@ typedef uint32_t ze_device_cache_property_flags_t; typedef enum _ze_device_cache_property_flag_t { ZE_DEVICE_CACHE_PROPERTY_FLAG_USER_CONTROL = ZE_BIT(0), ///< Device support User Cache Control (i.e. SLM section vs Generic Cache) - ZE_DEVICE_CACHE_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_CACHE_PROPERTY_FLAG_* ENUMs + ZE_DEVICE_CACHE_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_DEVICE_CACHE_PROPERTY_FLAG_* ENUMs } ze_device_cache_property_flag_t; @@ -2430,14 +2167,6 @@ typedef struct _ze_device_cache_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2498,14 +2227,6 @@ typedef struct _ze_device_image_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2543,14 +2264,6 @@ typedef struct _ze_device_external_memory_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2568,7 +2281,7 @@ typedef enum _ze_device_p2p_property_flag_t { ZE_DEVICE_P2P_PROPERTY_FLAG_ACCESS = ZE_BIT(0), ///< Device supports access between peer devices. ZE_DEVICE_P2P_PROPERTY_FLAG_ATOMICS = ZE_BIT(1), ///< Device supports atomics between peer devices. - ZE_DEVICE_P2P_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_P2P_PROPERTY_FLAG_* ENUMs + ZE_DEVICE_P2P_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_DEVICE_P2P_PROPERTY_FLAG_* ENUMs } ze_device_p2p_property_flag_t; @@ -2599,14 +2312,6 @@ typedef struct _ze_device_p2p_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// + `nullptr == hPeerDevice` @@ -2646,14 +2351,6 @@ zeDeviceGetP2PProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// + `nullptr == hPeerDevice` @@ -2677,17 +2374,11 @@ zeDeviceCanAccessPeer( /// - The implementation of this function must be thread-safe. /// /// @returns +/// - ::ZE_RESULT_SUCCESS /// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_SUCCESS @@ -2713,13 +2404,6 @@ zeDeviceGetStatus( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2736,101 +2420,6 @@ zeDeviceGetGlobalTimestamps( ///< Host's global timestamp value. ); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Synchronizes all command queues related to the device. -/// -/// @details -/// - The application may call this function from simultaneous threads with -/// the same device handle. -/// - The implementation of this function should be thread-safe. -/// - This function blocks until all preceding submissions to all queues on -/// the device are completed. -/// - This function returns an error if device execution fails. -/// - This function hangs indefinitely if the device is blocked on a -/// non-signaled event. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceSynchronize( - ze_device_handle_t hDevice ///< [in] handle of the device - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Supported Event properties flags -typedef uint32_t ze_device_event_properties_flags_t; -typedef enum _ze_device_event_properties_flag_t -{ - ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_AGGREGATE_STORAGE = ZE_BIT(0), ///< Counter-based Event with external aggregate storage supported - ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_IPC = ZE_BIT(1), ///< Counter-based Event IPC sharing supported - ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_SYNC_ALLOCATION = ZE_BIT(2), ///< Counter-based Event with external sync allocation supported - ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_INTERRUPT_WAIT = ZE_BIT(3), ///< Counter-based Event waiting for external interrupt id supported - ZE_DEVICE_EVENT_PROPERTIES_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_EVENT_PROPERTIES_FLAG_* ENUMs - -} ze_device_event_properties_flag_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Device Event properties struct. Can be passed as pNext to -/// ::ze_device_properties_t to obtain properties -typedef struct _ze_device_event_properties_t -{ - ze_structure_type_t stype; ///< [in] type of this structure - void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific - ///< structure (i.e. contains stype and pNext). - ze_device_event_properties_flags_t flags; ///< [out] Supported Event properties. Valid combination of - ///< ::ze_device_event_properties_flag_t. - -} ze_device_event_properties_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Returns unified increment value that can be used for Counter Based -/// Events created with -/// ::ze_event_counter_based_external_aggregate_storage_desc_t -/// -/// @details -/// - Value is applicable only to this specific device -/// - It may be used, when user is not able define number of internal driver -/// operations during given append call, for example dividing copy into -/// multiple engines. More details can be found in programming guide. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == incrementValue` -ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetAggregatedCopyOffloadIncrementValue( - ze_device_handle_t hDevice, ///< [in] handle of the device - uint32_t* incrementValue ///< [out] increment value that can be used for Event creation - ); - #if !defined(__GNUC__) #pragma endregion #endif @@ -2844,7 +2433,7 @@ typedef uint32_t ze_context_flags_t; typedef enum _ze_context_flag_t { ZE_CONTEXT_FLAG_TBD = ZE_BIT(0), ///< reserved for future use - ZE_CONTEXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_CONTEXT_FLAG_* ENUMs + ZE_CONTEXT_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_CONTEXT_FLAG_* ENUMs } ze_context_flag_t; @@ -2876,14 +2465,6 @@ typedef struct _ze_context_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2891,7 +2472,6 @@ typedef struct _ze_context_desc_t /// + `nullptr == phContext` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x1 < desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeContextCreate( ze_driver_handle_t hDriver, ///< [in] handle of the driver object @@ -2914,14 +2494,6 @@ zeContextCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2929,7 +2501,6 @@ zeContextCreate( /// + `nullptr == phContext` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x1 < desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_SIZE /// + `(nullptr == phDevices) && (0 < numDevices)` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -2967,14 +2538,6 @@ zeContextCreateEx( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -2992,17 +2555,11 @@ zeContextDestroy( /// - The implementation of this function should be lock-free. /// /// @returns +/// - ::ZE_RESULT_SUCCESS /// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_SUCCESS @@ -3042,12 +2599,7 @@ typedef enum _ze_command_queue_flag_t ///< the next to define an in-order list, and application is allowed to ///< pass signal and wait events ///< to each appended command to implement more complex dependency graphs. - ZE_COMMAND_QUEUE_FLAG_COPY_OFFLOAD_HINT = ZE_BIT(2), ///< To be used only when creating immediate command lists and only for - ///< compute queues. - ///< Try to offload copy operations to different engines. This is only a hint. - ///< Driver may ignore it per append call, based on platform capabilities - ///< or internal heuristics. - ZE_COMMAND_QUEUE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_COMMAND_QUEUE_FLAG_* ENUMs + ZE_COMMAND_QUEUE_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_COMMAND_QUEUE_FLAG_* ENUMs } ze_command_queue_flag_t; @@ -3060,7 +2612,7 @@ typedef enum _ze_command_queue_mode_t ///< Host thread is blocked using wait on implicit synchronization object ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS = 2, ///< Device execution is scheduled and will complete in future; ///< explicit synchronization object must be used to determine completeness - ZE_COMMAND_QUEUE_MODE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_COMMAND_QUEUE_MODE_* ENUMs + ZE_COMMAND_QUEUE_MODE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_COMMAND_QUEUE_MODE_* ENUMs } ze_command_queue_mode_t; @@ -3071,7 +2623,7 @@ typedef enum _ze_command_queue_priority_t ZE_COMMAND_QUEUE_PRIORITY_NORMAL = 0, ///< [default] normal priority ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_LOW = 1, ///< lower priority than normal ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_HIGH = 2, ///< higher priority than normal - ZE_COMMAND_QUEUE_PRIORITY_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_COMMAND_QUEUE_PRIORITY_* ENUMs + ZE_COMMAND_QUEUE_PRIORITY_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_COMMAND_QUEUE_PRIORITY_* ENUMs } ze_command_queue_priority_t; @@ -3115,14 +2667,6 @@ typedef struct _ze_command_queue_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -3130,10 +2674,9 @@ typedef struct _ze_command_queue_desc_t /// + `nullptr == desc` /// + `nullptr == phCommandQueue` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x7 < desc->flags` +/// + `0x3 < desc->flags` /// + `::ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS < desc->mode` /// + `::ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_HIGH < desc->priority` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandQueueCreate( ze_context_handle_t hContext, ///< [in] handle of the context object @@ -3166,14 +2709,6 @@ zeCommandQueueCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandQueue` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -3214,14 +2749,6 @@ zeCommandQueueDestroy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandQueue` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3252,14 +2779,6 @@ zeCommandQueueExecuteCommandLists( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandQueue` /// - ::ZE_RESULT_NOT_READY @@ -3289,14 +2808,6 @@ zeCommandQueueSynchronize( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandQueue` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3320,14 +2831,6 @@ zeCommandQueueGetOrdinal( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandQueue` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3377,11 +2880,7 @@ typedef enum _ze_command_list_flag_t ///< more complex dependency graphs. Cannot be combined with ::ZE_COMMAND_LIST_FLAG_RELAXED_ORDERING. ZE_COMMAND_LIST_FLAG_EXP_CLONEABLE = ZE_BIT(4), ///< this command list may be cloned using ::zeCommandListCreateCloneExp ///< after ::zeCommandListClose. - ZE_COMMAND_LIST_FLAG_COPY_OFFLOAD_HINT = ZE_BIT(5), ///< Try to offload copy operations to different engines. Applicable only - ///< for compute queues. - ///< This is only a hint. Driver may ignore it per append call, based on - ///< platform capabilities or internal heuristics. - ZE_COMMAND_LIST_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_COMMAND_LIST_FLAG_* ENUMs + ZE_COMMAND_LIST_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_COMMAND_LIST_FLAG_* ENUMs } ze_command_list_flag_t; @@ -3419,14 +2918,6 @@ typedef struct _ze_command_list_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -3434,8 +2925,7 @@ typedef struct _ze_command_list_desc_t /// + `nullptr == desc` /// + `nullptr == phCommandList` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x3f < desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +/// + `0x1f < desc->flags` ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListCreate( ze_context_handle_t hContext, ///< [in] handle of the context object @@ -3468,14 +2958,6 @@ zeCommandListCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -3483,10 +2965,9 @@ zeCommandListCreate( /// + `nullptr == altdesc` /// + `nullptr == phCommandList` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x7 < altdesc->flags` +/// + `0x3 < altdesc->flags` /// + `::ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS < altdesc->mode` /// + `::ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_HIGH < altdesc->priority` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListCreateImmediate( ze_context_handle_t hContext, ///< [in] handle of the context object @@ -3513,14 +2994,6 @@ zeCommandListCreateImmediate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -3543,14 +3016,6 @@ zeCommandListDestroy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -3575,14 +3040,6 @@ zeCommandListClose( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -3615,14 +3072,6 @@ zeCommandListReset( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3662,13 +3111,6 @@ zeCommandListAppendWriteGlobalTimestamp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_NOT_READY @@ -3700,14 +3142,6 @@ zeCommandListHostSynchronize( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3731,14 +3165,6 @@ zeCommandListGetDeviceHandle( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3763,14 +3189,6 @@ zeCommandListGetContextHandle( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3797,13 +3215,6 @@ zeCommandListGetOrdinal( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandListImmediate` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3830,14 +3241,6 @@ zeCommandListImmediateGetIndex( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3884,14 +3287,6 @@ zeCommandListIsImmediate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT @@ -3929,14 +3324,6 @@ zeCommandListAppendBarrier( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3977,14 +3364,6 @@ zeCommandListAppendMemoryRangesBarrier( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -4031,14 +3410,6 @@ zeContextSystemBarrier( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4064,12 +3435,11 @@ zeCommandListAppendMemoryCopy( /// @brief Initializes host, device, or shared memory. /// /// @details -/// - The application must ensure the memory pointed to by ptr is accessible -/// by the device on which the command list was created. -/// - The implementation must not access the memory pointed to by ptr as it -/// is free to be modified by either the Host or device up until +/// - The application must ensure the memory pointed to by dstptr is +/// accessible by the device on which the command list was created. +/// - The implementation must not access the memory pointed to by dstptr as +/// it is free to be modified by either the Host or device up until /// execution. -/// - The ptr must be aligned to pattern_size /// - The value to initialize memory to is described by the pattern and the /// pattern size. /// - The pattern size must be a power-of-two and less than or equal to the @@ -4094,21 +3464,12 @@ zeCommandListAppendMemoryCopy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == ptr` /// + `nullptr == pattern` /// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT /// - ::ZE_RESULT_ERROR_INVALID_SIZE /// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -4166,14 +3527,6 @@ typedef struct _ze_copy_region_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4231,14 +3584,6 @@ zeCommandListAppendMemoryCopyRegion( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hContextSrc` @@ -4286,14 +3631,6 @@ zeCommandListAppendMemoryCopyFromContext( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hDstImage` @@ -4350,14 +3687,6 @@ typedef struct _ze_image_region_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hDstImage` @@ -4409,14 +3738,6 @@ zeCommandListAppendImageCopyRegion( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hSrcImage` @@ -4467,14 +3788,6 @@ zeCommandListAppendImageCopyToMemory( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hDstImage` @@ -4531,14 +3844,6 @@ zeCommandListAppendImageCopyFromMemory( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4565,7 +3870,7 @@ typedef enum _ze_memory_advice_t ZE_MEMORY_ADVICE_SET_SYSTEM_MEMORY_PREFERRED_LOCATION = 8, ///< hint that the preferred memory location is host memory ZE_MEMORY_ADVICE_CLEAR_SYSTEM_MEMORY_PREFERRED_LOCATION = 9, ///< removes the effect of ///< ::ZE_MEMORY_ADVICE_SET_SYSTEM_MEMORY_PREFERRED_LOCATION - ZE_MEMORY_ADVICE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MEMORY_ADVICE_* ENUMs + ZE_MEMORY_ADVICE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_MEMORY_ADVICE_* ENUMs } ze_memory_advice_t; @@ -4599,14 +3904,6 @@ typedef enum _ze_memory_advice_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hDevice` @@ -4614,7 +3911,6 @@ typedef enum _ze_memory_advice_t /// + `nullptr == ptr` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZE_MEMORY_ADVICE_CLEAR_SYSTEM_MEMORY_PREFERRED_LOCATION < advice` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListAppendMemAdvise( ze_command_list_handle_t hCommandList, ///< [in] handle of command list @@ -4642,7 +3938,7 @@ typedef enum _ze_event_pool_flag_t ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP = ZE_BIT(3), ///< Indicates all events in pool will contain kernel timestamps ///< synchronized to host time domain; cannot be combined with ///< ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP - ZE_EVENT_POOL_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EVENT_POOL_FLAG_* ENUMs + ZE_EVENT_POOL_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_EVENT_POOL_FLAG_* ENUMs } ze_event_pool_flag_t; @@ -4676,14 +3972,6 @@ typedef struct _ze_event_pool_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4691,7 +3979,6 @@ typedef struct _ze_event_pool_desc_t /// + `nullptr == phEventPool` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0xf < desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_SIZE /// + `0 == desc->count` /// + `(nullptr == phDevices) && (0 < numDevices)` @@ -4728,14 +4015,6 @@ zeEventPoolCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEventPool` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -4755,60 +4034,10 @@ typedef enum _ze_event_scope_flag_t ///< device access and peer device access ZE_EVENT_SCOPE_FLAG_HOST = ZE_BIT(2), ///< cache hierarchies are flushed or invalidated sufficient for device and ///< host access - ZE_EVENT_SCOPE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EVENT_SCOPE_FLAG_* ENUMs + ZE_EVENT_SCOPE_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_EVENT_SCOPE_FLAG_* ENUMs } ze_event_scope_flag_t; -/////////////////////////////////////////////////////////////////////////////// -/// @brief Supported flags for defining counter based event -typedef uint32_t ze_event_counter_based_flags_t; -typedef enum _ze_event_counter_based_flag_t -{ - ZE_EVENT_COUNTER_BASED_FLAG_IMMEDIATE = ZE_BIT(0), ///< Counter-based event is used for immediate command lists (default) - ZE_EVENT_COUNTER_BASED_FLAG_NON_IMMEDIATE = ZE_BIT(1), ///< Counter-based event is used for non-immediate command lists - ZE_EVENT_COUNTER_BASED_FLAG_HOST_VISIBLE = ZE_BIT(2), ///< Signals and waits are also visible to host - ZE_EVENT_COUNTER_BASED_FLAG_IPC = ZE_BIT(3), ///< Event can be shared across processes for waiting - ZE_EVENT_COUNTER_BASED_FLAG_DEVICE_TIMESTAMP = ZE_BIT(4), ///< Event contains timestamps populated in the device time domain. - ///< Implementation of this can be vendor specific, but typically pulled - ///< from timers on the offload device and not the host. - ///< Cannot be combined with ::ZE_EVENT_COUNTER_BASED_FLAG_HOST_TIMESTAMP - ZE_EVENT_COUNTER_BASED_FLAG_HOST_TIMESTAMP = ZE_BIT(5), ///< Indicates that event will contain timestamps converted to the host - ///< time domain - ///< Cannot be combined with ::ZE_EVENT_COUNTER_BASED_FLAG_DEVICE_TIMESTAMP - ///< It is recommended to use this flag for most users that want to - ///< correlate timestamps from the host and device into a single timeline. - ///< For host timestamps see ::zeDeviceGetGlobalTimestamps. - ZE_EVENT_COUNTER_BASED_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EVENT_COUNTER_BASED_FLAG_* ENUMs - -} ze_event_counter_based_flag_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Supported event sync mode flags -typedef uint32_t ze_event_sync_mode_flags_t; -typedef enum _ze_event_sync_mode_flag_t -{ - ZE_EVENT_SYNC_MODE_FLAG_LOW_POWER_WAIT = ZE_BIT(0), ///< Low power host synchronization mode, for better CPU utilization - ZE_EVENT_SYNC_MODE_FLAG_SIGNAL_INTERRUPT = ZE_BIT(1), ///< Generate interrupt when Event is signalled on Device. It may be used - ///< to optimize low power CPU synchronization - ZE_EVENT_SYNC_MODE_FLAG_EXTERNAL_INTERRUPT_WAIT = ZE_BIT(2), ///< Host synchronization APIs wait for external interrupt id. Can be used - ///< only for Counter Based Events - ZE_EVENT_SYNC_MODE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EVENT_SYNC_MODE_FLAG_* ENUMs - -} ze_event_sync_mode_flag_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Event sync mode descriptor -typedef struct _ze_event_sync_mode_desc_t -{ - ze_structure_type_t stype; ///< [in] type of this structure - const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific - ///< structure (i.e. contains stype and pNext). - ze_event_sync_mode_flags_t syncModeFlags; ///< [in] valid combination of ::ze_event_sync_mode_flag_t - uint32_t externalInterruptId; ///< [in] External interrupt id. Used only when - ///< ::ZE_EVENT_SYNC_MODE_FLAG_EXTERNAL_INTERRUPT_WAIT flag is set - -} ze_event_sync_mode_desc_t; - /////////////////////////////////////////////////////////////////////////////// /// @brief Event descriptor typedef struct _ze_event_desc_t @@ -4831,58 +4060,6 @@ typedef struct _ze_event_desc_t } ze_event_desc_t; -/////////////////////////////////////////////////////////////////////////////// -/// @brief Counter Based Event descriptor -typedef struct _ze_event_counter_based_desc_t -{ - ze_structure_type_t stype; ///< [in] type of this structure - const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific - ///< structure (i.e. contains stype and pNext). - ze_event_counter_based_flags_t flags; ///< [in] counter based event flags. - ///< Must be 0 (default) or a valid combination of ::ze_event_counter_based_flag_t - ze_event_scope_flags_t signal; ///< [in] defines the scope of relevant cache hierarchies to flush on a - ///< signal action before the event is triggered. - ///< must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; - ///< default behavior is synchronization within the command list only, no - ///< additional cache hierarchies are flushed. - ze_event_scope_flags_t wait; ///< [in] defines the scope of relevant cache hierarchies to invalidate on - ///< a wait action after the event is complete. - ///< must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; - ///< default behavior is synchronization within the command list only, no - ///< additional cache hierarchies are invalidated. - -} ze_event_counter_based_desc_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Counter Based Event external sync allocation descriptor. Passed as -/// pNext to ::ze_event_counter_based_desc_t -typedef struct _ze_event_counter_based_external_sync_allocation_desc_t -{ - ze_structure_type_t stype; ///< [in] type of this structure - const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific - ///< structure (i.e. contains stype and pNext). - uint64_t* deviceAddress; ///< [in] device address for external synchronization allocation - uint64_t* hostAddress; ///< [in] host address for external synchronization allocation - uint64_t completionValue; ///< [in] completion value for external synchronization allocation - -} ze_event_counter_based_external_sync_allocation_desc_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Counter Based Event external aggregate storage. Passed as pNext to -/// ::ze_event_counter_based_desc_t -typedef struct _ze_event_counter_based_external_aggregate_storage_desc_t -{ - ze_structure_type_t stype; ///< [in] type of this structure - const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific - ///< structure (i.e. contains stype and pNext). - uint64_t* deviceAddress; ///< [in] device address that would be updated with atomic_add upon - ///< signaling of this event, must be device USM memory - uint64_t incrementValue; ///< [in] value which would by atomically added upon each completion - uint64_t completionValue; ///< [in] final completion value, when value under deviceAddress is equal - ///< or greater then this value then event is considered as completed - -} ze_event_counter_based_external_aggregate_storage_desc_t; - /////////////////////////////////////////////////////////////////////////////// /// @brief Creates an event from the pool. /// @@ -4906,14 +4083,6 @@ typedef struct _ze_event_counter_based_external_aggregate_storage_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEventPool` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4922,7 +4091,6 @@ typedef struct _ze_event_counter_based_external_aggregate_storage_desc_t /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x7 < desc->signal` /// + `0x7 < desc->wait` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeEventCreate( ze_event_pool_handle_t hEventPool, ///< [in] handle of the event pool @@ -4930,42 +4098,6 @@ zeEventCreate( ze_event_handle_t* phEvent ///< [out] pointer to handle of event object created ); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Creates Counter Based Event -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == phEvent` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x3f < desc->flags` -/// + `0x7 < desc->signal` -/// + `0x7 < desc->wait` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventCounterBasedCreate( - ze_context_handle_t hContext, ///< [in] handle of the context object - ze_device_handle_t hDevice, ///< [in] handle of the device object - const ze_event_counter_based_desc_t* desc, ///< [in] pointer to counter based event descriptor - ze_event_handle_t* phEvent ///< [out] pointer to handle of event object created - ); - /////////////////////////////////////////////////////////////////////////////// /// @brief Deletes an event object. /// @@ -4989,14 +4121,6 @@ zeEventCounterBasedCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEvent` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -5019,14 +4143,6 @@ zeEventDestroy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEventPool` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5060,14 +4176,6 @@ zeEventPoolGetIpcHandle( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -5106,14 +4214,6 @@ zeEventPoolPutIpcHandle( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5141,14 +4241,6 @@ zeEventPoolOpenIpcHandle( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEventPool` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -5156,119 +4248,6 @@ zeEventPoolCloseIpcHandle( ze_event_pool_handle_t hEventPool ///< [in][release] handle of event pool object ); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Gets an IPC counter based event handle that can be shared with another -/// process. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEvent` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phIpc` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventCounterBasedGetIpcHandle( - ze_event_handle_t hEvent, ///< [in] handle of event object - ze_ipc_event_counter_based_handle_t* phIpc ///< [out] Returned IPC event handle - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Opens an IPC event handle to retrieve from another process. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phEvent` -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventCounterBasedOpenIpcHandle( - ze_context_handle_t hContext, ///< [in] handle of the context object to associate with the IPC event - ///< handle - ze_ipc_event_counter_based_handle_t hIpc, ///< [in] IPC event handle - ze_event_handle_t* phEvent ///< [out] pointer handle of event object created - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Closes an IPC event handle in the current process. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEvent` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventCounterBasedCloseIpcHandle( - ze_event_handle_t hEvent ///< [in][release] handle of event object - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Returns Counter Based Event completion value (counter) and its device -/// address -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEvent` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == completionValue` -/// + `nullptr == deviceAddress` -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventCounterBasedGetDeviceAddress( - ze_event_handle_t hEvent, ///< [in] handle of event object - uint64_t* completionValue, ///< [in][out] completion value - uint64_t* deviceAddress ///< [in][out] counter device address - ); - /////////////////////////////////////////////////////////////////////////////// /// @brief Appends a signal of the event from the device into a command list. /// @@ -5297,14 +4276,6 @@ zeEventCounterBasedGetDeviceAddress( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hEvent` @@ -5333,14 +4304,6 @@ zeCommandListAppendSignalEvent( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5376,14 +4339,6 @@ zeCommandListAppendWaitOnEvents( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEvent` /// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT @@ -5409,14 +4364,6 @@ zeEventHostSignal( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEvent` /// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT @@ -5452,14 +4399,6 @@ zeEventHostSynchronize( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEvent` /// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT @@ -5493,14 +4432,6 @@ zeEventQueryStatus( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hEvent` @@ -5528,14 +4459,6 @@ zeCommandListAppendEventReset( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEvent` /// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT @@ -5587,14 +4510,6 @@ typedef struct _ze_kernel_timestamp_result_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEvent` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5635,14 +4550,6 @@ zeEventQueryKernelTimestamp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5681,14 +4588,6 @@ zeCommandListAppendQueryKernelTimestamps( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEvent` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5712,14 +4611,6 @@ zeEventGetEventPool( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEvent` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5745,14 +4636,6 @@ zeEventGetSignalScope( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEvent` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5778,14 +4661,6 @@ zeEventGetWaitScope( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEventPool` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5809,14 +4684,6 @@ zeEventPoolGetContextHandle( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEventPool` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5841,7 +4708,7 @@ typedef uint32_t ze_fence_flags_t; typedef enum _ze_fence_flag_t { ZE_FENCE_FLAG_SIGNALED = ZE_BIT(0), ///< fence is created in the signaled state, otherwise not signaled. - ZE_FENCE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_FENCE_FLAG_* ENUMs + ZE_FENCE_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_FENCE_FLAG_* ENUMs } ze_fence_flag_t; @@ -5878,14 +4745,6 @@ typedef struct _ze_fence_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandQueue` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5893,7 +4752,6 @@ typedef struct _ze_fence_desc_t /// + `nullptr == phFence` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x1 < desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeFenceCreate( ze_command_queue_handle_t hCommandQueue, ///< [in] handle of command queue @@ -5923,14 +4781,6 @@ zeFenceCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFence` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -5956,14 +4806,6 @@ zeFenceDestroy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFence` /// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT @@ -5998,14 +4840,6 @@ zeFenceHostSynchronize( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFence` /// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT @@ -6033,14 +4867,6 @@ zeFenceQueryStatus( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFence` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -6062,7 +4888,7 @@ typedef enum _ze_image_flag_t { ZE_IMAGE_FLAG_KERNEL_WRITE = ZE_BIT(0), ///< kernels will write contents ZE_IMAGE_FLAG_BIAS_UNCACHED = ZE_BIT(1), ///< device should not cache contents - ZE_IMAGE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_FLAG_* ENUMs + ZE_IMAGE_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_IMAGE_FLAG_* ENUMs } ze_image_flag_t; @@ -6076,7 +4902,7 @@ typedef enum _ze_image_type_t ZE_IMAGE_TYPE_2DARRAY = 3, ///< 2D array ZE_IMAGE_TYPE_3D = 4, ///< 3D ZE_IMAGE_TYPE_BUFFER = 5, ///< Buffer - ZE_IMAGE_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_TYPE_* ENUMs + ZE_IMAGE_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_IMAGE_TYPE_* ENUMs } ze_image_type_t; @@ -6130,7 +4956,7 @@ typedef enum _ze_image_format_layout_t ZE_IMAGE_FORMAT_LAYOUT_8_8_8 = 43, ///< 3-component 8-bit layout ZE_IMAGE_FORMAT_LAYOUT_16_16_16 = 44, ///< 3-component 16-bit layout ZE_IMAGE_FORMAT_LAYOUT_32_32_32 = 45, ///< 3-component 32-bit layout - ZE_IMAGE_FORMAT_LAYOUT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_FORMAT_LAYOUT_* ENUMs + ZE_IMAGE_FORMAT_LAYOUT_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_IMAGE_FORMAT_LAYOUT_* ENUMs } ze_image_format_layout_t; @@ -6143,7 +4969,7 @@ typedef enum _ze_image_format_type_t ZE_IMAGE_FORMAT_TYPE_UNORM = 2, ///< Unsigned normalized integer ZE_IMAGE_FORMAT_TYPE_SNORM = 3, ///< Signed normalized integer ZE_IMAGE_FORMAT_TYPE_FLOAT = 4, ///< Float - ZE_IMAGE_FORMAT_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_FORMAT_TYPE_* ENUMs + ZE_IMAGE_FORMAT_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_IMAGE_FORMAT_TYPE_* ENUMs } ze_image_format_type_t; @@ -6158,8 +4984,7 @@ typedef enum _ze_image_format_swizzle_t ZE_IMAGE_FORMAT_SWIZZLE_0 = 4, ///< Zero ZE_IMAGE_FORMAT_SWIZZLE_1 = 5, ///< One ZE_IMAGE_FORMAT_SWIZZLE_X = 6, ///< Don't care - ZE_IMAGE_FORMAT_SWIZZLE_D = 7, ///< Depth Component - ZE_IMAGE_FORMAT_SWIZZLE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_FORMAT_SWIZZLE_* ENUMs + ZE_IMAGE_FORMAT_SWIZZLE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_IMAGE_FORMAT_SWIZZLE_* ENUMs } ze_image_format_swizzle_t; @@ -6224,7 +5049,7 @@ typedef enum _ze_image_sampler_filter_flag_t { ZE_IMAGE_SAMPLER_FILTER_FLAG_POINT = ZE_BIT(0), ///< device supports point filtering ZE_IMAGE_SAMPLER_FILTER_FLAG_LINEAR = ZE_BIT(1), ///< device supports linear filtering - ZE_IMAGE_SAMPLER_FILTER_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_SAMPLER_FILTER_FLAG_* ENUMs + ZE_IMAGE_SAMPLER_FILTER_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_IMAGE_SAMPLER_FILTER_FLAG_* ENUMs } ze_image_sampler_filter_flag_t; @@ -6253,14 +5078,6 @@ typedef struct _ze_image_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6269,7 +5086,6 @@ typedef struct _ze_image_properties_t /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x3 < desc->flags` /// + `::ZE_IMAGE_TYPE_BUFFER < desc->type` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeImageGetProperties( ze_device_handle_t hDevice, ///< [in] handle of the device @@ -6296,14 +5112,6 @@ zeImageGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -6313,7 +5121,6 @@ zeImageGetProperties( /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x3 < desc->flags` /// + `::ZE_IMAGE_TYPE_BUFFER < desc->type` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT ZE_APIEXPORT ze_result_t ZE_APICALL zeImageCreate( @@ -6341,14 +5148,6 @@ zeImageCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hImage` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -6372,7 +5171,7 @@ typedef enum _ze_device_mem_alloc_flag_t ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_CACHED = ZE_BIT(0), ///< device should cache allocation ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_UNCACHED = ZE_BIT(1), ///< device should not cache allocation (UC) ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_INITIAL_PLACEMENT = ZE_BIT(2), ///< optimize shared allocation for first access on the device - ZE_DEVICE_MEM_ALLOC_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_MEM_ALLOC_FLAG_* ENUMs + ZE_DEVICE_MEM_ALLOC_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_DEVICE_MEM_ALLOC_FLAG_* ENUMs } ze_device_mem_alloc_flag_t; @@ -6400,7 +5199,7 @@ typedef enum _ze_host_mem_alloc_flag_t ZE_HOST_MEM_ALLOC_FLAG_BIAS_UNCACHED = ZE_BIT(1), ///< host should not cache allocation (UC) ZE_HOST_MEM_ALLOC_FLAG_BIAS_WRITE_COMBINED = ZE_BIT(2), ///< host memory should be allocated write-combined (WC) ZE_HOST_MEM_ALLOC_FLAG_BIAS_INITIAL_PLACEMENT = ZE_BIT(3), ///< optimize shared allocation for first access on the host - ZE_HOST_MEM_ALLOC_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_HOST_MEM_ALLOC_FLAG_* ENUMs + ZE_HOST_MEM_ALLOC_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_HOST_MEM_ALLOC_FLAG_* ENUMs } ze_host_mem_alloc_flag_t; @@ -6445,14 +5244,6 @@ typedef struct _ze_host_mem_alloc_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6462,7 +5253,6 @@ typedef struct _ze_host_mem_alloc_desc_t /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x7 < device_desc->flags` /// + `0xf < host_desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE /// + `0 == size` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT @@ -6499,14 +5289,6 @@ zeMemAllocShared( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -6515,7 +5297,6 @@ zeMemAllocShared( /// + `nullptr == pptr` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x7 < device_desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE /// + `0 == size` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT @@ -6553,14 +5334,6 @@ zeMemAllocDevice( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6568,7 +5341,6 @@ zeMemAllocDevice( /// + `nullptr == pptr` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0xf < host_desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE /// + `0 == size` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT @@ -6607,14 +5379,6 @@ zeMemAllocHost( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6633,9 +5397,7 @@ typedef enum _ze_memory_type_t ZE_MEMORY_TYPE_HOST = 1, ///< the memory pointed to is a host allocation ZE_MEMORY_TYPE_DEVICE = 2, ///< the memory pointed to is a device allocation ZE_MEMORY_TYPE_SHARED = 3, ///< the memory pointed to is a shared ownership allocation - ZE_MEMORY_TYPE_HOST_IMPORTED = 4, ///< the memory pointed to is a host allocation created from external - ///< system memory - ZE_MEMORY_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MEMORY_TYPE_* ENUMs + ZE_MEMORY_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_MEMORY_TYPE_* ENUMs } ze_memory_type_t; @@ -6669,14 +5431,6 @@ typedef struct _ze_memory_allocation_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6702,19 +5456,10 @@ zeMemGetAllocProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == ptr` -/// - ::ZE_RESULT_ERROR_ADDRESS_NOT_FOUND ZE_APIEXPORT ze_result_t ZE_APICALL zeMemGetAddressRange( ze_context_handle_t hContext, ///< [in] handle of the context object @@ -6741,14 +5486,6 @@ zeMemGetAddressRange( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6766,8 +5503,7 @@ zeMemGetIpcHandle( /// /// @details /// - Handle passed must be a valid file descriptor obtained with -/// ::ze_external_memory_export_fd_t via ::zeMemGetAllocProperties or -/// ::zePhysicalMemGetProperties. +/// ::ze_external_memory_export_fd_t via ::zeMemGetAllocProperties. /// - Returned IPC handle may contain metadata in addition to the file /// descriptor. /// - The application may call this function from simultaneous threads. @@ -6779,14 +5515,6 @@ zeMemGetIpcHandle( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6813,14 +5541,6 @@ zeMemGetIpcHandleFromFileDescriptorExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6837,8 +5557,7 @@ zeMemGetFileDescriptorFromIpcHandleExp( /// /// @details /// - This call may be used for IPC handles previously obtained with either -/// ::zeMemGetIpcHandle or with ::ze_external_memory_export_fd_t via -/// ::zeMemGetAllocProperties or ::zePhysicalMemGetProperties. +/// ::zeMemGetIpcHandle or with ::ze_external_memory_export_fd_t via ::zeMemGetAllocProperties. /// - Upon call, driver may release any underlying resources associated with /// the IPC handle. /// For instance, it may close the file descriptor contained in the IPC @@ -6855,14 +5574,6 @@ zeMemGetFileDescriptorFromIpcHandleExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -6878,7 +5589,7 @@ typedef enum _ze_ipc_memory_flag_t { ZE_IPC_MEMORY_FLAG_BIAS_CACHED = ZE_BIT(0), ///< device should cache allocation ZE_IPC_MEMORY_FLAG_BIAS_UNCACHED = ZE_BIT(1), ///< device should not cache allocation (UC) - ZE_IPC_MEMORY_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IPC_MEMORY_FLAG_* ENUMs + ZE_IPC_MEMORY_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_IPC_MEMORY_FLAG_* ENUMs } ze_ipc_memory_flag_t; @@ -6902,20 +5613,11 @@ typedef enum _ze_ipc_memory_flag_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x3 < flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pptr` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -6944,14 +5646,6 @@ zeMemOpenIpcHandle( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6966,11 +5660,10 @@ zeMemCloseIpcHandle( /// @brief Additional allocation descriptor for exporting external memory /// /// @details -/// - This structure may be passed to ::zeMemAllocDevice, ::zeMemAllocHost, -/// or ::zePhysicalMemCreate, via the `pNext` member of -/// ::ze_device_mem_alloc_desc_t or ::ze_host_mem_alloc_desc_t, or -/// ::ze_physical_mem_desc_t, respectively, to indicate an exportable -/// memory allocation. +/// - This structure may be passed to ::zeMemAllocDevice and +/// ::zeMemAllocHost, via the `pNext` member of +/// ::ze_device_mem_alloc_desc_t or ::ze_host_mem_alloc_desc_t, +/// respectively, to indicate an exportable memory allocation. /// - This structure may be passed to ::zeImageCreate, via the `pNext` /// member of ::ze_image_desc_t, to indicate an exportable image. typedef struct _ze_external_memory_export_desc_t @@ -6988,11 +5681,10 @@ typedef struct _ze_external_memory_export_desc_t /// file descriptor /// /// @details -/// - This structure may be passed to ::zeMemAllocDevice, ::zeMemAllocHost, -/// or ::zePhysicalMemCreate, via the `pNext` member of -/// ::ze_device_mem_alloc_desc_t or ::ze_host_mem_alloc_desc_t, or -/// ::ze_physical_mem_desc_t, respectively, to import memory from a file -/// descriptor. +/// - This structure may be passed to ::zeMemAllocDevice or +/// ::zeMemAllocHost, via the `pNext` member of +/// ::ze_device_mem_alloc_desc_t or of ::ze_host_mem_alloc_desc_t, +/// respectively, to import memory from a file descriptor. /// - This structure may be passed to ::zeImageCreate, via the `pNext` /// member of ::ze_image_desc_t, to import memory from a file descriptor. typedef struct _ze_external_memory_import_fd_t @@ -7016,9 +5708,6 @@ typedef struct _ze_external_memory_import_fd_t /// - This structure may be passed to ::zeImageGetAllocPropertiesExt, via /// the `pNext` member of ::ze_image_allocation_ext_properties_t, to /// export an image as a file descriptor. -/// - This structure may be passed to ::zePhysicalMemGetProperties, via the -/// `pNext` member of ::ze_physical_mem_properties_t, to export physical -/// memory as a file descriptor. /// - The requested memory export type must have been specified when the /// allocation was made. typedef struct _ze_external_memory_export_fd_t @@ -7041,11 +5730,10 @@ typedef struct _ze_external_memory_export_fd_t /// - When `name` is `nullptr`, `handle` must not be `nullptr`. /// - When `flags` is ::ZE_EXTERNAL_MEMORY_TYPE_FLAG_OPAQUE_WIN32_KMT, /// `name` must be `nullptr`. -/// - This structure may be passed to ::zeMemAllocDevice, ::zeMemAllocHost, -/// or ::zePhysicalMemCreate, via the `pNext` member of -/// ::ze_device_mem_alloc_desc_t or ::ze_host_mem_alloc_desc_t, or -/// ::ze_physical_mem_desc_t, respectively, to import memory from a Win32 -/// handle. +/// - This structure may be passed to ::zeMemAllocDevice or +/// ::zeMemAllocHost, via the `pNext` member of +/// ::ze_device_mem_alloc_desc_t or of ::ze_host_mem_alloc_desc_t, +/// respectively, to import memory from a Win32 handle. /// - This structure may be passed to ::zeImageCreate, via the `pNext` /// member of ::ze_image_desc_t, to import memory from a Win32 handle. typedef struct _ze_external_memory_import_win32_handle_t @@ -7070,9 +5758,6 @@ typedef struct _ze_external_memory_import_win32_handle_t /// - This structure may be passed to ::zeImageGetAllocPropertiesExt, via /// the `pNext` member of ::ze_image_allocation_ext_properties_t, to /// export an image as a Win32 handle. -/// - This structure may be passed to ::zePhysicalMemGetProperties, via the -/// `pNext` member of ::ze_physical_mem_properties_t, to export physical -/// memory as a Win32 handle. /// - The requested memory export type must have been specified when the /// allocation was made. typedef struct _ze_external_memory_export_win32_handle_t @@ -7105,7 +5790,7 @@ typedef enum _ze_memory_atomic_attr_exp_flag_t ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_SYSTEM_ATOMICS = ZE_BIT(6), ///< Concurrent atomics on the pointer from both host and device are ///< allowed. Requires ::ZE_MEMORY_ACCESS_CAP_FLAG_CONCURRENT_ATOMIC ///< returned by ::zeDeviceGetMemoryAccessProperties. - ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_* ENUMs + ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_* ENUMs } ze_memory_atomic_attr_exp_flag_t; @@ -7138,14 +5823,6 @@ typedef enum _ze_memory_atomic_attr_exp_flag_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -7153,7 +5830,6 @@ typedef enum _ze_memory_atomic_attr_exp_flag_t /// + `nullptr == ptr` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x7f < attr` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeMemSetAtomicAccessAttributeExp( ze_context_handle_t hContext, ///< [in] handle of context @@ -7179,14 +5855,6 @@ zeMemSetAtomicAccessAttributeExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -7215,7 +5883,7 @@ typedef enum _ze_module_format_t { ZE_MODULE_FORMAT_IL_SPIRV = 0, ///< Format is SPIRV IL format ZE_MODULE_FORMAT_NATIVE = 1, ///< Format is device native format - ZE_MODULE_FORMAT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MODULE_FORMAT_* ENUMs + ZE_MODULE_FORMAT_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_MODULE_FORMAT_* ENUMs } ze_module_format_t; @@ -7267,17 +5935,6 @@ typedef struct _ze_module_desc_t } ze_module_desc_t; -/////////////////////////////////////////////////////////////////////////////// -/// @brief Append launch kernel with parameters cooperative descriptor -typedef struct _ze_command_list_append_launch_kernel_param_cooperative_desc_t -{ - ze_structure_type_t stype; ///< [in] type of this structure - const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific - ///< structure (i.e. contains stype and pNext). - ze_bool_t isCooperative; ///< [in] When true, kernel is treated as cooperative. - -} ze_command_list_append_launch_kernel_param_cooperative_desc_t; - /////////////////////////////////////////////////////////////////////////////// /// @brief Creates a module on the context. /// @@ -7300,14 +5957,6 @@ typedef struct _ze_command_list_append_launch_kernel_param_cooperative_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -7317,7 +5966,6 @@ typedef struct _ze_command_list_append_launch_kernel_param_cooperative_desc_t /// + `nullptr == phModule` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZE_MODULE_FORMAT_NATIVE < desc->format` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NATIVE_BINARY /// - ::ZE_RESULT_ERROR_INVALID_SIZE /// + `0 == desc->inputSize` @@ -7351,14 +5999,6 @@ zeModuleCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hModule` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -7406,14 +6046,6 @@ zeModuleDestroy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == phModules` /// - ::ZE_RESULT_ERROR_MODULE_LINK_FAILURE @@ -7443,14 +6075,6 @@ zeModuleDynamicLink( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hModuleBuildLog` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -7474,14 +6098,6 @@ zeModuleBuildLogDestroy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hModuleBuildLog` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7514,14 +6130,6 @@ zeModuleBuildLogGetString( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hModule` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7550,14 +6158,6 @@ zeModuleGetNativeBinary( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hModule` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7584,14 +6184,6 @@ zeModuleGetGlobalPointer( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hModule` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7616,7 +6208,7 @@ typedef enum _ze_module_property_flag_t { ZE_MODULE_PROPERTY_FLAG_IMPORTS = ZE_BIT(0), ///< Module has imports (i.e. imported global variables and/or kernels). ///< See ::zeModuleDynamicLink. - ZE_MODULE_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MODULE_PROPERTY_FLAG_* ENUMs + ZE_MODULE_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_MODULE_PROPERTY_FLAG_* ENUMs } ze_module_property_flag_t; @@ -7644,14 +6236,6 @@ typedef struct _ze_module_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hModule` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7670,7 +6254,7 @@ typedef enum _ze_kernel_flag_t ZE_KERNEL_FLAG_FORCE_RESIDENCY = ZE_BIT(0), ///< force all device allocations to be resident during execution ZE_KERNEL_FLAG_EXPLICIT_RESIDENCY = ZE_BIT(1), ///< application is responsible for all residency of device allocations. ///< driver may disable implicit residency management. - ZE_KERNEL_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_KERNEL_FLAG_* ENUMs + ZE_KERNEL_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_KERNEL_FLAG_* ENUMs } ze_kernel_flag_t; @@ -7703,14 +6287,6 @@ typedef struct _ze_kernel_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hModule` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7719,7 +6295,6 @@ typedef struct _ze_kernel_desc_t /// + `nullptr == phKernel` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x3 < desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_KERNEL_NAME /// - ::ZE_RESULT_ERROR_INVALID_MODULE_UNLINKED ZE_APIEXPORT ze_result_t ZE_APICALL @@ -7747,14 +6322,6 @@ zeKernelCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -7781,14 +6348,6 @@ zeKernelDestroy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hModule` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7818,14 +6377,6 @@ zeModuleGetFunctionPointer( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION @@ -7853,14 +6404,6 @@ zeKernelSetGroupSize( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7885,10 +6428,6 @@ zeKernelSuggestGroupSize( /// @details /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. -/// - Applications are recommended to use ::zeKernelSuggestGroupSize and -/// ::zeKernelSetGroupSize first before calling this function and -/// launching cooperative kernels. Otherwise, implementation may return -/// ::ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION. /// /// @returns /// - ::ZE_RESULT_SUCCESS @@ -7896,14 +6435,6 @@ zeKernelSuggestGroupSize( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7923,8 +6454,6 @@ zeKernelSuggestMaxCooperativeGroupCount( /// - The application must **not** call this function from simultaneous /// threads with the same kernel handle. /// - The implementation of this function should be lock-free. -/// - If argument is SLM (size), then SLM size in bytes for this resource is -/// provided as argument size and argument value is null /// /// @returns /// - ::ZE_RESULT_SUCCESS @@ -7932,19 +6461,10 @@ zeKernelSuggestMaxCooperativeGroupCount( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX /// - ::ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT ZE_APIEXPORT ze_result_t ZE_APICALL zeKernelSetArgumentValue( ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object @@ -7962,7 +6482,7 @@ typedef enum _ze_kernel_indirect_access_flag_t ZE_KERNEL_INDIRECT_ACCESS_FLAG_HOST = ZE_BIT(0), ///< Indicates that the kernel accesses host allocations indirectly. ZE_KERNEL_INDIRECT_ACCESS_FLAG_DEVICE = ZE_BIT(1), ///< Indicates that the kernel accesses device allocations indirectly. ZE_KERNEL_INDIRECT_ACCESS_FLAG_SHARED = ZE_BIT(2), ///< Indicates that the kernel accesses shared allocations indirectly. - ZE_KERNEL_INDIRECT_ACCESS_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_KERNEL_INDIRECT_ACCESS_FLAG_* ENUMs + ZE_KERNEL_INDIRECT_ACCESS_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_KERNEL_INDIRECT_ACCESS_FLAG_* ENUMs } ze_kernel_indirect_access_flag_t; @@ -7983,19 +6503,10 @@ typedef enum _ze_kernel_indirect_access_flag_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x7 < flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeKernelSetIndirectAccess( ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object @@ -8016,14 +6527,6 @@ zeKernelSetIndirectAccess( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -8049,14 +6552,6 @@ zeKernelGetIndirectAccess( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -8086,7 +6581,7 @@ typedef enum _ze_cache_config_flag_t { ZE_CACHE_CONFIG_FLAG_LARGE_SLM = ZE_BIT(0), ///< Large SLM size ZE_CACHE_CONFIG_FLAG_LARGE_DATA = ZE_BIT(1), ///< Large General Data size - ZE_CACHE_CONFIG_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_CACHE_CONFIG_FLAG_* ENUMs + ZE_CACHE_CONFIG_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_CACHE_CONFIG_FLAG_* ENUMs } ze_cache_config_flag_t; @@ -8106,18 +6601,10 @@ typedef enum _ze_cache_config_flag_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x3 < flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE ZE_APIEXPORT ze_result_t ZE_APICALL zeKernelSetCacheConfig( @@ -8203,14 +6690,6 @@ typedef struct _ze_kernel_preferred_group_size_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -8237,14 +6716,6 @@ zeKernelGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -8287,14 +6758,6 @@ typedef struct _ze_group_count_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hKernel` @@ -8316,133 +6779,7 @@ zeCommandListAppendLaunchKernel( ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Launch kernel over one or more work groups and allow to pass -/// additional parameters. -/// -/// @details -/// - The application must ensure the kernel and events are accessible by -/// the device on which the command list was created. -/// - This may **only** be called for a command list created with command -/// queue group ordinal that supports compute. -/// - The application must ensure the command list, kernel and events were -/// created on the same context. -/// - This function may **not** be called from simultaneous threads with the -/// same command list handle. -/// - The implementation of this function should be lock-free. -/// - This function allows to pass additional parameters in the form of -/// `${x}_base_desc_t` -/// - This function can replace ::zeCommandListAppendLaunchCooperativeKernel -/// with additional parameter -/// `${x}_command_list_append_launch_kernel_param_cooperative_desc_t` -/// - This function supports both immediate and regular command lists. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// + `nullptr == hKernel` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pGroupCounts` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + when passed additional parameters are invalid or incompatible with the device or command list -ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendLaunchKernelWithParameters( - ze_command_list_handle_t hCommandList, ///< [in] handle of the command list - ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object - const ze_group_count_t* pGroupCounts, ///< [in] thread group launch arguments - const void * pNext, ///< [in][optional] additional parameters passed to the function - ze_event_handle_t hSignalEvent, ///< [in][optional] handle of the event to signal on completion - uint32_t numWaitEvents, ///< [in][optional] number of events to wait on before launching; must be 0 - ///< if `nullptr == phWaitEvents` - ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait - ///< on before launching - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Kernel dispatch group sizes. -typedef struct _ze_group_size_t -{ - uint32_t groupSizeX; ///< [in] size of thread group in X dimension - uint32_t groupSizeY; ///< [in] size of thread group in Y dimension - uint32_t groupSizeZ; ///< [in] size of thread group in Z dimension - -} ze_group_size_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Launch kernel over one or more work groups with specifying work group -/// size and all kernel arguments and allow to pass additional extensions. -/// -/// @details -/// - The application must ensure the kernel and events are accessible by -/// the device on which the command list was created. -/// - This may **only** be called for a command list created with command -/// queue group ordinal that supports compute. -/// - The application must ensure the command list, kernel and events were -/// created on the same context. -/// - This function may **not** be called from simultaneous threads with the -/// same command list handle. -/// - The implementation of this function should be lock-free. -/// - This function supports both immediate and regular command lists. -/// - This function changes kernel state as if separate -/// ${x}KernelSetGroupSize and ${x}KernelSetArgumentValue functions were -/// called. -/// - This function allows to pass additional extensions in the form of -/// `${x}_base_desc_t` -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// + `nullptr == hKernel` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + when passed additional extensions are invalid or incompatible with the device or command list -/// - ::ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION - "as per ${x}KernelSetGroupSize" -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT - "as per ${x}KernelSetArgumentValue" -ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendLaunchKernelWithArguments( - ze_command_list_handle_t hCommandList, ///< [in] handle of the command list - ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object - const ze_group_count_t groupCounts, ///< [in] thread group counts - const ze_group_size_t groupSizes, ///< [in] thread group sizes - void ** pArguments, ///< [in]pointer to an array of pointers - const void * pNext, ///< [in][optional] additional extensions passed to the function - ze_event_handle_t hSignalEvent, ///< [in][optional] handle of the event to signal on completion - uint32_t numWaitEvents, ///< [in][optional] number of events to wait on before launching; must be 0 - ///< if `nullptr == phWaitEvents` - ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait - ///< on before launching - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Launch kernel cooperatively over one or more work groups. +/// @brief Launch kernel cooperatively over one or more work groups. /// /// @details /// - The application must ensure the kernel and events are accessible by @@ -8465,14 +6802,6 @@ zeCommandListAppendLaunchKernelWithArguments( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hKernel` @@ -8518,14 +6847,6 @@ zeCommandListAppendLaunchCooperativeKernel( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hKernel` @@ -8574,14 +6895,6 @@ zeCommandListAppendLaunchKernelIndirect( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -8627,7 +6940,7 @@ typedef enum _ze_module_program_exp_version_t { ZE_MODULE_PROGRAM_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_MODULE_PROGRAM_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_MODULE_PROGRAM_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MODULE_PROGRAM_EXP_VERSION_* ENUMs + ZE_MODULE_PROGRAM_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_MODULE_PROGRAM_EXP_VERSION_* ENUMs } ze_module_program_exp_version_t; @@ -8635,24 +6948,24 @@ typedef enum _ze_module_program_exp_version_t /// @brief Module extended descriptor to support multiple input modules. /// /// @details -/// - Implementation must support ::ZE_MODULE_PROGRAM_EXP_NAME extension +/// - Implementation must support ::ZE_experimental_module_program extension /// - Modules support import and export linkage for functions and global /// variables. +/// - SPIR-V import and export linkage types are used. See SPIR-V +/// specification for linkage details. /// - pInputModules, pBuildFlags, and pConstants from ::ze_module_desc_t is /// ignored. /// - Format in ::ze_module_desc_t needs to be set to -/// ::ZE_MODULE_FORMAT_IL_SPIRV or ::ZE_MODULE_FORMAT_NATIVE. -/// - All modules in the list must be of the same format and match the -/// format specified in ::ze_module_desc_t. +/// ::ZE_MODULE_FORMAT_IL_SPIRV. typedef struct _ze_module_program_exp_desc_t { ze_structure_type_t stype; ///< [in] type of this structure const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific ///< structure (i.e. contains stype and pNext). uint32_t count; ///< [in] Count of input modules - const size_t* inputSizes; ///< [in][range(0, count)] sizes of each input module in pInputModules. - const uint8_t** pInputModules; ///< [in][range(0, count)] pointer to an array of binary modules in format - ///< specified as part of ::ze_module_desc_t. + const size_t* inputSizes; ///< [in][range(0, count)] sizes of each input IL module in pInputModules. + const uint8_t** pInputModules; ///< [in][range(0, count)] pointer to an array of IL (e.g. SPIR-V modules). + ///< Valid only for SPIR-V input. const char** pBuildFlags; ///< [in][optional][range(0, count)] array of strings containing build ///< flags. See pBuildFlags in ::ze_module_desc_t. const ze_module_constants_t** pConstants; ///< [in][optional][range(0, count)] pointer to array of specialization @@ -8680,7 +6993,7 @@ typedef enum _ze_raytracing_ext_version_t { ZE_RAYTRACING_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_RAYTRACING_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_RAYTRACING_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RAYTRACING_EXT_VERSION_* ENUMs + ZE_RAYTRACING_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RAYTRACING_EXT_VERSION_* ENUMs } ze_raytracing_ext_version_t; @@ -8690,7 +7003,7 @@ typedef uint32_t ze_device_raytracing_ext_flags_t; typedef enum _ze_device_raytracing_ext_flag_t { ZE_DEVICE_RAYTRACING_EXT_FLAG_RAYQUERY = ZE_BIT(0), ///< Supports rayquery - ZE_DEVICE_RAYTRACING_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_RAYTRACING_EXT_FLAG_* ENUMs + ZE_DEVICE_RAYTRACING_EXT_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_DEVICE_RAYTRACING_EXT_FLAG_* ENUMs } ze_device_raytracing_ext_flag_t; @@ -8716,7 +7029,7 @@ typedef uint32_t ze_raytracing_mem_alloc_ext_flags_t; typedef enum _ze_raytracing_mem_alloc_ext_flag_t { ZE_RAYTRACING_MEM_ALLOC_EXT_FLAG_TBD = ZE_BIT(0), ///< reserved for future use - ZE_RAYTRACING_MEM_ALLOC_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RAYTRACING_MEM_ALLOC_EXT_FLAG_* ENUMs + ZE_RAYTRACING_MEM_ALLOC_EXT_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RAYTRACING_MEM_ALLOC_EXT_FLAG_* ENUMs } ze_raytracing_mem_alloc_ext_flag_t; @@ -8761,13 +7074,6 @@ typedef struct _ze_raytracing_mem_alloc_ext_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -8800,14 +7106,6 @@ zeContextMakeMemoryResident( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -8836,14 +7134,6 @@ zeContextEvictMemory( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -8872,14 +7162,6 @@ zeContextMakeImageResident( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -8909,7 +7191,7 @@ typedef enum _ze_sampler_address_mode_t ///< 0.0f, 0.0f, 0.0f) if image format swizzle contains alpha, otherwise ///< (0.0f, 0.0f, 0.0f, 1.0f). ZE_SAMPLER_ADDRESS_MODE_MIRROR = 4, ///< Out-of-bounds coordinates are mirrored starting from edge. - ZE_SAMPLER_ADDRESS_MODE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_SAMPLER_ADDRESS_MODE_* ENUMs + ZE_SAMPLER_ADDRESS_MODE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_SAMPLER_ADDRESS_MODE_* ENUMs } ze_sampler_address_mode_t; @@ -8919,7 +7201,7 @@ typedef enum _ze_sampler_filter_mode_t { ZE_SAMPLER_FILTER_MODE_NEAREST = 0, ///< No coordinate modifications for out of bounds image access. ZE_SAMPLER_FILTER_MODE_LINEAR = 1, ///< Out-of-bounds coordinates are wrapped back around. - ZE_SAMPLER_FILTER_MODE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_SAMPLER_FILTER_MODE_* ENUMs + ZE_SAMPLER_FILTER_MODE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_SAMPLER_FILTER_MODE_* ENUMs } ze_sampler_filter_mode_t; @@ -8952,14 +7234,6 @@ typedef struct _ze_sampler_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -8969,7 +7243,6 @@ typedef struct _ze_sampler_desc_t /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZE_SAMPLER_ADDRESS_MODE_MIRROR < desc->addressMode` /// + `::ZE_SAMPLER_FILTER_MODE_LINEAR < desc->filterMode` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeSamplerCreate( ze_context_handle_t hContext, ///< [in] handle of the context object @@ -8996,14 +7269,6 @@ zeSamplerCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hSampler` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -9026,7 +7291,7 @@ typedef enum _ze_memory_access_attribute_t ZE_MEMORY_ACCESS_ATTRIBUTE_NONE = 0, ///< Indicates the memory page is inaccessible. ZE_MEMORY_ACCESS_ATTRIBUTE_READWRITE = 1, ///< Indicates the memory page supports read write access. ZE_MEMORY_ACCESS_ATTRIBUTE_READONLY = 2, ///< Indicates the memory page supports read-only access. - ZE_MEMORY_ACCESS_ATTRIBUTE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MEMORY_ACCESS_ATTRIBUTE_* ENUMs + ZE_MEMORY_ACCESS_ATTRIBUTE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_MEMORY_ACCESS_ATTRIBUTE_* ENUMs } ze_memory_access_attribute_t; @@ -9052,14 +7317,6 @@ typedef enum _ze_memory_access_attribute_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -9091,14 +7348,6 @@ zeVirtualMemReserve( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -9127,14 +7376,6 @@ zeVirtualMemFree( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -9158,7 +7399,7 @@ typedef enum _ze_physical_mem_flag_t { ZE_PHYSICAL_MEM_FLAG_ALLOCATE_ON_DEVICE = ZE_BIT(0), ///< [default] allocate physical device memory. ZE_PHYSICAL_MEM_FLAG_ALLOCATE_ON_HOST = ZE_BIT(1), ///< Allocate physical host memory instead. - ZE_PHYSICAL_MEM_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_PHYSICAL_MEM_FLAG_* ENUMs + ZE_PHYSICAL_MEM_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_PHYSICAL_MEM_FLAG_* ENUMs } ze_physical_mem_flag_t; @@ -9176,53 +7417,6 @@ typedef struct _ze_physical_mem_desc_t } ze_physical_mem_desc_t; -/////////////////////////////////////////////////////////////////////////////// -/// @brief Physical memory properties queried using ::zePhysicalMemGetProperties -typedef struct _ze_physical_mem_properties_t -{ - ze_structure_type_t stype; ///< [in] type of this structure - void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific - ///< structure (i.e. contains stype and pNext). - uint64_t id; ///< [out] unique identifier for the physical memory object - uint64_t size; ///< [out] size of the physical memory object in bytes - -} ze_physical_mem_properties_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Retrieves memory properties of the physical memory object. -/// -/// @details -/// - The application must only use the physical memory object on the -/// context for which it was created. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hPhysicalMem` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pMemProperties` -ZE_APIEXPORT ze_result_t ZE_APICALL -zePhysicalMemGetProperties( - ze_context_handle_t hContext, ///< [in] handle of the context object - ze_physical_mem_handle_t hPhysicalMem, ///< [in] handle of the physical memory object - ze_physical_mem_properties_t* pMemProperties ///< [in,out] pointer to physical memory properties structure. - ); - /////////////////////////////////////////////////////////////////////////////// /// @brief Creates a physical memory object for the context. /// @@ -9241,14 +7435,6 @@ zePhysicalMemGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -9257,7 +7443,6 @@ zePhysicalMemGetProperties( /// + `nullptr == phPhysicalMemory` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x3 < desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE /// + `0 == desc->size` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT @@ -9286,14 +7471,6 @@ zePhysicalMemCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hPhysicalMemory` @@ -9326,14 +7503,6 @@ zePhysicalMemDestroy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hPhysicalMemory` @@ -9341,7 +7510,6 @@ zePhysicalMemDestroy( /// + `nullptr == ptr` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZE_MEMORY_ACCESS_ATTRIBUTE_READONLY < access` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE /// + `0 == size` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT @@ -9374,14 +7542,6 @@ zeVirtualMemMap( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -9412,21 +7572,12 @@ zeVirtualMemUnmap( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == ptr` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZE_MEMORY_ACCESS_ATTRIBUTE_READONLY < access` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT /// + Address must be page aligned /// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE @@ -9457,14 +7608,6 @@ zeVirtualMemSetAccessAttribute( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -9505,7 +7648,7 @@ typedef enum _ze_float_atomics_ext_version_t { ZE_FLOAT_ATOMICS_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_FLOAT_ATOMICS_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_FLOAT_ATOMICS_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_FLOAT_ATOMICS_EXT_VERSION_* ENUMs + ZE_FLOAT_ATOMICS_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_FLOAT_ATOMICS_EXT_VERSION_* ENUMs } ze_float_atomics_ext_version_t; @@ -9520,7 +7663,7 @@ typedef enum _ze_device_fp_atomic_ext_flag_t ZE_DEVICE_FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE = ZE_BIT(16), ///< Supports atomic load, store, and exchange ZE_DEVICE_FP_ATOMIC_EXT_FLAG_LOCAL_ADD = ZE_BIT(17), ///< Supports atomic add and subtract ZE_DEVICE_FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX = ZE_BIT(18), ///< Supports atomic min and max - ZE_DEVICE_FP_ATOMIC_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_FP_ATOMIC_EXT_FLAG_* ENUMs + ZE_DEVICE_FP_ATOMIC_EXT_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_DEVICE_FP_ATOMIC_EXT_FLAG_* ENUMs } ze_device_fp_atomic_ext_flag_t; @@ -9563,7 +7706,7 @@ typedef enum _ze_global_offset_exp_version_t { ZE_GLOBAL_OFFSET_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_GLOBAL_OFFSET_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_GLOBAL_OFFSET_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_GLOBAL_OFFSET_EXP_VERSION_* ENUMs + ZE_GLOBAL_OFFSET_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_GLOBAL_OFFSET_EXP_VERSION_* ENUMs } ze_global_offset_exp_version_t; @@ -9583,14 +7726,6 @@ typedef enum _ze_global_offset_exp_version_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -9620,7 +7755,7 @@ typedef enum _ze_relaxed_allocation_limits_exp_version_t { ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_* ENUMs + ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_* ENUMs } ze_relaxed_allocation_limits_exp_version_t; @@ -9631,7 +7766,7 @@ typedef enum _ze_relaxed_allocation_limits_exp_flag_t { ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_MAX_SIZE = ZE_BIT(0), ///< Allocation size may exceed the `maxMemAllocSize` member of ///< ::ze_device_properties_t. - ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_* ENUMs + ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_* ENUMs } ze_relaxed_allocation_limits_exp_flag_t; @@ -9673,7 +7808,7 @@ typedef enum _ze_kernel_get_binary_exp_version_t { ZE_KERNEL_GET_BINARY_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_KERNEL_GET_BINARY_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_KERNEL_GET_BINARY_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_KERNEL_GET_BINARY_EXP_VERSION_* ENUMs + ZE_KERNEL_GET_BINARY_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_KERNEL_GET_BINARY_EXP_VERSION_* ENUMs } ze_kernel_get_binary_exp_version_t; @@ -9693,14 +7828,6 @@ typedef enum _ze_kernel_get_binary_exp_version_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -9731,9 +7858,8 @@ zeKernelGetBinaryExp( typedef enum _ze_driver_ddi_handles_ext_version_t { ZE_DRIVER_DDI_HANDLES_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 - ZE_DRIVER_DDI_HANDLES_EXT_VERSION_1_1 = ZE_MAKE_VERSION( 1, 1 ), ///< version 1.1 - ZE_DRIVER_DDI_HANDLES_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 1 ), ///< latest known version - ZE_DRIVER_DDI_HANDLES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DRIVER_DDI_HANDLES_EXT_VERSION_* ENUMs + ZE_DRIVER_DDI_HANDLES_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version + ZE_DRIVER_DDI_HANDLES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_DRIVER_DDI_HANDLES_EXT_VERSION_* ENUMs } ze_driver_ddi_handles_ext_version_t; @@ -9743,7 +7869,7 @@ typedef uint32_t ze_driver_ddi_handle_ext_flags_t; typedef enum _ze_driver_ddi_handle_ext_flag_t { ZE_DRIVER_DDI_HANDLE_EXT_FLAG_DDI_HANDLE_EXT_SUPPORTED = ZE_BIT(0), ///< Driver Supports DDI Handles Extension - ZE_DRIVER_DDI_HANDLE_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DRIVER_DDI_HANDLE_EXT_FLAG_* ENUMs + ZE_DRIVER_DDI_HANDLE_EXT_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_DRIVER_DDI_HANDLE_EXT_FLAG_* ENUMs } ze_driver_ddi_handle_ext_flag_t; @@ -9781,7 +7907,7 @@ typedef enum _ze_external_semaphore_ext_version_t { ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_* ENUMs + ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_* ENUMs } ze_external_semaphore_ext_version_t; @@ -9803,7 +7929,7 @@ typedef enum _ze_external_semaphore_ext_flag_t ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_KEYED_MUTEX_KMT = ZE_BIT(6), ///< Semaphore is a keyed mutex for Win32 KMT ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_VK_TIMELINE_SEMAPHORE_FD = ZE_BIT(7), ///< Semaphore is a Vulkan Timeline semaphore for Linux ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_VK_TIMELINE_SEMAPHORE_WIN32 = ZE_BIT(8), ///< Semaphore is a Vulkan Timeline semaphore for Win32 - ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_* ENUMs + ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_* ENUMs } ze_external_semaphore_ext_flag_t; @@ -9888,14 +8014,6 @@ typedef struct _ze_external_semaphore_wait_params_ext_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -9903,7 +8021,6 @@ typedef struct _ze_external_semaphore_wait_params_ext_t /// + `nullptr == phSemaphore` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x1ff < desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceImportExternalSemaphoreExt( ze_device_handle_t hDevice, ///< [in] The device handle. @@ -9927,14 +8044,6 @@ zeDeviceImportExternalSemaphoreExt( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hSemaphore` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -9959,13 +8068,6 @@ zeDeviceReleaseExternalSemaphoreExt( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -9982,10 +8084,9 @@ ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListAppendSignalExternalSemaphoreExt( ze_command_list_handle_t hCommandList, ///< [in] The command list handle. uint32_t numSemaphores, ///< [in] The number of external semaphores. - ze_external_semaphore_ext_handle_t* phSemaphores, ///< [in][range(0, numSemaphores)] The array of pointers to external - ///< semaphore handles to be appended into command list. - ze_external_semaphore_signal_params_ext_t* signalParams, ///< [in][range(0, numSemaphores)] The array of pointers to external - ///< semaphore signal parameters. + ze_external_semaphore_ext_handle_t* phSemaphores, ///< [in][range(0, numSemaphores)] The vector of external semaphore handles + ///< to be appended into command list. + ze_external_semaphore_signal_params_ext_t* signalParams, ///< [in] Signal parameters. ze_event_handle_t hSignalEvent, ///< [in][optional] handle of the event to signal on completion uint32_t numWaitEvents, ///< [in][optional] number of events to wait on before launching; must be 0 ///< if `nullptr == phWaitEvents` @@ -10009,13 +8110,6 @@ zeCommandListAppendSignalExternalSemaphoreExt( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -10032,10 +8126,9 @@ ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListAppendWaitExternalSemaphoreExt( ze_command_list_handle_t hCommandList, ///< [in] The command list handle. uint32_t numSemaphores, ///< [in] The number of external semaphores. - ze_external_semaphore_ext_handle_t* phSemaphores, ///< [in][range(0,numSemaphores)] The array of pointers to external - ///< semaphore handles to append into command list. - ze_external_semaphore_wait_params_ext_t* waitParams, ///< [in][range(0,numSemaphores)] The array of pointers to external - ///< semaphore wait parameters. + ze_external_semaphore_ext_handle_t* phSemaphores, ///< [in] [range(0,numSemaphores)] The vector of external semaphore handles + ///< to append into command list. + ze_external_semaphore_wait_params_ext_t* waitParams, ///< [in] Wait parameters. ze_event_handle_t hSignalEvent, ///< [in][optional] handle of the event to signal on completion uint32_t numWaitEvents, ///< [in][optional] number of events to wait on before launching; must be 0 ///< if `nullptr == phWaitEvents` @@ -10062,7 +8155,7 @@ typedef enum _ze_device_cache_line_size_ext_version_t { ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ),///< latest known version - ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_* ENUMs + ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_* ENUMs } ze_device_cache_line_size_ext_version_t; @@ -10101,7 +8194,7 @@ typedef enum _ze_rtas_builder_ext_version_t { ZE_RTAS_BUILDER_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_RTAS_BUILDER_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_RTAS_BUILDER_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_EXT_VERSION_* ENUMs + ZE_RTAS_BUILDER_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RTAS_BUILDER_EXT_VERSION_* ENUMs } ze_rtas_builder_ext_version_t; @@ -10111,7 +8204,7 @@ typedef uint32_t ze_rtas_device_ext_flags_t; typedef enum _ze_rtas_device_ext_flag_t { ZE_RTAS_DEVICE_EXT_FLAG_RESERVED = ZE_BIT(0), ///< reserved for future use - ZE_RTAS_DEVICE_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_DEVICE_EXT_FLAG_* ENUMs + ZE_RTAS_DEVICE_EXT_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RTAS_DEVICE_EXT_FLAG_* ENUMs } ze_rtas_device_ext_flag_t; @@ -10125,7 +8218,7 @@ typedef enum _ze_rtas_format_ext_t { ZE_RTAS_FORMAT_EXT_INVALID = 0x0, ///< Invalid acceleration structure format code ZE_RTAS_FORMAT_EXT_MAX = 0x7ffffffe, ///< Maximum acceleration structure format code - ZE_RTAS_FORMAT_EXT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_FORMAT_EXT_* ENUMs + ZE_RTAS_FORMAT_EXT_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RTAS_FORMAT_EXT_* ENUMs } ze_rtas_format_ext_t; @@ -10135,7 +8228,7 @@ typedef uint32_t ze_rtas_builder_ext_flags_t; typedef enum _ze_rtas_builder_ext_flag_t { ZE_RTAS_BUILDER_EXT_FLAG_RESERVED = ZE_BIT(0), ///< Reserved for future use - ZE_RTAS_BUILDER_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_EXT_FLAG_* ENUMs + ZE_RTAS_BUILDER_EXT_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RTAS_BUILDER_EXT_FLAG_* ENUMs } ze_rtas_builder_ext_flag_t; @@ -10145,7 +8238,7 @@ typedef uint32_t ze_rtas_parallel_operation_ext_flags_t; typedef enum _ze_rtas_parallel_operation_ext_flag_t { ZE_RTAS_PARALLEL_OPERATION_EXT_FLAG_RESERVED = ZE_BIT(0), ///< Reserved for future use - ZE_RTAS_PARALLEL_OPERATION_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_PARALLEL_OPERATION_EXT_FLAG_* ENUMs + ZE_RTAS_PARALLEL_OPERATION_EXT_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RTAS_PARALLEL_OPERATION_EXT_FLAG_* ENUMs } ze_rtas_parallel_operation_ext_flag_t; @@ -10155,7 +8248,7 @@ typedef uint32_t ze_rtas_builder_geometry_ext_flags_t; typedef enum _ze_rtas_builder_geometry_ext_flag_t { ZE_RTAS_BUILDER_GEOMETRY_EXT_FLAG_NON_OPAQUE = ZE_BIT(0), ///< non-opaque geometries invoke an any-hit shader - ZE_RTAS_BUILDER_GEOMETRY_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_GEOMETRY_EXT_FLAG_* ENUMs + ZE_RTAS_BUILDER_GEOMETRY_EXT_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RTAS_BUILDER_GEOMETRY_EXT_FLAG_* ENUMs } ze_rtas_builder_geometry_ext_flag_t; @@ -10175,7 +8268,7 @@ typedef enum _ze_rtas_builder_instance_ext_flag_t ///< be non-opaque ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_TRIANGLE_FORCE_NON_OPAQUE = ZE_BIT(3),///< forces instanced geometry to be non-opaque, unless ray flag forces it ///< to be opaque - ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_* ENUMs + ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_* ENUMs } ze_rtas_builder_instance_ext_flag_t; @@ -10201,7 +8294,7 @@ typedef enum _ze_rtas_builder_build_op_ext_flag_t { ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_COMPACT = ZE_BIT(0), ///< build more compact acceleration structure ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION = ZE_BIT(1), ///< guarantees single any-hit shader invocation per primitive - ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_* ENUMs + ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_* ENUMs } ze_rtas_builder_build_op_ext_flag_t; @@ -10224,7 +8317,7 @@ typedef enum _ze_rtas_builder_build_quality_hint_ext_t ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_LOW = 0, ///< build low-quality acceleration structure (fast) ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_MEDIUM = 1, ///< build medium-quality acceleration structure (slower) ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_HIGH = 2, ///< build high-quality acceleration structure (slow) - ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_* ENUMs + ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_* ENUMs } ze_rtas_builder_build_quality_hint_ext_t; @@ -10236,7 +8329,7 @@ typedef enum _ze_rtas_builder_geometry_type_ext_t ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_QUADS = 1, ///< quad mesh geometry type ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_PROCEDURAL = 2, ///< procedural geometry type ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_INSTANCE = 3, ///< instance geometry type - ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_* ENUMs + ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_* ENUMs } ze_rtas_builder_geometry_type_ext_t; @@ -10265,7 +8358,7 @@ typedef enum _ze_rtas_builder_input_data_format_ext_t ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_TRIANGLE_INDICES_UINT32 = 5, ///< Unsigned 32-bit triangle indices (see ///< ::ze_rtas_triangle_indices_uint32_ext_t) ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_QUAD_INDICES_UINT32 = 6, ///< Unsigned 32-bit quad indices (see ::ze_rtas_quad_indices_uint32_ext_t) - ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_* ENUMs + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_* ENUMs } ze_rtas_builder_input_data_format_ext_t; @@ -10672,7 +8765,7 @@ typedef struct _ze_rtas_builder_build_op_ext_desc_t /// @details /// - The application may call this function from simultaneous threads. /// - The implementation of this function must be thread-safe. -/// - The implementation must support ::ZE_RTAS_EXT_NAME extension. +/// - The implementation must support ::ZE_extension_rtas extension. /// /// @returns /// - ::ZE_RESULT_SUCCESS @@ -10680,14 +8773,6 @@ typedef struct _ze_rtas_builder_build_op_ext_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -10695,7 +8780,6 @@ typedef struct _ze_rtas_builder_build_op_ext_desc_t /// + `nullptr == phBuilder` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZE_RTAS_BUILDER_EXT_VERSION_CURRENT < pDescriptor->builderVersion` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeRTASBuilderCreateExt( ze_driver_handle_t hDriver, ///< [in] handle of driver object @@ -10716,14 +8800,6 @@ zeRTASBuilderCreateExt( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hBuilder` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -10733,7 +8809,6 @@ zeRTASBuilderCreateExt( /// + `::ZE_RTAS_FORMAT_EXT_MAX < pBuildOpDescriptor->rtasFormat` /// + `::ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_HIGH < pBuildOpDescriptor->buildQuality` /// + `0x3 < pBuildOpDescriptor->buildFlags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeRTASBuilderGetBuildPropertiesExt( ze_rtas_builder_ext_handle_t hBuilder, ///< [in] handle of builder object @@ -10749,24 +8824,16 @@ zeRTASBuilderGetBuildPropertiesExt( /// - The implementation of this function must be thread-safe. /// /// @returns +/// - ::ZE_RESULT_SUCCESS /// - ::ZE_RESULT_ERROR_UNINITIALIZED /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZE_RTAS_FORMAT_EXT_MAX < rtasFormatA` /// + `::ZE_RTAS_FORMAT_EXT_MAX < rtasFormatB` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_SUCCESS /// + An acceleration structure built with `rtasFormatA` is compatible with devices that report `rtasFormatB`. /// - ::ZE_RESULT_EXT_ERROR_OPERANDS_INCOMPATIBLE @@ -10834,14 +8901,6 @@ zeDriverRTASFormatCompatibilityCheckExt( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hBuilder` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -10852,7 +8911,6 @@ zeDriverRTASFormatCompatibilityCheckExt( /// + `::ZE_RTAS_FORMAT_EXT_MAX < pBuildOpDescriptor->rtasFormat` /// + `::ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_HIGH < pBuildOpDescriptor->buildQuality` /// + `0x3 < pBuildOpDescriptor->buildFlags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_EXT_RTAS_BUILD_DEFERRED /// + Acceleration structure build completion is deferred to parallel operation join. /// - ::ZE_RESULT_EXT_RTAS_BUILD_RETRY @@ -10904,14 +8962,6 @@ zeRTASBuilderBuildExt( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -10951,14 +9001,6 @@ zeRTASBuilderCommandListAppendCopyExt( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hBuilder` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -10974,7 +9016,7 @@ zeRTASBuilderDestroyExt( /// @details /// - The application may call this function from simultaneous threads. /// - The implementation of this function must be thread-safe. -/// - The implementation must support ::ZE_RTAS_EXT_NAME extension. +/// - The implementation must support ::ZE_extension_rtas extension. /// /// @returns /// - ::ZE_RESULT_SUCCESS @@ -10982,14 +9024,6 @@ zeRTASBuilderDestroyExt( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -11019,14 +9053,6 @@ zeRTASParallelOperationCreateExt( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hParallelOperation` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -11038,250 +9064,11 @@ zeRTASParallelOperationGetPropertiesExt( ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Joins a parallel build operation -/// -/// @details -/// - All worker threads return the same error code for the parallel build -/// operation upon build completion -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hParallelOperation` -ZE_APIEXPORT ze_result_t ZE_APICALL -zeRTASParallelOperationJoinExt( - ze_rtas_parallel_operation_ext_handle_t hParallelOperation ///< [in] handle of parallel operation object - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Destroys a ray tracing acceleration structure builder parallel -/// operation object -/// -/// @details -/// - The implementation of this function may immediately release any -/// internal Host and Device resources associated with this parallel -/// operation. -/// - The application must **not** call this function from simultaneous -/// threads with the same parallel operation handle. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hParallelOperation` -ZE_APIEXPORT ze_result_t ZE_APICALL -zeRTASParallelOperationDestroyExt( - ze_rtas_parallel_operation_ext_handle_t hParallelOperation ///< [in][release] handle of parallel operation object to destroy - ); - -#if !defined(__GNUC__) -#pragma endregion -#endif -// Intel 'oneAPI' Level-Zero Extension for Device Vector Sizes Query -#if !defined(__GNUC__) -#pragma region deviceVectorSizes -#endif -/////////////////////////////////////////////////////////////////////////////// -#ifndef ZE_DEVICE_VECTOR_SIZES_EXT_NAME -/// @brief Device Vector Sizes Query Extension Name -#define ZE_DEVICE_VECTOR_SIZES_EXT_NAME "ZE_extension_device_vector_sizes" -#endif // ZE_DEVICE_VECTOR_SIZES_EXT_NAME - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Device Vector Sizes Query Extension Version(s) -typedef enum _ze_device_vector_sizes_ext_version_t -{ - ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 - ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_* ENUMs - -} ze_device_vector_sizes_ext_version_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Device Vector Width Properties queried using -/// $DeviceGetVectorWidthPropertiesExt -typedef struct _ze_device_vector_width_properties_ext_t -{ - ze_structure_type_t stype; ///< [in] type of this structure - void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific - ///< structure (i.e. contains stype and pNext). - uint32_t vector_width_size; ///< [out] The associated vector width size supported by the device. - uint32_t preferred_vector_width_char; ///< [out] The preferred vector width size for char type supported by the device. - uint32_t preferred_vector_width_short; ///< [out] The preferred vector width size for short type supported by the device. - uint32_t preferred_vector_width_int; ///< [out] The preferred vector width size for int type supported by the device. - uint32_t preferred_vector_width_long; ///< [out] The preferred vector width size for long type supported by the device. - uint32_t preferred_vector_width_float; ///< [out] The preferred vector width size for float type supported by the device. - uint32_t preferred_vector_width_double; ///< [out] The preferred vector width size for double type supported by the device. - uint32_t preferred_vector_width_half; ///< [out] The preferred vector width size for half type supported by the device. - uint32_t native_vector_width_char; ///< [out] The native vector width size for char type supported by the device. - uint32_t native_vector_width_short; ///< [out] The native vector width size for short type supported by the device. - uint32_t native_vector_width_int; ///< [out] The native vector width size for int type supported by the device. - uint32_t native_vector_width_long; ///< [out] The native vector width size for long type supported by the device. - uint32_t native_vector_width_float; ///< [out] The native vector width size for float type supported by the device. - uint32_t native_vector_width_double; ///< [out] The native vector width size for double type supported by the device. - uint32_t native_vector_width_half; ///< [out] The native vector width size for half type supported by the device. - -} ze_device_vector_width_properties_ext_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Retrieves the vector width properties of the device. -/// -/// @details -/// - Properties are reported for each vector width supported by the device. -/// - Multiple calls to this function will return properties in the same -/// order. -/// - The number of vector width properties is reported thru the pCount -/// parameter which is updated by the driver given pCount == 0. -/// - The application may provide a buffer that is larger than the number of -/// properties, but the application must set pCount to the number of -/// properties to retrieve. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` -ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetVectorWidthPropertiesExt( - ze_device_handle_t hDevice, ///< [in] handle of the device - uint32_t* pCount, ///< [in,out] pointer to the number of vector width properties. - ///< if count is zero, then the driver shall update the value with the - ///< total number of vector width properties available. - ///< if count is greater than the number of vector width properties - ///< available, then the driver shall update the value with the correct - ///< number of vector width properties available. - ze_device_vector_width_properties_ext_t* pVectorWidthProperties ///< [in,out][optional][range(0, *pCount)] array of vector width properties. - ///< if count is less than the number of properties available, then the - ///< driver will return only the number requested. - ); - -#if !defined(__GNUC__) -#pragma endregion -#endif -// Intel 'oneAPI' Level-Zero Extension APIs for Mapping External Memory as part of host llocation -#if !defined(__GNUC__) -#pragma region externalMemMap -#endif -/////////////////////////////////////////////////////////////////////////////// -#ifndef ZE_EXTERNAL_MEMORY_MAPPING_EXT_NAME -/// @brief External Memory Mapping Extension Name -#define ZE_EXTERNAL_MEMORY_MAPPING_EXT_NAME "ZE_extension_external_memmap_sysmem" -#endif // ZE_EXTERNAL_MEMORY_MAPPING_EXT_NAME - -/////////////////////////////////////////////////////////////////////////////// -/// @brief External Memory Mapping Extension Version(s) -typedef enum _ze_external_memmap_sysmem_ext_version_t -{ - ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 - ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ),///< latest known version - ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_* ENUMs - -} ze_external_memmap_sysmem_ext_version_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Maps external system memory for an allocation -/// -/// @details -/// - This structure may be passed to ::zeMemAllocHost, via the `pNext` -/// member of ::ze_host_mem_alloc_desc_t to map system memory for a host -/// allocation. -/// - The system memory pointer and size being mapped must be page aligned -/// based on the supported page sizes on the device. -typedef struct _ze_external_memmap_sysmem_ext_desc_t -{ - ze_structure_type_t stype; ///< [in] type of this structure - const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific - ///< structure (i.e. contains stype and pNext). - const void* pSystemMemory; ///< [in] system memory pointer to map; must be page-aligned. - uint64_t size; ///< [in] size of the system memory to map; must be page-aligned. - -} ze_external_memmap_sysmem_ext_desc_t; - -#if !defined(__GNUC__) -#pragma endregion -#endif -// Intel 'oneAPI' Level-Zero Extension for retrieving kernel memory allocation properties. -#if !defined(__GNUC__) -#pragma region kernelAllocationProperties -#endif -/////////////////////////////////////////////////////////////////////////////// -#ifndef ZE_GET_KERNEL_ALLOCATION_PROPERTIES_EXP_NAME -/// @brief Get Kernel Allocation Properties Extension Name -#define ZE_GET_KERNEL_ALLOCATION_PROPERTIES_EXP_NAME "ZE_experimental_kernel_allocation_properties" -#endif // ZE_GET_KERNEL_ALLOCATION_PROPERTIES_EXP_NAME - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Get Kernel Allocation Properties Extension Version(s) -typedef enum _ze_kernel_get_allocation_properties_exp_version_t -{ - ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 - ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_* ENUMs - -} ze_kernel_get_allocation_properties_exp_version_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Kernel allocation properties -typedef struct _ze_kernel_allocation_exp_properties_t -{ - ze_structure_type_t stype; ///< [in] type of this structure - void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific - ///< structure (i.e. contains stype and pNext). - uint64_t base; ///< [out] base address of the allocation - size_t size; ///< [out] size of allocation - ze_memory_type_t type; ///< [out] type of allocation - uint32_t argIndex; ///< [out] kernel argument index for current allocation, -1 for driver - ///< internal (not kernel argument) allocations - -} ze_kernel_allocation_exp_properties_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Retrieves kernel allocation properties. +/// @brief Joins a parallel build operation /// /// @details -/// - A valid kernel handle must be created with ::zeKernelCreate. -/// - Returns array of kernel allocation properties for kernel handle. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. +/// - All worker threads return the same error code for the parallel build +/// operation upon build completion /// /// @returns /// - ::ZE_RESULT_SUCCESS @@ -11289,183 +9076,101 @@ typedef struct _ze_kernel_allocation_exp_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hKernel` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +/// + `nullptr == hParallelOperation` ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelGetAllocationPropertiesExp( - ze_kernel_handle_t hKernel, ///< [in] Kernel handle. - uint32_t* pCount, ///< [in,out] pointer to the number of kernel allocation properties. - ///< if count is zero, then the driver shall update the value with the - ///< total number of kernel allocation properties available. - ///< if count is greater than the number of kernel allocation properties - ///< available, then the driver shall update the value with the correct - ///< number of kernel allocation properties. - ze_kernel_allocation_exp_properties_t* pAllocationProperties ///< [in,out][optional][range(0, *pCount)] array of kernel allocation properties. - ///< if count is less than the number of kernel allocation properties - ///< available, then driver shall only retrieve that number of kernel - ///< allocation properties. +zeRTASParallelOperationJoinExt( + ze_rtas_parallel_operation_ext_handle_t hParallelOperation ///< [in] handle of parallel operation object ); -#if !defined(__GNUC__) -#pragma endregion -#endif -// Intel 'oneAPI' Level-Zero Extension APIs for Device UsableMem Size Properties Extension -#if !defined(__GNUC__) -#pragma region deviceusablememproperties -#endif -/////////////////////////////////////////////////////////////////////////////// -#ifndef ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_NAME -/// @brief Device Usable Memory Size Properties Extension Name -#define ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_NAME "ZE_extension_device_usablemem_size_properties" -#endif // ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_NAME - /////////////////////////////////////////////////////////////////////////////// -/// @brief Device Usable Mem Size Extension Version(s) -typedef enum _ze_device_usablemem_size_properties_ext_version_t -{ - ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 - ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_* ENUMs - -} ze_device_usablemem_size_properties_ext_version_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Memory access property to discover current status of usable memory +/// @brief Destroys a ray tracing acceleration structure builder parallel +/// operation object /// /// @details -/// - This structure may be returned from ::zeDeviceGetProperties via the -/// `pNext` member of ::ze_device_properties_t -typedef struct _ze_device_usablemem_size_ext_properties_t -{ - ze_structure_type_t stype; ///< [in] type of this structure - void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific - ///< structure (i.e. contains stype and pNext). - uint64_t currUsableMemSize; ///< [out] Returns the available usable memory at the device level. This is - ///< typically less than or equal to the available physical memory on the - ///< device. It important to note that usable memory size reported is - ///< transient in nature and cannot be used to reliably guarentee success - ///< of future allocations. The usable memory includes all the memory that - ///< the clients can allocate for their use and by L0 Core for its internal - ///< allocations. - -} ze_device_usablemem_size_ext_properties_t; - -#if !defined(__GNUC__) -#pragma endregion -#endif -// Intel 'oneAPI' Level-Zero Extension APIs for Image Format Support -#if !defined(__GNUC__) -#pragma region imageFormatSupport -#endif -/////////////////////////////////////////////////////////////////////////////// -#ifndef ZE_IMAGE_FORMAT_SUPPORT_EXT_NAME -/// @brief Image Format Support Extension Name -#define ZE_IMAGE_FORMAT_SUPPORT_EXT_NAME "ZE_extension_image_format_support" -#endif // ZE_IMAGE_FORMAT_SUPPORT_EXT_NAME - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Image Format Support Extension Version(s) -typedef enum _ze_image_format_support_ext_version_t -{ - ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 - ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_* ENUMs - -} ze_image_format_support_ext_version_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Image format support query properties +/// - The implementation of this function may immediately release any +/// internal Host and Device resources associated with this parallel +/// operation. +/// - The application must **not** call this function from simultaneous +/// threads with the same parallel operation handle. +/// - The implementation of this function must be thread-safe. /// -/// @details -/// - This structure may be passed to ::zeImageGetProperties via the pNext -/// member of ::ze_image_properties_t. -/// - The implementation shall populate the supported field based on the -/// ::ze_image_desc_t and ::ze_device_handle_t passed to -/// ::zeImageGetProperties. -/// - This provides a mechanism to query format support without requiring -/// image creation. -typedef struct _ze_image_format_support_ext_properties_t -{ - ze_structure_type_t stype; ///< [in] type of this structure - void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific - ///< structure (i.e. contains stype and pNext). - ze_bool_t supported; ///< [out] boolean flag indicating whether the image format is supported on - ///< the queried device - -} ze_image_format_support_ext_properties_t; +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +/// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +/// + `nullptr == hParallelOperation` +ZE_APIEXPORT ze_result_t ZE_APICALL +zeRTASParallelOperationDestroyExt( + ze_rtas_parallel_operation_ext_handle_t hParallelOperation ///< [in][release] handle of parallel operation object to destroy + ); #if !defined(__GNUC__) #pragma endregion #endif -// Intel 'oneAPI' Level-Zero Extension for setting the IPC memory handle type requested at memory allocation time. +// Intel 'oneAPI' Level-Zero Extension for Device Vector Sizes Query #if !defined(__GNUC__) -#pragma region ipcMemHandleType +#pragma region deviceVectorSizes #endif /////////////////////////////////////////////////////////////////////////////// -#ifndef ZE_IPC_MEM_HANDLE_TYPE_EXT_NAME -/// @brief IPC Memory Handle Type Extension Name -#define ZE_IPC_MEM_HANDLE_TYPE_EXT_NAME "ZE_extension_ipc_mem_handle_type" -#endif // ZE_IPC_MEM_HANDLE_TYPE_EXT_NAME - -/////////////////////////////////////////////////////////////////////////////// -/// @brief IPC Memory Handle Type Extension Version(s) -typedef enum _ze_ipc_mem_handle_type_ext_version_t -{ - ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 - ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_* ENUMs - -} ze_ipc_mem_handle_type_ext_version_t; +#ifndef ZE_DEVICE_VECTOR_SIZES_EXT_NAME +/// @brief Device Vector Sizes Query Extension Name +#define ZE_DEVICE_VECTOR_SIZES_EXT_NAME "ZE_extension_device_vector_sizes" +#endif // ZE_DEVICE_VECTOR_SIZES_EXT_NAME /////////////////////////////////////////////////////////////////////////////// -/// @brief Supported IPC memory handle type flags -typedef uint32_t ze_ipc_mem_handle_type_flags_t; -typedef enum _ze_ipc_mem_handle_type_flag_t +/// @brief Device Vector Sizes Query Extension Version(s) +typedef enum _ze_device_vector_sizes_ext_version_t { - ZE_IPC_MEM_HANDLE_TYPE_FLAG_DEFAULT = ZE_BIT(0), ///< Local IPC memory handle type for use within the same machine. - ZE_IPC_MEM_HANDLE_TYPE_FLAG_FABRIC_ACCESSIBLE = ZE_BIT(1), ///< Fabric accessible IPC memory handle type for use across machines via a - ///< supported fabric. - ZE_IPC_MEM_HANDLE_TYPE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IPC_MEM_HANDLE_TYPE_FLAG_* ENUMs + ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 + ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version + ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_* ENUMs -} ze_ipc_mem_handle_type_flag_t; +} ze_device_vector_sizes_ext_version_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief ['IPC Memory Handle Type Extension Descriptor', 'Used in -/// ::zeMemGetIpcHandleWithProperties, ::zeMemAllocDevice, and -/// ::zeMemAllocHost, ::zePhysicalMemCreate to specify the IPC memory -/// handle type to create for this allocation.'] -typedef struct _ze_ipc_mem_handle_type_ext_desc_t +/// @brief Device Vector Width Properties queried using +/// $DeviceGetVectorWidthPropertiesExt +typedef struct _ze_device_vector_width_properties_ext_t { ze_structure_type_t stype; ///< [in] type of this structure - const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific + void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific ///< structure (i.e. contains stype and pNext). - ze_ipc_mem_handle_type_flags_t typeFlags; ///< [in] valid combination of ::ze_ipc_mem_handle_type_flag_t + uint32_t vector_width_size; ///< [out] The associated vector width size supported by the device. + uint32_t preferred_vector_width_char; ///< [out] The preferred vector width size for char type supported by the device. + uint32_t preferred_vector_width_short; ///< [out] The preferred vector width size for short type supported by the device. + uint32_t preferred_vector_width_int; ///< [out] The preferred vector width size for int type supported by the device. + uint32_t preferred_vector_width_long; ///< [out] The preferred vector width size for long type supported by the device. + uint32_t preferred_vector_width_float; ///< [out] The preferred vector width size for float type supported by the device. + uint32_t preferred_vector_width_double; ///< [out] The preferred vector width size for double type supported by the device. + uint32_t preferred_vector_width_half; ///< [out] The preferred vector width size for half type supported by the device. + uint32_t native_vector_width_char; ///< [out] The native vector width size for char type supported by the device. + uint32_t native_vector_width_short; ///< [out] The native vector width size for short type supported by the device. + uint32_t native_vector_width_int; ///< [out] The native vector width size for int type supported by the device. + uint32_t native_vector_width_long; ///< [out] The native vector width size for long type supported by the device. + uint32_t native_vector_width_float; ///< [out] The native vector width size for float type supported by the device. + uint32_t native_vector_width_double; ///< [out] The native vector width size for double type supported by the device. + uint32_t native_vector_width_half; ///< [out] The native vector width size for half type supported by the device. -} ze_ipc_mem_handle_type_ext_desc_t; +} ze_device_vector_width_properties_ext_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Creates an IPC memory handle for the specified allocation with -/// properties for the requested handle. +/// @brief Retrieves the vector width properties of the device. /// /// @details -/// - Takes a pointer to a device or host memory allocation and creates an -/// IPC memory handle for exporting it for use in another process. -/// - The pointer must be the base pointer of a device or host memory -/// allocation; i.e. the value returned from ::zeMemAllocDevice or from -/// ::zeMemAllocHost, respectively or allocated from -/// ::zePhysicalMemCreate. +/// - Properties are reported for each vector width supported by the device. +/// - Multiple calls to this function will return properties in the same +/// order. +/// - The number of vector width properties is reported thru the pCount +/// parameter which is updated by the driver given pCount == 0. +/// - The application may provide a buffer that is larger than the number of +/// properties, but the application must set pCount to the number of +/// properties to retrieve. /// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. +/// - The implementation of this function should be lock-free. /// /// @returns /// - ::ZE_RESULT_SUCCESS @@ -11473,25 +9178,22 @@ typedef struct _ze_ipc_mem_handle_type_ext_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` +/// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == ptr` -/// + `nullptr == pIpcHandle` +/// + `nullptr == pCount` ZE_APIEXPORT ze_result_t ZE_APICALL -zeMemGetIpcHandleWithProperties( - ze_context_handle_t hContext, ///< [in] handle of the context object - const void* ptr, ///< [in] pointer to the device memory allocation - void* pNext, ///< [in][optional] Pointer to extension-specific structure. - ze_ipc_mem_handle_t* pIpcHandle ///< [out] Returned IPC memory handle +zeDeviceGetVectorWidthPropertiesExt( + ze_device_handle_t hDevice, ///< [in] handle of the device + uint32_t* pCount, ///< [in,out] pointer to the number of vector width properties. + ///< if count is zero, then the driver shall update the value with the + ///< total number of vector width properties available. + ///< if count is greater than the number of vector width properties + ///< available, then the driver shall update the value with the correct + ///< number of vector width properties available. + ze_device_vector_width_properties_ext_t* pVectorWidthProperties ///< [in,out][optional][range(0, *pCount)] array of vector width properties. + ///< if count is less than the number of properties available, then the + ///< driver will return only the number requested. ); #if !defined(__GNUC__) @@ -11513,7 +9215,7 @@ typedef enum _ze_cache_reservation_ext_version_t { ZE_CACHE_RESERVATION_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_CACHE_RESERVATION_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_CACHE_RESERVATION_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_CACHE_RESERVATION_EXT_VERSION_* ENUMs + ZE_CACHE_RESERVATION_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_CACHE_RESERVATION_EXT_VERSION_* ENUMs } ze_cache_reservation_ext_version_t; @@ -11530,7 +9232,7 @@ typedef enum _ze_cache_ext_region_t ZE_CACHE_EXT_REGION_DEFAULT = 0, ///< utilize driver default scheme ZE_CACHE_EXT_REGION_RESERVED = 1, ///< utilize reserved region ZE_CACHE_EXT_REGION_NON_RESERVED = 2, ///< utilize non-reserverd region - ZE_CACHE_EXT_REGION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_CACHE_EXT_REGION_* ENUMs + ZE_CACHE_EXT_REGION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_CACHE_EXT_REGION_* ENUMs } ze_cache_ext_region_t; @@ -11568,14 +9270,6 @@ typedef struct _ze_cache_reservation_ext_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -11601,21 +9295,12 @@ zeDeviceReserveCacheExt( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == ptr` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZE_CACHE_EXT_REGION_NON_RESERVED < cacheRegion` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceSetCacheAdviceExt( ze_device_handle_t hDevice, ///< [in] handle of the device object @@ -11643,7 +9328,7 @@ typedef enum _ze_event_query_timestamps_exp_version_t { ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ),///< latest known version - ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_* ENUMs + ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_* ENUMs } ze_event_query_timestamps_exp_version_t; @@ -11653,8 +9338,8 @@ typedef enum _ze_event_query_timestamps_exp_version_t /// @details /// - The application may call this function from simultaneous threads. /// - The implementation of this function must be thread-safe. -/// - The implementation must support ::ZE_EVENT_QUERY_TIMESTAMPS_EXP_NAME -/// extension. +/// - The implementation must support +/// ::ZE_experimental_event_query_timestamps. /// - The implementation must return all timestamps for the specified event /// and device pair. /// - The implementation must return all timestamps for all sub-devices when @@ -11672,14 +9357,6 @@ typedef enum _ze_event_query_timestamps_exp_version_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEvent` /// + `nullptr == hDevice` @@ -11718,7 +9395,7 @@ typedef enum _ze_image_memory_properties_exp_version_t { ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_* ENUMs + ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_* ENUMs } ze_image_memory_properties_exp_version_t; @@ -11741,8 +9418,8 @@ typedef struct _ze_image_memory_properties_exp_t /// @details /// - The application may call this function from simultaneous threads. /// - The implementation of this function must be thread-safe. -/// - The implementation must support ::ZE_IMAGE_MEMORY_PROPERTIES_EXP_NAME -/// extension. +/// - The implementation must support +/// ::ZE_experimental_image_memory_properties extension. /// /// @remarks /// _Analogues_ @@ -11754,14 +9431,6 @@ typedef struct _ze_image_memory_properties_exp_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hImage` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -11791,7 +9460,7 @@ typedef enum _ze_image_view_ext_version_t { ZE_IMAGE_VIEW_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_IMAGE_VIEW_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_IMAGE_VIEW_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_VIEW_EXT_VERSION_* ENUMs + ZE_IMAGE_VIEW_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_IMAGE_VIEW_EXT_VERSION_* ENUMs } ze_image_view_ext_version_t; @@ -11803,7 +9472,7 @@ typedef enum _ze_image_view_ext_version_t /// sub-devices, which was provided during creation. /// - The application may call this function from simultaneous threads. /// - The implementation of this function must be thread-safe. -/// - The implementation must support ::ZE_IMAGE_VIEW_EXT_NAME extension. +/// - The implementation must support ::ZE_extension_image_view extension. /// - Image views are treated as images from the API. /// - Image views provide a mechanism to redescribe how an image is /// interpreted (e.g. different format). @@ -11821,14 +9490,6 @@ typedef enum _ze_image_view_ext_version_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -11839,7 +9500,6 @@ typedef enum _ze_image_view_ext_version_t /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x3 < desc->flags` /// + `::ZE_IMAGE_TYPE_BUFFER < desc->type` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT ZE_APIEXPORT ze_result_t ZE_APICALL zeImageViewCreateExt( @@ -11862,7 +9522,7 @@ typedef enum _ze_image_view_exp_version_t { ZE_IMAGE_VIEW_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_IMAGE_VIEW_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_IMAGE_VIEW_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_VIEW_EXP_VERSION_* ENUMs + ZE_IMAGE_VIEW_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_IMAGE_VIEW_EXP_VERSION_* ENUMs } ze_image_view_exp_version_t; @@ -11874,7 +9534,8 @@ typedef enum _ze_image_view_exp_version_t /// sub-devices, which was provided during creation. /// - The application may call this function from simultaneous threads. /// - The implementation of this function must be thread-safe. -/// - The implementation must support ::ZE_IMAGE_VIEW_EXP_NAME extension. +/// - The implementation must support ::ZE_experimental_image_view +/// extension. /// - Image views are treated as images from the API. /// - Image views provide a mechanism to redescribe how an image is /// interpreted (e.g. different format). @@ -11894,14 +9555,6 @@ typedef enum _ze_image_view_exp_version_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -11912,7 +9565,6 @@ typedef enum _ze_image_view_exp_version_t /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x3 < desc->flags` /// + `::ZE_IMAGE_TYPE_BUFFER < desc->type` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT ZE_APIEXPORT ze_result_t ZE_APICALL zeImageViewCreateExp( @@ -11942,7 +9594,7 @@ typedef enum _ze_image_view_planar_ext_version_t { ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_* ENUMs + ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_* ENUMs } ze_image_view_planar_ext_version_t; @@ -11969,7 +9621,7 @@ typedef enum _ze_image_view_planar_exp_version_t { ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_* ENUMs + ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_* ENUMs } ze_image_view_planar_exp_version_t; @@ -12004,7 +9656,7 @@ typedef enum _ze_scheduling_hints_exp_version_t { ZE_SCHEDULING_HINTS_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_SCHEDULING_HINTS_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_SCHEDULING_HINTS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_SCHEDULING_HINTS_EXP_VERSION_* ENUMs + ZE_SCHEDULING_HINTS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_SCHEDULING_HINTS_EXP_VERSION_* ENUMs } ze_scheduling_hints_exp_version_t; @@ -12016,7 +9668,7 @@ typedef enum _ze_scheduling_hint_exp_flag_t ZE_SCHEDULING_HINT_EXP_FLAG_OLDEST_FIRST = ZE_BIT(0), ///< Hint that the kernel prefers oldest-first scheduling ZE_SCHEDULING_HINT_EXP_FLAG_ROUND_ROBIN = ZE_BIT(1), ///< Hint that the kernel prefers round-robin scheduling ZE_SCHEDULING_HINT_EXP_FLAG_STALL_BASED_ROUND_ROBIN = ZE_BIT(2), ///< Hint that the kernel prefers stall-based round-robin scheduling - ZE_SCHEDULING_HINT_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_SCHEDULING_HINT_EXP_FLAG_* ENUMs + ZE_SCHEDULING_HINT_EXP_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_SCHEDULING_HINT_EXP_FLAG_* ENUMs } ze_scheduling_hint_exp_flag_t; @@ -12072,21 +9724,12 @@ typedef struct _ze_scheduling_hint_exp_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pHint` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x7 < pHint->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeKernelSchedulingHintExp( ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object @@ -12112,7 +9755,7 @@ typedef enum _ze_linkonce_odr_ext_version_t { ZE_LINKONCE_ODR_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_LINKONCE_ODR_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_LINKONCE_ODR_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_LINKONCE_ODR_EXT_VERSION_* ENUMs + ZE_LINKONCE_ODR_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_LINKONCE_ODR_EXT_VERSION_* ENUMs } ze_linkonce_odr_ext_version_t; @@ -12135,7 +9778,7 @@ typedef enum _ze_power_saving_hint_exp_version_t { ZE_POWER_SAVING_HINT_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_POWER_SAVING_HINT_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_POWER_SAVING_HINT_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_POWER_SAVING_HINT_EXP_VERSION_* ENUMs + ZE_POWER_SAVING_HINT_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_POWER_SAVING_HINT_EXP_VERSION_* ENUMs } ze_power_saving_hint_exp_version_t; @@ -12147,7 +9790,7 @@ typedef enum _ze_power_saving_hint_type_t ///< while executing work submitted to this context. ZE_POWER_SAVING_HINT_TYPE_MAX = 100, ///< Maximum power savings. The device will do everything to bring power to ///< a minimum while executing work submitted to this context. - ZE_POWER_SAVING_HINT_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_POWER_SAVING_HINT_TYPE_* ENUMs + ZE_POWER_SAVING_HINT_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_POWER_SAVING_HINT_TYPE_* ENUMs } ze_power_saving_hint_type_t; @@ -12182,7 +9825,7 @@ typedef enum _ze_subgroup_ext_version_t { ZE_SUBGROUP_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_SUBGROUP_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_SUBGROUP_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_SUBGROUP_EXT_VERSION_* ENUMs + ZE_SUBGROUP_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_SUBGROUP_EXT_VERSION_* ENUMs } ze_subgroup_ext_version_t; @@ -12205,7 +9848,7 @@ typedef enum _ze_eu_count_ext_version_t { ZE_EU_COUNT_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_EU_COUNT_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_EU_COUNT_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EU_COUNT_EXT_VERSION_* ENUMs + ZE_EU_COUNT_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_EU_COUNT_EXT_VERSION_* ENUMs } ze_eu_count_ext_version_t; @@ -12244,7 +9887,7 @@ typedef enum _ze_pci_properties_ext_version_t { ZE_PCI_PROPERTIES_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_PCI_PROPERTIES_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_PCI_PROPERTIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_PCI_PROPERTIES_EXT_VERSION_* ENUMs + ZE_PCI_PROPERTIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_PCI_PROPERTIES_EXT_VERSION_* ENUMs } ze_pci_properties_ext_version_t; @@ -12308,14 +9951,6 @@ typedef struct _ze_pci_ext_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -12345,7 +9980,7 @@ typedef enum _ze_srgb_ext_version_t { ZE_SRGB_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_SRGB_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_SRGB_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_SRGB_EXT_VERSION_* ENUMs + ZE_SRGB_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_SRGB_EXT_VERSION_* ENUMs } ze_srgb_ext_version_t; @@ -12384,7 +10019,7 @@ typedef enum _ze_image_copy_ext_version_t { ZE_IMAGE_COPY_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_IMAGE_COPY_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_IMAGE_COPY_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_COPY_EXT_VERSION_* ENUMs + ZE_IMAGE_COPY_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_IMAGE_COPY_EXT_VERSION_* ENUMs } ze_image_copy_ext_version_t; @@ -12427,14 +10062,6 @@ typedef enum _ze_image_copy_ext_version_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hSrcImage` @@ -12499,14 +10126,6 @@ zeCommandListAppendImageCopyToMemoryExt( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hDstImage` @@ -12551,7 +10170,7 @@ typedef enum _ze_image_query_alloc_properties_ext_version_t { ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_* ENUMs + ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_* ENUMs } ze_image_query_alloc_properties_ext_version_t; @@ -12579,14 +10198,6 @@ typedef struct _ze_image_allocation_ext_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hImage` @@ -12618,7 +10229,7 @@ typedef enum _ze_linkage_inspection_ext_version_t { ZE_LINKAGE_INSPECTION_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_LINKAGE_INSPECTION_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_LINKAGE_INSPECTION_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_LINKAGE_INSPECTION_EXT_VERSION_* ENUMs + ZE_LINKAGE_INSPECTION_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_LINKAGE_INSPECTION_EXT_VERSION_* ENUMs } ze_linkage_inspection_ext_version_t; @@ -12630,7 +10241,7 @@ typedef enum _ze_linkage_inspection_ext_flag_t ZE_LINKAGE_INSPECTION_EXT_FLAG_IMPORTS = ZE_BIT(0), ///< List all imports of modules ZE_LINKAGE_INSPECTION_EXT_FLAG_UNRESOLVABLE_IMPORTS = ZE_BIT(1), ///< List all imports of modules that do not have a corresponding export ZE_LINKAGE_INSPECTION_EXT_FLAG_EXPORTS = ZE_BIT(2), ///< List all exports of modules - ZE_LINKAGE_INSPECTION_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_LINKAGE_INSPECTION_EXT_FLAG_* ENUMs + ZE_LINKAGE_INSPECTION_EXT_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_LINKAGE_INSPECTION_EXT_FLAG_* ENUMs } ze_linkage_inspection_ext_flag_t; @@ -12666,21 +10277,12 @@ typedef struct _ze_linkage_inspection_ext_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pInspectDesc` /// + `nullptr == phModules` /// + `nullptr == phLog` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x7 < pInspectDesc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeModuleInspectLinkageExt( ze_linkage_inspection_ext_desc_t* pInspectDesc, ///< [in] pointer to linkage inspection descriptor structure. @@ -12710,7 +10312,7 @@ typedef enum _ze_memory_compression_hints_ext_version_t { ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_* ENUMs + ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_* ENUMs } ze_memory_compression_hints_ext_version_t; @@ -12721,7 +10323,7 @@ typedef enum _ze_memory_compression_hints_ext_flag_t { ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_COMPRESSED = ZE_BIT(0), ///< Hint Driver implementation to make allocation compressible ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_UNCOMPRESSED = ZE_BIT(1), ///< Hint Driver implementation to make allocation not compressible - ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_* ENUMs + ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_* ENUMs } ze_memory_compression_hints_ext_flag_t; @@ -12765,7 +10367,7 @@ typedef enum _ze_memory_free_policies_ext_version_t { ZE_MEMORY_FREE_POLICIES_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_MEMORY_FREE_POLICIES_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_MEMORY_FREE_POLICIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MEMORY_FREE_POLICIES_EXT_VERSION_* ENUMs + ZE_MEMORY_FREE_POLICIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_MEMORY_FREE_POLICIES_EXT_VERSION_* ENUMs } ze_memory_free_policies_ext_version_t; @@ -12783,7 +10385,7 @@ typedef enum _ze_driver_memory_free_policy_ext_flag_t ///< blocking. Memory may be freed after all commands using the memory are ///< complete. Actual freeing of memory is specific to user mode driver and ///< kernel mode driver implementation and may be done asynchronously. - ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_* ENUMs + ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_* ENUMs } ze_driver_memory_free_policy_ext_flag_t; @@ -12836,14 +10438,6 @@ typedef struct _ze_memory_free_ext_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -12851,7 +10445,6 @@ typedef struct _ze_memory_free_ext_desc_t /// + `nullptr == ptr` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x3 < pMemFreeDesc->freePolicy` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeMemFreeExt( ze_context_handle_t hContext, ///< [in] handle of the context object @@ -12872,16 +10465,6 @@ zeMemFreeExt( #define ZE_BANDWIDTH_PROPERTIES_EXP_NAME "ZE_experimental_bandwidth_properties" #endif // ZE_BANDWIDTH_PROPERTIES_EXP_NAME -/////////////////////////////////////////////////////////////////////////////// -/// @brief Bandwidth Extension Version(s) -typedef enum _ze_bandwidth_properties_exp_version_t -{ - ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 - ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_* ENUMs - -} ze_bandwidth_properties_exp_version_t; - /////////////////////////////////////////////////////////////////////////////// /// @brief P2P Bandwidth Properties /// @@ -12913,7 +10496,6 @@ typedef struct _ze_device_p2p_bandwidth_exp_properties_t /// - This structure may be passed to /// ::zeDeviceGetCommandQueueGroupProperties by having the pNext member of /// ::ze_command_queue_group_properties_t point at this struct. -/// - [DEPRECATED] typedef struct _ze_copy_bandwidth_exp_properties_t { ze_structure_type_t stype; ///< [in] type of this structure @@ -12944,7 +10526,7 @@ typedef enum _ze_device_luid_ext_version_t { ZE_DEVICE_LUID_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_DEVICE_LUID_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_DEVICE_LUID_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_LUID_EXT_VERSION_* ENUMs + ZE_DEVICE_LUID_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_DEVICE_LUID_EXT_VERSION_* ENUMs } ze_device_luid_ext_version_t; @@ -13002,16 +10584,6 @@ typedef struct _ze_device_luid_ext_properties_t #define ZE_FABRIC_EXP_NAME "ZE_experimental_fabric" #endif // ZE_FABRIC_EXP_NAME -/////////////////////////////////////////////////////////////////////////////// -/// @brief Fabric Topology Discovery Extension Version(s) -typedef enum _ze_fabric_exp_version_t -{ - ZE_FABRIC_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 - ZE_FABRIC_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_FABRIC_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_FABRIC_EXP_VERSION_* ENUMs - -} ze_fabric_exp_version_t; - /////////////////////////////////////////////////////////////////////////////// #ifndef ZE_MAX_FABRIC_EDGE_MODEL_EXP_SIZE /// @brief Maximum fabric edge model string size @@ -13026,7 +10598,7 @@ typedef enum _ze_fabric_vertex_exp_type_t ZE_FABRIC_VERTEX_EXP_TYPE_DEVICE = 1, ///< Fabric vertex represents a device ZE_FABRIC_VERTEX_EXP_TYPE_SUBDEVICE = 2, ///< Fabric vertex represents a subdevice ZE_FABRIC_VERTEX_EXP_TYPE_SWITCH = 3, ///< Fabric vertex represents a switch - ZE_FABRIC_VERTEX_EXP_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_FABRIC_VERTEX_EXP_TYPE_* ENUMs + ZE_FABRIC_VERTEX_EXP_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_FABRIC_VERTEX_EXP_TYPE_* ENUMs } ze_fabric_vertex_exp_type_t; @@ -13039,7 +10611,7 @@ typedef enum _ze_fabric_edge_exp_duplexity_t ///< one direction at time ZE_FABRIC_EDGE_EXP_DUPLEXITY_FULL_DUPLEX = 2, ///< Fabric edge is full duplex, i.e. stated bandwidth is supported in both ///< directions simultaneously - ZE_FABRIC_EDGE_EXP_DUPLEXITY_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_FABRIC_EDGE_EXP_DUPLEXITY_* ENUMs + ZE_FABRIC_EDGE_EXP_DUPLEXITY_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_FABRIC_EDGE_EXP_DUPLEXITY_* ENUMs } ze_fabric_edge_exp_duplexity_t; @@ -13109,14 +10681,6 @@ typedef struct _ze_fabric_edge_exp_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -13142,7 +10706,7 @@ zeFabricVertexGetExp( /// - Multiple calls to this function will return identical fabric vertex /// handles, in the same order. /// - The number of handles returned from this function is affected by the -/// `ZE_AFFINITY_MASK` environment variable. +/// ::ZE_AFFINITY_MASK environment variable. /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. /// @@ -13152,14 +10716,6 @@ zeFabricVertexGetExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hVertex` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -13191,14 +10747,6 @@ zeFabricVertexGetSubVerticesExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hVertex` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -13222,14 +10770,6 @@ zeFabricVertexGetPropertiesExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hVertex` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -13257,14 +10797,6 @@ zeFabricVertexGetDeviceExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -13292,14 +10824,6 @@ zeDeviceGetFabricVertexExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hVertexA` /// + `nullptr == hVertexB` @@ -13335,14 +10859,6 @@ zeFabricEdgeGetExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEdge` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -13368,14 +10884,6 @@ zeFabricEdgeGetVerticesExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEdge` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -13405,7 +10913,7 @@ typedef enum _ze_device_memory_properties_ext_version_t { ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_* ENUMs + ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_* ENUMs } ze_device_memory_properties_ext_version_t; @@ -13435,11 +10943,7 @@ typedef enum _ze_device_memory_ext_type_t ZE_DEVICE_MEMORY_EXT_TYPE_GDDR6 = 19, ///< GDDR6 memory ZE_DEVICE_MEMORY_EXT_TYPE_GDDR6X = 20, ///< GDDR6X memory ZE_DEVICE_MEMORY_EXT_TYPE_GDDR7 = 21, ///< GDDR7 memory - ZE_DEVICE_MEMORY_EXT_TYPE_HBM2E = 22, ///< HBM2E memory - ZE_DEVICE_MEMORY_EXT_TYPE_HBM3 = 23, ///< HBM3 memory - ZE_DEVICE_MEMORY_EXT_TYPE_HBM3E = 24, ///< HBM3E memory - ZE_DEVICE_MEMORY_EXT_TYPE_HBM4 = 25, ///< HBM4 memory - ZE_DEVICE_MEMORY_EXT_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_MEMORY_EXT_TYPE_* ENUMs + ZE_DEVICE_MEMORY_EXT_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_DEVICE_MEMORY_EXT_TYPE_* ENUMs } ze_device_memory_ext_type_t; @@ -13483,7 +10987,7 @@ typedef enum _ze_bfloat16_conversions_ext_version_t { ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_* ENUMs + ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_* ENUMs } ze_bfloat16_conversions_ext_version_t; @@ -13506,7 +11010,7 @@ typedef enum _ze_device_ip_version_version_t { ZE_DEVICE_IP_VERSION_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_DEVICE_IP_VERSION_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_DEVICE_IP_VERSION_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_DEVICE_IP_VERSION_VERSION_* ENUMs + ZE_DEVICE_IP_VERSION_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_DEVICE_IP_VERSION_VERSION_* ENUMs } ze_device_ip_version_version_t; @@ -13546,7 +11050,7 @@ typedef enum _ze_kernel_max_group_size_properties_ext_version_t { ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_* ENUMs + ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_* ENUMs } ze_kernel_max_group_size_properties_ext_version_t; @@ -13591,7 +11095,7 @@ typedef enum _ze_sub_allocations_exp_version_t { ZE_SUB_ALLOCATIONS_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_SUB_ALLOCATIONS_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_SUB_ALLOCATIONS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_SUB_ALLOCATIONS_EXP_VERSION_* ENUMs + ZE_SUB_ALLOCATIONS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_SUB_ALLOCATIONS_EXP_VERSION_* ENUMs } ze_sub_allocations_exp_version_t; @@ -13645,7 +11149,7 @@ typedef enum _ze_event_query_kernel_timestamps_ext_version_t { ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_* ENUMs + ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_* ENUMs } ze_event_query_kernel_timestamps_ext_version_t; @@ -13656,7 +11160,7 @@ typedef enum _ze_event_query_kernel_timestamps_ext_flag_t { ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_KERNEL = ZE_BIT(0), ///< Kernel timestamp results ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_SYNCHRONIZED = ZE_BIT(1), ///< Device event timestamps synchronized to the host time domain - ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_* ENUMs + ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_* ENUMs } ze_event_query_kernel_timestamps_ext_flag_t; @@ -13726,7 +11230,7 @@ typedef struct _ze_event_query_kernel_timestamps_results_ext_properties_t /// - The application may call this function from simultaneous threads. /// - The implementation of this function must be thread-safe. /// - The implementation must support -/// ::ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_NAME extension. +/// ::ZE_extension_event_query_kernel_timestamps. /// - The implementation must return all timestamps for the specified event /// and device pair. /// - The implementation must return all timestamps for all sub-devices when @@ -13740,14 +11244,6 @@ typedef struct _ze_event_query_kernel_timestamps_results_ext_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEvent` /// + `nullptr == hDevice` @@ -13793,7 +11289,7 @@ typedef enum _ze_rtas_builder_exp_version_t { ZE_RTAS_BUILDER_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_RTAS_BUILDER_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_RTAS_BUILDER_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_EXP_VERSION_* ENUMs + ZE_RTAS_BUILDER_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RTAS_BUILDER_EXP_VERSION_* ENUMs } ze_rtas_builder_exp_version_t; @@ -13803,7 +11299,7 @@ typedef uint32_t ze_rtas_device_exp_flags_t; typedef enum _ze_rtas_device_exp_flag_t { ZE_RTAS_DEVICE_EXP_FLAG_RESERVED = ZE_BIT(0), ///< reserved for future use - ZE_RTAS_DEVICE_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_DEVICE_EXP_FLAG_* ENUMs + ZE_RTAS_DEVICE_EXP_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RTAS_DEVICE_EXP_FLAG_* ENUMs } ze_rtas_device_exp_flag_t; @@ -13817,7 +11313,7 @@ typedef enum _ze_rtas_format_exp_t { ZE_RTAS_FORMAT_EXP_INVALID = 0, ///< Invalid acceleration structure format ZE_RTAS_FORMAT_EXP_MAX = 0x7ffffffe, ///< Maximum acceleration structure format code - ZE_RTAS_FORMAT_EXP_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_FORMAT_EXP_* ENUMs + ZE_RTAS_FORMAT_EXP_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RTAS_FORMAT_EXP_* ENUMs } ze_rtas_format_exp_t; @@ -13827,7 +11323,7 @@ typedef uint32_t ze_rtas_builder_exp_flags_t; typedef enum _ze_rtas_builder_exp_flag_t { ZE_RTAS_BUILDER_EXP_FLAG_RESERVED = ZE_BIT(0), ///< Reserved for future use - ZE_RTAS_BUILDER_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_EXP_FLAG_* ENUMs + ZE_RTAS_BUILDER_EXP_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RTAS_BUILDER_EXP_FLAG_* ENUMs } ze_rtas_builder_exp_flag_t; @@ -13837,7 +11333,7 @@ typedef uint32_t ze_rtas_parallel_operation_exp_flags_t; typedef enum _ze_rtas_parallel_operation_exp_flag_t { ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_RESERVED = ZE_BIT(0), ///< Reserved for future use - ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_* ENUMs + ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_* ENUMs } ze_rtas_parallel_operation_exp_flag_t; @@ -13847,7 +11343,7 @@ typedef uint32_t ze_rtas_builder_geometry_exp_flags_t; typedef enum _ze_rtas_builder_geometry_exp_flag_t { ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_NON_OPAQUE = ZE_BIT(0), ///< non-opaque geometries invoke an any-hit shader - ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_* ENUMs + ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_* ENUMs } ze_rtas_builder_geometry_exp_flag_t; @@ -13867,7 +11363,7 @@ typedef enum _ze_rtas_builder_instance_exp_flag_t ///< be non-opaque ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_FORCE_NON_OPAQUE = ZE_BIT(3),///< forces instanced geometry to be non-opaque, unless ray flag forces it ///< to be opaque - ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_* ENUMs + ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_* ENUMs } ze_rtas_builder_instance_exp_flag_t; @@ -13893,7 +11389,7 @@ typedef enum _ze_rtas_builder_build_op_exp_flag_t { ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_COMPACT = ZE_BIT(0), ///< build more compact acceleration structure ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION = ZE_BIT(1), ///< guarantees single any-hit shader invocation per primitive - ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_* ENUMs + ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_* ENUMs } ze_rtas_builder_build_op_exp_flag_t; @@ -13916,7 +11412,7 @@ typedef enum _ze_rtas_builder_build_quality_hint_exp_t ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_LOW = 0, ///< build low-quality acceleration structure (fast) ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_MEDIUM = 1, ///< build medium-quality acceleration structure (slower) ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_HIGH = 2, ///< build high-quality acceleration structure (slow) - ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_* ENUMs + ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_* ENUMs } ze_rtas_builder_build_quality_hint_exp_t; @@ -13928,7 +11424,7 @@ typedef enum _ze_rtas_builder_geometry_type_exp_t ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_QUADS = 1, ///< quad mesh geometry type ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_PROCEDURAL = 2, ///< procedural geometry type ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_INSTANCE = 3, ///< instance geometry type - ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_* ENUMs + ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_* ENUMs } ze_rtas_builder_geometry_type_exp_t; @@ -13957,7 +11453,7 @@ typedef enum _ze_rtas_builder_input_data_format_exp_t ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_TRIANGLE_INDICES_UINT32 = 5, ///< Unsigned 32-bit triangle indices (see ///< ::ze_rtas_triangle_indices_uint32_exp_t) ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_QUAD_INDICES_UINT32 = 6, ///< Unsigned 32-bit quad indices (see ::ze_rtas_quad_indices_uint32_exp_t) - ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_* ENUMs + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_* ENUMs } ze_rtas_builder_input_data_format_exp_t; @@ -14364,7 +11860,8 @@ typedef struct _ze_rtas_builder_build_op_exp_desc_t /// @details /// - The application may call this function from simultaneous threads. /// - The implementation of this function must be thread-safe. -/// - The implementation must support ::ZE_RTAS_BUILDER_EXP_NAME extension. +/// - The implementation must support ::ZE_experimental_rtas_builder +/// extension. /// /// @returns /// - ::ZE_RESULT_SUCCESS @@ -14372,14 +11869,6 @@ typedef struct _ze_rtas_builder_build_op_exp_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -14387,7 +11876,6 @@ typedef struct _ze_rtas_builder_build_op_exp_desc_t /// + `nullptr == phBuilder` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZE_RTAS_BUILDER_EXP_VERSION_CURRENT < pDescriptor->builderVersion` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeRTASBuilderCreateExp( ze_driver_handle_t hDriver, ///< [in] handle of driver object @@ -14408,14 +11896,6 @@ zeRTASBuilderCreateExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hBuilder` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -14425,7 +11905,6 @@ zeRTASBuilderCreateExp( /// + `::ZE_RTAS_FORMAT_EXP_MAX < pBuildOpDescriptor->rtasFormat` /// + `::ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_HIGH < pBuildOpDescriptor->buildQuality` /// + `0x3 < pBuildOpDescriptor->buildFlags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeRTASBuilderGetBuildPropertiesExp( ze_rtas_builder_exp_handle_t hBuilder, ///< [in] handle of builder object @@ -14441,24 +11920,16 @@ zeRTASBuilderGetBuildPropertiesExp( /// - The implementation of this function must be thread-safe. /// /// @returns +/// - ::ZE_RESULT_SUCCESS /// - ::ZE_RESULT_ERROR_UNINITIALIZED /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZE_RTAS_FORMAT_EXP_MAX < rtasFormatA` /// + `::ZE_RTAS_FORMAT_EXP_MAX < rtasFormatB` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_SUCCESS /// + An acceleration structure built with `rtasFormatA` is compatible with devices that report `rtasFormatB`. /// - ::ZE_RESULT_EXP_ERROR_OPERANDS_INCOMPATIBLE @@ -14526,14 +11997,6 @@ zeDriverRTASFormatCompatibilityCheckExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hBuilder` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -14544,7 +12007,6 @@ zeDriverRTASFormatCompatibilityCheckExp( /// + `::ZE_RTAS_FORMAT_EXP_MAX < pBuildOpDescriptor->rtasFormat` /// + `::ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_HIGH < pBuildOpDescriptor->buildQuality` /// + `0x3 < pBuildOpDescriptor->buildFlags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_EXP_RTAS_BUILD_DEFERRED /// + Acceleration structure build completion is deferred to parallel operation join. /// - ::ZE_RESULT_EXP_RTAS_BUILD_RETRY @@ -14584,14 +12046,6 @@ zeRTASBuilderBuildExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hBuilder` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -14607,7 +12061,8 @@ zeRTASBuilderDestroyExp( /// @details /// - The application may call this function from simultaneous threads. /// - The implementation of this function must be thread-safe. -/// - The implementation must support ::ZE_RTAS_BUILDER_EXP_NAME extension. +/// - The implementation must support ::ZE_experimental_rtas_builder +/// extension. /// /// @returns /// - ::ZE_RESULT_SUCCESS @@ -14615,14 +12070,6 @@ zeRTASBuilderDestroyExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -14652,14 +12099,6 @@ zeRTASParallelOperationCreateExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hParallelOperation` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -14683,14 +12122,6 @@ zeRTASParallelOperationGetPropertiesExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hParallelOperation` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -14716,14 +12147,6 @@ zeRTASParallelOperationJoinExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hParallelOperation` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -14734,7 +12157,7 @@ zeRTASParallelOperationDestroyExp( #if !defined(__GNUC__) #pragma endregion #endif -// Intel 'oneAPI' Level-Zero Extension APIs for Counter-based Event Pools. @deprecated since 1.15 +// Intel 'oneAPI' Level-Zero Extension APIs for Counter-based Event Pools #if !defined(__GNUC__) #pragma region counterbasedeventpool #endif @@ -14750,7 +12173,7 @@ typedef enum _ze_event_pool_counter_based_exp_version_t { ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_* ENUMs + ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_* ENUMs } ze_event_pool_counter_based_exp_version_t; @@ -14761,14 +12184,14 @@ typedef enum _ze_event_pool_counter_based_exp_flag_t { ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_IMMEDIATE = ZE_BIT(0), ///< Counter-based event pool is used for immediate command lists (default) ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_NON_IMMEDIATE = ZE_BIT(1), ///< Counter-based event pool is for non-immediate command lists - ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_* ENUMs + ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_* ENUMs } ze_event_pool_counter_based_exp_flag_t; /////////////////////////////////////////////////////////////////////////////// /// @brief Event pool descriptor for counter-based events. This structure may be /// passed to ::zeEventPoolCreate as pNext member of -/// ::ze_event_pool_desc_t. @deprecated since 1.15 +/// ::ze_event_pool_desc_t. typedef struct _ze_event_pool_counter_based_exp_desc_t { ze_structure_type_t stype; ///< [in] type of this structure @@ -14800,7 +12223,7 @@ typedef enum _ze_bindless_image_exp_version_t { ZE_BINDLESS_IMAGE_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_BINDLESS_IMAGE_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_BINDLESS_IMAGE_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_BINDLESS_IMAGE_EXP_VERSION_* ENUMs + ZE_BINDLESS_IMAGE_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_BINDLESS_IMAGE_EXP_VERSION_* ENUMs } ze_bindless_image_exp_version_t; @@ -14814,7 +12237,7 @@ typedef enum _ze_image_bindless_exp_flag_t ZE_IMAGE_BINDLESS_EXP_FLAG_SAMPLED_IMAGE = ZE_BIT(1), ///< Bindless sampled images are created with ::zeImageCreate by combining ///< BINDLESS and SAMPLED_IMAGE. ///< Create sampled image view from bindless unsampled image using SAMPLED_IMAGE. - ZE_IMAGE_BINDLESS_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMAGE_BINDLESS_EXP_FLAG_* ENUMs + ZE_IMAGE_BINDLESS_EXP_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_IMAGE_BINDLESS_EXP_FLAG_* ENUMs } ze_image_bindless_exp_flag_t; @@ -14868,25 +12291,7 @@ typedef struct _ze_device_pitched_alloc_exp_properties_t } ze_device_pitched_alloc_exp_properties_t; /////////////////////////////////////////////////////////////////////////////// -/// @brief Pitch information for 2-dimensional linear pitched allocations -/// -/// @details -/// - This structure may be passed to ::zeDeviceGetImageProperties in -/// conjunction with the ::ze_device_pitched_alloc_exp_properties_t via -/// its pNext member -typedef struct _ze_pitched_alloc_2dimage_linear_pitch_exp_info_t -{ - ze_structure_type_t stype; ///< [in] type of this structure - void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific - ///< structure (i.e. contains stype and pNext). - size_t pitchAlign; ///< [out] Required pitch Aligment in Bytes. - size_t maxSupportedPitch; ///< [out] Maximum allowed pitch in Bytes. - -} ze_pitched_alloc_2dimage_linear_pitch_exp_info_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Retrieves pitch information that can be used to allocate USM memory -/// for a given image. +/// @brief Allocate pitched USM memory for images /// /// @details /// - Retrieves pitch for 2D image given the width, height and size in bytes @@ -14895,7 +12300,7 @@ typedef struct _ze_pitched_alloc_2dimage_linear_pitch_exp_info_t /// - The application may call this function from simultaneous threads /// - The implementation of this function must be thread-safe. /// - The implementation of this function should be lock-free. -/// - The implementation must support ::ZE_BINDLESS_IMAGE_EXP_NAME extension. +/// - The implementation must support ::ZE_experimental_bindless_image extension. /// /// @returns /// - ::ZE_RESULT_SUCCESS @@ -14903,14 +12308,6 @@ typedef struct _ze_pitched_alloc_2dimage_linear_pitch_exp_info_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -14931,7 +12328,7 @@ zeMemGetPitchFor2dImage( /// - The application may call this function from simultaneous threads /// - The implementation of this function must be thread-safe. /// - The implementation of this function should be lock-free. -/// - The implementation must support ::ZE_BINDLESS_IMAGE_EXP_NAME +/// - The implementation must support ::ZE_experimental_bindless_image /// extension. /// /// @returns @@ -14940,14 +12337,6 @@ zeMemGetPitchFor2dImage( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hImage` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -14958,24 +12347,6 @@ zeImageGetDeviceOffsetExp( uint64_t* pDeviceOffset ///< [out] bindless device offset for image ); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Specify user defined pitch for pitched linear image allocations. This -/// structure may be passed to ::zeImageCreate in conjunction with -/// ::ze_image_pitched_exp_desc_t via its pNext member -typedef struct _ze_custom_pitch_exp_desc_t -{ - ze_structure_type_t stype; ///< [in] type of this structure - const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific - ///< structure (i.e. contains stype and pNext). - size_t rowPitch; ///< [in] user programmed aligned pitch for pitched linear image - ///< allocations. This pitch should satisfy the pitchAlign requirement in - ///< ::ze_pitched_alloc_2dimage_linear_pitch_exp_info_t - size_t slicePitch; ///< [in] user programmed slice pitch , must be multiple of rowPitch. For - ///< 2D image arrary or a slice of a 3D image array - this pitch should be - ///< >= rowPitch * image_height . For 1D iamge array >= rowPitch. - -} ze_custom_pitch_exp_desc_t; - #if !defined(__GNUC__) #pragma endregion #endif @@ -14995,7 +12366,7 @@ typedef enum _ze_command_list_clone_exp_version_t { ZE_COMMAND_LIST_CLONE_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_COMMAND_LIST_CLONE_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_COMMAND_LIST_CLONE_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_COMMAND_LIST_CLONE_EXP_VERSION_* ENUMs + ZE_COMMAND_LIST_CLONE_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_COMMAND_LIST_CLONE_EXP_VERSION_* ENUMs } ze_command_list_clone_exp_version_t; @@ -15023,14 +12394,6 @@ typedef enum _ze_command_list_clone_exp_version_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -15060,7 +12423,7 @@ typedef enum _ze_immediate_command_list_append_exp_version_t { ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_* ENUMs + ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_* ENUMs } ze_immediate_command_list_append_exp_version_t; @@ -15082,14 +12445,6 @@ typedef enum _ze_immediate_command_list_append_exp_version_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandListImmediate` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -15130,7 +12485,7 @@ typedef enum _ze_mutable_command_list_exp_version_t ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_1 = ZE_MAKE_VERSION( 1, 1 ), ///< version 1.1 ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 1 ), ///< latest known version - ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_* ENUMs + ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_* ENUMs } ze_mutable_command_list_exp_version_t; @@ -15147,7 +12502,7 @@ typedef enum _ze_mutable_command_exp_flag_t ZE_MUTABLE_COMMAND_EXP_FLAG_WAIT_EVENTS = ZE_BIT(5), ///< command wait events ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_INSTRUCTION = ZE_BIT(6), ///< command kernel ZE_MUTABLE_COMMAND_EXP_FLAG_GRAPH_ARGUMENTS = ZE_BIT(7), ///< graph arguments - ZE_MUTABLE_COMMAND_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MUTABLE_COMMAND_EXP_FLAG_* ENUMs + ZE_MUTABLE_COMMAND_EXP_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_MUTABLE_COMMAND_EXP_FLAG_* ENUMs } ze_mutable_command_exp_flag_t; @@ -15172,7 +12527,7 @@ typedef uint32_t ze_mutable_command_list_exp_flags_t; typedef enum _ze_mutable_command_list_exp_flag_t { ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_RESERVED = ZE_BIT(0), ///< reserved - ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_* ENUMs + ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_* ENUMs } ze_mutable_command_list_exp_flag_t; @@ -15295,14 +12650,6 @@ typedef struct _ze_mutable_graph_argument_exp_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -15310,7 +12657,6 @@ typedef struct _ze_mutable_graph_argument_exp_desc_t /// + `nullptr == pCommandId` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0xff < desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListGetNextCommandIdExp( ze_command_list_handle_t hCommandList, ///< [in] handle of the command list @@ -15337,14 +12683,6 @@ zeCommandListGetNextCommandIdExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -15352,7 +12690,6 @@ zeCommandListGetNextCommandIdExp( /// + `nullptr == pCommandId` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0xff < desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListGetNextCommandIdWithKernelsExp( ze_command_list_handle_t hCommandList, ///< [in] handle of the command list @@ -15383,13 +12720,6 @@ zeCommandListGetNextCommandIdWithKernelsExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -15425,14 +12755,6 @@ zeCommandListUpdateMutableCommandsExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -15469,14 +12791,6 @@ zeCommandListUpdateMutableCommandSignalEventExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_SIZE @@ -15512,14 +12826,6 @@ zeCommandListUpdateMutableCommandWaitEventsExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -18712,4 +16018,4 @@ typedef struct _ze_callbacks_t } // extern "C" #endif -#endif // _ZE_API_H +#endif // _ZE_API_H \ No newline at end of file diff --git a/backends/ze/include/ze_ddi.h b/backends/ze/include/ze_ddi.h index e7a042744..86f433684 100644 --- a/backends/ze/include/ze_ddi.h +++ b/backends/ze/include/ze_ddi.h @@ -1,11 +1,11 @@ /* * - * Copyright (C) 2019-2025 Intel Corporation + * Copyright (C) 2019-2021 Intel Corporation * * SPDX-License-Identifier: MIT * * @file ze_ddi.h - * @version v1.15-r1.13.73 + * @version v1.13-r1.13.1 * */ #ifndef _ZE_DDI_H @@ -389,12 +389,6 @@ typedef ze_result_t (ZE_APICALL *ze_pfnDriverRTASFormatCompatibilityCheckExt_t)( ze_rtas_format_ext_t ); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for zeDriverGetDefaultContext -typedef ze_context_handle_t (ZE_APICALL *ze_pfnDriverGetDefaultContext_t)( - ze_driver_handle_t - ); - /////////////////////////////////////////////////////////////////////////////// /// @brief Table of Driver functions pointers typedef struct _ze_driver_dditable_t @@ -407,7 +401,6 @@ typedef struct _ze_driver_dditable_t ze_pfnDriverGetExtensionFunctionAddress_t pfnGetExtensionFunctionAddress; ze_pfnDriverGetLastErrorDescription_t pfnGetLastErrorDescription; ze_pfnDriverRTASFormatCompatibilityCheckExt_t pfnRTASFormatCompatibilityCheckExt; - ze_pfnDriverGetDefaultContext_t pfnGetDefaultContext; } ze_driver_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -634,19 +627,6 @@ typedef ze_result_t (ZE_APICALL *ze_pfnDeviceGetVectorWidthPropertiesExt_t)( ze_device_vector_width_properties_ext_t* ); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for zeDeviceSynchronize -typedef ze_result_t (ZE_APICALL *ze_pfnDeviceSynchronize_t)( - ze_device_handle_t - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for zeDeviceGetAggregatedCopyOffloadIncrementValue -typedef ze_result_t (ZE_APICALL *ze_pfnDeviceGetAggregatedCopyOffloadIncrementValue_t)( - ze_device_handle_t, - uint32_t* - ); - /////////////////////////////////////////////////////////////////////////////// /// @brief Table of Device functions pointers typedef struct _ze_device_dditable_t @@ -673,8 +653,6 @@ typedef struct _ze_device_dditable_t ze_pfnDeviceImportExternalSemaphoreExt_t pfnImportExternalSemaphoreExt; ze_pfnDeviceReleaseExternalSemaphoreExt_t pfnReleaseExternalSemaphoreExt; ze_pfnDeviceGetVectorWidthPropertiesExt_t pfnGetVectorWidthPropertiesExt; - ze_pfnDeviceSynchronize_t pfnSynchronize; - ze_pfnDeviceGetAggregatedCopyOffloadIncrementValue_t pfnGetAggregatedCopyOffloadIncrementValue; } ze_device_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -1285,32 +1263,6 @@ typedef ze_result_t (ZE_APICALL *ze_pfnCommandListAppendWaitExternalSemaphoreExt ze_event_handle_t* ); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for zeCommandListAppendLaunchKernelWithParameters -typedef ze_result_t (ZE_APICALL *ze_pfnCommandListAppendLaunchKernelWithParameters_t)( - ze_command_list_handle_t, - ze_kernel_handle_t, - const ze_group_count_t*, - const void *, - ze_event_handle_t, - uint32_t, - ze_event_handle_t* - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for zeCommandListAppendLaunchKernelWithArguments -typedef ze_result_t (ZE_APICALL *ze_pfnCommandListAppendLaunchKernelWithArguments_t)( - ze_command_list_handle_t, - ze_kernel_handle_t, - const ze_group_count_t, - const ze_group_size_t, - void **, - const void *, - ze_event_handle_t, - uint32_t, - ze_event_handle_t* - ); - /////////////////////////////////////////////////////////////////////////////// /// @brief Table of CommandList functions pointers typedef struct _ze_command_list_dditable_t @@ -1351,8 +1303,6 @@ typedef struct _ze_command_list_dditable_t ze_pfnCommandListIsImmediate_t pfnIsImmediate; ze_pfnCommandListAppendSignalExternalSemaphoreExt_t pfnAppendSignalExternalSemaphoreExt; ze_pfnCommandListAppendWaitExternalSemaphoreExt_t pfnAppendWaitExternalSemaphoreExt; - ze_pfnCommandListAppendLaunchKernelWithParameters_t pfnAppendLaunchKernelWithParameters; - ze_pfnCommandListAppendLaunchKernelWithArguments_t pfnAppendLaunchKernelWithArguments; } ze_command_list_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -1720,15 +1670,6 @@ typedef ze_result_t (ZE_APICALL *ze_pfnMemGetPitchFor2dImage_t)( size_t * ); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for zeMemGetIpcHandleWithProperties -typedef ze_result_t (ZE_APICALL *ze_pfnMemGetIpcHandleWithProperties_t)( - ze_context_handle_t, - const void*, - void*, - ze_ipc_mem_handle_t* - ); - /////////////////////////////////////////////////////////////////////////////// /// @brief Table of Mem functions pointers typedef struct _ze_mem_dditable_t @@ -1745,7 +1686,6 @@ typedef struct _ze_mem_dditable_t ze_pfnMemFreeExt_t pfnFreeExt; ze_pfnMemPutIpcHandle_t pfnPutIpcHandle; ze_pfnMemGetPitchFor2dImage_t pfnGetPitchFor2dImage; - ze_pfnMemGetIpcHandleWithProperties_t pfnGetIpcHandleWithProperties; } ze_mem_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -2074,44 +2014,6 @@ typedef ze_result_t (ZE_APICALL *ze_pfnEventGetWaitScope_t)( ze_event_scope_flags_t* ); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for zeEventCounterBasedCreate -typedef ze_result_t (ZE_APICALL *ze_pfnEventCounterBasedCreate_t)( - ze_context_handle_t, - ze_device_handle_t, - const ze_event_counter_based_desc_t*, - ze_event_handle_t* - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for zeEventCounterBasedGetIpcHandle -typedef ze_result_t (ZE_APICALL *ze_pfnEventCounterBasedGetIpcHandle_t)( - ze_event_handle_t, - ze_ipc_event_counter_based_handle_t* - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for zeEventCounterBasedOpenIpcHandle -typedef ze_result_t (ZE_APICALL *ze_pfnEventCounterBasedOpenIpcHandle_t)( - ze_context_handle_t, - ze_ipc_event_counter_based_handle_t, - ze_event_handle_t* - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for zeEventCounterBasedCloseIpcHandle -typedef ze_result_t (ZE_APICALL *ze_pfnEventCounterBasedCloseIpcHandle_t)( - ze_event_handle_t - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for zeEventCounterBasedGetDeviceAddress -typedef ze_result_t (ZE_APICALL *ze_pfnEventCounterBasedGetDeviceAddress_t)( - ze_event_handle_t, - uint64_t*, - uint64_t* - ); - /////////////////////////////////////////////////////////////////////////////// /// @brief Table of Event functions pointers typedef struct _ze_event_dditable_t @@ -2127,11 +2029,6 @@ typedef struct _ze_event_dditable_t ze_pfnEventGetEventPool_t pfnGetEventPool; ze_pfnEventGetSignalScope_t pfnGetSignalScope; ze_pfnEventGetWaitScope_t pfnGetWaitScope; - ze_pfnEventCounterBasedCreate_t pfnCounterBasedCreate; - ze_pfnEventCounterBasedGetIpcHandle_t pfnCounterBasedGetIpcHandle; - ze_pfnEventCounterBasedOpenIpcHandle_t pfnCounterBasedOpenIpcHandle; - ze_pfnEventCounterBasedCloseIpcHandle_t pfnCounterBasedCloseIpcHandle; - ze_pfnEventCounterBasedGetDeviceAddress_t pfnCounterBasedGetDeviceAddress; } ze_event_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -2507,14 +2404,6 @@ typedef ze_result_t (ZE_APICALL *ze_pfnKernelGetBinaryExp_t)( uint8_t* ); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for zeKernelGetAllocationPropertiesExp -typedef ze_result_t (ZE_APICALL *ze_pfnKernelGetAllocationPropertiesExp_t)( - ze_kernel_handle_t, - uint32_t*, - ze_kernel_allocation_exp_properties_t* - ); - /////////////////////////////////////////////////////////////////////////////// /// @brief Table of KernelExp functions pointers typedef struct _ze_kernel_exp_dditable_t @@ -2522,7 +2411,6 @@ typedef struct _ze_kernel_exp_dditable_t ze_pfnKernelSetGlobalOffsetExp_t pfnSetGlobalOffsetExp; ze_pfnKernelSchedulingHintExp_t pfnSchedulingHintExp; ze_pfnKernelGetBinaryExp_t pfnGetBinaryExp; - ze_pfnKernelGetAllocationPropertiesExp_t pfnGetAllocationPropertiesExp; } ze_kernel_exp_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -2608,21 +2496,12 @@ typedef ze_result_t (ZE_APICALL *ze_pfnPhysicalMemDestroy_t)( ze_physical_mem_handle_t ); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for zePhysicalMemGetProperties -typedef ze_result_t (ZE_APICALL *ze_pfnPhysicalMemGetProperties_t)( - ze_context_handle_t, - ze_physical_mem_handle_t, - ze_physical_mem_properties_t* - ); - /////////////////////////////////////////////////////////////////////////////// /// @brief Table of PhysicalMem functions pointers typedef struct _ze_physical_mem_dditable_t { ze_pfnPhysicalMemCreate_t pfnCreate; ze_pfnPhysicalMemDestroy_t pfnDestroy; - ze_pfnPhysicalMemGetProperties_t pfnGetProperties; } ze_physical_mem_dditable_t; /////////////////////////////////////////////////////////////////////////////// diff --git a/backends/ze/include/ze_ddi_common.h b/backends/ze/include/ze_ddi_common.h index 6e5c6a0b5..ca6eb50ac 100644 --- a/backends/ze/include/ze_ddi_common.h +++ b/backends/ze/include/ze_ddi_common.h @@ -5,7 +5,7 @@ * SPDX-License-Identifier: MIT * * @file ze_ddi_common.h - * @version v1.15-r1.13.73 + * @version v1.13-r1.13.1 * */ #ifndef _ZE_DDI_COMMON_H @@ -16,7 +16,6 @@ #include "ze_ddi.h" #include "zet_ddi.h" #include "zes_ddi.h" -#include "zer_ddi.h" #if defined(__cplusplus) extern "C" { @@ -28,7 +27,6 @@ typedef struct _ze_handle_t ze_dditable_driver_t *pCore; // [in] pointer to _ze_dditable_t_ object related to this handle zet_dditable_driver_t *pTools; // [in] pointer to _zet_dditable_t_ object related to this handle zes_dditable_driver_t *pSysman; // [in] pointer to _zes_dditable_t_ object related to this handle - zer_dditable_driver_t *pRuntime; // [in] pointer to _zer_dditable_t_ object related to this handle } ze_handle_t; #if defined(__cplusplus) diff --git a/backends/ze/include/ze_ddi_ver.h b/backends/ze/include/ze_ddi_ver.h index 7c9aac53c..90b31dda7 100644 --- a/backends/ze/include/ze_ddi_ver.h +++ b/backends/ze/include/ze_ddi_ver.h @@ -5,7 +5,7 @@ * SPDX-License-Identifier: MIT * * @file ze_ddi.h - * @version v1.15-r1.13.73 + * @version v1.13-r1.13.73 * */ #ifndef _ZE_DDI_VER_H @@ -79,7 +79,7 @@ typedef struct _ze_global_dditable_t_1_1 } ze_global_dditable_t_1_1; /////////////////////////////////////////////////////////////////////////////// -/// [1.0, 1.1, 1.13, 1.14, 1.6] +/// [1.0, 1.1, 1.13, 1.6] /// @brief Table of Driver functions pointers typedef struct _ze_driver_dditable_t_1_0 { @@ -111,18 +111,6 @@ typedef struct _ze_driver_dditable_t_1_13 ze_pfnDriverRTASFormatCompatibilityCheckExt_t pfnRTASFormatCompatibilityCheckExt; } ze_driver_dditable_t_1_13; -typedef struct _ze_driver_dditable_t_1_14 -{ - ze_pfnDriverGet_t pfnGet; - ze_pfnDriverGetApiVersion_t pfnGetApiVersion; - ze_pfnDriverGetProperties_t pfnGetProperties; - ze_pfnDriverGetIpcProperties_t pfnGetIpcProperties; - ze_pfnDriverGetExtensionProperties_t pfnGetExtensionProperties; - ze_pfnDriverGetExtensionFunctionAddress_t pfnGetExtensionFunctionAddress; - ze_pfnDriverRTASFormatCompatibilityCheckExt_t pfnRTASFormatCompatibilityCheckExt; - ze_pfnDriverGetDefaultContext_t pfnGetDefaultContext; -} ze_driver_dditable_t_1_14; - typedef struct _ze_driver_dditable_t_1_6 { ze_pfnDriverGet_t pfnGet; @@ -133,7 +121,6 @@ typedef struct _ze_driver_dditable_t_1_6 ze_pfnDriverGetExtensionFunctionAddress_t pfnGetExtensionFunctionAddress; ze_pfnDriverGetLastErrorDescription_t pfnGetLastErrorDescription; ze_pfnDriverRTASFormatCompatibilityCheckExt_t pfnRTASFormatCompatibilityCheckExt; - ze_pfnDriverGetDefaultContext_t pfnGetDefaultContext; } ze_driver_dditable_t_1_6; /////////////////////////////////////////////////////////////////////////////// @@ -145,7 +132,7 @@ typedef struct _ze_driver_exp_dditable_t_1_7 } ze_driver_exp_dditable_t_1_7; /////////////////////////////////////////////////////////////////////////////// -/// [1.0, 1.1, 1.12, 1.13, 1.14, 1.15, 1.2, 1.3, 1.7] +/// [1.0, 1.1, 1.12, 1.13, 1.2, 1.3, 1.7] /// @brief Table of Device functions pointers typedef struct _ze_device_dditable_t_1_0 { @@ -227,53 +214,6 @@ typedef struct _ze_device_dditable_t_1_13 ze_pfnDeviceGetVectorWidthPropertiesExt_t pfnGetVectorWidthPropertiesExt; } ze_device_dditable_t_1_13; -typedef struct _ze_device_dditable_t_1_14 -{ - ze_pfnDeviceGet_t pfnGet; - ze_pfnDeviceGetSubDevices_t pfnGetSubDevices; - ze_pfnDeviceGetProperties_t pfnGetProperties; - ze_pfnDeviceGetComputeProperties_t pfnGetComputeProperties; - ze_pfnDeviceGetModuleProperties_t pfnGetModuleProperties; - ze_pfnDeviceGetCommandQueueGroupProperties_t pfnGetCommandQueueGroupProperties; - ze_pfnDeviceGetMemoryProperties_t pfnGetMemoryProperties; - ze_pfnDeviceGetMemoryAccessProperties_t pfnGetMemoryAccessProperties; - ze_pfnDeviceGetCacheProperties_t pfnGetCacheProperties; - ze_pfnDeviceGetImageProperties_t pfnGetImageProperties; - ze_pfnDeviceGetExternalMemoryProperties_t pfnGetExternalMemoryProperties; - ze_pfnDeviceGetP2PProperties_t pfnGetP2PProperties; - ze_pfnDeviceCanAccessPeer_t pfnCanAccessPeer; - ze_pfnDeviceGetStatus_t pfnGetStatus; - ze_pfnDeviceGetGlobalTimestamps_t pfnGetGlobalTimestamps; - ze_pfnDeviceImportExternalSemaphoreExt_t pfnImportExternalSemaphoreExt; - ze_pfnDeviceReleaseExternalSemaphoreExt_t pfnReleaseExternalSemaphoreExt; - ze_pfnDeviceGetVectorWidthPropertiesExt_t pfnGetVectorWidthPropertiesExt; - ze_pfnDeviceSynchronize_t pfnSynchronize; -} ze_device_dditable_t_1_14; - -typedef struct _ze_device_dditable_t_1_15 -{ - ze_pfnDeviceGet_t pfnGet; - ze_pfnDeviceGetSubDevices_t pfnGetSubDevices; - ze_pfnDeviceGetProperties_t pfnGetProperties; - ze_pfnDeviceGetComputeProperties_t pfnGetComputeProperties; - ze_pfnDeviceGetModuleProperties_t pfnGetModuleProperties; - ze_pfnDeviceGetCommandQueueGroupProperties_t pfnGetCommandQueueGroupProperties; - ze_pfnDeviceGetMemoryProperties_t pfnGetMemoryProperties; - ze_pfnDeviceGetMemoryAccessProperties_t pfnGetMemoryAccessProperties; - ze_pfnDeviceGetCacheProperties_t pfnGetCacheProperties; - ze_pfnDeviceGetImageProperties_t pfnGetImageProperties; - ze_pfnDeviceGetExternalMemoryProperties_t pfnGetExternalMemoryProperties; - ze_pfnDeviceGetP2PProperties_t pfnGetP2PProperties; - ze_pfnDeviceCanAccessPeer_t pfnCanAccessPeer; - ze_pfnDeviceGetStatus_t pfnGetStatus; - ze_pfnDeviceGetGlobalTimestamps_t pfnGetGlobalTimestamps; - ze_pfnDeviceImportExternalSemaphoreExt_t pfnImportExternalSemaphoreExt; - ze_pfnDeviceReleaseExternalSemaphoreExt_t pfnReleaseExternalSemaphoreExt; - ze_pfnDeviceGetVectorWidthPropertiesExt_t pfnGetVectorWidthPropertiesExt; - ze_pfnDeviceSynchronize_t pfnSynchronize; - ze_pfnDeviceGetAggregatedCopyOffloadIncrementValue_t pfnGetAggregatedCopyOffloadIncrementValue; -} ze_device_dditable_t_1_15; - typedef struct _ze_device_dditable_t_1_2 { ze_pfnDeviceGet_t pfnGet; @@ -296,8 +236,6 @@ typedef struct _ze_device_dditable_t_1_2 ze_pfnDeviceImportExternalSemaphoreExt_t pfnImportExternalSemaphoreExt; ze_pfnDeviceReleaseExternalSemaphoreExt_t pfnReleaseExternalSemaphoreExt; ze_pfnDeviceGetVectorWidthPropertiesExt_t pfnGetVectorWidthPropertiesExt; - ze_pfnDeviceSynchronize_t pfnSynchronize; - ze_pfnDeviceGetAggregatedCopyOffloadIncrementValue_t pfnGetAggregatedCopyOffloadIncrementValue; } ze_device_dditable_t_1_2; typedef struct _ze_device_dditable_t_1_3 @@ -323,8 +261,6 @@ typedef struct _ze_device_dditable_t_1_3 ze_pfnDeviceImportExternalSemaphoreExt_t pfnImportExternalSemaphoreExt; ze_pfnDeviceReleaseExternalSemaphoreExt_t pfnReleaseExternalSemaphoreExt; ze_pfnDeviceGetVectorWidthPropertiesExt_t pfnGetVectorWidthPropertiesExt; - ze_pfnDeviceSynchronize_t pfnSynchronize; - ze_pfnDeviceGetAggregatedCopyOffloadIncrementValue_t pfnGetAggregatedCopyOffloadIncrementValue; } ze_device_dditable_t_1_3; typedef struct _ze_device_dditable_t_1_7 @@ -351,8 +287,6 @@ typedef struct _ze_device_dditable_t_1_7 ze_pfnDeviceImportExternalSemaphoreExt_t pfnImportExternalSemaphoreExt; ze_pfnDeviceReleaseExternalSemaphoreExt_t pfnReleaseExternalSemaphoreExt; ze_pfnDeviceGetVectorWidthPropertiesExt_t pfnGetVectorWidthPropertiesExt; - ze_pfnDeviceSynchronize_t pfnSynchronize; - ze_pfnDeviceGetAggregatedCopyOffloadIncrementValue_t pfnGetAggregatedCopyOffloadIncrementValue; } ze_device_dditable_t_1_7; /////////////////////////////////////////////////////////////////////////////// @@ -413,7 +347,7 @@ typedef struct _ze_command_queue_dditable_t_1_9 } ze_command_queue_dditable_t_1_9; /////////////////////////////////////////////////////////////////////////////// -/// [1.0, 1.12, 1.14, 1.3, 1.6, 1.9] +/// [1.0, 1.12, 1.3, 1.6, 1.9] /// @brief Table of CommandList functions pointers typedef struct _ze_command_list_dditable_t_1_0 { @@ -477,40 +411,6 @@ typedef struct _ze_command_list_dditable_t_1_12 ze_pfnCommandListAppendWaitExternalSemaphoreExt_t pfnAppendWaitExternalSemaphoreExt; } ze_command_list_dditable_t_1_12; -typedef struct _ze_command_list_dditable_t_1_14 -{ - ze_pfnCommandListCreate_t pfnCreate; - ze_pfnCommandListCreateImmediate_t pfnCreateImmediate; - ze_pfnCommandListDestroy_t pfnDestroy; - ze_pfnCommandListClose_t pfnClose; - ze_pfnCommandListReset_t pfnReset; - ze_pfnCommandListAppendWriteGlobalTimestamp_t pfnAppendWriteGlobalTimestamp; - ze_pfnCommandListAppendBarrier_t pfnAppendBarrier; - ze_pfnCommandListAppendMemoryRangesBarrier_t pfnAppendMemoryRangesBarrier; - ze_pfnCommandListAppendMemoryCopy_t pfnAppendMemoryCopy; - ze_pfnCommandListAppendMemoryFill_t pfnAppendMemoryFill; - ze_pfnCommandListAppendMemoryCopyRegion_t pfnAppendMemoryCopyRegion; - ze_pfnCommandListAppendMemoryCopyFromContext_t pfnAppendMemoryCopyFromContext; - ze_pfnCommandListAppendImageCopy_t pfnAppendImageCopy; - ze_pfnCommandListAppendImageCopyRegion_t pfnAppendImageCopyRegion; - ze_pfnCommandListAppendImageCopyToMemory_t pfnAppendImageCopyToMemory; - ze_pfnCommandListAppendImageCopyFromMemory_t pfnAppendImageCopyFromMemory; - ze_pfnCommandListAppendMemoryPrefetch_t pfnAppendMemoryPrefetch; - ze_pfnCommandListAppendMemAdvise_t pfnAppendMemAdvise; - ze_pfnCommandListAppendSignalEvent_t pfnAppendSignalEvent; - ze_pfnCommandListAppendWaitOnEvents_t pfnAppendWaitOnEvents; - ze_pfnCommandListAppendEventReset_t pfnAppendEventReset; - ze_pfnCommandListAppendQueryKernelTimestamps_t pfnAppendQueryKernelTimestamps; - ze_pfnCommandListAppendLaunchKernel_t pfnAppendLaunchKernel; - ze_pfnCommandListAppendLaunchCooperativeKernel_t pfnAppendLaunchCooperativeKernel; - ze_pfnCommandListAppendLaunchKernelIndirect_t pfnAppendLaunchKernelIndirect; - ze_pfnCommandListAppendLaunchMultipleKernelsIndirect_t pfnAppendLaunchMultipleKernelsIndirect; - ze_pfnCommandListAppendSignalExternalSemaphoreExt_t pfnAppendSignalExternalSemaphoreExt; - ze_pfnCommandListAppendWaitExternalSemaphoreExt_t pfnAppendWaitExternalSemaphoreExt; - ze_pfnCommandListAppendLaunchKernelWithParameters_t pfnAppendLaunchKernelWithParameters; - ze_pfnCommandListAppendLaunchKernelWithArguments_t pfnAppendLaunchKernelWithArguments; -} ze_command_list_dditable_t_1_14; - typedef struct _ze_command_list_dditable_t_1_3 { ze_pfnCommandListCreate_t pfnCreate; @@ -543,8 +443,6 @@ typedef struct _ze_command_list_dditable_t_1_3 ze_pfnCommandListAppendImageCopyFromMemoryExt_t pfnAppendImageCopyFromMemoryExt; ze_pfnCommandListAppendSignalExternalSemaphoreExt_t pfnAppendSignalExternalSemaphoreExt; ze_pfnCommandListAppendWaitExternalSemaphoreExt_t pfnAppendWaitExternalSemaphoreExt; - ze_pfnCommandListAppendLaunchKernelWithParameters_t pfnAppendLaunchKernelWithParameters; - ze_pfnCommandListAppendLaunchKernelWithArguments_t pfnAppendLaunchKernelWithArguments; } ze_command_list_dditable_t_1_3; typedef struct _ze_command_list_dditable_t_1_6 @@ -580,8 +478,6 @@ typedef struct _ze_command_list_dditable_t_1_6 ze_pfnCommandListHostSynchronize_t pfnHostSynchronize; ze_pfnCommandListAppendSignalExternalSemaphoreExt_t pfnAppendSignalExternalSemaphoreExt; ze_pfnCommandListAppendWaitExternalSemaphoreExt_t pfnAppendWaitExternalSemaphoreExt; - ze_pfnCommandListAppendLaunchKernelWithParameters_t pfnAppendLaunchKernelWithParameters; - ze_pfnCommandListAppendLaunchKernelWithArguments_t pfnAppendLaunchKernelWithArguments; } ze_command_list_dditable_t_1_6; typedef struct _ze_command_list_dditable_t_1_9 @@ -622,8 +518,6 @@ typedef struct _ze_command_list_dditable_t_1_9 ze_pfnCommandListIsImmediate_t pfnIsImmediate; ze_pfnCommandListAppendSignalExternalSemaphoreExt_t pfnAppendSignalExternalSemaphoreExt; ze_pfnCommandListAppendWaitExternalSemaphoreExt_t pfnAppendWaitExternalSemaphoreExt; - ze_pfnCommandListAppendLaunchKernelWithParameters_t pfnAppendLaunchKernelWithParameters; - ze_pfnCommandListAppendLaunchKernelWithArguments_t pfnAppendLaunchKernelWithArguments; } ze_command_list_dditable_t_1_9; /////////////////////////////////////////////////////////////////////////////// @@ -691,7 +585,7 @@ typedef struct _ze_image_exp_dditable_t_1_9 } ze_image_exp_dditable_t_1_9; /////////////////////////////////////////////////////////////////////////////// -/// [1.0, 1.15, 1.3, 1.6, 1.9] +/// [1.0, 1.3, 1.6, 1.9] /// @brief Table of Mem functions pointers typedef struct _ze_mem_dditable_t_1_0 { @@ -706,20 +600,6 @@ typedef struct _ze_mem_dditable_t_1_0 ze_pfnMemCloseIpcHandle_t pfnCloseIpcHandle; } ze_mem_dditable_t_1_0; -typedef struct _ze_mem_dditable_t_1_15 -{ - ze_pfnMemAllocShared_t pfnAllocShared; - ze_pfnMemAllocDevice_t pfnAllocDevice; - ze_pfnMemAllocHost_t pfnAllocHost; - ze_pfnMemFree_t pfnFree; - ze_pfnMemGetAllocProperties_t pfnGetAllocProperties; - ze_pfnMemGetAddressRange_t pfnGetAddressRange; - ze_pfnMemGetIpcHandle_t pfnGetIpcHandle; - ze_pfnMemOpenIpcHandle_t pfnOpenIpcHandle; - ze_pfnMemCloseIpcHandle_t pfnCloseIpcHandle; - ze_pfnMemGetIpcHandleWithProperties_t pfnGetIpcHandleWithProperties; -} ze_mem_dditable_t_1_15; - typedef struct _ze_mem_dditable_t_1_3 { ze_pfnMemAllocShared_t pfnAllocShared; @@ -732,7 +612,6 @@ typedef struct _ze_mem_dditable_t_1_3 ze_pfnMemOpenIpcHandle_t pfnOpenIpcHandle; ze_pfnMemCloseIpcHandle_t pfnCloseIpcHandle; ze_pfnMemFreeExt_t pfnFreeExt; - ze_pfnMemGetIpcHandleWithProperties_t pfnGetIpcHandleWithProperties; } ze_mem_dditable_t_1_3; typedef struct _ze_mem_dditable_t_1_6 @@ -748,7 +627,6 @@ typedef struct _ze_mem_dditable_t_1_6 ze_pfnMemCloseIpcHandle_t pfnCloseIpcHandle; ze_pfnMemFreeExt_t pfnFreeExt; ze_pfnMemPutIpcHandle_t pfnPutIpcHandle; - ze_pfnMemGetIpcHandleWithProperties_t pfnGetIpcHandleWithProperties; } ze_mem_dditable_t_1_6; typedef struct _ze_mem_dditable_t_1_9 @@ -765,7 +643,6 @@ typedef struct _ze_mem_dditable_t_1_9 ze_pfnMemFreeExt_t pfnFreeExt; ze_pfnMemPutIpcHandle_t pfnPutIpcHandle; ze_pfnMemGetPitchFor2dImage_t pfnGetPitchFor2dImage; - ze_pfnMemGetIpcHandleWithProperties_t pfnGetIpcHandleWithProperties; } ze_mem_dditable_t_1_9; /////////////////////////////////////////////////////////////////////////////// @@ -832,7 +709,7 @@ typedef struct _ze_event_pool_dditable_t_1_9 } ze_event_pool_dditable_t_1_9; /////////////////////////////////////////////////////////////////////////////// -/// [1.0, 1.15, 1.6, 1.9] +/// [1.0, 1.6, 1.9] /// @brief Table of Event functions pointers typedef struct _ze_event_dditable_t_1_0 { @@ -845,22 +722,6 @@ typedef struct _ze_event_dditable_t_1_0 ze_pfnEventQueryKernelTimestamp_t pfnQueryKernelTimestamp; } ze_event_dditable_t_1_0; -typedef struct _ze_event_dditable_t_1_15 -{ - ze_pfnEventCreate_t pfnCreate; - ze_pfnEventDestroy_t pfnDestroy; - ze_pfnEventHostSignal_t pfnHostSignal; - ze_pfnEventHostSynchronize_t pfnHostSynchronize; - ze_pfnEventQueryStatus_t pfnQueryStatus; - ze_pfnEventHostReset_t pfnHostReset; - ze_pfnEventQueryKernelTimestamp_t pfnQueryKernelTimestamp; - ze_pfnEventCounterBasedCreate_t pfnCounterBasedCreate; - ze_pfnEventCounterBasedGetIpcHandle_t pfnCounterBasedGetIpcHandle; - ze_pfnEventCounterBasedOpenIpcHandle_t pfnCounterBasedOpenIpcHandle; - ze_pfnEventCounterBasedCloseIpcHandle_t pfnCounterBasedCloseIpcHandle; - ze_pfnEventCounterBasedGetDeviceAddress_t pfnCounterBasedGetDeviceAddress; -} ze_event_dditable_t_1_15; - typedef struct _ze_event_dditable_t_1_6 { ze_pfnEventCreate_t pfnCreate; @@ -871,11 +732,6 @@ typedef struct _ze_event_dditable_t_1_6 ze_pfnEventHostReset_t pfnHostReset; ze_pfnEventQueryKernelTimestamp_t pfnQueryKernelTimestamp; ze_pfnEventQueryKernelTimestampsExt_t pfnQueryKernelTimestampsExt; - ze_pfnEventCounterBasedCreate_t pfnCounterBasedCreate; - ze_pfnEventCounterBasedGetIpcHandle_t pfnCounterBasedGetIpcHandle; - ze_pfnEventCounterBasedOpenIpcHandle_t pfnCounterBasedOpenIpcHandle; - ze_pfnEventCounterBasedCloseIpcHandle_t pfnCounterBasedCloseIpcHandle; - ze_pfnEventCounterBasedGetDeviceAddress_t pfnCounterBasedGetDeviceAddress; } ze_event_dditable_t_1_6; typedef struct _ze_event_dditable_t_1_9 @@ -891,11 +747,6 @@ typedef struct _ze_event_dditable_t_1_9 ze_pfnEventGetEventPool_t pfnGetEventPool; ze_pfnEventGetSignalScope_t pfnGetSignalScope; ze_pfnEventGetWaitScope_t pfnGetWaitScope; - ze_pfnEventCounterBasedCreate_t pfnCounterBasedCreate; - ze_pfnEventCounterBasedGetIpcHandle_t pfnCounterBasedGetIpcHandle; - ze_pfnEventCounterBasedOpenIpcHandle_t pfnCounterBasedOpenIpcHandle; - ze_pfnEventCounterBasedCloseIpcHandle_t pfnCounterBasedCloseIpcHandle; - ze_pfnEventCounterBasedGetDeviceAddress_t pfnCounterBasedGetDeviceAddress; } ze_event_dditable_t_1_9; /////////////////////////////////////////////////////////////////////////////// @@ -963,7 +814,7 @@ typedef struct _ze_kernel_dditable_t_1_0 } ze_kernel_dditable_t_1_0; /////////////////////////////////////////////////////////////////////////////// -/// [1.1, 1.11, 1.14, 1.2] +/// [1.1, 1.11, 1.2] /// @brief Table of KernelExp functions pointers typedef struct _ze_kernel_exp_dditable_t_1_1 { @@ -976,19 +827,11 @@ typedef struct _ze_kernel_exp_dditable_t_1_11 ze_pfnKernelGetBinaryExp_t pfnGetBinaryExp; } ze_kernel_exp_dditable_t_1_11; -typedef struct _ze_kernel_exp_dditable_t_1_14 -{ - ze_pfnKernelSetGlobalOffsetExp_t pfnSetGlobalOffsetExp; - ze_pfnKernelGetBinaryExp_t pfnGetBinaryExp; - ze_pfnKernelGetAllocationPropertiesExp_t pfnGetAllocationPropertiesExp; -} ze_kernel_exp_dditable_t_1_14; - typedef struct _ze_kernel_exp_dditable_t_1_2 { ze_pfnKernelSetGlobalOffsetExp_t pfnSetGlobalOffsetExp; ze_pfnKernelSchedulingHintExp_t pfnSchedulingHintExp; ze_pfnKernelGetBinaryExp_t pfnGetBinaryExp; - ze_pfnKernelGetAllocationPropertiesExp_t pfnGetAllocationPropertiesExp; } ze_kernel_exp_dditable_t_1_2; /////////////////////////////////////////////////////////////////////////////// @@ -1001,7 +844,7 @@ typedef struct _ze_sampler_dditable_t_1_0 } ze_sampler_dditable_t_1_0; /////////////////////////////////////////////////////////////////////////////// -/// [1.0, 1.15] +/// [1.0] /// @brief Table of PhysicalMem functions pointers typedef struct _ze_physical_mem_dditable_t_1_0 { @@ -1009,13 +852,6 @@ typedef struct _ze_physical_mem_dditable_t_1_0 ze_pfnPhysicalMemDestroy_t pfnDestroy; } ze_physical_mem_dditable_t_1_0; -typedef struct _ze_physical_mem_dditable_t_1_15 -{ - ze_pfnPhysicalMemCreate_t pfnCreate; - ze_pfnPhysicalMemDestroy_t pfnDestroy; - ze_pfnPhysicalMemGetProperties_t pfnGetProperties; -} ze_physical_mem_dditable_t_1_15; - /////////////////////////////////////////////////////////////////////////////// /// [1.0] /// @brief Table of VirtualMem functions pointers diff --git a/backends/ze/include/zer_api.h b/backends/ze/include/zer_api.h deleted file mode 100644 index 9a2536f7e..000000000 --- a/backends/ze/include/zer_api.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - * - * Copyright (C) 2019-2025 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - * @file zer_api.h - * @version v1.15-r1.13.73 - * - */ -#ifndef _ZER_API_H -#define _ZER_API_H -#if defined(__cplusplus) -#pragma once -#endif - -// 'core' API headers -#include "ze_api.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -// Intel 'oneAPI' Level-Zero Runtime API common types -#if !defined(__GNUC__) -#pragma region common -#endif -/////////////////////////////////////////////////////////////////////////////// -/// @brief Immediate Command List default descriptor for GPU devices -static const ze_command_queue_desc_t zeDefaultGPUImmediateCommandQueueDesc = { - ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC, ///< stype - 0, ///< pNext - 0, ///< ordinal - 0, ///< index - ZE_COMMAND_QUEUE_FLAG_IN_ORDER | ZE_COMMAND_QUEUE_FLAG_COPY_OFFLOAD_HINT, ///< flags - ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS, ///< mode - ZE_COMMAND_QUEUE_PRIORITY_NORMAL, ///< priority -}; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Device Unified Shared Memory Allocation default descriptor for GPU -/// devices -static const ze_device_mem_alloc_desc_t zeDefaultGPUDeviceMemAllocDesc = { - ZE_STRUCTURE_TYPE_DEVICE_MEM_ALLOC_DESC, ///< stype - 0, ///< pNext - ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_CACHED, ///< flags - 0, ///< ordinal -}; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Host Unified Shared Memory Allocation default descriptor for GPU -/// devices -static const ze_host_mem_alloc_desc_t zeDefaultGPUHostMemAllocDesc = { - ZE_STRUCTURE_TYPE_HOST_MEM_ALLOC_DESC, ///< stype - 0, ///< pNext - ZE_HOST_MEM_ALLOC_FLAG_BIAS_CACHED | ZE_HOST_MEM_ALLOC_FLAG_BIAS_INITIAL_PLACEMENT, ///< flags -}; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Retrieves a string describing the last error code returned by the -/// default driver in the current thread. -/// -/// @details -/// - String returned is thread local. -/// - String is only updated on calls returning an error, i.e., not on calls -/// returning ::ZE_RESULT_SUCCESS. -/// - String may be empty if driver considers error code is already explicit -/// enough to describe cause. -/// - Memory pointed to by ppString is owned by the default driver. -/// - String returned is null-terminated. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == ppString` -ZE_APIEXPORT ze_result_t ZE_APICALL -zerGetLastErrorDescription( - const char** ppString ///< [in,out] pointer to a null-terminated array of characters describing - ///< cause of error. - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Translates device handle to integer identifier. -/// -/// @details -/// - The implementation of this function should be lock-free. -/// - This function does not return error code, to get info about failure -/// user may use ::zerGetLastErrorDescription function. -/// - In case of failure, this function returns UINT32_MAX. -/// -/// @returns -/// - integer identifier for the device -/// - UINT32_MAX -ZE_APIEXPORT uint32_t ZE_APICALL -zerTranslateDeviceHandleToIdentifier( - ze_device_handle_t hDevice ///< [in] handle of the device - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Translates to integer identifier to a device handle. -/// -/// @details -/// - The driver must be initialized before calling this function. -/// - The implementation of this function should be lock-free. -/// - This function does not return error code, to get info about failure -/// user may use ::zerGetLastErrorDescription function. -/// - In case of failure, this function returns null. -/// - Details on the error can be retrieved using -/// ::zerGetLastErrorDescription function. -/// -/// @returns -/// - handle of the device with the given identifier -/// - nullptr -ZE_APIEXPORT ze_device_handle_t ZE_APICALL -zerTranslateIdentifierToDeviceHandle( - uint32_t identifier ///< [in] integer identifier of the device - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Retrieves handle to default context from the default driver. -/// -/// @details -/// - The driver must be initialized before calling this function. -/// - The implementation of this function should be lock-free. -/// - This returned context contains all the devices available in the -/// default driver. -/// - This function does not return error code, to get info about failure -/// user may use ::zerGetLastErrorDescription function. -/// - In case of failure, this function returns null. -/// - Details on the error can be retrieved using -/// ::zerGetLastErrorDescription function. -/// -/// @returns -/// - handle of the default context -/// - nullptr -ZE_APIEXPORT ze_context_handle_t ZE_APICALL -zerGetDefaultContext( - void - ); - - -#if !defined(__GNUC__) -#pragma endregion -#endif - -#if defined(__cplusplus) -} // extern "C" -#endif - -#endif // _ZER_API_H diff --git a/backends/ze/include/zer_ddi.h b/backends/ze/include/zer_ddi.h deleted file mode 100644 index 6cef429fa..000000000 --- a/backends/ze/include/zer_ddi.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * - * Copyright (C) 2019-2025 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - * @file zer_ddi.h - * @version v1.15-r1.13.73 - * - */ -#ifndef _ZER_DDI_H -#define _ZER_DDI_H -#if defined(__cplusplus) -#pragma once -#endif -#include "zer_api.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for zerGetLastErrorDescription -typedef ze_result_t (ZE_APICALL *zer_pfnGetLastErrorDescription_t)( - const char** - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for zerTranslateDeviceHandleToIdentifier -typedef uint32_t (ZE_APICALL *zer_pfnTranslateDeviceHandleToIdentifier_t)( - ze_device_handle_t - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for zerTranslateIdentifierToDeviceHandle -typedef ze_device_handle_t (ZE_APICALL *zer_pfnTranslateIdentifierToDeviceHandle_t)( - uint32_t - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for zerGetDefaultContext -typedef ze_context_handle_t (ZE_APICALL *zer_pfnGetDefaultContext_t)( - void - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Table of Global functions pointers -typedef struct _zer_global_dditable_t -{ - zer_pfnGetLastErrorDescription_t pfnGetLastErrorDescription; - zer_pfnTranslateDeviceHandleToIdentifier_t pfnTranslateDeviceHandleToIdentifier; - zer_pfnTranslateIdentifierToDeviceHandle_t pfnTranslateIdentifierToDeviceHandle; - zer_pfnGetDefaultContext_t pfnGetDefaultContext; -} zer_global_dditable_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Exported function for filling application's Global table -/// with current process' addresses -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION -ZE_DLLEXPORT ze_result_t ZE_APICALL -zerGetGlobalProcAddrTable( - ze_api_version_t version, ///< [in] API version requested - zer_global_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for zerGetGlobalProcAddrTable -typedef ze_result_t (ZE_APICALL *zer_pfnGetGlobalProcAddrTable_t)( - ze_api_version_t, - zer_global_dditable_t* - ); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Container for all DDI tables -typedef struct _zer_dditable_t -{ - zer_global_dditable_t Global; -} zer_dditable_t; -/// @brief Container for all DDI tables with version and tables set by the Driver -typedef struct _zer_dditable_driver_t -{ - ze_api_version_t version; - uint8_t isValidFlag; - zer_global_dditable_t * Global; -} zer_dditable_driver_t; - -#if defined(__cplusplus) -} // extern "C" -#endif - -#endif // _ZER_DDI_H \ No newline at end of file diff --git a/backends/ze/include/zer_ddi_ver.h b/backends/ze/include/zer_ddi_ver.h index 151847735..a348e00b4 100644 --- a/backends/ze/include/zer_ddi_ver.h +++ b/backends/ze/include/zer_ddi_ver.h @@ -5,7 +5,7 @@ * SPDX-License-Identifier: MIT * * @file zer_ddi.h - * @version v1.15-r1.13.73 + * @version v1.13-r1.13.73 * */ #ifndef _ZER_DDI_VER_H @@ -19,17 +19,6 @@ extern "C" { #endif -/////////////////////////////////////////////////////////////////////////////// -/// [1.14] -/// @brief Table of Global functions pointers -typedef struct _zer_global_dditable_t_1_14 -{ - zer_pfnGetLastErrorDescription_t pfnGetLastErrorDescription; - zer_pfnTranslateDeviceHandleToIdentifier_t pfnTranslateDeviceHandleToIdentifier; - zer_pfnTranslateIdentifierToDeviceHandle_t pfnTranslateIdentifierToDeviceHandle; - zer_pfnGetDefaultContext_t pfnGetDefaultContext; -} zer_global_dditable_t_1_14; - #if defined(__cplusplus) } // extern "C" diff --git a/backends/ze/include/zes_api.h b/backends/ze/include/zes_api.h index 9b058a3bd..82f706e07 100644 --- a/backends/ze/include/zes_api.h +++ b/backends/ze/include/zes_api.h @@ -1,11 +1,11 @@ /* * - * Copyright (C) 2019-2025 Intel Corporation + * Copyright (C) 2019-2021 Intel Corporation * * SPDX-License-Identifier: MIT * * @file zes_api.h - * @version v1.15-r1.13.73 + * @version v1.13-r1.13.1 * */ #ifndef _ZES_API_H @@ -163,9 +163,7 @@ typedef enum _zes_structure_type_t ZES_STRUCTURE_TYPE_VF_UTIL_ENGINE_EXP2 = 0x00020010, ///< ::zes_vf_util_engine_exp2_t ZES_STRUCTURE_TYPE_VF_EXP2_CAPABILITIES = 0x00020011, ///< ::zes_vf_exp2_capabilities_t ZES_STRUCTURE_TYPE_DEVICE_ECC_DEFAULT_PROPERTIES_EXT = 0x00020012, ///< ::zes_device_ecc_default_properties_ext_t - ZES_STRUCTURE_TYPE_PCI_LINK_SPEED_DOWNGRADE_EXT_STATE = 0x00020013, ///< ::zes_pci_link_speed_downgrade_ext_state_t - ZES_STRUCTURE_TYPE_PCI_LINK_SPEED_DOWNGRADE_EXT_PROPERTIES = 0x00020014,///< ::zes_pci_link_speed_downgrade_ext_properties_t - ZES_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_STRUCTURE_TYPE_* ENUMs + ZES_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_STRUCTURE_TYPE_* ENUMs } zes_structure_type_t; @@ -515,14 +513,6 @@ typedef struct _zes_temp_config_t zes_temp_config_t; /// @brief Forward-declare zes_device_ecc_default_properties_ext_t typedef struct _zes_device_ecc_default_properties_ext_t zes_device_ecc_default_properties_ext_t; -/////////////////////////////////////////////////////////////////////////////// -/// @brief Forward-declare zes_pci_link_speed_downgrade_ext_state_t -typedef struct _zes_pci_link_speed_downgrade_ext_state_t zes_pci_link_speed_downgrade_ext_state_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Forward-declare zes_pci_link_speed_downgrade_ext_properties_t -typedef struct _zes_pci_link_speed_downgrade_ext_properties_t zes_pci_link_speed_downgrade_ext_properties_t; - /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare zes_power_limit_ext_desc_t typedef struct _zes_power_limit_ext_desc_t zes_power_limit_ext_desc_t; @@ -597,7 +587,7 @@ typedef uint32_t zes_init_flags_t; typedef enum _zes_init_flag_t { ZES_INIT_FLAG_PLACEHOLDER = ZE_BIT(0), ///< placeholder for future use - ZES_INIT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_INIT_FLAG_* ENUMs + ZES_INIT_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_INIT_FLAG_* ENUMs } zes_init_flag_t; @@ -606,7 +596,7 @@ typedef enum _zes_init_flag_t /// /// @details /// - The application must call this function or ::zeInit with the -/// `ZES_ENABLE_SYSMAN` environment variable set before calling any other +/// ::ZES_ENABLE_SYSMAN environment variable set before calling any other /// sysman function. /// - If this function is not called then all other sysman functions will /// return ::ZE_RESULT_ERROR_UNINITIALIZED. @@ -625,18 +615,10 @@ typedef enum _zes_init_flag_t /// - ::ZE_RESULT_SUCCESS /// - ::ZE_RESULT_ERROR_UNINITIALIZED /// - ::ZE_RESULT_ERROR_DEVICE_LOST +/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x1 < flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY ZE_APIEXPORT ze_result_t ZE_APICALL zesInit( @@ -662,14 +644,6 @@ zesInit( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pCount` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -713,14 +687,6 @@ typedef struct _zes_driver_extension_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -754,14 +720,6 @@ zesDriverGetExtensionProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -788,8 +746,8 @@ zesDriverGetExtensionFunctionAddress( /// - Multiple calls to this function will return identical sysman device /// handles, in the same order. /// - The number and order of handles returned from this function is NOT -/// affected by the `ZE_AFFINITY_MASK`, `ZE_ENABLE_PCI_ID_DEVICE_ORDER`, -/// or `ZE_FLAT_DEVICE_HIERARCHY` environment variables. +/// affected by the ::ZE_AFFINITY_MASK, ::ZE_ENABLE_PCI_ID_DEVICE_ORDER, +/// or ::ZE_FLAT_DEVICE_HIERARCHY environment variables. /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. /// @@ -799,14 +757,6 @@ zesDriverGetExtensionFunctionAddress( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -848,7 +798,7 @@ typedef enum _zes_engine_type_flag_t ZES_ENGINE_TYPE_FLAG_MEDIA = ZE_BIT(3), ///< Engines that process media workloads. ZES_ENGINE_TYPE_FLAG_DMA = ZE_BIT(4), ///< Engines that copy blocks of data. ZES_ENGINE_TYPE_FLAG_RENDER = ZE_BIT(5), ///< Engines that can process both 3D content and compute kernels. - ZES_ENGINE_TYPE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_ENGINE_TYPE_FLAG_* ENUMs + ZES_ENGINE_TYPE_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_ENGINE_TYPE_FLAG_* ENUMs } zes_engine_type_flag_t; @@ -859,7 +809,7 @@ typedef enum _zes_repair_status_t ZES_REPAIR_STATUS_UNSUPPORTED = 0, ///< The device does not support in-field repairs. ZES_REPAIR_STATUS_NOT_PERFORMED = 1, ///< The device has never been repaired. ZES_REPAIR_STATUS_PERFORMED = 2, ///< The device has been repaired. - ZES_REPAIR_STATUS_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_REPAIR_STATUS_* ENUMs + ZES_REPAIR_STATUS_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_REPAIR_STATUS_* ENUMs } zes_repair_status_t; @@ -871,7 +821,7 @@ typedef enum _zes_reset_reason_flag_t ZES_RESET_REASON_FLAG_WEDGED = ZE_BIT(0), ///< The device needs to be reset because one or more parts of the hardware ///< is wedged ZES_RESET_REASON_FLAG_REPAIR = ZE_BIT(1), ///< The device needs to be reset in order to complete in-field repairs - ZES_RESET_REASON_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_RESET_REASON_FLAG_* ENUMs + ZES_RESET_REASON_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_RESET_REASON_FLAG_* ENUMs } zes_reset_reason_flag_t; @@ -882,7 +832,7 @@ typedef enum _zes_reset_type_t ZES_RESET_TYPE_WARM = 0, ///< Apply warm reset ZES_RESET_TYPE_COLD = 1, ///< Apply cold reset ZES_RESET_TYPE_FLR = 2, ///< Apply FLR reset - ZES_RESET_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_RESET_TYPE_* ENUMs + ZES_RESET_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_RESET_TYPE_* ENUMs } zes_reset_type_t; @@ -929,7 +879,7 @@ typedef enum _zes_device_type_t ZES_DEVICE_TYPE_FPGA = 3, ///< Field Programmable Gate Array ZES_DEVICE_TYPE_MCA = 4, ///< Memory Copy Accelerator ZES_DEVICE_TYPE_VPU = 5, ///< Vision Processing Unit - ZES_DEVICE_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_DEVICE_TYPE_* ENUMs + ZES_DEVICE_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_DEVICE_TYPE_* ENUMs } zes_device_type_t; @@ -942,7 +892,7 @@ typedef enum _zes_device_property_flag_t ZES_DEVICE_PROPERTY_FLAG_SUBDEVICE = ZE_BIT(1), ///< Device handle used for query represents a sub-device. ZES_DEVICE_PROPERTY_FLAG_ECC = ZE_BIT(2), ///< Device supports error correction memory access. ZES_DEVICE_PROPERTY_FLAG_ONDEMANDPAGING = ZE_BIT(3), ///< Device supports on-demand page-faulting. - ZES_DEVICE_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_DEVICE_PROPERTY_FLAG_* ENUMs + ZES_DEVICE_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_DEVICE_PROPERTY_FLAG_* ENUMs } zes_device_property_flag_t; @@ -1007,14 +957,6 @@ typedef struct _zes_device_ext_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1039,14 +981,6 @@ zesDeviceGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1077,12 +1011,6 @@ zesDeviceGetState( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS @@ -1118,12 +1046,6 @@ zesDeviceReset( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1181,14 +1103,6 @@ typedef struct _zes_process_state_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1262,7 +1176,7 @@ typedef enum _zes_pci_link_status_t ZES_PCI_LINK_STATUS_QUALITY_ISSUES = 2, ///< The link is up but has quality and/or bandwidth degradation ZES_PCI_LINK_STATUS_STABILITY_ISSUES = 3, ///< The link has stability issues and preventing workloads making forward ///< progress - ZES_PCI_LINK_STATUS_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_PCI_LINK_STATUS_* ENUMs + ZES_PCI_LINK_STATUS_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_PCI_LINK_STATUS_* ENUMs } zes_pci_link_status_t; @@ -1273,7 +1187,7 @@ typedef enum _zes_pci_link_qual_issue_flag_t { ZES_PCI_LINK_QUAL_ISSUE_FLAG_REPLAYS = ZE_BIT(0), ///< A significant number of replays are occurring ZES_PCI_LINK_QUAL_ISSUE_FLAG_SPEED = ZE_BIT(1), ///< There is a degradation in the maximum bandwidth of the link - ZES_PCI_LINK_QUAL_ISSUE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_PCI_LINK_QUAL_ISSUE_FLAG_* ENUMs + ZES_PCI_LINK_QUAL_ISSUE_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_PCI_LINK_QUAL_ISSUE_FLAG_* ENUMs } zes_pci_link_qual_issue_flag_t; @@ -1283,7 +1197,7 @@ typedef uint32_t zes_pci_link_stab_issue_flags_t; typedef enum _zes_pci_link_stab_issue_flag_t { ZES_PCI_LINK_STAB_ISSUE_FLAG_RETRAINING = ZE_BIT(0), ///< Link retraining has occurred to deal with quality issues - ZES_PCI_LINK_STAB_ISSUE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_PCI_LINK_STAB_ISSUE_FLAG_* ENUMs + ZES_PCI_LINK_STAB_ISSUE_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_PCI_LINK_STAB_ISSUE_FLAG_* ENUMs } zes_pci_link_stab_issue_flag_t; @@ -1316,7 +1230,7 @@ typedef enum _zes_pci_bar_type_t ZES_PCI_BAR_TYPE_MMIO = 0, ///< MMIO registers ZES_PCI_BAR_TYPE_ROM = 1, ///< ROM aperture ZES_PCI_BAR_TYPE_MEM = 2, ///< Device memory - ZES_PCI_BAR_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_PCI_BAR_TYPE_* ENUMs + ZES_PCI_BAR_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_PCI_BAR_TYPE_* ENUMs } zes_pci_bar_type_t; @@ -1400,14 +1314,6 @@ typedef struct _zes_pci_stats_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1431,14 +1337,6 @@ zesDevicePciGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1462,14 +1360,6 @@ zesDevicePciGetState( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1501,13 +1391,6 @@ zesDevicePciGetBars( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1540,7 +1423,7 @@ typedef enum _zes_overclock_domain_t ZES_OVERCLOCK_DOMAIN_GPU_MEDIA = 64, ///< Overclocking a GPU with media assets on its own PLL/VR. ZES_OVERCLOCK_DOMAIN_VRAM = 128, ///< Overclocking device local memory. ZES_OVERCLOCK_DOMAIN_ADM = 256, ///< Overclocking LLC/L4 cache. - ZES_OVERCLOCK_DOMAIN_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_OVERCLOCK_DOMAIN_* ENUMs + ZES_OVERCLOCK_DOMAIN_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_OVERCLOCK_DOMAIN_* ENUMs } zes_overclock_domain_t; @@ -1563,7 +1446,7 @@ typedef enum _zes_overclock_control_t ZES_OVERCLOCK_CONTROL_TEMP_LIMIT = 512, ///< This control changes the value of TjMax. ZES_OVERCLOCK_CONTROL_ITD_DISABLE = 1024, ///< This control permits disabling the adaptive voltage feature ITD ZES_OVERCLOCK_CONTROL_ACM_DISABLE = 2048, ///< This control permits disabling the adaptive voltage feature ACM. - ZES_OVERCLOCK_CONTROL_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_OVERCLOCK_CONTROL_* ENUMs + ZES_OVERCLOCK_CONTROL_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_OVERCLOCK_CONTROL_* ENUMs } zes_overclock_control_t; @@ -1577,7 +1460,7 @@ typedef enum _zes_overclock_mode_t ZES_OVERCLOCK_MODE_MODE_UNAVAILABLE = 4, ///< Overclocking is unavailable at this time since the system is running ///< on battery. ZES_OVERCLOCK_MODE_MODE_DISABLED = 5, ///< Overclock mode is disabled. - ZES_OVERCLOCK_MODE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_OVERCLOCK_MODE_* ENUMs + ZES_OVERCLOCK_MODE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_OVERCLOCK_MODE_* ENUMs } zes_overclock_mode_t; @@ -1590,7 +1473,7 @@ typedef enum _zes_control_state_t ZES_CONTROL_STATE_STATE_ACTIVE = 2, ///< The overclock control has been set and it is active. ZES_CONTROL_STATE_STATE_DISABLED = 3, ///< The overclock control value has been disabled due to the current power ///< configuration (typically when running on DC). - ZES_CONTROL_STATE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_CONTROL_STATE_* ENUMs + ZES_CONTROL_STATE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_CONTROL_STATE_* ENUMs } zes_control_state_t; @@ -1603,7 +1486,7 @@ typedef enum _zes_pending_action_t ZES_PENDING_ACTION_PENDING_COLD_RESET = 2, ///< The requested change requires a device cold reset (hotplug, system ///< boot). ZES_PENDING_ACTION_PENDING_WARM_RESET = 3, ///< The requested change requires a device warm reset (PCIe FLR). - ZES_PENDING_ACTION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_PENDING_ACTION_* ENUMs + ZES_PENDING_ACTION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_PENDING_ACTION_* ENUMs } zes_pending_action_t; @@ -1618,7 +1501,7 @@ typedef enum _zes_vf_program_type_t ///< the frequency of those points cannot be changed ZES_VF_PROGRAM_TYPE_VF_VOLT_FIXED = 2, ///< Can only program the frequency for the V-F points that is reads back - ///< the voltage of each point cannot be changed. - ZES_VF_PROGRAM_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_VF_PROGRAM_TYPE_* ENUMs + ZES_VF_PROGRAM_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_VF_PROGRAM_TYPE_* ENUMs } zes_vf_program_type_t; @@ -1628,7 +1511,7 @@ typedef enum _zes_vf_type_t { ZES_VF_TYPE_VOLT = 0, ///< VF Voltage point ZES_VF_TYPE_FREQ = 1, ///< VF Frequency point - ZES_VF_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_VF_TYPE_* ENUMs + ZES_VF_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_VF_TYPE_* ENUMs } zes_vf_type_t; @@ -1639,7 +1522,7 @@ typedef enum _zes_vf_array_type_t ZES_VF_ARRAY_TYPE_USER_VF_ARRAY = 0, ///< User V-F array ZES_VF_ARRAY_TYPE_DEFAULT_VF_ARRAY = 1, ///< Default V-F array ZES_VF_ARRAY_TYPE_LIVE_VF_ARRAY = 2, ///< Live V-F array - ZES_VF_ARRAY_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_VF_ARRAY_TYPE_* ENUMs + ZES_VF_ARRAY_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_VF_ARRAY_TYPE_* ENUMs } zes_vf_array_type_t; @@ -1722,13 +1605,6 @@ typedef struct _zes_vf_property_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -1751,13 +1627,6 @@ zesDeviceSetOverclockWaiver( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1786,18 +1655,10 @@ zesDeviceGetOverclockDomains( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_OVERCLOCK_DOMAIN_ADM < domainType` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pAvailableControls` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -1825,13 +1686,6 @@ zesDeviceGetOverclockControls( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -1856,13 +1710,6 @@ zesDeviceResetOverclockSettings( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1897,14 +1744,6 @@ zesDeviceReadOverclockState( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1938,13 +1777,6 @@ zesDeviceEnumOverclockDomains( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDomainHandle` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1970,13 +1802,6 @@ zesOverclockGetDomainProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDomainHandle` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2002,18 +1827,10 @@ zesOverclockGetDomainVFProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDomainHandle` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pControlProperties` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -2038,18 +1855,10 @@ zesOverclockGetDomainControlProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDomainHandle` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pValue` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -2074,18 +1883,10 @@ zesOverclockGetControlCurrentValue( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDomainHandle` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pValue` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -2111,18 +1912,10 @@ zesOverclockGetControlPendingValue( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDomainHandle` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pPendingAction` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -2149,18 +1942,10 @@ zesOverclockSetControlUserValue( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDomainHandle` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pControlState` /// + `nullptr == pPendingAction` @@ -2188,19 +1973,11 @@ zesOverclockGetControlState( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDomainHandle` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_VF_TYPE_FREQ < VFType` /// + `::ZES_VF_ARRAY_TYPE_LIVE_VF_ARRAY < VFArrayType` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == PointValue` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -2228,18 +2005,10 @@ zesOverclockGetVFPointValues( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDomainHandle` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_VF_TYPE_FREQ < VFType` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE /// + Overclocking is not supported on this control domain ZE_APIEXPORT ze_result_t ZE_APICALL @@ -2267,7 +2036,7 @@ typedef enum _zes_diag_result_t ZES_DIAG_RESULT_FAIL_CANT_REPAIR = 2, ///< Diagnostic had problems setting up repairs ZES_DIAG_RESULT_REBOOT_FOR_REPAIR = 3, ///< Diagnostics found errors, setup for repair and reboot is required to ///< complete the process - ZES_DIAG_RESULT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_DIAG_RESULT_* ENUMs + ZES_DIAG_RESULT_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_DIAG_RESULT_* ENUMs } zes_diag_result_t; @@ -2322,14 +2091,6 @@ typedef struct _zes_diag_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2363,14 +2124,6 @@ zesDeviceEnumDiagnosticTestSuites( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDiagnostics` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2399,14 +2152,6 @@ zesDiagnosticsGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDiagnostics` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2447,13 +2192,6 @@ zesDiagnosticsGetTests( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDiagnostics` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2484,7 +2222,7 @@ typedef enum _zes_device_ecc_state_t ZES_DEVICE_ECC_STATE_UNAVAILABLE = 0, ///< None ZES_DEVICE_ECC_STATE_ENABLED = 1, ///< ECC enabled. ZES_DEVICE_ECC_STATE_DISABLED = 2, ///< ECC disabled. - ZES_DEVICE_ECC_STATE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_DEVICE_ECC_STATE_* ENUMs + ZES_DEVICE_ECC_STATE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_DEVICE_ECC_STATE_* ENUMs } zes_device_ecc_state_t; @@ -2496,7 +2234,7 @@ typedef enum _zes_device_action_t ZES_DEVICE_ACTION_WARM_CARD_RESET = 1, ///< Warm reset of the card. ZES_DEVICE_ACTION_COLD_CARD_RESET = 2, ///< Cold reset of the card. ZES_DEVICE_ACTION_COLD_SYSTEM_REBOOT = 3, ///< Cold reboot of the system. - ZES_DEVICE_ACTION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_DEVICE_ACTION_* ENUMs + ZES_DEVICE_ACTION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_DEVICE_ACTION_* ENUMs } zes_device_action_t; @@ -2537,14 +2275,6 @@ typedef struct _zes_device_ecc_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2568,14 +2298,6 @@ zesDeviceEccAvailable( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2599,14 +2321,6 @@ zesDeviceEccConfigurable( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2632,14 +2346,6 @@ zesDeviceGetEccState( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2647,7 +2353,6 @@ zesDeviceGetEccState( /// + `nullptr == pState` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_DEVICE_ECC_STATE_DISABLED < newState->state` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_WARNING_ACTION_REQUIRED /// + User must look at the pendingAction attribute of pState & perform the action required to complete the ECC state change. ZE_APIEXPORT ze_result_t ZE_APICALL @@ -2706,7 +2411,7 @@ typedef enum _zes_engine_group_t ///< engines so activity of such an engine may not be indicative of the ///< underlying resource utilization - use ::ZES_ENGINE_GROUP_MEDIA_ALL for ///< that. - ZES_ENGINE_GROUP_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_ENGINE_GROUP_* ENUMs + ZES_ENGINE_GROUP_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_ENGINE_GROUP_* ENUMs } zes_engine_group_t; @@ -2765,14 +2470,6 @@ typedef struct _zes_engine_stats_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2806,14 +2503,6 @@ zesDeviceEnumEngineGroups( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEngine` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2839,14 +2528,6 @@ zesEngineGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEngine` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2898,7 +2579,7 @@ typedef enum _zes_event_type_flag_t ZES_EVENT_TYPE_FLAG_DEVICE_RESET_REQUIRED = ZE_BIT(14), ///< Event is triggered when the device needs to be reset (use ///< ::zesDeviceGetState() to determine the reasons for the reset). ZES_EVENT_TYPE_FLAG_SURVIVABILITY_MODE_DETECTED = ZE_BIT(15), ///< Event is triggered when graphics driver encounter an error condition. - ZES_EVENT_TYPE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_EVENT_TYPE_FLAG_* ENUMs + ZES_EVENT_TYPE_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_EVENT_TYPE_FLAG_* ENUMs } zes_event_type_flag_t; @@ -2915,19 +2596,10 @@ typedef enum _zes_event_type_flag_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0xffff < events` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zesDeviceEventRegister( zes_device_handle_t hDevice, ///< [in] The device handle. @@ -2947,12 +2619,6 @@ zesDeviceEventRegister( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2998,12 +2664,6 @@ zesDriverEventListen( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3066,7 +2726,7 @@ typedef enum _zes_fabric_port_status_t ZES_FABRIC_PORT_STATUS_FAILED = 3, ///< Port connection instabilities are preventing workloads making forward ///< progress ZES_FABRIC_PORT_STATUS_DISABLED = 4, ///< The port is configured down - ZES_FABRIC_PORT_STATUS_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_FABRIC_PORT_STATUS_* ENUMs + ZES_FABRIC_PORT_STATUS_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_FABRIC_PORT_STATUS_* ENUMs } zes_fabric_port_status_t; @@ -3077,7 +2737,7 @@ typedef enum _zes_fabric_port_qual_issue_flag_t { ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_LINK_ERRORS = ZE_BIT(0), ///< Excessive link errors are occurring ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_SPEED = ZE_BIT(1), ///< There is a degradation in the bitrate and/or width of the link - ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_* ENUMs + ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_* ENUMs } zes_fabric_port_qual_issue_flag_t; @@ -3097,7 +2757,7 @@ typedef enum _zes_fabric_port_failure_flag_t ///< period of time. Driver will allow port to continue to train, but will ///< not enable the port for use until the port has been disabled and ///< subsequently re-enabled using ::zesFabricPortSetConfig(). - ZES_FABRIC_PORT_FAILURE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_FABRIC_PORT_FAILURE_FLAG_* ENUMs + ZES_FABRIC_PORT_FAILURE_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_FABRIC_PORT_FAILURE_FLAG_* ENUMs } zes_fabric_port_failure_flag_t; @@ -3247,14 +2907,6 @@ typedef struct _zes_fabric_port_error_counters_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3288,14 +2940,6 @@ zesDeviceEnumFabricPorts( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPort` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3319,14 +2963,6 @@ zesFabricPortGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPort` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3351,14 +2987,6 @@ zesFabricPortGetLinkType( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPort` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3382,13 +3010,6 @@ zesFabricPortGetConfig( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPort` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3415,14 +3036,6 @@ zesFabricPortSetConfig( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPort` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3446,13 +3059,6 @@ zesFabricPortGetState( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPort` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3481,13 +3087,6 @@ zesFabricPortGetThroughput( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPort` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3513,14 +3112,6 @@ zesFabricPortGetFabricErrorCounters( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3551,7 +3142,7 @@ typedef enum _zes_fan_speed_mode_t ZES_FAN_SPEED_MODE_FIXED = 1, ///< The fan speed is currently set to a fixed value ZES_FAN_SPEED_MODE_TABLE = 2, ///< The fan speed is currently controlled dynamically by hardware based on ///< a temp/speed table - ZES_FAN_SPEED_MODE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_FAN_SPEED_MODE_* ENUMs + ZES_FAN_SPEED_MODE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_FAN_SPEED_MODE_* ENUMs } zes_fan_speed_mode_t; @@ -3561,7 +3152,7 @@ typedef enum _zes_fan_speed_units_t { ZES_FAN_SPEED_UNITS_RPM = 0, ///< The fan speed is in units of revolutions per minute (rpm) ZES_FAN_SPEED_UNITS_PERCENT = 1, ///< The fan speed is a percentage of the maximum speed of the fan - ZES_FAN_SPEED_UNITS_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_FAN_SPEED_UNITS_* ENUMs + ZES_FAN_SPEED_UNITS_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_FAN_SPEED_UNITS_* ENUMs } zes_fan_speed_units_t; @@ -3653,14 +3244,6 @@ typedef struct _zes_fan_config_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3694,14 +3277,6 @@ zesDeviceEnumFans( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFan` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3726,14 +3301,6 @@ zesFanGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFan` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3758,13 +3325,6 @@ zesFanGetConfig( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFan` /// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS @@ -3788,12 +3348,6 @@ zesFanSetDefaultMode( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFan` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3822,11 +3376,6 @@ zesFanSetFixedSpeedMode( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFan` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3856,18 +3405,10 @@ zesFanSetSpeedTableMode( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFan` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_FAN_SPEED_UNITS_PERCENT < units` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pSpeed` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -3920,14 +3461,6 @@ typedef struct _zes_firmware_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3961,14 +3494,6 @@ zesDeviceEnumFirmwares( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFirmware` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3997,13 +3522,6 @@ zesFirmwareGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFirmware` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4030,14 +3548,6 @@ zesFirmwareFlash( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFirmware` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4064,14 +3574,6 @@ zesFirmwareGetFlashProgress( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFirmware` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4097,7 +3599,7 @@ typedef enum _zes_freq_domain_t ZES_FREQ_DOMAIN_GPU = 0, ///< GPU Core Domain. ZES_FREQ_DOMAIN_MEMORY = 1, ///< Local Memory Domain. ZES_FREQ_DOMAIN_MEDIA = 2, ///< GPU Media Domain. - ZES_FREQ_DOMAIN_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_FREQ_DOMAIN_* ENUMs + ZES_FREQ_DOMAIN_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_FREQ_DOMAIN_* ENUMs } zes_freq_domain_t; @@ -4171,10 +3673,7 @@ typedef enum _zes_freq_throttle_reason_flag_t ZES_FREQ_THROTTLE_REASON_FLAG_SW_RANGE = ZE_BIT(5), ///< frequency throttled due to software supplied frequency range ZES_FREQ_THROTTLE_REASON_FLAG_HW_RANGE = ZE_BIT(6), ///< frequency throttled due to a sub block that has a lower frequency ///< range when it receives clocks - ZES_FREQ_THROTTLE_REASON_FLAG_VOLTAGE = ZE_BIT(7), ///< frequency throttled due to voltage excursion - ZES_FREQ_THROTTLE_REASON_FLAG_THERMAL = ZE_BIT(8), ///< frequency throttled due to thermal conditions - ZES_FREQ_THROTTLE_REASON_FLAG_POWER = ZE_BIT(9), ///< frequency throttled due to power constraints - ZES_FREQ_THROTTLE_REASON_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_FREQ_THROTTLE_REASON_FLAG_* ENUMs + ZES_FREQ_THROTTLE_REASON_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_FREQ_THROTTLE_REASON_FLAG_* ENUMs } zes_freq_throttle_reason_flag_t; @@ -4246,7 +3745,7 @@ typedef enum _zes_oc_mode_t ///< specified overclock values. This mode disables OVERRIDE and ///< INTERPOLATIVE modes. This mode can damage the part, most of the ///< protections are disabled on this mode. - ZES_OC_MODE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_OC_MODE_* ENUMs + ZES_OC_MODE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_OC_MODE_* ENUMs } zes_oc_mode_t; @@ -4302,14 +3801,6 @@ typedef struct _zes_oc_capabilities_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4343,14 +3834,6 @@ zesDeviceEnumFrequencyDomains( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4377,14 +3860,6 @@ zesFrequencyGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4416,14 +3891,6 @@ zesFrequencyGetAvailableClocks( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4451,13 +3918,6 @@ zesFrequencyGetRange( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4485,14 +3945,6 @@ zesFrequencySetRange( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4516,14 +3968,6 @@ zesFrequencyGetState( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4549,14 +3993,6 @@ zesFrequencyGetThrottleTime( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4582,11 +4018,6 @@ zesFrequencyOcGetCapabilities( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4623,11 +4054,6 @@ zesFrequencyOcGetFrequencyTarget( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -4661,11 +4087,6 @@ zesFrequencyOcSetFrequencyTarget( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4704,11 +4125,6 @@ zesFrequencyOcGetVoltageTarget( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -4744,16 +4160,10 @@ zesFrequencyOcSetVoltageTarget( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_OC_MODE_FIXED < CurrentOcMode` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE /// + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t). /// + The specified voltage and/or frequency overclock settings exceed the hardware values (see the `maxOcFrequency`, `maxOcVoltage`, `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t). @@ -4782,11 +4192,6 @@ zesFrequencyOcSetMode( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4819,13 +4224,6 @@ zesFrequencyOcGetMode( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4855,10 +4253,6 @@ zesFrequencyOcGetIccMax( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -4890,13 +4284,6 @@ zesFrequencyOcSetIccMax( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -4925,10 +4312,6 @@ zesFrequencyOcGetTjMax( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFrequency` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -5007,14 +4390,6 @@ typedef struct _zes_led_state_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5048,14 +4423,6 @@ zesDeviceEnumLeds( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hLed` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5079,14 +4446,6 @@ zesLedGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hLed` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5110,13 +4469,6 @@ zesLedGetState( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hLed` /// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS @@ -5140,12 +4492,6 @@ zesLedSetState( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hLed` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5191,7 +4537,7 @@ typedef enum _zes_mem_type_t ZES_MEM_TYPE_GDDR6 = 17, ///< GDDR6 memory ZES_MEM_TYPE_GDDR6X = 18, ///< GDDR6X memory ZES_MEM_TYPE_GDDR7 = 19, ///< GDDR7 memory - ZES_MEM_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_MEM_TYPE_* ENUMs + ZES_MEM_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_MEM_TYPE_* ENUMs } zes_mem_type_t; @@ -5201,7 +4547,7 @@ typedef enum _zes_mem_loc_t { ZES_MEM_LOC_SYSTEM = 0, ///< System memory ZES_MEM_LOC_DEVICE = 1, ///< On board local device memory - ZES_MEM_LOC_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_MEM_LOC_* ENUMs + ZES_MEM_LOC_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_MEM_LOC_* ENUMs } zes_mem_loc_t; @@ -5216,7 +4562,7 @@ typedef enum _zes_mem_health_t ZES_MEM_HEALTH_CRITICAL = 3, ///< Operating with reduced memory to cover banks with too many ///< uncorrectable errors. ZES_MEM_HEALTH_REPLACE = 4, ///< Device should be replaced due to excessive uncorrectable errors. - ZES_MEM_HEALTH_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_MEM_HEALTH_* ENUMs + ZES_MEM_HEALTH_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_MEM_HEALTH_* ENUMs } zes_mem_health_t; @@ -5232,9 +4578,9 @@ typedef struct _zes_mem_properties_t ///< that the resource is on the device of the calling Sysman handle uint32_t subdeviceId; ///< [out] If onSubdevice is true, this gives the ID of the sub-device zes_mem_loc_t location; ///< [out] Location of this memory (system, device) - uint64_t physicalSize; ///< [out] Physical memory capacity in bytes. A value of 0 indicates that - ///< this property is not known. However, a call to zesMemoryGetState() - ///< will return the available free physical memory. + uint64_t physicalSize; ///< [out] Physical memory size in bytes. A value of 0 indicates that this + ///< property is not known. However, a call to ::zesMemoryGetState() will + ///< correctly return the total size of usable memory. int32_t busWidth; ///< [out] Width of the memory bus. A value of -1 means that this property ///< is unknown. int32_t numChannels; ///< [out] The number of memory channels. A value of -1 means that this @@ -5246,21 +4592,17 @@ typedef struct _zes_mem_properties_t /// @brief Memory state - health, allocated /// /// @details -/// - Percent free is given by 100 * free / pysical mem size. +/// - Percent allocation is given by 100 * (size - free / size. +/// - Percent free is given by 100 * free / size. typedef struct _zes_mem_state_t { zes_structure_type_t stype; ///< [in] type of this structure const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific ///< structure (i.e. contains stype and pNext). zes_mem_health_t health; ///< [out] Indicates the health of the memory - uint64_t free; ///< [out] The free physical memory in bytes + uint64_t free; ///< [out] The free memory in bytes uint64_t size; ///< [out] The total allocatable memory in bytes (can be less than the - ///< `physicalSize` member of ::zes_mem_properties_t). *DEPRECATED* - ///< This member can no longer track the allocatable memory reliably. - ///< Clients depending on this information can use the - ///< zeDeviceGetMemoryProperties with - ///< ze_device_usablemem_size_ext_properties_t extention to get information - ///< of the available usable memory. + ///< `physicalSize` member of ::zes_mem_properties_t) } zes_mem_state_t; @@ -5318,14 +4660,6 @@ typedef struct _zes_mem_ext_bandwidth_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5359,14 +4693,6 @@ zesDeviceEnumMemoryModules( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMemory` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5390,14 +4716,6 @@ zesMemoryGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMemory` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5421,13 +4739,6 @@ zesMemoryGetState( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMemory` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5478,14 +4789,6 @@ typedef struct _zes_perf_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5519,14 +4822,6 @@ zesDeviceEnumPerformanceFactorDomains( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPerf` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5551,14 +4846,6 @@ zesPerformanceFactorGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPerf` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5588,14 +4875,6 @@ zesPerformanceFactorGetConfig( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPerf` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -5621,7 +4900,7 @@ typedef enum _zes_power_domain_t ZES_POWER_DOMAIN_STACK = 3, ///< The PUnit power domain is a stack-level power domain. ZES_POWER_DOMAIN_MEMORY = 4, ///< The PUnit power domain is a memory-level power domain. ZES_POWER_DOMAIN_GPU = 5, ///< The PUnit power domain is a GPU-level power domain. - ZES_POWER_DOMAIN_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_POWER_DOMAIN_* ENUMs + ZES_POWER_DOMAIN_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_POWER_DOMAIN_* ENUMs } zes_power_domain_t; @@ -5641,7 +4920,7 @@ typedef enum _zes_power_level_t ZES_POWER_LEVEL_INSTANTANEOUS = 4, ///< The PUnit predicts effective power draw using the current device ///< configuration (frequency, voltage, etc...) & throttles proactively to ///< stay within the specified limit. - ZES_POWER_LEVEL_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_POWER_LEVEL_* ENUMs + ZES_POWER_LEVEL_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_POWER_LEVEL_* ENUMs } zes_power_level_t; @@ -5653,7 +4932,7 @@ typedef enum _zes_power_source_t ///< battery powered. ZES_POWER_SOURCE_MAINS = 1, ///< Limit active only when the device is mains powered. ZES_POWER_SOURCE_BATTERY = 2, ///< Limit active only when the device is battery powered. - ZES_POWER_SOURCE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_POWER_SOURCE_* ENUMs + ZES_POWER_SOURCE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_POWER_SOURCE_* ENUMs } zes_power_source_t; @@ -5664,7 +4943,7 @@ typedef enum _zes_limit_unit_t ZES_LIMIT_UNIT_UNKNOWN = 0, ///< The PUnit power monitoring unit cannot be determined. ZES_LIMIT_UNIT_CURRENT = 1, ///< The limit is specified in milliamperes of current drawn. ZES_LIMIT_UNIT_POWER = 2, ///< The limit is specified in milliwatts of power generated. - ZES_LIMIT_UNIT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_LIMIT_UNIT_* ENUMs + ZES_LIMIT_UNIT_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_LIMIT_UNIT_* ENUMs } zes_limit_unit_t; @@ -5795,14 +5074,6 @@ typedef struct _zes_energy_threshold_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5837,13 +5108,6 @@ zesDeviceEnumPowerDomains( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5869,14 +5133,6 @@ zesDeviceGetCardPowerDomain( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPower` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5900,14 +5156,6 @@ zesPowerGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPower` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -5933,14 +5181,6 @@ zesPowerGetEnergyCounter( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPower` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -5968,12 +5208,6 @@ zesPowerGetLimits( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPower` /// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS @@ -6004,12 +5238,6 @@ zesPowerSetLimits( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPower` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6052,11 +5280,6 @@ zesPowerGetEnergyThreshold( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPower` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE @@ -6087,7 +5310,7 @@ typedef enum _zes_psu_voltage_status_t ZES_PSU_VOLTAGE_STATUS_NORMAL = 1, ///< No unusual voltages have been detected ZES_PSU_VOLTAGE_STATUS_OVER = 2, ///< Over-voltage has occurred ZES_PSU_VOLTAGE_STATUS_UNDER = 3, ///< Under-voltage has occurred - ZES_PSU_VOLTAGE_STATUS_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_PSU_VOLTAGE_STATUS_* ENUMs + ZES_PSU_VOLTAGE_STATUS_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_PSU_VOLTAGE_STATUS_* ENUMs } zes_psu_voltage_status_t; @@ -6137,14 +5360,6 @@ typedef struct _zes_psu_state_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6178,14 +5393,6 @@ zesDeviceEnumPsus( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPsu` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6209,14 +5416,6 @@ zesPsuGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPsu` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6240,7 +5439,7 @@ typedef enum _zes_ras_error_type_t { ZES_RAS_ERROR_TYPE_CORRECTABLE = 0, ///< Errors were corrected by hardware ZES_RAS_ERROR_TYPE_UNCORRECTABLE = 1, ///< Error were not corrected - ZES_RAS_ERROR_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_RAS_ERROR_TYPE_* ENUMs + ZES_RAS_ERROR_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_RAS_ERROR_TYPE_* ENUMs } zes_ras_error_type_t; @@ -6259,7 +5458,7 @@ typedef enum _zes_ras_error_cat_t ZES_RAS_ERROR_CAT_CACHE_ERRORS = 5, ///< The number of errors that have occurred in caches (L1/L3/register ///< file/shared local memory/sampler) ZES_RAS_ERROR_CAT_DISPLAY_ERRORS = 6, ///< The number of errors that have occurred in the display - ZES_RAS_ERROR_CAT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_RAS_ERROR_CAT_* ENUMs + ZES_RAS_ERROR_CAT_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_RAS_ERROR_CAT_* ENUMs } zes_ras_error_cat_t; @@ -6346,14 +5545,6 @@ typedef struct _zes_ras_config_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6389,14 +5580,6 @@ zesDeviceEnumRasErrorSets( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hRas` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6429,14 +5612,6 @@ zesRasGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hRas` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6472,12 +5647,6 @@ zesRasGetConfig( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hRas` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6508,13 +5677,6 @@ zesRasSetConfig( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hRas` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6551,7 +5713,7 @@ typedef enum _zes_sched_mode_t ///< contexts must wait until the running context completes with no further ///< submitted work. ZES_SCHED_MODE_COMPUTE_UNIT_DEBUG = 3, ///< [DEPRECATED] No longer supported. - ZES_SCHED_MODE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_SCHED_MODE_* ENUMs + ZES_SCHED_MODE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_SCHED_MODE_* ENUMs } zes_sched_mode_t; @@ -6634,14 +5796,6 @@ typedef struct _zes_sched_timeslice_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6675,14 +5829,6 @@ zesDeviceEnumSchedulers( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hScheduler` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6706,13 +5852,6 @@ zesSchedulerGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hScheduler` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6738,13 +5877,6 @@ zesSchedulerGetCurrentMode( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hScheduler` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6772,13 +5904,6 @@ zesSchedulerGetTimeoutModeProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hScheduler` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6811,12 +5936,6 @@ zesSchedulerGetTimesliceModeProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hScheduler` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6851,12 +5970,6 @@ zesSchedulerSetTimeoutMode( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hScheduler` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6891,12 +6004,6 @@ zesSchedulerSetTimesliceMode( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hScheduler` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6931,12 +6038,6 @@ zesSchedulerSetExclusiveMode( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hScheduler` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -6964,7 +6065,7 @@ zesSchedulerSetComputeUnitDebugMode( typedef enum _zes_standby_type_t { ZES_STANDBY_TYPE_GLOBAL = 0, ///< Control the overall standby policy of the device/sub-device - ZES_STANDBY_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_STANDBY_TYPE_* ENUMs + ZES_STANDBY_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_STANDBY_TYPE_* ENUMs } zes_standby_type_t; @@ -6989,7 +6090,7 @@ typedef enum _zes_standby_promo_mode_t ZES_STANDBY_PROMO_MODE_DEFAULT = 0, ///< Best compromise between performance and energy savings. ZES_STANDBY_PROMO_MODE_NEVER = 1, ///< The device/component will never shutdown. This can improve performance ///< but uses more energy. - ZES_STANDBY_PROMO_MODE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_STANDBY_PROMO_MODE_* ENUMs + ZES_STANDBY_PROMO_MODE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_STANDBY_PROMO_MODE_* ENUMs } zes_standby_promo_mode_t; @@ -7006,14 +6107,6 @@ typedef enum _zes_standby_promo_mode_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7047,14 +6140,6 @@ zesDeviceEnumStandbyDomains( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hStandby` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7078,14 +6163,6 @@ zesStandbyGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hStandby` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7109,18 +6186,10 @@ zesStandbyGetMode( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hStandby` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_STANDBY_PROMO_MODE_NEVER < mode` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS /// + User does not have permissions to make these modifications. ZE_APIEXPORT ze_result_t ZE_APICALL @@ -7149,7 +6218,7 @@ typedef enum _zes_temp_sensors_t ZES_TEMP_SENSORS_GPU_BOARD = 6, ///< The maximum temperature across all sensors in the GPU Board ZES_TEMP_SENSORS_GPU_BOARD_MIN = 7, ///< The minimum temperature across all sensors in the GPU Board ZES_TEMP_SENSORS_VOLTAGE_REGULATOR = 8, ///< The maximum temperature across all sensors in the Voltage Regulator - ZES_TEMP_SENSORS_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_TEMP_SENSORS_* ENUMs + ZES_TEMP_SENSORS_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_TEMP_SENSORS_* ENUMs } zes_temp_sensors_t; @@ -7219,14 +6288,6 @@ typedef struct _zes_temp_config_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7260,14 +6321,6 @@ zesDeviceEnumTemperatureSensors( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hTemperature` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7292,12 +6345,6 @@ zesTemperatureGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hTemperature` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7339,10 +6386,6 @@ zesTemperatureGetConfig( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hTemperature` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7376,14 +6419,6 @@ zesTemperatureSetConfig( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hTemperature` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7414,7 +6449,7 @@ typedef enum _zes_device_ecc_default_properties_ext_version_t { ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ),///< version 1.0 ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ),///< latest known version - ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_* ENUMs + ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_* ENUMs } zes_device_ecc_default_properties_ext_version_t; @@ -7430,94 +6465,6 @@ typedef struct _zes_device_ecc_default_properties_ext_t } zes_device_ecc_default_properties_ext_t; -#if !defined(__GNUC__) -#pragma endregion -#endif -// Intel 'oneAPI' Level-Zero Sysman Extension APIs for PCI Link Speed Downgrade -#if !defined(__GNUC__) -#pragma region pciLinkSpeedDowngrade -#endif -/////////////////////////////////////////////////////////////////////////////// -#ifndef ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_NAME -/// @brief PCI Link Speed Downgrade Extension Name -#define ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_NAME "ZES_extension_pci_link_speed_downgrade" -#endif // ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_NAME - -/////////////////////////////////////////////////////////////////////////////// -/// @brief PCI Link Speed Downgrade Extension Version(s) -typedef enum _zes_pci_link_speed_downgrade_ext_version_t -{ - ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 - ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_* ENUMs - -} zes_pci_link_speed_downgrade_ext_version_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Query PCIe downgrade status. -/// -/// @details -/// - This structure can be passed in the 'pNext' of ::zes_pci_state_t -typedef struct _zes_pci_link_speed_downgrade_ext_state_t -{ - zes_structure_type_t stype; ///< [in] type of this structure - const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific - ///< structure (i.e. contains stype and pNext). - ze_bool_t pciLinkSpeedDowngradeStatus; ///< [out] Returns the current PCIe downgrade status. - -} zes_pci_link_speed_downgrade_ext_state_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Query PCIe downgrade capability. -/// -/// @details -/// - This structure can be passed in the 'pNext' of ::zes_pci_properties_t -typedef struct _zes_pci_link_speed_downgrade_ext_properties_t -{ - zes_structure_type_t stype; ///< [in] type of this structure - void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific - ///< structure (i.e. contains stype and pNext). - ze_bool_t pciLinkSpeedUpdateCapable; ///< [out] Returns if PCIe downgrade capability is available. - int32_t maxPciGenSupported; ///< [out] Returns the max supported PCIe generation of the device. -1 - ///< indicates the information is not available - -} zes_pci_link_speed_downgrade_ext_properties_t; - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Update PCI Link Speed (Downgrade or Upgrade (restore to its default -/// speed)) -/// -/// @details -/// - This function allows updating the PCI link speed to downgrade or -/// upgrade (restore to its default speed) the connection. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pendingAction` -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to perform this operation. -ZE_APIEXPORT ze_result_t ZE_APICALL -zesDevicePciLinkSpeedUpdateExt( - zes_device_handle_t hDevice, ///< [in] Sysman handle of the device. - ze_bool_t shouldDowngrade, ///< [in] boolean value to decide whether to perform PCIe downgrade(true) - ///< or set to default speed(false) - zes_device_action_t* pendingAction ///< [out] Pending action - ); - #if !defined(__GNUC__) #pragma endregion #endif @@ -7537,7 +6484,7 @@ typedef enum _zes_power_limits_ext_version_t { ZES_POWER_LIMITS_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZES_POWER_LIMITS_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZES_POWER_LIMITS_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_POWER_LIMITS_EXT_VERSION_* ENUMs + ZES_POWER_LIMITS_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_POWER_LIMITS_EXT_VERSION_* ENUMs } zes_power_limits_ext_version_t; @@ -7604,14 +6551,6 @@ typedef struct _zes_power_ext_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPower` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7651,12 +6590,6 @@ zesPowerGetLimitsExt( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hPower` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7691,7 +6624,7 @@ typedef enum _zes_engine_activity_ext_version_t { ZES_ENGINE_ACTIVITY_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZES_ENGINE_ACTIVITY_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZES_ENGINE_ACTIVITY_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_ENGINE_ACTIVITY_EXT_VERSION_* ENUMs + ZES_ENGINE_ACTIVITY_EXT_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_ENGINE_ACTIVITY_EXT_VERSION_* ENUMs } zes_engine_activity_ext_version_t; @@ -7732,14 +6665,6 @@ typedef struct _zes_engine_ext_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hEngine` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7783,7 +6708,7 @@ typedef enum _zes_ras_state_exp_version_t { ZES_RAS_STATE_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZES_RAS_STATE_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZES_RAS_STATE_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_RAS_STATE_EXP_VERSION_* ENUMs + ZES_RAS_STATE_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_RAS_STATE_EXP_VERSION_* ENUMs } zes_ras_state_exp_version_t; @@ -7805,7 +6730,7 @@ typedef enum _zes_ras_error_category_exp_t ZES_RAS_ERROR_CATEGORY_EXP_MEMORY_ERRORS = 7, ///< The number of errors that have occurred in Memory ZES_RAS_ERROR_CATEGORY_EXP_SCALE_ERRORS = 8, ///< The number of errors that have occurred in Scale Fabric ZES_RAS_ERROR_CATEGORY_EXP_L3FABRIC_ERRORS = 9, ///< The number of errors that have occurred in L3 Fabric - ZES_RAS_ERROR_CATEGORY_EXP_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_RAS_ERROR_CATEGORY_EXP_* ENUMs + ZES_RAS_ERROR_CATEGORY_EXP_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_RAS_ERROR_CATEGORY_EXP_* ENUMs } zes_ras_error_category_exp_t; @@ -7834,14 +6759,6 @@ typedef struct _zes_ras_state_exp_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hRas` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -7878,18 +6795,10 @@ zesRasGetStateExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hRas` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_RAS_ERROR_CATEGORY_EXP_L3FABRIC_ERRORS < category` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS /// + Don't have permissions to clear error counters. ZE_APIEXPORT ze_result_t ZE_APICALL @@ -7917,7 +6826,7 @@ typedef enum _zes_mem_page_offline_state_exp_version_t { ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_* ENUMs + ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_* ENUMs } zes_mem_page_offline_state_exp_version_t; @@ -7957,7 +6866,7 @@ typedef enum _zes_mem_bandwidth_counter_bits_exp_version_t { ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_* ENUMs + ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_* ENUMs } zes_mem_bandwidth_counter_bits_exp_version_t; @@ -7999,7 +6908,7 @@ typedef enum _zes_power_domain_properties_exp_version_t { ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_* ENUMs + ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_* ENUMs } zes_power_domain_properties_exp_version_t; @@ -8039,7 +6948,7 @@ typedef enum _zes_firmware_security_exp_version_t { ZES_FIRMWARE_SECURITY_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZES_FIRMWARE_SECURITY_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZES_FIRMWARE_SECURITY_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_FIRMWARE_SECURITY_EXP_VERSION_* ENUMs + ZES_FIRMWARE_SECURITY_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_FIRMWARE_SECURITY_EXP_VERSION_* ENUMs } zes_firmware_security_exp_version_t; @@ -8060,14 +6969,6 @@ typedef enum _zes_firmware_security_exp_version_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFirmware` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -8092,14 +6993,6 @@ zesFirmwareGetSecurityVersionExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hFirmware` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -8126,7 +7019,7 @@ typedef enum _zes_sysman_device_mapping_exp_version_t { ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ),///< latest known version - ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_* ENUMs + ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_* ENUMs } zes_sysman_device_mapping_exp_version_t; @@ -8155,14 +7048,6 @@ typedef struct _zes_subdevice_exp_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -8195,14 +7080,6 @@ zesDeviceGetSubDevicePropertiesExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -8240,7 +7117,7 @@ typedef enum _zes_vf_management_exp_version_t ZES_VF_MANAGEMENT_EXP_VERSION_1_1 = ZE_MAKE_VERSION( 1, 1 ), ///< version 1.1 (deprecated) ZES_VF_MANAGEMENT_EXP_VERSION_1_2 = ZE_MAKE_VERSION( 1, 2 ), ///< version 1.2 ZES_VF_MANAGEMENT_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 2 ), ///< latest known version - ZES_VF_MANAGEMENT_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_VF_MANAGEMENT_EXP_VERSION_* ENUMs + ZES_VF_MANAGEMENT_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_VF_MANAGEMENT_EXP_VERSION_* ENUMs } zes_vf_management_exp_version_t; @@ -8251,7 +7128,7 @@ typedef enum _zes_vf_info_mem_type_exp_flag_t { ZES_VF_INFO_MEM_TYPE_EXP_FLAG_MEM_TYPE_SYSTEM = ZE_BIT(0), ///< System memory ZES_VF_INFO_MEM_TYPE_EXP_FLAG_MEM_TYPE_DEVICE = ZE_BIT(1), ///< Device local memory - ZES_VF_INFO_MEM_TYPE_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_VF_INFO_MEM_TYPE_EXP_FLAG_* ENUMs + ZES_VF_INFO_MEM_TYPE_EXP_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_VF_INFO_MEM_TYPE_EXP_FLAG_* ENUMs } zes_vf_info_mem_type_exp_flag_t; @@ -8264,7 +7141,7 @@ typedef enum _zes_vf_info_util_exp_flag_t ZES_VF_INFO_UTIL_EXP_FLAG_INFO_MEM_CPU = ZE_BIT(1), ///< System memory utilization associated with virtual function ZES_VF_INFO_UTIL_EXP_FLAG_INFO_MEM_GPU = ZE_BIT(2), ///< Device memory utilization associated with virtual function ZES_VF_INFO_UTIL_EXP_FLAG_INFO_ENGINE = ZE_BIT(3), ///< Engine utilization associated with virtual function - ZES_VF_INFO_UTIL_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZES_VF_INFO_UTIL_EXP_FLAG_* ENUMs + ZES_VF_INFO_UTIL_EXP_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZES_VF_INFO_UTIL_EXP_FLAG_* ENUMs } zes_vf_info_util_exp_flag_t; @@ -8382,14 +7259,6 @@ typedef struct _zes_vf_util_engine_exp2_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -8425,14 +7294,6 @@ zesDeviceEnumActiveVFExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hVFhandle` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -8459,14 +7320,6 @@ zesVFManagementGetVFPropertiesExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hVFhandle` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -8505,14 +7358,6 @@ zesVFManagementGetVFMemoryUtilizationExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hVFhandle` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -8550,19 +7395,10 @@ zesVFManagementGetVFEngineUtilizationExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hVFhandle` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0xf < flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zesVFManagementSetVFTelemetryModeExp( zes_vf_handle_t hVFhandle, ///< [in] Sysman handle for the component. @@ -8586,19 +7422,10 @@ zesVFManagementSetVFTelemetryModeExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hVFhandle` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0xf < flag` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zesVFManagementSetVFTelemetrySamplingIntervalExp( zes_vf_handle_t hVFhandle, ///< [in] Sysman handle for the component. @@ -8620,14 +7447,6 @@ zesVFManagementSetVFTelemetrySamplingIntervalExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -8663,14 +7482,6 @@ zesDeviceEnumEnabledVFExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hVFhandle` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -8696,14 +7507,6 @@ zesVFManagementGetVFCapabilitiesExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hVFhandle` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -8739,14 +7542,6 @@ zesVFManagementGetVFMemoryUtilizationExp2( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hVFhandle` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -8780,14 +7575,6 @@ zesVFManagementGetVFEngineUtilizationExp2( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hVFhandle` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -8806,4 +7593,4 @@ zesVFManagementGetVFCapabilitiesExp2( } // extern "C" #endif -#endif // _ZES_API_H +#endif // _ZES_API_H \ No newline at end of file diff --git a/backends/ze/include/zes_ddi.h b/backends/ze/include/zes_ddi.h index 8b2fc2398..24b533568 100644 --- a/backends/ze/include/zes_ddi.h +++ b/backends/ze/include/zes_ddi.h @@ -1,11 +1,11 @@ /* * - * Copyright (C) 2019-2025 Intel Corporation + * Copyright (C) 2019-2021 Intel Corporation * * SPDX-License-Identifier: MIT * * @file zes_ddi.h - * @version v1.15-r1.13.73 + * @version v1.13-r1.13.1 * */ #ifndef _ZES_DDI_H @@ -337,14 +337,6 @@ typedef ze_result_t (ZE_APICALL *zes_pfnDeviceResetExt_t)( zes_reset_properties_t* ); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for zesDevicePciLinkSpeedUpdateExt -typedef ze_result_t (ZE_APICALL *zes_pfnDevicePciLinkSpeedUpdateExt_t)( - zes_device_handle_t, - ze_bool_t, - zes_device_action_t* - ); - /////////////////////////////////////////////////////////////////////////////// /// @brief Table of Device functions pointers typedef struct _zes_device_dditable_t @@ -386,7 +378,6 @@ typedef struct _zes_device_dditable_t zes_pfnDeviceReadOverclockState_t pfnReadOverclockState; zes_pfnDeviceEnumOverclockDomains_t pfnEnumOverclockDomains; zes_pfnDeviceResetExt_t pfnResetExt; - zes_pfnDevicePciLinkSpeedUpdateExt_t pfnPciLinkSpeedUpdateExt; } zes_device_dditable_t; /////////////////////////////////////////////////////////////////////////////// diff --git a/backends/ze/include/zes_ddi_ver.h b/backends/ze/include/zes_ddi_ver.h index 38b88bca4..1578e60d3 100644 --- a/backends/ze/include/zes_ddi_ver.h +++ b/backends/ze/include/zes_ddi_ver.h @@ -5,7 +5,7 @@ * SPDX-License-Identifier: MIT * * @file zes_ddi.h - * @version v1.15-r1.13.73 + * @version v1.13-r1.13.73 * */ #ifndef _ZES_DDI_VER_H @@ -28,7 +28,7 @@ typedef struct _zes_global_dditable_t_1_5 } zes_global_dditable_t_1_5; /////////////////////////////////////////////////////////////////////////////// -/// [1.0, 1.15, 1.4, 1.5, 1.7] +/// [1.0, 1.4, 1.5, 1.7] /// @brief Table of Device functions pointers typedef struct _zes_device_dditable_t_1_0 { @@ -59,36 +59,6 @@ typedef struct _zes_device_dditable_t_1_0 zes_pfnDeviceEnumTemperatureSensors_t pfnEnumTemperatureSensors; } zes_device_dditable_t_1_0; -typedef struct _zes_device_dditable_t_1_15 -{ - zes_pfnDeviceGetProperties_t pfnGetProperties; - zes_pfnDeviceGetState_t pfnGetState; - zes_pfnDeviceReset_t pfnReset; - zes_pfnDeviceProcessesGetState_t pfnProcessesGetState; - zes_pfnDevicePciGetProperties_t pfnPciGetProperties; - zes_pfnDevicePciGetState_t pfnPciGetState; - zes_pfnDevicePciGetBars_t pfnPciGetBars; - zes_pfnDevicePciGetStats_t pfnPciGetStats; - zes_pfnDeviceEnumDiagnosticTestSuites_t pfnEnumDiagnosticTestSuites; - zes_pfnDeviceEnumEngineGroups_t pfnEnumEngineGroups; - zes_pfnDeviceEventRegister_t pfnEventRegister; - zes_pfnDeviceEnumFabricPorts_t pfnEnumFabricPorts; - zes_pfnDeviceEnumFans_t pfnEnumFans; - zes_pfnDeviceEnumFirmwares_t pfnEnumFirmwares; - zes_pfnDeviceEnumFrequencyDomains_t pfnEnumFrequencyDomains; - zes_pfnDeviceEnumLeds_t pfnEnumLeds; - zes_pfnDeviceEnumMemoryModules_t pfnEnumMemoryModules; - zes_pfnDeviceEnumPerformanceFactorDomains_t pfnEnumPerformanceFactorDomains; - zes_pfnDeviceEnumPowerDomains_t pfnEnumPowerDomains; - zes_pfnDeviceGetCardPowerDomain_t pfnGetCardPowerDomain; - zes_pfnDeviceEnumPsus_t pfnEnumPsus; - zes_pfnDeviceEnumRasErrorSets_t pfnEnumRasErrorSets; - zes_pfnDeviceEnumSchedulers_t pfnEnumSchedulers; - zes_pfnDeviceEnumStandbyDomains_t pfnEnumStandbyDomains; - zes_pfnDeviceEnumTemperatureSensors_t pfnEnumTemperatureSensors; - zes_pfnDevicePciLinkSpeedUpdateExt_t pfnPciLinkSpeedUpdateExt; -} zes_device_dditable_t_1_15; - typedef struct _zes_device_dditable_t_1_4 { zes_pfnDeviceGetProperties_t pfnGetProperties; @@ -120,7 +90,6 @@ typedef struct _zes_device_dditable_t_1_4 zes_pfnDeviceEccConfigurable_t pfnEccConfigurable; zes_pfnDeviceGetEccState_t pfnGetEccState; zes_pfnDeviceSetEccState_t pfnSetEccState; - zes_pfnDevicePciLinkSpeedUpdateExt_t pfnPciLinkSpeedUpdateExt; } zes_device_dditable_t_1_4; typedef struct _zes_device_dditable_t_1_5 @@ -161,7 +130,6 @@ typedef struct _zes_device_dditable_t_1_5 zes_pfnDeviceResetOverclockSettings_t pfnResetOverclockSettings; zes_pfnDeviceReadOverclockState_t pfnReadOverclockState; zes_pfnDeviceEnumOverclockDomains_t pfnEnumOverclockDomains; - zes_pfnDevicePciLinkSpeedUpdateExt_t pfnPciLinkSpeedUpdateExt; } zes_device_dditable_t_1_5; typedef struct _zes_device_dditable_t_1_7 @@ -203,7 +171,6 @@ typedef struct _zes_device_dditable_t_1_7 zes_pfnDeviceReadOverclockState_t pfnReadOverclockState; zes_pfnDeviceEnumOverclockDomains_t pfnEnumOverclockDomains; zes_pfnDeviceResetExt_t pfnResetExt; - zes_pfnDevicePciLinkSpeedUpdateExt_t pfnPciLinkSpeedUpdateExt; } zes_device_dditable_t_1_7; /////////////////////////////////////////////////////////////////////////////// diff --git a/backends/ze/include/zet_api.h b/backends/ze/include/zet_api.h index f7a933fa6..13b8ea01e 100644 --- a/backends/ze/include/zet_api.h +++ b/backends/ze/include/zet_api.h @@ -1,11 +1,11 @@ /* * - * Copyright (C) 2019-2025 Intel Corporation + * Copyright (C) 2019-2021 Intel Corporation * * SPDX-License-Identifier: MIT * * @file zet_api.h - * @version v1.15-r1.13.73 + * @version v1.13-r1.13.1 * */ #ifndef _ZET_API_H @@ -102,8 +102,7 @@ typedef enum _zet_structure_type_t ZET_STRUCTURE_TYPE_METRIC_GROUP_TYPE_EXP = 0x00010006, ///< ::zet_metric_group_type_exp_t ZET_STRUCTURE_TYPE_EXPORT_DMA_EXP_PROPERTIES = 0x00010007, ///< ::zet_export_dma_buf_exp_properties_t ZET_STRUCTURE_TYPE_METRIC_TRACER_EXP_DESC = 0x00010008, ///< ::zet_metric_tracer_exp_desc_t - ZET_STRUCTURE_TYPE_METRIC_SOURCE_ID_EXP = 0x00010009, ///< ::zet_metric_source_id_exp_t - ZET_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_STRUCTURE_TYPE_* ENUMs + ZET_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_STRUCTURE_TYPE_* ENUMs } zet_structure_type_t; @@ -139,7 +138,7 @@ typedef enum _zet_value_type_t ZET_VALUE_TYPE_STRING = 5, ///< C string ZET_VALUE_TYPE_UINT8 = 6, ///< 8-bit unsigned-integer ZET_VALUE_TYPE_UINT16 = 7, ///< 16-bit unsigned-integer - ZET_VALUE_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_VALUE_TYPE_* ENUMs + ZET_VALUE_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_VALUE_TYPE_* ENUMs } zet_value_type_t; @@ -340,7 +339,7 @@ typedef struct _zet_metric_programmable_param_value_exp_t zet_metric_programmabl typedef enum _zet_module_debug_info_format_t { ZET_MODULE_DEBUG_INFO_FORMAT_ELF_DWARF = 0, ///< Format is ELF/DWARF - ZET_MODULE_DEBUG_INFO_FORMAT_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_MODULE_DEBUG_INFO_FORMAT_* ENUMs + ZET_MODULE_DEBUG_INFO_FORMAT_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_MODULE_DEBUG_INFO_FORMAT_* ENUMs } zet_module_debug_info_format_t; @@ -361,19 +360,10 @@ typedef enum _zet_module_debug_info_format_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hModule` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZET_MODULE_DEBUG_INFO_FORMAT_ELF_DWARF < format` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pSize` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -397,7 +387,7 @@ typedef uint32_t zet_device_debug_property_flags_t; typedef enum _zet_device_debug_property_flag_t { ZET_DEVICE_DEBUG_PROPERTY_FLAG_ATTACH = ZE_BIT(0), ///< the device supports attaching for debug - ZET_DEVICE_DEBUG_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_DEVICE_DEBUG_PROPERTY_FLAG_* ENUMs + ZET_DEVICE_DEBUG_PROPERTY_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_DEVICE_DEBUG_PROPERTY_FLAG_* ENUMs } zet_device_debug_property_flag_t; @@ -422,14 +412,6 @@ typedef struct _zet_device_debug_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -461,11 +443,6 @@ typedef struct _zet_debug_config_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -493,14 +470,6 @@ zetDebugAttach( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDebug` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -515,7 +484,7 @@ typedef enum _zet_debug_event_flag_t { ZET_DEBUG_EVENT_FLAG_NEED_ACK = ZE_BIT(0), ///< The event needs to be acknowledged by calling ///< ::zetDebugAcknowledgeEvent. - ZET_DEBUG_EVENT_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_DEBUG_EVENT_FLAG_* ENUMs + ZET_DEBUG_EVENT_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_DEBUG_EVENT_FLAG_* ENUMs } zet_debug_event_flag_t; @@ -532,7 +501,7 @@ typedef enum _zet_debug_event_type_t ZET_DEBUG_EVENT_TYPE_THREAD_STOPPED = 6, ///< The thread stopped due to a device exception ZET_DEBUG_EVENT_TYPE_THREAD_UNAVAILABLE = 7, ///< The thread is not available to be stopped ZET_DEBUG_EVENT_TYPE_PAGE_FAULT = 8, ///< A page request could not be completed on the device - ZET_DEBUG_EVENT_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_DEBUG_EVENT_TYPE_* ENUMs + ZET_DEBUG_EVENT_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_DEBUG_EVENT_TYPE_* ENUMs } zet_debug_event_type_t; @@ -542,7 +511,7 @@ typedef enum _zet_debug_detach_reason_t { ZET_DEBUG_DETACH_REASON_INVALID = 0, ///< The detach reason is not valid ZET_DEBUG_DETACH_REASON_HOST_EXIT = 1, ///< The host process exited - ZET_DEBUG_DETACH_REASON_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_DEBUG_DETACH_REASON_* ENUMs + ZET_DEBUG_DETACH_REASON_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_DEBUG_DETACH_REASON_* ENUMs } zet_debug_detach_reason_t; @@ -582,7 +551,7 @@ typedef enum _zet_debug_page_fault_reason_t ZET_DEBUG_PAGE_FAULT_REASON_INVALID = 0, ///< The page fault reason is not valid ZET_DEBUG_PAGE_FAULT_REASON_MAPPING_ERROR = 1, ///< The address is not mapped ZET_DEBUG_PAGE_FAULT_REASON_PERMISSION_ERROR = 2, ///< Invalid access permissions - ZET_DEBUG_PAGE_FAULT_REASON_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_DEBUG_PAGE_FAULT_REASON_* ENUMs + ZET_DEBUG_PAGE_FAULT_REASON_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_DEBUG_PAGE_FAULT_REASON_* ENUMs } zet_debug_page_fault_reason_t; @@ -628,14 +597,6 @@ typedef struct _zet_debug_event_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDebug` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -664,14 +625,6 @@ zetDebugReadEvent( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDebug` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -691,13 +644,6 @@ zetDebugAcknowledgeEvent( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDebug` /// - ::ZE_RESULT_ERROR_NOT_AVAILABLE @@ -717,13 +663,6 @@ zetDebugInterrupt( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDebug` /// - ::ZE_RESULT_ERROR_NOT_AVAILABLE @@ -741,8 +680,7 @@ typedef enum _zet_debug_memory_space_type_t ZET_DEBUG_MEMORY_SPACE_TYPE_DEFAULT = 0, ///< default memory space (attribute may be omitted) ZET_DEBUG_MEMORY_SPACE_TYPE_SLM = 1, ///< shared local memory space (GPU-only) ZET_DEBUG_MEMORY_SPACE_TYPE_ELF = 2, ///< ELF file memory space - ZET_DEBUG_MEMORY_SPACE_TYPE_BARRIER = 3, ///< Barrier memory space - ZET_DEBUG_MEMORY_SPACE_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_DEBUG_MEMORY_SPACE_TYPE_* ENUMs + ZET_DEBUG_MEMORY_SPACE_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_DEBUG_MEMORY_SPACE_TYPE_* ENUMs } zet_debug_memory_space_type_t; @@ -771,21 +709,13 @@ typedef struct _zet_debug_memory_space_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDebug` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == desc` /// + `nullptr == buffer` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZET_DEBUG_MEMORY_SPACE_TYPE_BARRIER < desc->type` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +/// + `::ZET_DEBUG_MEMORY_SPACE_TYPE_ELF < desc->type` /// - ::ZE_RESULT_ERROR_NOT_AVAILABLE /// + the thread is running or unavailable /// + the memory cannot be accessed from the supplied thread @@ -811,21 +741,13 @@ zetDebugReadMemory( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDebug` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == desc` /// + `nullptr == buffer` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZET_DEBUG_MEMORY_SPACE_TYPE_BARRIER < desc->type` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +/// + `::ZET_DEBUG_MEMORY_SPACE_TYPE_ELF < desc->type` /// - ::ZE_RESULT_ERROR_NOT_AVAILABLE /// + the thread is running or unavailable /// + the memory cannot be accessed from the supplied thread @@ -845,7 +767,7 @@ typedef enum _zet_debug_regset_flag_t { ZET_DEBUG_REGSET_FLAG_READABLE = ZE_BIT(0), ///< register set is readable ZET_DEBUG_REGSET_FLAG_WRITEABLE = ZE_BIT(1), ///< register set is writeable - ZET_DEBUG_REGSET_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_DEBUG_REGSET_FLAG_* ENUMs + ZET_DEBUG_REGSET_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_DEBUG_REGSET_FLAG_* ENUMs } zet_debug_regset_flag_t; @@ -876,14 +798,6 @@ typedef struct _zet_debug_regset_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -912,12 +826,6 @@ zetDebugGetRegisterSetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDebug` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -951,13 +859,6 @@ zetDebugGetThreadRegisterSetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDebug` /// - ::ZE_RESULT_ERROR_NOT_AVAILABLE @@ -985,13 +886,6 @@ zetDebugReadRegisters( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDebug` /// - ::ZE_RESULT_ERROR_NOT_AVAILABLE @@ -1029,14 +923,6 @@ zetDebugWriteRegisters( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1075,7 +961,7 @@ typedef enum _zet_metric_group_sampling_type_flag_t ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_EVENT_BASED = ZE_BIT(0), ///< Event based sampling ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_TIME_BASED = ZE_BIT(1), ///< Time based sampling ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_EXP_TRACER_BASED = ZE_BIT(2), ///< Experimental Tracer based sampling - ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_* ENUMs + ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_* ENUMs } zet_metric_group_sampling_type_flag_t; @@ -1108,14 +994,6 @@ typedef struct _zet_metric_group_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricGroup` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1148,7 +1026,7 @@ typedef enum _zet_metric_type_t ZET_METRIC_TYPE_IP_EXP = 0x7ffffffe, ///< Metric type: instruction pointer. Deprecated, use ///< ::ZET_METRIC_TYPE_IP. ZET_METRIC_TYPE_IP = 0x7ffffffe, ///< Metric type: instruction pointer - ZET_METRIC_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_METRIC_TYPE_* ENUMs + ZET_METRIC_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_METRIC_TYPE_* ENUMs } zet_metric_type_t; @@ -1158,7 +1036,7 @@ typedef enum _zet_metric_group_calculation_type_t { ZET_METRIC_GROUP_CALCULATION_TYPE_METRIC_VALUES = 0, ///< Calculated metric values from raw data. ZET_METRIC_GROUP_CALCULATION_TYPE_MAX_METRIC_VALUES = 1, ///< Maximum metric values. - ZET_METRIC_GROUP_CALCULATION_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_METRIC_GROUP_CALCULATION_TYPE_* ENUMs + ZET_METRIC_GROUP_CALCULATION_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_METRIC_GROUP_CALCULATION_TYPE_* ENUMs } zet_metric_group_calculation_type_t; @@ -1174,19 +1052,10 @@ typedef enum _zet_metric_group_calculation_type_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricGroup` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZET_METRIC_GROUP_CALCULATION_TYPE_MAX_METRIC_VALUES < type` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pRawData` /// + `nullptr == pMetricValueCount` @@ -1219,14 +1088,6 @@ zetMetricGroupCalculateMetricValues( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricGroup` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1297,14 +1158,6 @@ typedef struct _zet_metric_properties_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetric` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1336,13 +1189,6 @@ zetMetricGetProperties( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -1399,14 +1245,6 @@ typedef struct _zet_metric_streamer_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -1444,14 +1282,6 @@ zetMetricStreamerOpen( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hMetricStreamer` @@ -1475,14 +1305,6 @@ zetCommandListAppendMetricStreamerMarker( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricStreamer` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -1502,14 +1324,6 @@ zetMetricStreamerClose( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricStreamer` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1538,7 +1352,7 @@ typedef enum _zet_metric_query_pool_type_t { ZET_METRIC_QUERY_POOL_TYPE_PERFORMANCE = 0, ///< Performance metric query pool. ZET_METRIC_QUERY_POOL_TYPE_EXECUTION = 1, ///< Skips workload execution between begin/end calls. - ZET_METRIC_QUERY_POOL_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_METRIC_QUERY_POOL_TYPE_* ENUMs + ZET_METRIC_QUERY_POOL_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_METRIC_QUERY_POOL_TYPE_* ENUMs } zet_metric_query_pool_type_t; @@ -1567,14 +1381,6 @@ typedef struct _zet_metric_query_pool_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -1584,7 +1390,6 @@ typedef struct _zet_metric_query_pool_desc_t /// + `nullptr == phMetricQueryPool` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZET_METRIC_QUERY_POOL_TYPE_EXECUTION < desc->type` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zetMetricQueryPoolCreate( zet_context_handle_t hContext, ///< [in] handle of the context object @@ -1612,14 +1417,6 @@ zetMetricQueryPoolCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricQueryPool` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -1641,14 +1438,6 @@ zetMetricQueryPoolDestroy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricQueryPool` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1676,14 +1465,6 @@ zetMetricQueryCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricQuery` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -1707,14 +1488,6 @@ zetMetricQueryDestroy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricQuery` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -1741,14 +1514,6 @@ zetMetricQueryReset( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hMetricQuery` @@ -1785,14 +1550,6 @@ zetCommandListAppendMetricQueryBegin( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hMetricQuery` @@ -1821,14 +1578,6 @@ zetCommandListAppendMetricQueryEnd( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -1848,14 +1597,6 @@ zetCommandListAppendMetricMemoryBarrier( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricQuery` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1889,7 +1630,7 @@ typedef enum _zet_profile_flag_t ZET_PROFILE_FLAG_REGISTER_REALLOCATION = ZE_BIT(0), ///< request the compiler attempt to minimize register usage as much as ///< possible to allow for instrumentation ZET_PROFILE_FLAG_FREE_REGISTER_INFO = ZE_BIT(1), ///< request the compiler generate free register info - ZET_PROFILE_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_PROFILE_FLAG_* ENUMs + ZET_PROFILE_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_PROFILE_FLAG_* ENUMs } zet_profile_flag_t; @@ -1911,7 +1652,7 @@ typedef struct _zet_profile_properties_t typedef enum _zet_profile_token_type_t { ZET_PROFILE_TOKEN_TYPE_FREE_REGISTER = 0, ///< GRF info - ZET_PROFILE_TOKEN_TYPE_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_PROFILE_TOKEN_TYPE_* ENUMs + ZET_PROFILE_TOKEN_TYPE_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_PROFILE_TOKEN_TYPE_* ENUMs } zet_profile_token_type_t; @@ -1955,14 +1696,6 @@ typedef struct _zet_profile_register_sequence_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hKernel` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -1992,7 +1725,7 @@ typedef enum _zet_api_tracing_exp_version_t { ZET_API_TRACING_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZET_API_TRACING_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZET_API_TRACING_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_API_TRACING_EXP_VERSION_* ENUMs + ZET_API_TRACING_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_API_TRACING_EXP_VERSION_* ENUMs } zet_api_tracing_exp_version_t; @@ -2015,9 +1748,6 @@ typedef struct _zet_tracer_exp_desc_t /// @brief Creates a tracer on the context. /// /// @details -/// - @deprecated This function is not supported in L0 drivers and has been -/// replaced by the Loader Tracing Layer. See the Loader Tracing -/// documentation for more details. /// - The application must only use the tracer for the context which was /// provided during creation. /// - The tracer is created in the disabled state. @@ -2030,14 +1760,6 @@ typedef struct _zet_tracer_exp_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2055,9 +1777,6 @@ zetTracerExpCreate( /// @brief Destroys a tracer. /// /// @details -/// - @deprecated This function is not supported in L0 drivers and has been -/// replaced by the Loader Tracing Layer. See the Loader Tracing -/// documentation for more details. /// - The application must **not** call this function from simultaneous /// threads with the same tracer handle. /// - The implementation of this function must be thread-safe. @@ -2071,14 +1790,6 @@ zetTracerExpCreate( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hTracer` /// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE @@ -2092,9 +1803,6 @@ zetTracerExpDestroy( /// execution. /// /// @details -/// - @deprecated This function is not supported in L0 drivers and has been -/// replaced by the Loader Tracing Layer. See the Loader Tracing -/// documentation for more details. /// - The application only needs to set the function pointers it is /// interested in receiving; all others should be 'nullptr' /// - The application must ensure that no other threads are executing @@ -2108,14 +1816,6 @@ zetTracerExpDestroy( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hTracer` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2131,9 +1831,6 @@ zetTracerExpSetPrologues( /// execution. /// /// @details -/// - @deprecated This function is not supported in L0 drivers and has been -/// replaced by the Loader Tracing Layer. See the Loader Tracing -/// documentation for more details. /// - The application only needs to set the function pointers it is /// interested in receiving; all others should be 'nullptr' /// - The application must ensure that no other threads are executing @@ -2147,14 +1844,6 @@ zetTracerExpSetPrologues( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hTracer` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2169,9 +1858,6 @@ zetTracerExpSetEpilogues( /// @brief Enables (or disables) the tracer /// /// @details -/// - @deprecated This function is not supported in L0 drivers and has been -/// replaced by the Loader Tracing Layer. See the Loader Tracing -/// documentation for more details. /// - The application must **not** call this function from simultaneous /// threads with the same tracer handle. /// @@ -2181,14 +1867,6 @@ zetTracerExpSetEpilogues( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hTracer` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -2216,7 +1894,7 @@ typedef enum _zet_concurrent_metric_groups_exp_version_t { ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_* ENUMs + ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_* ENUMs } zet_concurrent_metric_groups_exp_version_t; @@ -2233,16 +1911,9 @@ typedef enum _zet_concurrent_metric_groups_exp_version_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` +/// + `nullptr == phMetricGroups` ZE_APIEXPORT ze_result_t ZE_APICALL zetDeviceGetConcurrentMetricGroupsExp( zet_device_handle_t hDevice, ///< [in] handle of the device @@ -2275,7 +1946,7 @@ typedef enum _zet_metric_tracer_exp_version_t { ZET_METRIC_TRACER_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZET_METRIC_TRACER_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZET_METRIC_TRACER_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_METRIC_TRACER_EXP_VERSION_* ENUMs + ZET_METRIC_TRACER_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_METRIC_TRACER_EXP_VERSION_* ENUMs } zet_metric_tracer_exp_version_t; @@ -2340,14 +2011,6 @@ typedef struct _zet_metric_entry_exp_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hContext` /// + `nullptr == hDevice` @@ -2383,14 +2046,6 @@ zetMetricTracerCreateExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricTracer` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -2414,14 +2069,6 @@ zetMetricTracerDestroyExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricTracer` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -2450,14 +2097,6 @@ zetMetricTracerEnableExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricTracer` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -2486,14 +2125,6 @@ zetMetricTracerDisableExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricTracer` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2525,14 +2156,6 @@ zetMetricTracerReadDataExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricTracer` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2552,14 +2175,6 @@ zetMetricDecoderCreateExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == phMetricDecoder` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -2584,14 +2199,6 @@ zetMetricDecoderDestroyExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricDecoder` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2622,14 +2229,6 @@ zetMetricDecoderGetDecodableMetricsExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == phMetricDecoder` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -2699,7 +2298,7 @@ typedef enum _zet_metric_group_type_exp_flag_t ZET_METRIC_GROUP_TYPE_EXP_FLAG_USER_CREATED = ZE_BIT(1), ///< Metric group created using ::zetDeviceCreateMetricGroupsFromMetricsExp ZET_METRIC_GROUP_TYPE_EXP_FLAG_OTHER = ZE_BIT(2), ///< Metric group which has a collection of metrics ZET_METRIC_GROUP_TYPE_EXP_FLAG_MARKER = ZE_BIT(3), ///< Metric group is capable of generating Marker metric - ZET_METRIC_GROUP_TYPE_EXP_FLAG_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_METRIC_GROUP_TYPE_EXP_FLAG_* ENUMs + ZET_METRIC_GROUP_TYPE_EXP_FLAG_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_METRIC_GROUP_TYPE_EXP_FLAG_* ENUMs } zet_metric_group_type_exp_flag_t; @@ -2749,7 +2348,7 @@ typedef enum _zet_metric_group_marker_exp_version_t { ZET_METRIC_GROUP_MARKER_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZET_METRIC_GROUP_MARKER_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZET_METRIC_GROUP_MARKER_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_METRIC_GROUP_MARKER_EXP_VERSION_* ENUMs + ZET_METRIC_GROUP_MARKER_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_METRIC_GROUP_MARKER_EXP_VERSION_* ENUMs } zet_metric_group_marker_exp_version_t; @@ -2779,14 +2378,6 @@ typedef struct _zet_metric_source_id_exp_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hCommandList` /// + `nullptr == hMetricGroup` @@ -2818,7 +2409,7 @@ typedef enum _zet_metrics_runtime_enable_disable_exp_version_t { ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_* ENUMs + ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_* ENUMs } zet_metrics_runtime_enable_disable_exp_version_t; @@ -2844,14 +2435,6 @@ typedef enum _zet_metrics_runtime_enable_disable_exp_version_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -2878,14 +2461,6 @@ zetDeviceEnableMetricsExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` ZE_APIEXPORT ze_result_t ZE_APICALL @@ -2912,7 +2487,7 @@ typedef enum _ze_calculate_multiple_metrics_exp_version_t { ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ),///< version 1.0 ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ),///< latest known version - ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_* ENUMs + ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_* ENUMs } ze_calculate_multiple_metrics_exp_version_t; @@ -2936,19 +2511,10 @@ typedef enum _ze_calculate_multiple_metrics_exp_version_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricGroup` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZET_METRIC_GROUP_CALCULATION_TYPE_MAX_METRIC_VALUES < type` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pRawData` /// + `nullptr == pSetCount` @@ -2999,7 +2565,7 @@ typedef enum _ze_metric_global_timestamps_exp_version_t { ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_* ENUMs + ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_* ENUMs } ze_metric_global_timestamps_exp_version_t; @@ -3036,14 +2602,6 @@ typedef struct _zet_metric_global_timestamps_resolution_exp_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricGroup` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3076,7 +2634,7 @@ typedef enum _zet_export_metric_data_exp_version_t { ZET_EXPORT_METRIC_DATA_EXP_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 ZET_EXPORT_METRIC_DATA_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version - ZET_EXPORT_METRIC_DATA_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_EXPORT_METRIC_DATA_EXP_VERSION_* ENUMs + ZET_EXPORT_METRIC_DATA_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_EXPORT_METRIC_DATA_EXP_VERSION_* ENUMs } zet_export_metric_data_exp_version_t; @@ -3121,14 +2679,6 @@ typedef struct _zet_metric_calculate_exp_desc_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricGroup` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3166,19 +2716,10 @@ zetMetricGroupGetExportDataExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDriver` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZET_METRIC_GROUP_CALCULATION_TYPE_MAX_METRIC_VALUES < type` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pExportData` /// + `nullptr == pCalculateDescriptor` @@ -3231,7 +2772,7 @@ typedef enum _zet_metric_programmable_exp_version_t { ZET_METRIC_PROGRAMMABLE_EXP_VERSION_1_1 = ZE_MAKE_VERSION( 1, 1 ), ///< version 1.1 ZET_METRIC_PROGRAMMABLE_EXP_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 1 ), ///< latest known version - ZET_METRIC_PROGRAMMABLE_EXP_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_METRIC_PROGRAMMABLE_EXP_VERSION_* ENUMs + ZET_METRIC_PROGRAMMABLE_EXP_VERSION_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_METRIC_PROGRAMMABLE_EXP_VERSION_* ENUMs } zet_metric_programmable_exp_version_t; @@ -3326,7 +2867,7 @@ typedef enum _zet_metric_programmable_param_type_exp_t ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_RATE = 4, ///< Produces normalization average using raw_metric / timestamp. ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_BYTES = 5, ///< Produces normalization average using raw_metric * n bytes. ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_GENERIC = 6, ///< Generic Parameter type. Please refer the parameter's description. - ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_* ENUMs + ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_* ENUMs } zet_metric_programmable_param_type_exp_t; @@ -3343,7 +2884,7 @@ typedef enum _zet_value_info_type_exp_t ZET_VALUE_INFO_TYPE_EXP_UINT16 = 6, ///< 16-bit unsigned-integer ZET_VALUE_INFO_TYPE_EXP_UINT64_RANGE = 7, ///< 64-bit unsigned-integer range (minimum and maximum) ZET_VALUE_INFO_TYPE_EXP_FLOAT64_RANGE = 8, ///< 64-bit floating point range (minimum and maximum) - ZET_VALUE_INFO_TYPE_EXP_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZET_VALUE_INFO_TYPE_EXP_* ENUMs + ZET_VALUE_INFO_TYPE_EXP_FORCE_UINT32 = 0x7fffffff, ///< Value marking end of ZET_VALUE_INFO_TYPE_EXP_* ENUMs } zet_value_info_type_exp_t; @@ -3430,14 +2971,6 @@ typedef struct _zet_metric_programmable_param_value_exp_t /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3468,14 +3001,6 @@ zetMetricProgrammableGetExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricProgrammable` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3499,14 +3024,6 @@ zetMetricProgrammableGetPropertiesExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricProgrammable` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3539,14 +3056,6 @@ zetMetricProgrammableGetParamInfoExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricProgrammable` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3587,14 +3096,6 @@ zetMetricProgrammableGetParamValueInfoExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricProgrammable` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3637,14 +3138,6 @@ zetMetricCreateFromProgrammableExp2( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricProgrammable` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3691,15 +3184,9 @@ zetMetricCreateFromProgrammableExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` +/// + `nullptr == phMetrics` /// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT /// + metricGroupCount is lesser than the number of metric group handles that could be created. ZE_APIEXPORT ze_result_t ZE_APICALL @@ -3739,14 +3226,6 @@ zetDeviceCreateMetricGroupsFromMetricsExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER @@ -3755,7 +3234,6 @@ zetDeviceCreateMetricGroupsFromMetricsExp( /// + `nullptr == phMetricGroup` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `0x7 < samplingType` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZE_APIEXPORT ze_result_t ZE_APICALL zetMetricGroupCreateExp( zet_device_handle_t hDevice, ///< [in] handle of the device @@ -3789,13 +3267,6 @@ zetMetricGroupCreateExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricGroup` /// + `nullptr == hMetric` @@ -3829,13 +3300,6 @@ zetMetricGroupAddMetricExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricGroup` /// + `nullptr == hMetric` @@ -3875,13 +3339,6 @@ zetMetricGroupRemoveMetricExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricGroup` /// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT @@ -3912,13 +3369,6 @@ zetMetricGroupCloseExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetricGroup` /// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT @@ -3943,13 +3393,6 @@ zetMetricGroupDestroyExp( /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hMetric` /// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT @@ -3969,4 +3412,4 @@ zetMetricDestroyExp( } // extern "C" #endif -#endif // _ZET_API_H +#endif // _ZET_API_H \ No newline at end of file diff --git a/backends/ze/include/zet_ddi.h b/backends/ze/include/zet_ddi.h index e538e71e9..bf7f56c02 100644 --- a/backends/ze/include/zet_ddi.h +++ b/backends/ze/include/zet_ddi.h @@ -1,11 +1,11 @@ /* * - * Copyright (C) 2019-2025 Intel Corporation + * Copyright (C) 2019-2021 Intel Corporation * * SPDX-License-Identifier: MIT * * @file zet_ddi.h - * @version v1.15-r1.13.73 + * @version v1.13-r1.13.1 * */ #ifndef _ZET_DDI_H diff --git a/backends/ze/include/zet_ddi_ver.h b/backends/ze/include/zet_ddi_ver.h index 894e693c4..eb294d1bd 100644 --- a/backends/ze/include/zet_ddi_ver.h +++ b/backends/ze/include/zet_ddi_ver.h @@ -5,7 +5,7 @@ * SPDX-License-Identifier: MIT * * @file zet_ddi.h - * @version v1.15-r1.13.73 + * @version v1.13-r1.13.73 * */ #ifndef _ZET_DDI_VER_H diff --git a/backends/ze/ze.h.include b/backends/ze/ze.h.include index 590173119..208a429c2 100644 --- a/backends/ze/ze.h.include +++ b/backends/ze/ze.h.include @@ -7,8 +7,10 @@ #include #include #include +#ifdef NEW_VERSION_WITH_ZER #include #include +#endif #include #include #include diff --git a/backends/ze/ze_model.rb b/backends/ze/ze_model.rb index f27658974..43c34580c 100644 --- a/backends/ze/ze_model.rb +++ b/backends/ze/ze_model.rb @@ -14,7 +14,8 @@ $zet_api_yaml = YAML.load_file('zet_api.yaml') $zes_api_yaml = YAML.load_file('zes_api.yaml') $zel_api_yaml = YAML.load_file('zel_api.yaml') -$zer_api_yaml = YAML.load_file('zer_api.yaml') +#$zer_api_yaml = YAML.load_file('zer_api.yaml') +$zer_api_yaml = {"typedefs" => [], "structs" => [], "functions" => [] } $zex_api_yaml = YAML.load_file('zex_api.yaml') $ze_api = YAMLCAst.from_yaml_ast($ze_api_yaml) @@ -57,7 +58,7 @@ 'ZES_STRUCTURE_TYPE_MEM_PAGE_OFFLINE_STATE_EXP' => 'ZES_STRUCTURE_TYPE_MEMORY_PAGE_OFFLINE_STATE_EXP', } -$struct_type_reject = Set.new([]) +$struct_type_reject = Set.new(['zet_metric_source_id_exp_t']) $ze_meta_parameters = YAML.load_file(File.join(SRC_DIR, 'ze_meta_parameters.yaml')) $ze_meta_parameters['meta_parameters'].each do |func, list| @@ -86,6 +87,7 @@ end end + $zer_meta_parameters = YAML.load_file(File.join(SRC_DIR, 'zer_meta_parameters.yaml')) $zer_meta_parameters['meta_parameters'].each do |func, list| list.each do |type, *args| From 8f604688f3b24f564c36b87f9121b7d02b6f5836 Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Tue, 3 Mar 2026 23:53:59 +0000 Subject: [PATCH 20/30] Fix xprof... --- xprof/xprof.rb.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xprof/xprof.rb.in b/xprof/xprof.rb.in index eb66666fe..749a1a9c0 100755 --- a/xprof/xprof.rb.in +++ b/xprof/xprof.rb.in @@ -740,7 +740,7 @@ module LocalMaster # /!\ If babeltrace moved the file the `lttng_trace_dir_tmp` no longer exist LOGGER.debug("Deleting #{lttng_trace_dir_tmp}") - FileUtils.FileUtils.rm_rf(lttng_trace_dir_tmp) + FileUtils.rm_rf(lttng_trace_dir_tmp) end end From 46cce2ce411a21ca5333b64567c1b830cb02628f Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Tue, 3 Mar 2026 23:58:48 +0000 Subject: [PATCH 21/30] Fix lint --- backends/ze/gen_ze.rb | 70 +++++++++---------- .../ze/utils_spec_update/query_ze_version.cpp | 20 +++--- backends/ze/ze_model.rb | 5 +- 3 files changed, 45 insertions(+), 50 deletions(-) diff --git a/backends/ze/gen_ze.rb b/backends/ze/gen_ze.rb index 5c0a5c9df..b24ed87f7 100644 --- a/backends/ze/gen_ze.rb +++ b/backends/ze/gen_ze.rb @@ -1,41 +1,41 @@ require_relative 'ze_model' puts <<~EOF - #include - #include - #include "ze.h.include" - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include "uthash.h" - #include "utlist.h" - - #include "ze_tracepoints.h" - #include "zet_tracepoints.h" - #include "zes_tracepoints.h" - #include "zel_tracepoints.h" -#ifdef NEW_VERSION_WITH_ZER - #include "zer_tracepoints.h" -#endif - #include "zex_tracepoints.h" - #include "ze_structs_tracepoints.h" - #include "zet_structs_tracepoints.h" - #include "zes_structs_tracepoints.h" - #include "zel_structs_tracepoints.h" -#ifdef NEW_VERSION_WITH_ZER - #include "zer_structs_tracepoints.h" -#endif - #include "zex_structs_tracepoints.h" - #include "ze_sampling.h" - #include "ze_profiling.h" - #include "ze_properties.h" - #include "ze_build.h" + #include + #include + #include "ze.h.include" + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include "uthash.h" + #include "utlist.h" + + #include "ze_tracepoints.h" + #include "zet_tracepoints.h" + #include "zes_tracepoints.h" + #include "zel_tracepoints.h" + #ifdef NEW_VERSION_WITH_ZER + #include "zer_tracepoints.h" + #endif + #include "zex_tracepoints.h" + #include "ze_structs_tracepoints.h" + #include "zet_structs_tracepoints.h" + #include "zes_structs_tracepoints.h" + #include "zel_structs_tracepoints.h" + #ifdef NEW_VERSION_WITH_ZER + #include "zer_structs_tracepoints.h" + #endif + #include "zex_structs_tracepoints.h" + #include "ze_sampling.h" + #include "ze_profiling.h" + #include "ze_properties.h" + #include "ze_build.h" EOF diff --git a/backends/ze/utils_spec_update/query_ze_version.cpp b/backends/ze/utils_spec_update/query_ze_version.cpp index 56d882974..ee302e6b4 100644 --- a/backends/ze/utils_spec_update/query_ze_version.cpp +++ b/backends/ze/utils_spec_update/query_ze_version.cpp @@ -13,16 +13,15 @@ int main() { zeDriverGet(&driverCount, &driver); // Query driver properties - ze_driver_properties_t driverProps{.stype = - ZE_STRUCTURE_TYPE_DRIVER_PROPERTIES}; + ze_driver_properties_t driverProps{.stype = ZE_STRUCTURE_TYPE_DRIVER_PROPERTIES}; zeDriverGetProperties(driver, &driverProps); - std::cout << "Driver version: " << ZE_MAJOR_VERSION(driverProps.driverVersion) - << "." << ZE_MINOR_VERSION(driverProps.driverVersion) << std::endl; + std::cout << "Driver version: " << ZE_MAJOR_VERSION(driverProps.driverVersion) << "." + << ZE_MINOR_VERSION(driverProps.driverVersion) << std::endl; // Compare with header version - std::cout << "API version: " << ZE_MAJOR_VERSION(ZE_API_VERSION_CURRENT) - << "." << ZE_MINOR_VERSION(ZE_API_VERSION_CURRENT) << std::endl; + std::cout << "API version: " << ZE_MAJOR_VERSION(ZE_API_VERSION_CURRENT) << "." + << ZE_MINOR_VERSION(ZE_API_VERSION_CURRENT) << std::endl; // Query loader component versions size_t numElems = 0; @@ -32,13 +31,10 @@ int main() { std::cout << "Loader component versions:" << std::endl; for (size_t i = 0; i < numElems; ++i) { - std::cout << " [" << i << "] Name: " << versions[i].component_name - << std::endl - << " Spec: " - << ZE_MAJOR_VERSION(versions[i].spec_version) << "." + std::cout << " [" << i << "] Name: " << versions[i].component_name << std::endl + << " Spec: " << ZE_MAJOR_VERSION(versions[i].spec_version) << "." << ZE_MINOR_VERSION(versions[i].spec_version) << std::endl - << " Lib version: " - << versions[i].component_lib_version.major << "." + << " Lib version: " << versions[i].component_lib_version.major << "." << versions[i].component_lib_version.minor << "." << versions[i].component_lib_version.patch << std::endl; } diff --git a/backends/ze/ze_model.rb b/backends/ze/ze_model.rb index 43c34580c..c7129e7bb 100644 --- a/backends/ze/ze_model.rb +++ b/backends/ze/ze_model.rb @@ -14,8 +14,8 @@ $zet_api_yaml = YAML.load_file('zet_api.yaml') $zes_api_yaml = YAML.load_file('zes_api.yaml') $zel_api_yaml = YAML.load_file('zel_api.yaml') -#$zer_api_yaml = YAML.load_file('zer_api.yaml') -$zer_api_yaml = {"typedefs" => [], "structs" => [], "functions" => [] } +# $zer_api_yaml = YAML.load_file('zer_api.yaml') +$zer_api_yaml = { 'typedefs' => [], 'structs' => [], 'functions' => [] } $zex_api_yaml = YAML.load_file('zex_api.yaml') $ze_api = YAMLCAst.from_yaml_ast($ze_api_yaml) @@ -87,7 +87,6 @@ end end - $zer_meta_parameters = YAML.load_file(File.join(SRC_DIR, 'zer_meta_parameters.yaml')) $zer_meta_parameters['meta_parameters'].each do |func, list| list.each do |type, *args| From bac1d04df45282ff7e8fb4953712bbe8af11eb2b Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Thu, 5 Mar 2026 00:21:56 +0000 Subject: [PATCH 22/30] ze-loader-api.h --- backends/ze/Makefile.am | 3 +- backends/ze/README.md | 10 +++ backends/ze/extract_ze.rb | 2 +- backends/ze/find_level_zero_tag.sh | 58 ------------ backends/ze/gen_ze.rb | 2 +- backends/ze/include/loader/ze_loader.h | 3 +- backends/ze/include/loader/ze_loader_api.h | 100 +++++++++++++++++++++ 7 files changed, 116 insertions(+), 62 deletions(-) delete mode 100755 backends/ze/find_level_zero_tag.sh create mode 100644 backends/ze/include/loader/ze_loader_api.h diff --git a/backends/ze/Makefile.am b/backends/ze/Makefile.am index 03192bc57..3420e609b 100644 --- a/backends/ze/Makefile.am +++ b/backends/ze/Makefile.am @@ -34,7 +34,8 @@ ZE_HDR_ROOT = \ layers/zel_tracing_ddi.h \ layers/zel_tracing_ddi_ver.h \ layers/zel_tracing_register_cb.h \ - loader/ze_loader.h + loader/ze_loader.h \ + loader/ze_loader_api.h ZE_HDR = $(ZE_HDR_ROOT:%=$(srcdir)/include/%) MODIFIED_ZE_HDR = $(ZE_HDR_ROOT:%=modified_include/%) diff --git a/backends/ze/README.md b/backends/ze/README.md index 493b1c845..cd465e8ea 100644 --- a/backends/ze/README.md +++ b/backends/ze/README.md @@ -37,6 +37,9 @@ $ git ls-remote --sort="v:refname" --tags https://github.com/oneapi-src/level- 6369d8d642e9c7625e67f38664267f171b8e42dc refs/tags/v1.28.2 ``` +- We need also to copy / paste `source/loader/ze_loader_api.h`. The loader export it, so we export it too, just in case. + - Those header, are a nighmare of C++ header. We patch them manully. + ## 2/ DDI Ver ### Sync @@ -74,6 +77,7 @@ grep "ZE_API_VERSION_CURRENT" ../include/ze_api.h # Sanity check (We don't talk about `ZE_API_VERSION_CURRENT_M`...) - Note that `layers/zel_tracing_ddi_ver.h` is not generated manually, and need manual update. + - We remove all the C++, and all the weird important who bring symbol for other namespace. ## 3/ Optional: ZEX @@ -86,6 +90,12 @@ grep "ZE_API_VERSION_CURRENT" ../include/ze_api.h # Sanity check # Potential Problems +## 0 + +Run `utils_spec_update/test_symbol_exported.sh $loader_so $out_so` +If symbol are not exposed by the loader, but are exposed by us it's a bug! +Add a patch to comment them in `header.path`. + ## 1 ``` diff --git a/backends/ze/extract_ze.rb b/backends/ze/extract_ze.rb index ef9ee59af..180d9b185 100644 --- a/backends/ze/extract_ze.rb +++ b/backends/ze/extract_ze.rb @@ -4,7 +4,7 @@ #include #include #include - #include + #include EOF if enable_clang_parser? diff --git a/backends/ze/find_level_zero_tag.sh b/backends/ze/find_level_zero_tag.sh deleted file mode 100755 index cd28ccea1..000000000 --- a/backends/ze/find_level_zero_tag.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env bash -# find_level_zero_tag_git.sh -# Find the most recent level-zero tag whose history contains a commit -# referencing a given L0 Spec version (e.g. v1.15). -# -# Usage: -# ./find_level_zero_tag_git.sh [repo_url] -# -# Examples: -# ./find_level_zero_tag_git.sh 1.15 -# ./find_level_zero_tag_git.sh 1.15 https://github.com/myorg/level-zero - -set -euo pipefail - -SPEC_VERSION="${1:-}" -REPO_URL="${2:-https://github.com/oneapi-src/level-zero.git}" - -if [[ -z "$SPEC_VERSION" ]]; then - echo "Usage: $0 [repo_url]" >&2 - echo " e.g. $0 1.15" >&2 - exit 1 -fi - -# Escape dots and add the string to search -ESCAPED=$(printf '%s' "$SPEC_VERSION" | sed 's/\./\\./g') -GREP_PATTERN="L0 Spec v${ESCAPED}" - -WORK_DIR=$(mktemp -d) -trap 'rm -rf "$WORK_DIR"' EXIT - -echo "Cloning $REPO_URL" >&2 -# --bare + --filter=blob:none → fetch commits & tags but skip file blobs -git clone --bare --filter=blob:none --quiet "$REPO_URL" "$WORK_DIR/repo.git" -cd "$WORK_DIR/repo.git" - -echo "Searching commit history for: ${GREP_PATTERN=}" >&2 - -# ── Step 1: find all commits whose message matches the spec version ─────────── -# In case of pre-release, or not yet tagget we keep multiple of them -MATCHING_COMMITS=$(git log --all --oneline --grep="$GREP_PATTERN" --format="%H %s") - -if [[ -z "$MATCHING_COMMITS" ]]; then - echo "✘ No commit found referencing spec version: ${SPEC_VERSION}" >&2 - exit 1 -fi -echo "${MATCHING_COMMITS}" >&2 - -# ── Step 3: find the most recent v* tag containing any of those commits ────── -CONTAINS_ARGS=$(awk '{print "--contains " $1}' <<<"$MATCHING_COMMITS") -MOST_RECENT=$(git tag -l --sort=-version:refname $CONTAINS_ARGS -- 'v*' | head -1) - -if [[ -z "$MOST_RECENT" ]]; then - echo "Matching commit(s) found but no v* tags contain them yet." >&2 - exit 1 -fi - -echo "Latest maching tag containing any of those commit" >&2 -echo "$MOST_RECENT" diff --git a/backends/ze/gen_ze.rb b/backends/ze/gen_ze.rb index b24ed87f7..131cc8257 100644 --- a/backends/ze/gen_ze.rb +++ b/backends/ze/gen_ze.rb @@ -247,7 +247,7 @@ def gen_struct_printer(namespace, types) } $ze_commands.each do |c| - next if c.name.match(/zeGet.*ProcAddrTable/) || c.name.match(/zeLoaderInit/) || c.name.match(/^zel/) + next if c.name.match(/zeGet.*ProcAddrTable/) || c.name.match(/zeLoaderInit/) || c.name.match(/^zel/) || c.name == "zeLoaderGetTracingHandle" puts <<~EOF #{c.decl_hidden_alias}; diff --git a/backends/ze/include/loader/ze_loader.h b/backends/ze/include/loader/ze_loader.h index 5b6261e29..74a6e0deb 100644 --- a/backends/ze/include/loader/ze_loader.h +++ b/backends/ze/include/loader/ze_loader.h @@ -13,6 +13,7 @@ #endif #include "../ze_api.h" +#include #if defined(__cplusplus) extern "C" { @@ -138,4 +139,4 @@ zelDisableTracingLayer(); #if defined(__cplusplus) } // extern "C" #endif -#endif //_ZE_LOADER_H \ No newline at end of file +#endif //_ZE_LOADER_H diff --git a/backends/ze/include/loader/ze_loader_api.h b/backends/ze/include/loader/ze_loader_api.h new file mode 100644 index 000000000..9dae01db5 --- /dev/null +++ b/backends/ze/include/loader/ze_loader_api.h @@ -0,0 +1,100 @@ +/* + * + * Copyright (C) 2020-2021 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + * @file ze_loader_api.cpp + * + */ + +//#include "ze_loader_internal.h" +#include "loader/ze_loader.h" + +//Modification +#include "../ze_api.h" +#include +#define HMODULE void * + +#define TRACING_COMP_NAME "loader" + +#if defined(__cplusplus) +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Exported function for initializing loader +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +ZE_DLLEXPORT ze_result_t ZE_APICALL +zeLoaderInit(); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Exported function for verifying usable L0 Drivers for Loader to report +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +//ZE_DLLEXPORT ze_result_t ZE_APICALL +//zelLoaderDriverCheck(ze_init_flags_t flags, ze_init_driver_type_desc_t* desc, ze_global_dditable_t *globalInitStored, zes_global_dditable_t *sysmanGlobalInitStored, bool *requireDdiReinit, bool sysmanOnly); +ZE_DLLEXPORT ze_result_t ZE_APICALL +zelLoaderDriverCheck(ze_init_flags_t flags, ze_init_driver_type_desc_t* desc, ze_global_dditable_t *globalInitStored, void *sysmanGlobalInitStored, bool *requireDdiReinit, bool sysmanOnly); + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Internal function for Setting the ddi table for the Tracing Layer. +/// +//ZE_DLLEXPORT ze_result_t ZE_APICALL +//zelLoaderTracingLayerInit(std::atomic &zeDdiTable); +ZE_DLLEXPORT ze_result_t ZE_APICALL +zelLoaderTracingLayerInit(void* zeDdiTable); + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Exported function for getting tracing lib handle +/// +/// @returns +/// - ::handle to tracing library +ZE_DLLEXPORT HMODULE ZE_APICALL +zeLoaderGetTracingHandle(); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Get pointer to Loader Context +/// +/// @returns +/// - ::handle to tracing library +//ZE_DLLEXPORT loader::context_t *ZE_APICALL +//zelLoaderGetContext(); +ZE_DLLEXPORT void *ZE_APICALL +zelLoaderGetContext(); + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Exported function for getting version +/// +// Aurora loader doesn't export it for some reason +//ZE_DLLEXPORT ze_result_t ZE_APICALL +//zelLoaderGetVersion(zel_component_version_t *version); + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Exported function for getting versions of all components +/// +ZE_DLLEXPORT ze_result_t ZE_APICALL +zelLoaderGetVersionsInternal( + size_t *num_elems, //Pointer to num versions to get. + zel_component_version_t *versions); //Pointer to array of versions. If set to NULL, num_elems is returned + + +ZE_DLLEXPORT ze_result_t ZE_APICALL +zelLoaderTranslateHandleInternal( + zel_handle_type_t handleType, //Handle type + void *handleIn, //Input: handle to translate from loader handle to driver handle + void **handleOut); //Output: Pointer to handleOut is set to driver handle if successful + + +#if defined(__cplusplus) +} +#endif From 2882b23b88a989263356847d70029fb0982c2adb Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Thu, 5 Mar 2026 21:52:58 +0000 Subject: [PATCH 23/30] Lets go! --- backends/ze/Makefile.am | 2 +- backends/ze/README.md | 39 +++++++++++++++++- backends/ze/extract_ze.rb | 2 +- backends/ze/extract_zel.rb | 3 +- backends/ze/headers.patch | 41 +++++++++++++++---- backends/ze/include/loader/ze_loader_api.h | 9 ++-- .../loader/ze_loader_api_ze_namespace.h | 14 +++++++ 7 files changed, 92 insertions(+), 18 deletions(-) create mode 100644 backends/ze/include/loader/ze_loader_api_ze_namespace.h diff --git a/backends/ze/Makefile.am b/backends/ze/Makefile.am index 3420e609b..9ada1de32 100644 --- a/backends/ze/Makefile.am +++ b/backends/ze/Makefile.am @@ -64,7 +64,7 @@ $(MODIFIED_ZE_HDR) &: $(ZE_HDR) $(srcdir)/headers.patch $(RM) -r modified_include/ cp -r $(srcdir)/include/ modified_include/ chmod -R u+w modified_include/ -#cat $(srcdir)/headers.patch | patch -i - -d modified_include/ -s -p1 + cat $(srcdir)/headers.patch | patch -i - -d modified_include/ -s -p1 clean-local: $(RM) -r modified_include diff --git a/backends/ze/README.md b/backends/ze/README.md index cd465e8ea..94b0aab45 100644 --- a/backends/ze/README.md +++ b/backends/ze/README.md @@ -37,8 +37,14 @@ $ git ls-remote --sort="v:refname" --tags https://github.com/oneapi-src/level- 6369d8d642e9c7625e67f38664267f171b8e42dc refs/tags/v1.28.2 ``` +### Note on `ze_loader_api.h` + - We need also to copy / paste `source/loader/ze_loader_api.h`. The loader export it, so we export it too, just in case. - - Those header, are a nighmare of C++ header. We patch them manully. +- Those header, are a nighmare. + - 1/ C++ header: We modify them manually to remove any C++ + - 2/ We split them by namespace: + - `ze_loader`, contain `zel`, + - `ze_loader_api_ze_namespace.h` contain the `ze`. ## 2/ DDI Ver @@ -88,7 +94,7 @@ grep "ZE_API_VERSION_CURRENT" ../include/ze_api.h # Sanity check - Try to compile -# Potential Problems +# Potential Problems, Thinks to check ## 0 @@ -96,6 +102,35 @@ Run `utils_spec_update/test_symbol_exported.sh $loader_so $out_so` If symbol are not exposed by the loader, but are exposed by us it's a bug! Add a patch to comment them in `header.path`. +``` +$ bash ./utils_spec_update/test_symbol_exported.sh /usr/lib64/libze_loader.so ~/project/p26.04/THAPI/build/ici/lib/thapi/ze/libze_loader.so +--- /usr/lib64/libze_loader.so ++++ /home/applenco/project/p26.04/THAPI/build/ici/lib/thapi/ze/libze_loader.so +@@ -240,6 +240,7 @@ + zelLoaderContextTeardown + zelLoaderDriverCheck + zelLoaderGetContext ++zelLoaderGetVersion + zelLoaderGetVersions + zelLoaderGetVersionsInternal + zelLoaderTracingLayerInit +@@ -444,6 +445,7 @@ + zelTracerRTASParallelOperationGetPropertiesExtRegisterCallback + zelTracerRTASParallelOperationJoinExpRegisterCallback + zelTracerRTASParallelOperationJoinExtRegisterCallback ++zelTracerResetAllCallbacks + zelTracerSamplerCreateRegisterCallback + zelTracerSamplerDestroyRegisterCallback + zelTracerSetEnabled +``` + +One possibility is to do: +``` +cp -r ../../build/backends/ze/modified_include . +# Modify `modified_include` +Then +`diff -u4 -r --new-file include/ modified_include/ > headers.patch` + ## 1 ``` diff --git a/backends/ze/extract_ze.rb b/backends/ze/extract_ze.rb index 180d9b185..4c81d2f44 100644 --- a/backends/ze/extract_ze.rb +++ b/backends/ze/extract_ze.rb @@ -4,7 +4,7 @@ #include #include #include - #include + #include EOF if enable_clang_parser? diff --git a/backends/ze/extract_zel.rb b/backends/ze/extract_zel.rb index 57bba4dab..f05a3136c 100644 --- a/backends/ze/extract_zel.rb +++ b/backends/ze/extract_zel.rb @@ -6,13 +6,14 @@ #include #include #include + #include EOF if enable_clang_parser? header = [shared_header, zel_header].join("\n") require 'open3' yaml, status = Open3.capture2( - 'h2yaml --compat-cast-to-yaml -Wc,-xc -Wc,-Imodified_include/ --filter-header "zel" -', stdin_data: header + 'h2yaml --compat-cast-to-yaml -Wc,-xc -Wc,-Imodified_include/ --filter-header "zel|ze_loader" -', stdin_data: header ) exit(1) unless status.success? diff --git a/backends/ze/headers.patch b/backends/ze/headers.patch index add1cc19a..1912dee4a 100644 --- a/backends/ze/headers.patch +++ b/backends/ze/headers.patch @@ -1,13 +1,36 @@ -diff -u4 -r --new-file include/cuda.h modified_include/cuda.h ---- include/layers/zel_tracing_register_cb.h 2026-02-27 16:26:19.000000000 +0000 -+++ modified_include/layers/zel_tracing_register_cb.h 2026-02-27 16:30:52.000000000 +0000 -@@ -2727,8 +2727,9 @@ - /// allowing the callback the ability to modify the parameter's value +diff -u4 -r --new-file include/layers/zel_tracing_register_cb.h modified_include/layers/zel_tracing_register_cb.h +--- include/layers/zel_tracing_register_cb.h 2026-03-05 21:34:03.000000000 +0000 ++++ modified_include/layers/zel_tracing_register_cb.h 2026-03-05 21:45:37.000000000 +0000 +@@ -3919,10 +3919,11 @@ + ze_pfnCommandListUpdateMutableCommandKernelsExpCb_t pfnUpdateMutableCommandKernelsExpCb + ); - typedef struct _zer_get_default_context_params_t - { -+ uint8_t _dummy; // padding to ensure ABI compatibility between C and C++ - } zer_get_default_context_params_t; + +-ZE_APIEXPORT ze_result_t ZE_APICALL +-zelTracerResetAllCallbacks(zel_tracer_handle_t hTracer); ++// Not exposed by the loader ++//ZE_APIEXPORT ze_result_t ZE_APICALL ++//zelTracerResetAllCallbacks(zel_tracer_handle_t hTracer); + + + #if defined(__cplusplus) + } // extern "C" +diff -u4 -r --new-file include/loader/ze_loader_api.h modified_include/loader/ze_loader_api.h +--- include/loader/ze_loader_api.h 2026-03-05 21:17:00.000000000 +0000 ++++ modified_include/loader/ze_loader_api.h 2026-03-05 21:46:13.000000000 +0000 +@@ -74,11 +74,11 @@ + + /////////////////////////////////////////////////////////////////////////////// + /// @brief Exported function for getting version + /// +-// Aurora loader doesn't export it for some reason +-ZE_DLLEXPORT ze_result_t ZE_APICALL +-zelLoaderGetVersion(zel_component_version_t *version); ++// Not exposed by the loader ++//ZE_DLLEXPORT ze_result_t ZE_APICALL ++//zelLoaderGetVersion(zel_component_version_t *version); /////////////////////////////////////////////////////////////////////////////// + /// @brief Exported function for getting versions of all components +Binary files include/loader/.ze_loader_api.h.swp and modified_include/loader/.ze_loader_api.h.swp differ diff --git a/backends/ze/include/loader/ze_loader_api.h b/backends/ze/include/loader/ze_loader_api.h index 9dae01db5..97171c7bd 100644 --- a/backends/ze/include/loader/ze_loader_api.h +++ b/backends/ze/include/loader/ze_loader_api.h @@ -22,14 +22,15 @@ extern "C" { #endif +// Moved to `ze_loader_api_ze_namespace.h` /////////////////////////////////////////////////////////////////////////////// /// @brief Exported function for initializing loader /// /// @returns /// - ::ZE_RESULT_SUCCESS /// - ::ZE_RESULT_ERROR_UNINITIALIZED -ZE_DLLEXPORT ze_result_t ZE_APICALL -zeLoaderInit(); +//ZE_DLLEXPORT ze_result_t ZE_APICALL +//zeLoaderInit(); /////////////////////////////////////////////////////////////////////////////// /// @brief Exported function for verifying usable L0 Drivers for Loader to report @@ -75,8 +76,8 @@ zelLoaderGetContext(); /// @brief Exported function for getting version /// // Aurora loader doesn't export it for some reason -//ZE_DLLEXPORT ze_result_t ZE_APICALL -//zelLoaderGetVersion(zel_component_version_t *version); +ZE_DLLEXPORT ze_result_t ZE_APICALL +zelLoaderGetVersion(zel_component_version_t *version); /////////////////////////////////////////////////////////////////////////////// diff --git a/backends/ze/include/loader/ze_loader_api_ze_namespace.h b/backends/ze/include/loader/ze_loader_api_ze_namespace.h new file mode 100644 index 000000000..a365c4bd6 --- /dev/null +++ b/backends/ze/include/loader/ze_loader_api_ze_namespace.h @@ -0,0 +1,14 @@ +// Manualy created! +// Moving `ze` Namespace here from `ze_loader_api.h` +#include "../ze_api.h" + +// Moved to `ze_loader_api_ze_namespace.h` +/////////////////////////////////////////////////////////////////////////////// +/// @brief Exported function for initializing loader +/// +/// @returns +/// - ::ZE_RESULT_SUCCESS +/// - ::ZE_RESULT_ERROR_UNINITIALIZED +ZE_DLLEXPORT ze_result_t ZE_APICALL +zeLoaderInit(); + From dbf0d350652726f4159612455ccca6a5e6f6b8d9 Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Thu, 5 Mar 2026 22:55:24 +0000 Subject: [PATCH 24/30] fix distcheck --- backends/ze/gen_ze.rb | 2 +- backends/ze/ze_model.rb | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/backends/ze/gen_ze.rb b/backends/ze/gen_ze.rb index 131cc8257..12dc75dfc 100644 --- a/backends/ze/gen_ze.rb +++ b/backends/ze/gen_ze.rb @@ -247,7 +247,7 @@ def gen_struct_printer(namespace, types) } $ze_commands.each do |c| - next if c.name.match(/zeGet.*ProcAddrTable/) || c.name.match(/zeLoaderInit/) || c.name.match(/^zel/) || c.name == "zeLoaderGetTracingHandle" + next if c.name.match(/zeGet.*ProcAddrTable|^zeLoaderInit|^zeLoaderGetTracingHandle/) puts <<~EOF #{c.decl_hidden_alias}; diff --git a/backends/ze/ze_model.rb b/backends/ze/ze_model.rb index c7129e7bb..b2987f94a 100644 --- a/backends/ze/ze_model.rb +++ b/backends/ze/ze_model.rb @@ -87,12 +87,12 @@ end end -$zer_meta_parameters = YAML.load_file(File.join(SRC_DIR, 'zer_meta_parameters.yaml')) -$zer_meta_parameters['meta_parameters'].each do |func, list| - list.each do |type, *args| - register_meta_parameter func, Kernel.const_get(type), *args - end -end +#$zer_meta_parameters = YAML.load_file(File.join(SRC_DIR, 'zer_meta_parameters.yaml')) +#$zer_meta_parameters['meta_parameters'].each do |func, list| +# list.each do |type, *args| +# register_meta_parameter func, Kernel.const_get(type), *args +# end +#end $zex_meta_parameters = YAML.load_file(File.join(SRC_DIR, 'zex_meta_parameters.yaml')) $zex_meta_parameters['meta_parameters'].each do |func, list| From 07fb3f04f1bcc7b472ef6c0eee6ef190c01fb20f Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Thu, 5 Mar 2026 22:58:05 +0000 Subject: [PATCH 25/30] fix init --- xprof/xprof.rb.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xprof/xprof.rb.in b/xprof/xprof.rb.in index 749a1a9c0..9de81bad9 100755 --- a/xprof/xprof.rb.in +++ b/xprof/xprof.rb.in @@ -500,7 +500,7 @@ class SamplingDaemon < SpawnDaemon end def initialize(h = {}) - super + super() daemon_path = "#{BINDIR}/thapi_sampling_daemon" raise "No sampling_daemon binary found at #{daemon_path}" unless File.exist?(daemon_path) From 730f960968c0e04c9c473bcaaa651393da1b4725 Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Thu, 5 Mar 2026 23:12:02 +0000 Subject: [PATCH 26/30] Good comment --- backends/ze/ze_model.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backends/ze/ze_model.rb b/backends/ze/ze_model.rb index b2987f94a..28dd55208 100644 --- a/backends/ze/ze_model.rb +++ b/backends/ze/ze_model.rb @@ -87,12 +87,12 @@ end end -#$zer_meta_parameters = YAML.load_file(File.join(SRC_DIR, 'zer_meta_parameters.yaml')) -#$zer_meta_parameters['meta_parameters'].each do |func, list| +# $zer_meta_parameters = YAML.load_file(File.join(SRC_DIR, 'zer_meta_parameters.yaml')) +# $zer_meta_parameters['meta_parameters'].each do |func, list| # list.each do |type, *args| # register_meta_parameter func, Kernel.const_get(type), *args # end -#end +# end $zex_meta_parameters = YAML.load_file(File.join(SRC_DIR, 'zex_meta_parameters.yaml')) $zex_meta_parameters['meta_parameters'].each do |func, list| From c1d72e98c1d39eb0f22b93c80fc9a69de2dfc385 Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Thu, 5 Mar 2026 23:39:23 +0000 Subject: [PATCH 27/30] Add utlis --- backends/ze/utils_spec_update/test_symbol_exported.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 backends/ze/utils_spec_update/test_symbol_exported.sh diff --git a/backends/ze/utils_spec_update/test_symbol_exported.sh b/backends/ze/utils_spec_update/test_symbol_exported.sh new file mode 100644 index 000000000..a7e60f9a3 --- /dev/null +++ b/backends/ze/utils_spec_update/test_symbol_exported.sh @@ -0,0 +1,7 @@ + +get_funcs() { + readelf -W --dyn-syms "$1" | awk '/GLOBAL/ && /DEFAULT/ && /FUNC/ && $8 ~ /^ze/ {print $8}' | LC_COLLATE=C sort +} + +diff -u --label "$1" --label "$2" <(get_funcs $1) <(get_funcs $2) + From d00ece9ed81eb4cdc2ddbe4145e0786be1172c7c Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Fri, 6 Mar 2026 00:04:57 +0000 Subject: [PATCH 28/30] Update ze metadata --- backends/ze/ze_meta_parameters.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/backends/ze/ze_meta_parameters.yaml b/backends/ze/ze_meta_parameters.yaml index 354dc6920..80553794c 100644 --- a/backends/ze/ze_meta_parameters.yaml +++ b/backends/ze/ze_meta_parameters.yaml @@ -336,3 +336,31 @@ meta_parameters: - [ InScalar, desc ] zeCommandListUpdateMutableCommandWaitEventsExp: - [ InArray, phWaitEvents, numWaitEvents ] + zeInitDrivers: + - [ InScalar, desc ] + - [ InOutScalar, pCount ] + - [ OutArray, phDrivers, pCount ] + zeKernelGetBinaryExp: + - [ InOutScalar, pSize ] + - [ OutArray, pKernelBinary, pSize ] + zeDeviceImportExternalSemaphoreExt: + - [ InScalar, desc ] + - [ OutScalar, phSemaphore ] + zeCommandListAppendSignalExternalSemaphoreExt: + - [ InArray, phSemaphores, numSemaphores ] + - [ InArray, signalParams, numSemaphores ] + - [ InArray, phWaitEvents, numWaitEvents ] + zeCommandListAppendWaitExternalSemaphoreExt: + - [ InArray, phSemaphores, numSemaphores ] + - [ InArray, waitParams, numSemaphores ] + - [ InArray, phWaitEvents, numWaitEvents ] + zeDeviceGetVectorWidthPropertiesExt: + - [ InOutScalar, pCount ] + - [ OutArray, pVectorWidthProperties, pCount ] + zeCommandListGetNextCommandIdWithKernelsExp: + - [ InOutScalar, desc ] # Yep, it's special https://oneapi-src.github.io/level-zero-spec/level-zero/1.11/core/api.html#zecommandlistgetnextcommandidwithkernelsexp + - [ InArray, phKernels, numKernels ] + - [ OutScalar, pCommandId ] + zeCommandListUpdateMutableCommandKernelsExp: + - [ InArray, pCommandId, numKernels ] + - [ InArray, phKernels, numKernels ] From ace31e3979db8af686691b1e3c898ae24235a8a3 Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Fri, 6 Mar 2026 00:07:34 +0000 Subject: [PATCH 29/30] Add check_metadata.py --- backends/ze/README.md | 4 ++ .../ze/utils_spec_update/check_metadata.py | 58 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 backends/ze/utils_spec_update/check_metadata.py diff --git a/backends/ze/README.md b/backends/ze/README.md index 94b0aab45..7e0b76343 100644 --- a/backends/ze/README.md +++ b/backends/ze/README.md @@ -94,6 +94,10 @@ grep "ZE_API_VERSION_CURRENT" ../include/ze_api.h # Sanity check - Try to compile +## 4/ Add medatadata + +You can use the `check_metadata.py` script to help you indentify function which need update and then figure it out. + # Potential Problems, Thinks to check ## 0 diff --git a/backends/ze/utils_spec_update/check_metadata.py b/backends/ze/utils_spec_update/check_metadata.py new file mode 100644 index 000000000..297ed4c47 --- /dev/null +++ b/backends/ze/utils_spec_update/check_metadata.py @@ -0,0 +1,58 @@ +#!/usr/bin/env python3 +""" +Verify that all functions in ze_api.yaml with pointer parameters +have corresponding entries in ze_meta_parameters.yaml. +""" + +import sys +import yaml + + +def load_yaml(path): + with open(path) as f: + return yaml.safe_load(f) + + +IGNORED_PARAMS = {"ptr", "pDdiTable"} + + +def get_pointer_params(func): + return [ + param["name"] + for param in func.get("params", []) + if param.get("type", {}).get("kind") == "pointer" + and param["name"] not in IGNORED_PARAMS + ] + + +def main(): + api_path, meta_path = sys.argv[1], sys.argv[2] + + api = load_yaml(api_path) + meta = load_yaml(meta_path) + + meta_keys = set(meta.get("meta_parameters", {}).keys()) + + # Build {func_name: [pointer_param_names]} for functions that have pointer params + needs_meta = { + func["name"]: get_pointer_params(func) + for func in api.get("functions", []) + if get_pointer_params(func) + } + + missing = {name: params for name, params in needs_meta.items() if name not in meta_keys} + + if missing: + print(f"❌ {len(missing)} function(s) with pointer params are missing metadata:\n") + for func_name, params in missing.items(): + print(f" {func_name}:") + for p in params: + print(f" - {p}") + sys.exit(1) + else: + print(f"✅ All {len(needs_meta)} function(s) with pointer params have metadata.") + sys.exit(0) + + +if __name__ == "__main__": + main() From 1cef2fa61a792ba011dbcc78a01ec5dd502118f0 Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Fri, 6 Mar 2026 00:09:15 +0000 Subject: [PATCH 30/30] Format shell... --- backends/ze/utils_spec_update/test_symbol_exported.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/backends/ze/utils_spec_update/test_symbol_exported.sh b/backends/ze/utils_spec_update/test_symbol_exported.sh index a7e60f9a3..f6a9920f3 100644 --- a/backends/ze/utils_spec_update/test_symbol_exported.sh +++ b/backends/ze/utils_spec_update/test_symbol_exported.sh @@ -1,7 +1,5 @@ - get_funcs() { - readelf -W --dyn-syms "$1" | awk '/GLOBAL/ && /DEFAULT/ && /FUNC/ && $8 ~ /^ze/ {print $8}' | LC_COLLATE=C sort + readelf -W --dyn-syms "$1" | awk '/GLOBAL/ && /DEFAULT/ && /FUNC/ && $8 ~ /^ze/ {print $8}' | LC_COLLATE=C sort } -diff -u --label "$1" --label "$2" <(get_funcs $1) <(get_funcs $2) - +diff -u --label "$1" --label "$2" <(get_funcs $1) <(get_funcs $2)