├── .github ├── dependabot.yml ├── docker │ └── build.Dockerfile └── workflows │ ├── loader-integration.yml │ └── scorecard.yml ├── .gitignore ├── CMakeLists.txt ├── LICENSE ├── README.md ├── REQUIREMENTS.md ├── SECURITY.md ├── scripts ├── Doxyfile ├── README.md ├── YaML.md ├── assets │ ├── html │ │ ├── _static │ │ │ └── custom.css │ │ └── _templates │ │ │ └── breadcrumbs.html │ ├── images │ │ ├── A21_Subvertex+Remote.png │ │ ├── A21_Subvertex.png │ │ ├── A21_Vertex+Subvertex+Remote.png │ │ ├── A21_Vertex.png │ │ ├── DGXA100_Vertex.png │ │ ├── core_device.png │ │ ├── core_event.png │ │ ├── core_fence.png │ │ ├── core_module.png │ │ ├── core_queue.png │ │ ├── core_reserved_suballocations.png │ │ ├── core_subdevice.png │ │ ├── intel-logo.png │ │ ├── one_api_sw_stack.png │ │ ├── tools_metric_hierarchy.png │ │ ├── tools_metric_query.png │ │ ├── tools_metric_streamer.png │ │ ├── tools_sysman_fabric.png │ │ ├── tools_sysman_fan_flow.png │ │ ├── tools_sysman_freq_flow.png │ │ ├── tools_sysman_freq_subdevices.png │ │ ├── tools_sysman_oc.png │ │ └── tools_sysman_resprops.png │ ├── level_zero.vsdx │ └── topology.vsdx ├── config.ini ├── core │ ├── CacheLineSize.yml │ ├── EUCount.yml │ ├── EXT.rst │ ├── EXT_Bfloat16Conversions.rst │ ├── EXT_CacheReservation.rst │ ├── EXT_DeviceCacheLineSize.rst │ ├── EXT_DeviceIpVersion.rst │ ├── EXT_DeviceLUID.rst │ ├── EXT_Device_vector_sizes.rst │ ├── EXT_Driver_DDIHandles.rst │ ├── EXT_EUCount.rst │ ├── EXT_EXP_BindlessImages.rst │ ├── EXT_EventQueryKernelTimestamps.rst │ ├── EXT_Exp_BandwidthProperties.rst │ ├── EXT_Exp_CommandListClone.rst │ ├── EXT_Exp_CounterBasedEventPools.rst │ ├── EXT_Exp_EventQueryTimestamps.rst │ ├── EXT_Exp_Fabric.rst │ ├── EXT_Exp_GlobalOffset.rst │ ├── EXT_Exp_ImageMemoryProperties.rst │ ├── EXT_Exp_ImageView.rst │ ├── EXT_Exp_ImageViewPlanar.rst │ ├── EXT_Exp_ImmediateCommandListAppend.rst │ ├── EXT_Exp_KernelBinary.rst │ ├── EXT_Exp_ModuleProgram.rst │ ├── EXT_Exp_MutableCommandList.rst │ ├── EXT_Exp_PowerSavingHint.rst │ ├── EXT_Exp_RTASBuilder.rst │ ├── EXT_Exp_RelaxedAllocLimits.rst │ ├── EXT_Exp_SchedulingHints.rst │ ├── EXT_Exp_SubAllocationProperties.rst │ ├── EXT_ExternalSemaphores.rst │ ├── EXT_FloatAtomics.rst │ ├── EXT_ImageCopy.rst │ ├── EXT_ImageQueryAllocProperties.rst │ ├── EXT_ImageView.rst │ ├── EXT_ImageViewPlanar.rst │ ├── EXT_KernelMaxGroupSizeProperties.rst │ ├── EXT_LinkOnceODR.rst │ ├── EXT_LinkageInspection.rst │ ├── EXT_MemoryCompressionHints.rst │ ├── EXT_MemoryFreePolicies.rst │ ├── EXT_MemoryProperties.rst │ ├── EXT_PCIProperties.rst │ ├── EXT_RTAS.rst │ ├── EXT_Raytracing.rst │ ├── EXT_SRGB.rst │ ├── EXT_Subgroups.rst │ ├── INTRO.rst │ ├── PCIProperties.yml │ ├── PROG.rst │ ├── RTAS.yml │ ├── RTASBuilder.yml │ ├── SPIRV.rst │ ├── SRGB.yml │ ├── bandwidth.yml │ ├── barrier.yml │ ├── bfloat16conversions.yml │ ├── bindlessimages.yml │ ├── cacheReservation.yml │ ├── cmdlist.yml │ ├── cmdqueue.yml │ ├── commandListClone.yml │ ├── common.yml │ ├── context.yml │ ├── copy.yml │ ├── counterbasedeventpool.yml │ ├── device.yml │ ├── deviceLUID.yml │ ├── deviceVectorSizes.yml │ ├── deviceipversion.yml │ ├── driver.yml │ ├── driverDDIHandles.yml │ ├── event.yml │ ├── eventQueryKernelTimestamps.yml │ ├── eventquerytimestamps.yml │ ├── externalSemaphores.yml │ ├── fabric.yml │ ├── fence.yml │ ├── floatAtomics.yml │ ├── globaloffset.yml │ ├── image.yml │ ├── imageCopy.yml │ ├── imageQueryAllocProperties.yml │ ├── imagememoryproperties.yml │ ├── imageview.yml │ ├── imageviewplanar.yml │ ├── immediateCommandListAppend.yml │ ├── kernelBinary.yml │ ├── kernelMaxGroupSizeProperties.yml │ ├── kernelSchedulingHints.yml │ ├── linkageInspection.yml │ ├── linkonceodr.yml │ ├── memory.yml │ ├── memoryCompressionHints.yml │ ├── memoryFreePolicies.yml │ ├── memoryProperties.yml │ ├── module.yml │ ├── mutableCommandList.yml │ ├── powersavinghint.yml │ ├── program.yml │ ├── raytracing.yml │ ├── relaxedAllocLimits.yml │ ├── residency.yml │ ├── sampler.yml │ ├── subAllocationsProperties.yml │ ├── subgroups.yml │ └── virtual.yml ├── generate_code.py ├── generate_docs.py ├── parse_specs.py ├── retrieve_api_tables.py ├── run.py ├── sysman │ ├── EXT_EngineActivity.rst │ ├── EXT_Exp_EccState.rst │ ├── EXT_Exp_FirmwareSecurityVersion.rst │ ├── EXT_Exp_MemPageOfflineState.rst │ ├── EXT_Exp_RasState.rst │ ├── EXT_Exp_VirtualFunctionManagement.rst │ ├── EXT_Exp_power_domain.rst │ ├── EXT_MemoryBwCounterValidBits.rst │ ├── EXT_PowerLimits.rst │ ├── EXT_SysmanDeviceMapping.rst │ ├── Overclock.yml │ ├── PROG.rst │ ├── common.yml │ ├── device.yml │ ├── diagnostics.yml │ ├── driver.yml │ ├── ecc.yml │ ├── eccState.yml │ ├── engine.yml │ ├── engineActivity.yml │ ├── events.yml │ ├── fabric.yml │ ├── fan.yml │ ├── firmware.yml │ ├── firmwareSecurityVersion.yml │ ├── frequency.yml │ ├── led.yml │ ├── memPageOfflineState.yml │ ├── memory.yml │ ├── memoryBwCounterValidBits.yml │ ├── performance.yml │ ├── power.yml │ ├── powerDomainProperties.yml │ ├── powerLimits.yml │ ├── psu.yml │ ├── ras.yml │ ├── rasState.yml │ ├── scheduler.yml │ ├── standby.yml │ ├── sysmanDeviceMapping.yml │ ├── temperature.yml │ └── virtualFunctionManagement.yml ├── templates │ ├── __init__.py │ ├── api.cpp.mako │ ├── api.h.mako │ ├── api.py.mako │ ├── api.rst.mako │ ├── api_listing.mako │ ├── conf.py.mako │ ├── ddi.h.mako │ ├── ddi_common.h.mako │ ├── helper.py │ ├── index.rst.mako │ └── versions.rst.mako ├── tools │ ├── EXT_Exp_APITracing.rst │ ├── EXT_Exp_ConcurrentMetricGroup.rst │ ├── EXT_Exp_GlobalTimestamps.rst │ ├── EXT_Exp_MetricExportData.rst │ ├── EXT_Exp_MetricExportMemory.rst │ ├── EXT_Exp_MetricGroupMarker.rst │ ├── EXT_Exp_MetricProgrammable.rst │ ├── EXT_Exp_MetricTracer.rst │ ├── EXT_Exp_MetricsRuntimeEnableDisable.rst │ ├── EXT_Exp_MultiMetricValues.rst │ ├── GlobalTimestamps.yml │ ├── PROG.rst │ ├── cmdlist.yml │ ├── common.yml │ ├── concurrentMetricGroup.yml │ ├── context.yml │ ├── debug.yml │ ├── device.yml │ ├── metric.yml │ ├── metricExportData.yml │ ├── metricExportMemory.yml │ ├── metricGroupMarker.yml │ ├── metricProgrammable.yml │ ├── metricRuntimeEnableDisable.yml │ ├── metricTracer.yml │ ├── module.yml │ ├── multiMetricValues.yml │ ├── pin.yml │ └── tracing.yml └── util.py ├── source └── CMakeLists.txt └── third_party ├── CMakeLists.txt └── requirements.txt /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2023 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | 7 | version: 2 8 | updates: 9 | # Enable version updates for pip 10 | - package-ecosystem: "pip" 11 | # Look for `requirements.txt` `third_party` directory 12 | directory: "/third_party" 13 | # Check the pip registry for updates every week 14 | schedule: 15 | interval: "weekly" 16 | # Disable version updates for pip dependencies 17 | open-pull-requests-limit: 0 18 | -------------------------------------------------------------------------------- /.github/docker/build.Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1.4 2 | FROM amr-registry.caas.intel.com/level-zero-linux-compute/ubuntu:24.10 3 | 4 | SHELL ["/bin/bash", "-e", "-c"] 5 | 6 | RUN --mount=type=cache,target=/var/cache/apt < to the output path 12 | set(CUSTOM_COMMAND_BINARY_DIR ${CUSTOM_COMMAND_BINARY_DIR}/$) 13 | endif() 14 | 15 | #CXX compiler support 16 | if(NOT MSVC) 17 | include(CheckCXXCompilerFlag) 18 | CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14) 19 | CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X) 20 | if(COMPILER_SUPPORTS_CXX14) 21 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") 22 | elseif(COMPILER_SUPPORTS_CXX0X) 23 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") 24 | else() 25 | message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++14 support. Please use a different C++ compiler.") 26 | endif() 27 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -fPIC") 28 | endif() 29 | 30 | #MSVC compile flags 31 | if(MSVC) 32 | string(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") 33 | string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}") 34 | 35 | # treat warnings as errors 36 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX /W3 /wd4996") 37 | 38 | # enable multi-process compilation 39 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") 40 | endif() 41 | 42 | # Allow custom third_party folder 43 | if(NOT DEFINED THIRD_PARTY_DIR) 44 | set(THIRD_PARTY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party) 45 | endif() 46 | 47 | # Option to disable tests 48 | option(${PROJECT_NAME}_BUILD_TESTS "Build unit tests." ON) 49 | 50 | add_subdirectory(${THIRD_PARTY_DIR}) 51 | 52 | # Copy third_party_binaries to output BIN folder 53 | #add_custom_target(copy_third_party_files) 54 | 55 | #add_custom_command( 56 | # TARGET copy_third_party_files 57 | # POST_BUILD 58 | #) 59 | 60 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) 61 | add_subdirectory(source) 62 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Intel Corporation 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Contents 2 | This repo contains the following: 3 | - API specification in YaML 4 | - API programming guide in Markdown 5 | - API C/C++ header files (generated) 6 | - API Python module (generated) 7 | - Sample C++ wrapper (generated) 8 | - Sample C/C++ import library (generated) 9 | 10 | # Source Code Generation 11 | Code is generated using included [Python scripts](/scripts/README.md). 12 | 13 | # Documentation 14 | Documentation is generated from source code using Doxygen. 15 | 16 | # Third-Party Tools 17 | Contains requirements for building spec. Compiler tools for building need to be manually installed for Windows. 18 | 19 | # Building 20 | Project is defined using [CMake](https://cmake.org/). 21 | 22 | **Windows**: 23 | Generating Visual Studio Project. EXE and binaries will be in **build/bin/{build_config}** 24 | ~~~~ 25 | mkdir build 26 | cd build 27 | cmake {path_to_source_dir} -G "Visual Studio 15 2017 Win64" 28 | ~~~~ 29 | 30 | **Linux**: 31 | Executable and binaries will be in **build/bin** 32 | ~~~~ 33 | mkdir build 34 | cd build 35 | cmake {path_to_source_dir} 36 | make 37 | ~~~~ 38 | 39 | -------------------------------------------------------------------------------- /REQUIREMENTS.md: -------------------------------------------------------------------------------- 1 | # Requirements 2 | 3 | ## API and Library Requirements 4 | 5 | ### API Namespace 6 | * API's will clearly define the functionality 7 | * API's will use a consistent style within the library 8 | * APIs' will not allow namespace collision when multiple libraries are linked in the same user application 9 | * API will be consistent across libraries included in the product 10 | * Will not allow namespace collision when multiple libraries are linked in the same user application 11 | * Exceptions: 12 | + If two libraries are unlikely to used together, willing to sacrifice optimal performance 13 | + For existing libraries, favor API consistency vs. stylist name space 14 | 15 | ### Common Functional Requirements 16 | * Libraries will use common resource allocation (memory, threads, device context) - under & above API where applicable 17 | * Libraries will support consistent data types to avoid unnecessary data manipulation / reformatting 18 | * Libraries will support a composable threading model and synchronous/asynchronous operations 19 | * Libraries will utilize unified error reporting, debug information, I/O mechanism (file, network, ...), etc. 20 | 21 | ### Directory Structure and Deployment Requirements 22 | * The Libraries can be delivered as "stand-alone" deliverables 23 | * The Libraries can be delivered in a common product suite configuration (with other product components) 24 | * When delivered in a product suite, the directory structure will conform to the master product directory layout requirements 25 | * The library subcomponents will be installed in a consistent directory structure across the included libraries 26 | * When two or more libraries are installed independently, they will conform to a common directory structure and versioning layout 27 | * Libraries will be packaged for installation using common packaging mechanism for the operations systems that they targeted (e.g. .rpm, .deb, .msi, etc.) 28 | 29 | ### Library Language Binding Requirements 30 | * DPC++ Language binding requirements 31 | + Performance Libraries that execute on multiple Intel IP's shall support the DPCP++ language binding as the primary mechanism for programing on multiple Intel Hardware IP's 32 | + If the library supports DPC++ for a only a subset of functions for offload to an accelerator (e.g. ATS), all CPU functions should all support DPC++ Language bindings so that application developers can write their entire application in DPC++ 33 | + If a Library only supports only the CPU, but is likey to be used with another library the supports DPC++ on CPU and ATS, the library shall also support DPC++ 34 | * Libraries may support other language bindings (C/C++/FORTRAN/JAVA/PYTHON, etc.) to support existing user base and use cases required by the developer domain 35 | 36 | ### Library API Deprecation Management 37 | * Library API deprecation will be managed via a change control process 38 | * Definitions: 39 | + Supported - In the currently released library and will not change at short notice. 40 | + Deprecated - Documented to be no longer supported, and may be removed in the future at an announced date. Users are encouraged to use an alternative API or library 41 | + Removed - Removed from library, no longer supported or available 42 | 43 | #### Objectives for Deprecation 44 | * Refine and improve APIs to deliver better value for developer and Intel 45 | + API does not expose best performance or support important usage models 46 | * Remove outdated or infrequently used functionality based on usage data. 47 | 48 | #### Multi year/release process 49 | * Goal: Provide customers ample time to review, respond and adapt 50 | + Proactively communicate deprecation 51 | + Use warning and \#pragma per each deprecated item 52 | + Over the deprecation period: collect & analyze deprecation feedback & remove APIs 53 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | Intel is committed to rapidly addressing security vulnerabilities affecting our customers and providing clear guidance on the solution, impact, severity and mitigation. 4 | 5 | ## Reporting a Vulnerability 6 | 7 | Please report any security vulnerabilities in this project [utilizing the guidelines here](https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html). 8 | 9 | -------------------------------------------------------------------------------- /scripts/README.md: -------------------------------------------------------------------------------- 1 | Python dependencies: 2 | * Python v3.6.6 or later 3 | * [Mako Templates for Python](https://www.makotemplates.org/) v1.0.7 or later 4 | * [PyYAML](https://pyyaml.org/) v3.13 or later 5 | * [Sphinx](https://www.sphinx-doc.org/en/master/) v2.2.2 or later 6 | 7 | Installing Python dependencies: 8 | 9 | * Install all python requirements 10 | ~~~~ 11 | python3 -m pip install -r ../third_party/requirements.txt 12 | ~~~~ 13 | 14 | Documentation is generated from source code using Doxygen. 15 | * [Doxygen](http://www.doxygen.nl/) v1.9.1 or later 16 | -------------------------------------------------------------------------------- /scripts/assets/html/_static/custom.css: -------------------------------------------------------------------------------- 1 | .wy-side-nav-search, .wy-nav-top { 2 | background: #4308E5; 3 | } 4 | -------------------------------------------------------------------------------- /scripts/assets/html/_templates/breadcrumbs.html: -------------------------------------------------------------------------------- 1 | {%- extends "sphinx_rtd_theme/breadcrumbs.html" %} 2 | 3 | {% block breadcrumbs %} 4 | {% endblock %} 5 | {% block breadcrumbs_aside %} 6 | {% endblock %} 7 | 8 | -------------------------------------------------------------------------------- /scripts/assets/images/A21_Subvertex+Remote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/images/A21_Subvertex+Remote.png -------------------------------------------------------------------------------- /scripts/assets/images/A21_Subvertex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/images/A21_Subvertex.png -------------------------------------------------------------------------------- /scripts/assets/images/A21_Vertex+Subvertex+Remote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/images/A21_Vertex+Subvertex+Remote.png -------------------------------------------------------------------------------- /scripts/assets/images/A21_Vertex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/images/A21_Vertex.png -------------------------------------------------------------------------------- /scripts/assets/images/DGXA100_Vertex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/images/DGXA100_Vertex.png -------------------------------------------------------------------------------- /scripts/assets/images/core_device.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/images/core_device.png -------------------------------------------------------------------------------- /scripts/assets/images/core_event.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/images/core_event.png -------------------------------------------------------------------------------- /scripts/assets/images/core_fence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/images/core_fence.png -------------------------------------------------------------------------------- /scripts/assets/images/core_module.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/images/core_module.png -------------------------------------------------------------------------------- /scripts/assets/images/core_queue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/images/core_queue.png -------------------------------------------------------------------------------- /scripts/assets/images/core_reserved_suballocations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/images/core_reserved_suballocations.png -------------------------------------------------------------------------------- /scripts/assets/images/core_subdevice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/images/core_subdevice.png -------------------------------------------------------------------------------- /scripts/assets/images/intel-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/images/intel-logo.png -------------------------------------------------------------------------------- /scripts/assets/images/one_api_sw_stack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/images/one_api_sw_stack.png -------------------------------------------------------------------------------- /scripts/assets/images/tools_metric_hierarchy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/images/tools_metric_hierarchy.png -------------------------------------------------------------------------------- /scripts/assets/images/tools_metric_query.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/images/tools_metric_query.png -------------------------------------------------------------------------------- /scripts/assets/images/tools_metric_streamer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/images/tools_metric_streamer.png -------------------------------------------------------------------------------- /scripts/assets/images/tools_sysman_fabric.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/images/tools_sysman_fabric.png -------------------------------------------------------------------------------- /scripts/assets/images/tools_sysman_fan_flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/images/tools_sysman_fan_flow.png -------------------------------------------------------------------------------- /scripts/assets/images/tools_sysman_freq_flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/images/tools_sysman_freq_flow.png -------------------------------------------------------------------------------- /scripts/assets/images/tools_sysman_freq_subdevices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/images/tools_sysman_freq_subdevices.png -------------------------------------------------------------------------------- /scripts/assets/images/tools_sysman_oc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/images/tools_sysman_oc.png -------------------------------------------------------------------------------- /scripts/assets/images/tools_sysman_resprops.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/images/tools_sysman_resprops.png -------------------------------------------------------------------------------- /scripts/assets/level_zero.vsdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/level_zero.vsdx -------------------------------------------------------------------------------- /scripts/assets/topology.vsdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/assets/topology.vsdx -------------------------------------------------------------------------------- /scripts/config.ini: -------------------------------------------------------------------------------- 1 | [core] 2 | OneApi='oneAPI' 3 | namespace=ze 4 | tags=OneApi,x,s 5 | x=${namespace} 6 | s=${sysman:namespace} 7 | 8 | [tools] 9 | OneApi=${core:OneApi} 10 | namespace=zet 11 | tags=OneApi,x,t 12 | x=${core:namespace} 13 | t=${namespace} 14 | 15 | [sysman] 16 | OneApi=${core:OneApi} 17 | namespace=zes 18 | tags=OneApi,x,s 19 | x=${core:namespace} 20 | s=${namespace} 21 | -------------------------------------------------------------------------------- /scripts/core/CacheLineSize.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2025 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension APIs for CacheLine Size" 11 | version: "1.13" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "CacheLine Size Extension Name" 15 | version: "1.13" 16 | name: $X_CACHELINE_SIZE_EXT_NAME 17 | value: '"$X_extension_device_cache_line_size"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "CacheLine Size Extension Version(s)" 21 | version: "1.13" 22 | name: $x_device_cache_line_size_ext_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: struct 29 | desc: "CacheLine Size queried using $xDeviceGetCacheProperties" 30 | version: "1.13" 31 | class: $xDevice 32 | name: $x_device_cache_line_size_ext_t 33 | base: $x_base_desc_t 34 | members: 35 | - type: size_t 36 | name: cacheLineSize 37 | desc: "[out] The cache line size in bytes." 38 | details: 39 | - "This structure may be returned from $xDeviceGetCacheProperties via the `pNext` member of $x_device_cache_properties_t." 40 | - "Used for determining the cache line size supported on a device." 41 | -------------------------------------------------------------------------------- /scripts/core/EUCount.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2021-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension APIs for EU Count" 11 | version: "1.3" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "EU Count Extension Name" 15 | version: "1.3" 16 | name: $X_EU_COUNT_EXT_NAME 17 | value: '"$X_extension_eu_count"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "EU Count Extension Version(s)" 21 | version: "1.3" 22 | name: $x_eu_count_ext_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: struct 29 | desc: "EU count queried using $xDeviceGetProperties" 30 | version: "1.3" 31 | class: $xDevice 32 | name: $x_eu_count_ext_t 33 | base: $x_base_desc_t 34 | members: 35 | - type: uint32_t 36 | name: numTotalEUs 37 | desc: "[out] Total number of EUs available" 38 | details: 39 | - "This structure may be returned from $xDeviceGetProperties via the `pNext` member of $x_device_properties_t." 40 | - "Used for determining the total number of EUs available on device." 41 | -------------------------------------------------------------------------------- /scripts/core/EXT_Bfloat16Conversions.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_bfloat16_conversions: 12 | 13 | ================================ 14 | Bfloat16 Conversions Extension 15 | ================================ 16 | 17 | API 18 | ---- 19 | 20 | * Enumerations 21 | 22 | 23 | * ${x}_bfloat16_conversions_ext_version_t 24 | -------------------------------------------------------------------------------- /scripts/core/EXT_CacheReservation.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_cache_reservation: 12 | 13 | ============================= 14 | Cache Reservation Extension 15 | ============================= 16 | 17 | API 18 | ---- 19 | 20 | * Functions 21 | 22 | * ${x}DeviceReserveCacheExt 23 | * ${x}DeviceSetCacheAdviceExt 24 | 25 | * Enumerations 26 | 27 | * ${x}_cache_reservation_ext_version_t 28 | * ${x}_cache_ext_region_t 29 | 30 | * Structures 31 | 32 | * ${x}_cache_reservation_ext_desc_t 33 | -------------------------------------------------------------------------------- /scripts/core/EXT_DeviceCacheLineSize.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_device_cache_line_size: 12 | 13 | ====================================== 14 | Device CacheLine Size Extension 15 | ====================================== 16 | 17 | API 18 | ---- 19 | * Enumerations 20 | 21 | 22 | * ${x}_device_cache_line_size_ext_version_t 23 | 24 | 25 | * Structures 26 | 27 | 28 | * ${x}_device_cache_line_size_ext_t 29 | 30 | Device CacheLine Size 31 | ~~~~~~~~~~~~~~~~~~~~~ 32 | 33 | Accelerator devices have a cache line size which is the size of the smallest unit of memory that can be read or written to memory. The ${x}_device_cache_line_size_ext_t struct returned via ${x}DeviceGetCacheProperties contains the cache line size of the device. 34 | 35 | .. parsed-literal:: 36 | ... 37 | ${x}_device_cache_properties_t devCacheProps; 38 | ${x}_device_cache_line_size_ext_t devCacheLineSize; 39 | devProps.stype = ${X}_STRUCTURE_TYPE_DEVICE_CACHE_PROPERTIES; 40 | devProps.pNext = &devCacheLineSize; 41 | devCacheLineSize.stype = ${X}_STRUCTURE_TYPE_DEVICE_CACHELINE_SIZE_EXT; 42 | devCacheLineSize.pNext = nullptr; 43 | uint32_t count = 1; 44 | // Get the Device Cache Properties and the Device CacheLine Size Properties 45 | ${x}_result_t result = ${x}DeviceGetCacheProperties(dev, &count, &devProps); 46 | auto device_cache_line_size = devCacheLineSize.cacheLineSize; 47 | -------------------------------------------------------------------------------- /scripts/core/EXT_DeviceIpVersion.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_device_ip_version: 12 | 13 | ====================================== 14 | Device IP Version Extension 15 | ====================================== 16 | 17 | API 18 | ---- 19 | 20 | * Structures 21 | 22 | * ${x}_device_ip_version_ext_t 23 | -------------------------------------------------------------------------------- /scripts/core/EXT_DeviceLUID.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_device_luid: 12 | 13 | ========================================== 14 | Device Local Identifier (LUID) Extension 15 | ========================================== 16 | 17 | API 18 | ---- 19 | 20 | * Enumerations 21 | 22 | 23 | * ${x}_device_luid_ext_version_t 24 | 25 | 26 | * Structures 27 | 28 | * ${x}_device_luid_ext_t 29 | * ${x}_device_luid_ext_properties_t 30 | -------------------------------------------------------------------------------- /scripts/core/EXT_Device_vector_sizes.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_device_vector_sizes: 12 | 13 | ======================================================= 14 | Device Vector Sizes Query Extension 15 | ======================================================= 16 | 17 | API 18 | ---- 19 | 20 | * Enumerations 21 | * ${x}_device_vector_sizes_ext_version_t 22 | 23 | * Structures 24 | * ${x}_device_vector_width_properties_ext_t 25 | 26 | * Functions 27 | * ${x}DeviceGetVectorWidthPropertiesExt 28 | 29 | Summary: 30 | ~~~~~~~~~~~~~~~~~~~~~~ 31 | 32 | This extension provides a mechanism to query all the supported vector sizes for the given device. Users can use this query to allow them to choose the best vector size for each data type for their kernels. 33 | The call to ${x}DeviceGetVectorWidthPropertiesExt returns list(s) of preferred/native vector sizes matched with the vector width supported on the device. 34 | The first index in the array for the vector sizes will be for the largest vector width supported by the device. 35 | Example: a device with SIMD support of 16, 8, will report the preferred vector sizes for 16 first and then 8. 36 | 37 | Example usecase: 38 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 39 | 40 | .. parsed-literal:: 41 | ${x}DeviceGetVectorWidthPropertiesExt(hDevice, &pCount, nullptr); 42 | std::vector<${x}_device_vector_width_properties_ext_t> vectorWidthProps(pCount); 43 | for (auto& vectorWidthProp : vectorWidthProps) { 44 | vectorWidthProp.stype = ${X}_STRUCTURE_TYPE_DEVICE_VECTOR_WIDTH_PROPERTIES_EXT; 45 | vectorWidthProp.pNext = nullptr; 46 | } 47 | ${x}DeviceGetVectorWidthPropertiesExt(hDevice, &pCount, vectorWidthProps.data()); 48 | -------------------------------------------------------------------------------- /scripts/core/EXT_EUCount.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_eu_count: 12 | 13 | ====================================== 14 | EU Count Extension 15 | ====================================== 16 | 17 | API 18 | ---- 19 | 20 | * Structures 21 | 22 | * ${x}_eu_count_ext_t 23 | -------------------------------------------------------------------------------- /scripts/core/EXT_EventQueryKernelTimestamps.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_event_query_kernel_timestamps: 12 | 13 | ========================================= 14 | Event Query Kernel Timestamps Extension 15 | ========================================= 16 | 17 | API 18 | ---- 19 | 20 | * Enumerations 21 | 22 | 23 | * ${x}_event_query_kernel_timestamps_ext_version_t 24 | * ${x}_event_query_kernel_timestamps_ext_flags_t 25 | 26 | 27 | * Structures 28 | 29 | 30 | * ${x}_event_query_kernel_timestamps_ext_properties_t 31 | * ${x}_event_query_kernel_timestamps_results_ext_properties_t 32 | * ${x}_synchronized_timestamp_data_ext_t 33 | * ${x}_synchronized_timestamp_result_ext_t 34 | 35 | 36 | * Functions 37 | 38 | 39 | * ${x}EventQueryKernelTimestampsExt 40 | 41 | 42 | Event Query Kernel Timestamps 43 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 44 | 45 | This extension enables the querying of synchronized event timestamps. 46 | 47 | - *Synchronized event timestamps* are device timestamps synchronized to the host time domain. 48 | 49 | **Notes** 50 | 51 | - The querying of synchronized event timestamps has a performance cost. 52 | - This extension is designed to complement and eventually replace all usages of ${x}EventQueryTimestampsExp and ${x}EventQueryKernelTimestamp. 53 | - The value returned by the `pCount` parameter of ${x}EventQueryKernelTimestampsExt is implementation specific. 54 | 55 | .. parsed-literal:: 56 | 57 | ${x}_device_properties_t devProps; 58 | ${x}_event_query_kernel_timestamps_ext_properties_t tsProps; 59 | 60 | devProps.stype = ${X}_STRUCTURE_TYPE_DEVICE_PROPERTIES; 61 | devProps.pNext = &tsProps; 62 | 63 | tsProps.stype = ${X}_STRUCTURE_TYPE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_PROPERTIES; 64 | tsProps.pNext = nullptr; 65 | 66 | // Determine the level of support by getting the module properties 67 | ${x}DeviceGetProperties(hDevice, &devProps); 68 | 69 | const bool supportsKernelTimestamps = (0 != (tsProps.flags & ${X}_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_KERNEL)); 70 | const bool supportsSynchronizedTimestamps = (0 != (tsProps.flags & ${X}_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_SYNCHRONIZED)); 71 | 72 | // Assumption: hEvent was created with ${X}_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP 73 | 74 | // ... 75 | // launch kernel 76 | // synchronize host 77 | // ... 78 | 79 | if (supportsKernelTimestamps || supportsSynchronizedTimestamps) { 80 | // Number of event timestamps 81 | uint32_t count = 0; 82 | 83 | // Get the number of timestamps associated with the event. 84 | ${x}EventQueryKernelTimestampsExt(hEvent, hDevice, &count, nullptr); 85 | 86 | // Allocate storage for kernel timestamp results 87 | std::vector<${x}_kernel_timestamp_result_t> kernelTimestamps(count); 88 | 89 | // Allocate storage for synchronized timestamp results 90 | std::vector<${x}_synchronized_timestamp_result_ext_t> synchronizedTimestamps(count); 91 | 92 | // Build event query kernel timestamps descriptors 93 | ${x}_event_query_kernel_timestamps_results_ext_properties_t resultsProps; 94 | 95 | resultsProps.stype = ${X}_STRUCTURE_TYPE_EVENT_QUERY_KERNEL_TIMESTAMPS_RESULTS_EXT_PROPERTIES; 96 | resultsProps.pNext = nullptr; 97 | resultsProps.pKernelTimestampsBuffer = supportsKernelTimestamps ? kernelTimestamps.data() : nullptr; 98 | resultsProps.pSynchronizedTimestampsBuffer = supportsSynchronizedTimestamps ? synchronizedTimestamps.data() : nullptr; 99 | 100 | // Query the event timestamps 101 | ${x}EventQueryKernelTimestampsExt(hEvent, hDevice, &count, &resultsProps); 102 | } 103 | -------------------------------------------------------------------------------- /scripts/core/EXT_Exp_CommandListClone.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_experimental_command_list_clone: 12 | 13 | ============================== 14 | Command List Clone Extension 15 | ============================== 16 | 17 | API 18 | ---- 19 | 20 | * Enumerations 21 | 22 | * ${x}_command_list_clone_exp_version_t 23 | 24 | * Functions 25 | 26 | * ${x}CommandListCreateCloneExp 27 | 28 | 29 | ==================== 30 | Command List Clone 31 | ==================== 32 | 33 | A command list created with the cloneable flag may be cloned only after it has been closed. 34 | 35 | .. parsed-literal:: 36 | 37 | // Create a command list that may be cloned 38 | ${x}_command_list_desc_t commandListDesc = { 39 | ${X}_STRUCTURE_TYPE_COMMAND_LIST_DESC, 40 | nullptr, 41 | 0, 42 | ${X}_COMMAND_LIST_FLAG_EXP_CLONEABLE 43 | }; 44 | ${x}_command_list_handle_t hCommandList = nullptr; 45 | ${x}CommandListCreate(hContext, hDevice, &commandListDesc, &hCommandList); 46 | 47 | // { ...[construct command list]... } 48 | 49 | // Close the command list 50 | ${x}CommandListClose(hCommandList); 51 | 52 | // Execute the command list 53 | zeCommandQueueExecuteCommandLists(hCommandQueue, 1, &hCommandList, nullptr); 54 | 55 | // Clone the command list, no synchronization required 56 | ${x}_command_list_handle_t hClonedCommandList = nullptr; 57 | ${x}CommandListCreateCloneExp(hCommandList, &hClonedCommandList); 58 | 59 | // ... 60 | 61 | -------------------------------------------------------------------------------- /scripts/core/EXT_Exp_CounterBasedEventPools.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_experimental_event_pool_counter_based: 12 | 13 | ===================================== 14 | Counter-Based Event Pools Extension 15 | ===================================== 16 | 17 | API 18 | ---- 19 | 20 | * Enumerations 21 | 22 | * ${x}_event_pool_counter_based_exp_flags_t 23 | * ${x}_event_pool_counter_based_exp_version_t 24 | 25 | * Structures 26 | 27 | * ${x}_event_pool_counter_based_exp_desc_t 28 | 29 | Counter-Based Events 30 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 31 | 32 | By default, events in Level Zero contains one of two states: signaled or not signaled. 33 | Signaling of an event, as well as resetting its state, can be done from either host or 34 | device. 35 | 36 | Another way of tracking the state of an event is by using a counter, which is incremented 37 | every time a task has completed in the device. Using a counter-based event may provide 38 | Level Zero driver implementations with the opportunity for both functional and performance 39 | optimizations. 40 | 41 | The following recommendations and restrictions apply to counter-based events: 42 | 43 | - Counter-based events can be used only with in-orders lists, whether those are regular or immediate. 44 | - Counter-based events must not be reset, i.e., a call to ${x}EventHostReset or ${x}CommandListAppendEventReset 45 | is not allowed. 46 | - Counter-based events must not be signaled from host, i.e., a call to ${x}EventHostSignal is not allowed. 47 | - Counter-based events may be reused multiple times without a need for reset. 48 | - Counter-based events may be used on multiple command lists. 49 | - Querying a counter-based event queries only the last saved counter value from the last command list that incremented it, 50 | i.e., a signaled counter-based event always represents the completion of the last call to which it was passed as signal event. 51 | - Synchronizing on a counter-based event waits only for the last saved counter value from the last command list that incremented it. 52 | - A counter-based event may be passed as signaling event for a new append call without needing to wait for the signaling of 53 | the last call where it was used. 54 | 55 | Counter-based events can be created by passing ${x}_event_pool_counter_based_exp_desc_t to ${x}EventPoolCreate 56 | as pNext member of ${x}_event_pool_desc_t. 57 | 58 | .. parsed-literal:: 59 | 60 | uint32_t numEvents = 2; 61 | ${x}_event_pool_handle_t eventPool = {}; 62 | ${x}_event_pool_desc_t eventPoolDesc = {${X}_STRUCTURE_TYPE_EVENT_POOL_DESC}; 63 | eventPoolDesc.count = numEvents; 64 | 65 | ${x}_event_pool_counter_based_exp_desc_t counterBasedDesc = {${X}_STRUCTURE_TYPE_COUNTER_BASED_EVENT_POOL_EXP_DESC}; 66 | counterBasedDesc.flags = ${X}_EVENT_POOL_COUNTER_BASED_EXP_FLAG_IMMEDIATE; 67 | eventPoolDesc.pNext = &counterBasedDesc; 68 | 69 | ${x}_result_t = zeEventPoolCreate(context, &eventPoolDesc, 1, &device, &eventPool)); 70 | -------------------------------------------------------------------------------- /scripts/core/EXT_Exp_EventQueryTimestamps.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_experimental_event_query_timestamps: 12 | 13 | ==================================== 14 | Event Query Timestamps Extension 15 | ==================================== 16 | 17 | API 18 | ---- 19 | 20 | * Functions 21 | 22 | 23 | * ${x}EventQueryTimestampsExp 24 | 25 | 26 | * Enumerations 27 | 28 | 29 | * ${x}_event_query_timestamps_exp_version_t 30 | 31 | 32 | -------------------------------------------------------------------------------- /scripts/core/EXT_Exp_GlobalOffset.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_experimental_global_offset: 12 | 13 | ========================= 14 | Global Offset Extension 15 | ========================= 16 | 17 | API 18 | ---- 19 | 20 | * Functions 21 | 22 | 23 | * ${x}KernelSetGlobalOffsetExp 24 | 25 | 26 | * Enumerations 27 | 28 | 29 | * ${x}_global_offset_exp_version_t 30 | 31 | -------------------------------------------------------------------------------- /scripts/core/EXT_Exp_ImageMemoryProperties.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_experimental_image_memory_properties: 12 | 13 | ==================================== 14 | Image Memory Properties Extension 15 | ==================================== 16 | 17 | API 18 | ---- 19 | 20 | * Functions 21 | 22 | * ${x}ImageGetMemoryPropertiesExp 23 | 24 | 25 | * Enumerations 26 | 27 | * ${x}_image_memory_properties_exp_version_t 28 | 29 | 30 | * Structures 31 | 32 | * ${x}_image_memory_properties_exp_t 33 | 34 | 35 | -------------------------------------------------------------------------------- /scripts/core/EXT_Exp_ImageView.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | 10 | <%! 11 | from parse_specs import _version_compare_gequal 12 | %> 13 | 14 | :orphan: 15 | 16 | .. _ZE_experimental_image_view: 17 | 18 | ========================= 19 | Image View Extension 20 | ========================= 21 | 22 | %if _version_compare_gequal(ver, "1.5"): 23 | This experimental extension is deprecated and replaced by the :ref:`${th.subt(namespace, tags, X)}_extension_image_view <${th.subt(namespace, tags, X)}_extension_image_view>` standard extension. 24 | %endif 25 | 26 | API 27 | ---- 28 | 29 | * Functions 30 | 31 | 32 | * ${x}ImageViewCreateExp 33 | 34 | 35 | * Enumerations 36 | 37 | 38 | * ${x}_image_view_exp_version_t 39 | 40 | -------------------------------------------------------------------------------- /scripts/core/EXT_Exp_ImageViewPlanar.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | 10 | <%! 11 | from parse_specs import _version_compare_gequal 12 | %> 13 | 14 | :orphan: 15 | 16 | .. _ZE_experimental_image_view_planar: 17 | 18 | ============================= 19 | Image View Planar Extension 20 | ============================= 21 | 22 | This experimental extension is deprecated since version 1.5 onwards and replaced by the :ref:`${th.subt(namespace, tags, X)}_extension_image_view_planar <${th.subt(namespace, tags, X)}_extension_image_view_planar>` standard extension. 23 | 24 | API 25 | ---- 26 | 27 | * Enumerations 28 | 29 | 30 | * ${x}_image_view_planar_exp_version_t 31 | 32 | 33 | * Structures 34 | 35 | 36 | * ${x}_image_view_planar_exp_desc_t 37 | 38 | 39 | -------------------------------------------------------------------------------- /scripts/core/EXT_Exp_ImmediateCommandListAppend.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_experimental_immediate_command_list_append: 12 | 13 | ========================================= 14 | Immediate Command List Append Extension 15 | ========================================= 16 | 17 | API 18 | ---- 19 | 20 | * Enumerations 21 | 22 | * ${x}_immediate_command_list_append_exp_version_t 23 | 24 | * Functions 25 | 26 | * ${x}CommandListImmediateAppendCommandListsExp 27 | 28 | =============================== 29 | Immediate Command List Append 30 | =============================== 31 | 32 | This extension allows an application to append one or more command lists to an immediate command list for dispatch. 33 | -------------------------------------------------------------------------------- /scripts/core/EXT_Exp_KernelBinary.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_kernel_binary_exp: 12 | 13 | ========================================= 14 | Get Kernel Binary Program Data Extension 15 | ========================================= 16 | 17 | API 18 | ---- 19 | 20 | * Enumerations 21 | 22 | * ${x}_kernel_get_binary_exp_version_t 23 | 24 | * Functions 25 | 26 | * ${x}KernelGetBinaryExp 27 | 28 | 29 | =============================== 30 | Get Kernel Binary Program Data 31 | =============================== 32 | 33 | After a kernel is created with zeKernelCreate, the user will be able to retrieve the kernel 34 | binary program data, which is in GEN ISA format. Each valid kernel handle will provide the 35 | information required to retrieve such data. The user may then save this data to a file for 36 | disassembly and analysis. There is a 2-step process to obtain this data. The first step is 37 | to find the size of binary program data, so that memory may be allocated to store such data. 38 | This is done by providing an input storage pointer with nullptr value. After allocating a 39 | storage array of this size, the user then provides the valid size and storage location to 40 | retrieve the data. 41 | 42 | The following pseudo-code shows how to obtain the kernel binary program data save to a file: 43 | 44 | .. parsed-literal:: 45 | 46 | #include 47 | //hKernel = valid kernel handle 48 | size_t kBinarySize = 0; 49 | char ``*``\progArray; 50 | ${x}KernelGetBinaryExp(hKernel, &KBinarysize, nullptr); 51 | progArray = new char[kBinarySize]; 52 | ${x}KernelGetBinaryExp(hKernel, &kBinarySize, progArray); 53 | const std::string filePath = "program.bin"; 54 | std::ofstream stream(filePath, std::ios::out | std::ios::binary); 55 | stream.write(reinterpret_cast(progArray), kBinarySize); 56 | stream.close(); 57 | delete[] progArray; 58 | -------------------------------------------------------------------------------- /scripts/core/EXT_Exp_ModuleProgram.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_experimental_module_program: 12 | 13 | ========================= 14 | Module Program Extension 15 | ========================= 16 | 17 | API 18 | ---- 19 | 20 | * Enumerations 21 | 22 | 23 | * ${x}_module_program_exp_version_t 24 | 25 | 26 | * Structures 27 | 28 | 29 | * ${x}_module_program_exp_desc_t 30 | -------------------------------------------------------------------------------- /scripts/core/EXT_Exp_PowerSavingHint.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_experimental_power_saving_hint: 12 | 13 | ============================ 14 | Power Saving Hint Extension 15 | ============================ 16 | 17 | API 18 | ---- 19 | 20 | * Enumerations 21 | 22 | * ${x}_power_saving_hint_exp_version_t 23 | 24 | 25 | * Structures 26 | 27 | 28 | * ${x}_context_power_saving_hint_exp_desc_t 29 | -------------------------------------------------------------------------------- /scripts/core/EXT_Exp_RelaxedAllocLimits.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_experimental_relaxed_allocation_limits: 12 | 13 | ===================================== 14 | Relaxed Allocation Limits Extension 15 | ===================================== 16 | 17 | API 18 | ---- 19 | 20 | * Enumerations 21 | 22 | 23 | * ${x}_relaxed_allocation_limits_exp_version_t 24 | * ${x}_relaxed_allocation_limits_exp_flags_t 25 | 26 | 27 | * Structures 28 | 29 | 30 | * ${x}_relaxed_allocation_limits_exp_desc_t 31 | -------------------------------------------------------------------------------- /scripts/core/EXT_Exp_SchedulingHints.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_experimental_scheduling_hints: 12 | 13 | =================================== 14 | Kernel Scheduling Hints Extension 15 | =================================== 16 | 17 | API 18 | ---- 19 | 20 | * Functions 21 | 22 | 23 | * ${x}KernelSchedulingHintExp 24 | 25 | 26 | * Enumerations 27 | 28 | 29 | * ${x}_scheduling_hints_exp_version_t 30 | * ${x}_scheduling_hint_exp_flags_t 31 | 32 | 33 | * Structures 34 | 35 | 36 | * ${x}_scheduling_hint_exp_properties_t 37 | * ${x}_scheduling_hint_exp_desc_t 38 | 39 | -------------------------------------------------------------------------------- /scripts/core/EXT_Exp_SubAllocationProperties.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_experimental_sub_allocations: 12 | 13 | ===================================== 14 | Sub-Allocation Properties Extension 15 | ===================================== 16 | 17 | API 18 | ---- 19 | 20 | * Enumerations 21 | 22 | 23 | * ${x}_sub_allocations_exp_version_t 24 | 25 | 26 | * Structures 27 | 28 | 29 | * ${x}_memory_sub_allocations_exp_properties_t 30 | 31 | Sub-Allocation Properties 32 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 33 | 34 | Driver implementations may choose to create a device allocation as a series of sub-allocations. For instance, 35 | an allocation created against a parent device may be allocated internally as set of N sub-allocations, with 36 | N being the number of sub-devices associated with the parent device. 37 | 38 | The sub-allocation properties extension may be used to get the properties, i.e. base address and size, for 39 | each of those sub-allocations. The following pseudo-code demonstrates a basic use-case of this extension: 40 | 41 | .. parsed-literal:: 42 | 43 | ${x}MemAllocDevice(context, &desc, size, alignment, device, &ptr); 44 | 45 | ${x}_memory_sub_allocations_exp_properties_t subAllocationDesc {}; 46 | uitn32_t numberOfSuballocations = 0; 47 | subAllocationDesc.stype = ${X}_STRUCTURE_TYPE_MEMORY_SUB_ALLOCATIONS_EXP_PROPERTIES; 48 | subAllocationDesc.pCount = &numberOfSuballocations; 49 | 50 | ${x}_memory_allocation_properties_t memAllocProperties {}; 51 | memAllocProperties.stype = ${X}_STRUCTURE_TYPE_MEMORY_ALLOCATION_PROPERTIES; 52 | memAllocProperties.pNext = &subAllocationDesc; 53 | 54 | // Get number of sub-allocations 55 | ${x}MemGetAllocProperties(context, ptr, &memAllocProperties, nullptr); 56 | 57 | // if more than 1 sub-allocation, then allocation has been split 58 | if (numberOfSuballocations > 1) { 59 | std::vector<${x}_sub_allocation_t> subAllocationMemAllocProperties(numberOfSuballocations); 60 | subAllocationDesc.pSubAllocations = subAllocationMemAllocProperties.data(); 61 | 62 | ${x}MemGetAllocProperties(context, ptr, &memAllocProperties, nullptr); 63 | 64 | // retrieve the properties of each sub-allocation 65 | for (auto &subAllocationProperty : subAllocationMemAllocProperties) { 66 | void * base = subAllocationProperty.base; 67 | size_t size = subAllocationProperty.size; 68 | } 69 | } 70 | ... -------------------------------------------------------------------------------- /scripts/core/EXT_FloatAtomics.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_float_atomics: 12 | 13 | ========================= 14 | Float Atomics Extension 15 | ========================= 16 | 17 | API 18 | ---- 19 | 20 | * Enumerations 21 | 22 | 23 | * ${x}_float_atomics_ext_version_t 24 | * ${x}_device_fp_atomic_ext_flags_t 25 | 26 | 27 | * Structures 28 | 29 | 30 | * ${x}_float_atomic_ext_properties_t 31 | -------------------------------------------------------------------------------- /scripts/core/EXT_ImageCopy.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_image_copy: 12 | 13 | ====================================== 14 | Image Copy Extension 15 | ====================================== 16 | 17 | API 18 | ---- 19 | 20 | * Functions 21 | 22 | 23 | * ${x}CommandListAppendImageCopyToMemoryExt 24 | * ${x}CommandListAppendImageCopyFromMemoryExt 25 | 26 | 27 | * Enumerations 28 | 29 | 30 | * ${x}_image_copy_ext_version_t 31 | 32 | Image Copy 33 | ~~~~~~~~~~ 34 | 35 | Sometimes it is desired to copy the contents of an image object to a buffer object, i.e., linear un-formatted memory, e.g., for use in a different library. The ${x}CommandListAppendImageCopyToMemory API call can be used to for this purpose if no padding is desired in the buffer being written into. The ${x}CommandListAppendImageCopyToMemoryExt call can be used to copy pixel values from an image object into a destination buffer with padding. Padding can be specified in both row pitch as well as slice pitch for 3D images/2D image arrays. The slice pitch must be set to 0 when performing this operation with 2D images. 36 | 37 | The following psuedo-code demonstrates a sequence for copying a 32x32 region out of an image object to a buffer with row pitch set to 64: 38 | 39 | .. parsed-literal:: 40 | 41 | ... 42 | // Create image region descriptor 43 | ${x}_image_region_t srcReg = { 44 | 0, // originX 45 | 0, // originY 46 | 0, // originZ 47 | 32, // width 48 | 32, // height 49 | 0 // depth 50 | }; 51 | 52 | 53 | ${x}_result_t result = ${x}CommandListAppendImageCopyToMemoryExt(hCmdList, pDstBuffer, hSrcImage, &srcRegion, 64, 0, nullptr, 0, nullptr); 54 | 55 | Similarly, sometimes it is desired to copy the contents of a buffer object, i.e., linear un-formatted memory, to an image object, e.g., if the contents of the image are being imported from a different library. The ${x}CommandListAppendImageCopyFromMemory API call can be used to for this purpose if no padding is present in the buffer being read from. The ${x}CommandListAppendImageCopyFromMemoryExt call can be used to copy pixel values from the source buffer with padding into an image object. Padding can be specified in both row pitch as well as slice pitch for 3D images/2D image arrays. The slice pitch must be set to 0 when performing this operation with 2D images. 56 | 57 | The following psuedo-code demonstrates a sequence for copying a 32x32 region from a buffer with row pitch equal to 64 into an image object with row pitch: 58 | 59 | .. parsed-literal:: 60 | 61 | ... 62 | // Create image region descriptor 63 | ${x}_image_region_t srcReg = { 64 | 0, // originX 65 | 0, // originY 66 | 0, // originZ 67 | 32, // width 68 | 32, // height 69 | 0 // depth 70 | }; 71 | 72 | 73 | ${x}_result_t result = ${x}CommandListAppendImageCopyFromMemoryExt(hCmdList, hDstImage, pSrcBuffer, &srcRegion, 64, 0, nullptr, 0, nullptr); 74 | -------------------------------------------------------------------------------- /scripts/core/EXT_ImageQueryAllocProperties.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_image_query_alloc_properties: 12 | 13 | =============================================== 14 | Querying Image Allocation Properties Extension 15 | =============================================== 16 | 17 | API 18 | ---- 19 | 20 | * Functions 21 | 22 | * ${x}ImageGetAllocPropertiesExt 23 | 24 | * Enumerations 25 | 26 | * ${x}_image_query_alloc_properties_ext_version_t 27 | 28 | * Structures 29 | 30 | * ${x}_image_allocation_ext_properties_t 31 | 32 | -------------------------------------------------------------------------------- /scripts/core/EXT_ImageView.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_image_view: 12 | 13 | ========================= 14 | Image View Extension 15 | ========================= 16 | 17 | API 18 | ---- 19 | 20 | * Functions 21 | 22 | 23 | * ${x}ImageViewCreateExt 24 | 25 | 26 | * Enumerations 27 | 28 | 29 | * ${x}_image_view_ext_version_t 30 | 31 | -------------------------------------------------------------------------------- /scripts/core/EXT_ImageViewPlanar.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_image_view_planar: 12 | 13 | ============================= 14 | Image View Planar Extension 15 | ============================= 16 | 17 | API 18 | ---- 19 | 20 | * Enumerations 21 | 22 | 23 | * ${x}_image_view_planar_ext_version_t 24 | 25 | 26 | * Structures 27 | 28 | 29 | * ${x}_image_view_planar_ext_desc_t 30 | 31 | 32 | -------------------------------------------------------------------------------- /scripts/core/EXT_KernelMaxGroupSizeProperties.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_kernel_max_group_size_properties: 12 | 13 | ============================================ 14 | Kernel Max Group Size Properties Extension 15 | ============================================ 16 | 17 | API 18 | ---- 19 | 20 | * Enumerations 21 | 22 | 23 | * ${x}_kernel_max_group_size_properties_ext_version_t 24 | 25 | 26 | * Structures 27 | 28 | 29 | * ${x}_kernel_max_group_size_properties_ext_t 30 | 31 | 32 | -------------------------------------------------------------------------------- /scripts/core/EXT_LinkOnceODR.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_linkonce_odr: 12 | 13 | ============================= 14 | Link Once ODR Extension 15 | ============================= 16 | 17 | API 18 | ---- 19 | 20 | * Enumerations 21 | 22 | 23 | * ${x}_linkonce_odr_ext_version_t 24 | -------------------------------------------------------------------------------- /scripts/core/EXT_LinkageInspection.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_linkage_inspection: 12 | 13 | ====================================== 14 | Linkage Inspection Extension 15 | ====================================== 16 | 17 | API 18 | ---- 19 | 20 | * Functions 21 | 22 | 23 | * ${x}ModuleInspectLinkageExt 24 | 25 | 26 | * Enumerations 27 | 28 | 29 | * ${x}_linkage_inspection_ext_version_t 30 | * ${x}_linkage_inspection_ext_flags_t 31 | 32 | 33 | * Structures 34 | 35 | 36 | * ${x}_linkage_inspection_ext_desc_t 37 | 38 | Linkage Inspection 39 | ~~~~~~~~~~~~~~~~~~ 40 | 41 | Modules support SPIR-V linkage, i.e., modules can import and export global variables and function definitions to/from other modules. This extension provides an API to inspect the linkage properties & requirements of a collection of modules. 42 | 43 | Modules may require global variables & functions to be imported before all dependencies are satisfied. Modules may also export global variables & functions that can be imported by dependent modules. Additionally, a set of modules may have un-satisfiable import dependencies, i.e., import dependencies that are required by one or modules in the set that are not provided as exports by any other module within the set. If the set of modules is to be dynamically linked using ${x}ModuleDynamicLink, all un-resolvable import dependencies must be eliminated from the set by adding modules to the set that define the missing import dependencies. 44 | 45 | The ${x}_module_build_log_handle_t log object returned by the call to ${x}ModuleInspectLinkageExt will contain separate lists of the imports, un-resolvable imports, & exports requested via the appropriate combination of ${x}_linkage_inspection_ext_flags_t flags. 46 | 47 | The following psuedo-code demonstrates a sequence for inspecting the import dependencies, un-resolvable import dependencies, and exports of a set of modules: 48 | 49 | .. parsed-literal:: 50 | 51 | ... 52 | // Create a linkage inspection descriptor 53 | ${x}_linkage_inspection_ext_desc_t inspectDesc = {${X}_STRUCTURE_TYPE_LINKAGE_INSPECTION_EXT_DESC, nullptr, 54 | ${X}_LINKAGE_INSPECTION_EXT_FLAG_IMPORTS | ${X}_LINKAGE_INSPECTION_EXT_FLAG_UNRESOLVABLE_IMPORTS | ${X}_LINKAGE_INSPECTION_EXT_FLAG_EXPORTS 55 | }; 56 | ${x}_module_build_log_handle_t linkLog; 57 | ${x}_result_t result = ${x}ModuleInspectLinkageExt(&inspectDesc, numModules, &hModules, &linkLog); 58 | 59 | size_t szLog = 0; 60 | ${x}ModuleBuildLogGetString(linkLog, &szLog, nullptr); 61 | 62 | char_t* strLog = allocate(szLog); 63 | ${x}ModuleBuildLogGetString(linkLog, &szLog, strLog); 64 | 65 | // Save log to disk. 66 | ... 67 | 68 | free(strLog); 69 | 70 | ${x}ModuleBuildLogDestroy(linkLog); 71 | -------------------------------------------------------------------------------- /scripts/core/EXT_MemoryCompressionHints.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_memory_compression_hints: 12 | 13 | ===================================== 14 | Memory Compression Hints Extension 15 | ===================================== 16 | 17 | API 18 | ---- 19 | 20 | * Enumerations 21 | 22 | 23 | * ${x}_memory_compression_hints_ext_version_t 24 | * ${x}_memory_compression_hints_ext_flags_t 25 | 26 | 27 | * Structures 28 | 29 | 30 | * ${x}_memory_compression_hints_ext_desc_t 31 | -------------------------------------------------------------------------------- /scripts/core/EXT_MemoryFreePolicies.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_memory_free_policies: 12 | 13 | ================================= 14 | Memory Free Policies Extension 15 | ================================= 16 | 17 | API 18 | ---- 19 | 20 | * Functions 21 | 22 | * ${x}MemFreeExt 23 | 24 | * Enumerations 25 | 26 | * ${x}_memory_free_policies_ext_version_t 27 | * ${x}_driver_memory_free_policy_ext_flags_t 28 | 29 | * Structures 30 | 31 | * ${x}_driver_memory_free_ext_properties_t 32 | * ${x}_memory_free_ext_desc_t 33 | 34 | -------------------------------------------------------------------------------- /scripts/core/EXT_MemoryProperties.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_device_memory_properties: 12 | 13 | ====================================== 14 | Device Memory Properties Extension 15 | ====================================== 16 | 17 | API 18 | ---- 19 | 20 | * Enumerations 21 | 22 | 23 | * ${x}_device_memory_properties_ext_version_t 24 | * ${x}_device_memory_ext_type_t 25 | 26 | 27 | * Structures 28 | 29 | 30 | * ${x}_device_memory_ext_properties_t 31 | 32 | Extended Device Memory Properties 33 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34 | 35 | Users may wish to build a cost model for computation on accelerators exposed through ${OneApi} Level-Zero. Such cost models require detailed information about the properties of the accelerator such as memory bandwidth. This extension provides extended information about the memories exposed as part of a device. The extension introduces the ${x}_device_memory_ext_properties_t struct which can be passed to ${x}DeviceGetMemoryProperties via the `pNext` member of ${x}_device_memory_properties_t. 36 | 37 | The following psuedo-code demonstrates a sequence for obtaining extended information about the memory properties of a memory module exposed as part of a device: 38 | 39 | .. parsed-literal:: 40 | 41 | ... 42 | // Discover memories on device 43 | uint32_t memCount = 0; 44 | ${x}DeviceGetMemoryProperties(hDevice, &memCount, nullptr); 45 | 46 | // Allocate properties structs 47 | ${x}_device_memory_properties_t* pMemProps = allocate(memCount*sizeof(${x}_device_memory_properties_t)); 48 | ${x}_device_memory_ext_properties_t* pExtMemProps = allocate(memCount*sizeof(${x}_device_memory_ext_properties_t)); 49 | 50 | // Make pNext in memProps point at corresponding extMemProps 51 | for (uint32_t i = 0; i < memCount; ++i) { 52 | pMemProps[i].stype = ${X}_STRUCTURE_TYPE_DEVICE_MEMORY_PROPERTIES; 53 | pMemProps[i].pNext = &pExtMemProps[i]; 54 | pExtMemProps[i].stype = ${X}_STRUCTURE_TYPE_DEVICE_MEMORY_EXT_PROPERTIES; 55 | pExtMemProps[i].pNext = nullptr; 56 | } 57 | 58 | // Obtain memory & extended memory properties 59 | ${x}DeviceGetMemoryProperties(hDevice, &memCount, pMemProps); 60 | -------------------------------------------------------------------------------- /scripts/core/EXT_PCIProperties.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_pci_properties: 12 | 13 | ====================================== 14 | PCI Properties Extension 15 | ====================================== 16 | 17 | API 18 | ---- 19 | 20 | * Functions 21 | 22 | 23 | * ${x}DevicePciGetPropertiesExt 24 | 25 | 26 | * Enumerations 27 | 28 | 29 | * ${x}_pci_properties_ext_version_t 30 | 31 | 32 | * Structures 33 | 34 | 35 | * ${x}_pci_ext_properties_t 36 | * ${x}_pci_address_ext_t 37 | * ${x}_pci_speed_ext_t 38 | 39 | PCI Properties 40 | ~~~~~~~~~~~~~~~~~~ 41 | 42 | Accelerator devices connected to the host CPU over a PCI root complex can be located in the PCI switch fabric using a bus:device:function (BDF) address. This is useful, e.g., to determine which PCI devices are located *close* to each other in the PCI switch fabric. The ${x}_pci_address_ext_t struct returned via ${x}_pci_ext_properties_t by the call to ${x}DevicePciGetPropertiesExt contains the BDF address of the device. 43 | 44 | The choice of the optimal algorithm to use for a given computation may be dependent on the access speed, i.e., bandwidth at which data can be transferred over PCI to the device. The ${x}_pci_speed_ext_t struct returned via ${x}_pci_ext_properties_t by the call to ${x}DevicePciGetPropertiesExt contains the theoretical PCI BW for accessing the device. 45 | 46 | The following psuedo-code demonstrates a sequence for obtaining the BDF address & PCI BW of a device: 47 | 48 | .. parsed-literal:: 49 | 50 | ... 51 | // Create a PCI address struct 52 | ${x}_pci_address_ext_t devAddr = { 53 | 0, // domain 54 | 0, // bus 55 | 0, // device 56 | 0 // function 57 | }; 58 | // Create a PCI speed struct 59 | ${x}_pci_speed_ext_t devSpeed = { 60 | 0, // gen 61 | 0, // width 62 | 0 // maxBandwidth 63 | }; 64 | 65 | // Create a PCI Properties struct 66 | ${x}_pci_ext_properties_t devPCIProps = { 67 | ${X}_STRUCTURE_TYPE_PCI_EXT_PROPERTIES, 68 | nullptr, 69 | devAddr, 70 | devSpeed 71 | }; 72 | 73 | // Get the PCI Address & Speed 74 | ${x}_result_t result = ${x}DevicePciGetPropertiesExt(dev, &devPCIProps); 75 | -------------------------------------------------------------------------------- /scripts/core/EXT_Raytracing.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_raytracing: 12 | 13 | ========================= 14 | Raytracing Extension 15 | ========================= 16 | 17 | API 18 | ---- 19 | 20 | * Enumerations 21 | 22 | 23 | * ${x}_raytracing_ext_version_t 24 | * ${x}_device_raytracing_ext_flags_t 25 | * ${x}_raytracing_mem_alloc_ext_flags_t 26 | 27 | 28 | * Structures 29 | 30 | 31 | * ${x}_device_raytracing_ext_properties_t 32 | * ${x}_raytracing_mem_alloc_ext_desc_t 33 | 34 | -------------------------------------------------------------------------------- /scripts/core/EXT_SRGB.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_srgb: 12 | 13 | ====================================== 14 | sRGB Extension 15 | ====================================== 16 | 17 | API 18 | ---- 19 | 20 | * Structures 21 | 22 | * ${x}_srgb_ext_desc_t 23 | 24 | sRGB 25 | ~~~~ 26 | 27 | Device capabilities may include native support for sRGB image formats. sRGB images may benefit from hardware acceleration on devices that include native support for sRGB. The following psuedo-code demonstrates a sequence for creating an sRGB image: 28 | 29 | .. parsed-literal:: 30 | 31 | // Specify single component FLOAT32 format 32 | ${x}_image_format_t format = { 33 | ${X}_IMAGE_FORMAT_LAYOUT_32, ${X}_IMAGE_FORMAT_TYPE_FLOAT, 34 | ${X}_IMAGE_FORMAT_SWIZZLE_R, ${X}_IMAGE_FORMAT_SWIZZLE_0, ${X}_IMAGE_FORMAT_SWIZZLE_0, ${X}_IMAGE_FORMAT_SWIZZLE_1 35 | }; 36 | 37 | // Specify sRGB image format 38 | ${x}_srgb_ext_desc_t isSRGB = { 39 | ${X}_STRUCTURE_TYPE_SRGB_EXT_DESC, 40 | nullptr, 41 | true 42 | }; 43 | 44 | ${x}_image_desc_t imageDesc = { 45 | ${X}_STRUCTURE_TYPE_IMAGE_DESC, 46 | &isSRGB, 47 | 0, // read-only 48 | ${X}_IMAGE_TYPE_2D, 49 | format, 50 | 128, 128, 0, 0, 0 51 | }; 52 | ${x}_image_handle_t hImage; 53 | ${x}ImageCreate(hContext, hDevice, &imageDesc, &hImage); 54 | 55 | // upload contents from host pointer 56 | ${x}CommandListAppendImageCopyFromMemory(hCommandList, hImage, nullptr, pImageData, nullptr, 0, nullptr); 57 | ... 58 | -------------------------------------------------------------------------------- /scripts/core/EXT_Subgroups.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZE_extension_subgroups: 12 | 13 | ========================= 14 | Subgroups Extension 15 | ========================= 16 | 17 | API 18 | ---- 19 | 20 | * Enumerations 21 | 22 | 23 | * ${x}_subgroup_ext_version_t 24 | 25 | -------------------------------------------------------------------------------- /scripts/core/PCIProperties.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2021-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension APIs for PCI Properties" 11 | version: "1.3" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "PCI Properties Extension Name" 15 | version: "1.3" 16 | name: $X_PCI_PROPERTIES_EXT_NAME 17 | value: '"$X_extension_pci_properties"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "PCI Properties Extension Version(s)" 21 | version: "1.3" 22 | name: $x_pci_properties_ext_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: struct 29 | desc: "Device PCI address" 30 | version: "1.3" 31 | class: $xDevice 32 | name: $x_pci_address_ext_t 33 | members: 34 | - type: uint32_t 35 | name: "domain" 36 | desc: "[out] PCI domain number" 37 | - type: uint32_t 38 | name: "bus" 39 | desc: "[out] PCI BDF bus number" 40 | - type: uint32_t 41 | name: "device" 42 | desc: "[out] PCI BDF device number" 43 | - type: uint32_t 44 | name: "function" 45 | desc: "[out] PCI BDF function number" 46 | details: 47 | - "This structure may be passed to $xDevicePciGetPropertiesExt as an attribute of $x_pci_ext_properties_t." 48 | - "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." 49 | --- #-------------------------------------------------------------------------- 50 | type: struct 51 | desc: "Device PCI speed" 52 | version: "1.3" 53 | class: $xDevice 54 | name: $x_pci_speed_ext_t 55 | members: 56 | - type: int32_t 57 | name: "genVersion" 58 | desc: "[out] The link generation. A value of -1 means that this property is unknown." 59 | - type: int32_t 60 | name: "width" 61 | desc: "[out] The number of lanes. A value of -1 means that this property is unknown." 62 | - type: int64_t 63 | name: "maxBandwidth" 64 | desc: "[out] The theoretical maximum bandwidth in bytes/sec (sum of all lanes). A value of -1 means that this property is unknown." 65 | --- #-------------------------------------------------------------------------- 66 | type: struct 67 | desc: "Static PCI properties" 68 | class: $xDevice 69 | name: $x_pci_ext_properties_t 70 | base: $x_base_properties_t 71 | members: 72 | - type: $x_pci_address_ext_t 73 | name: "address" 74 | desc: "[out] The BDF address" 75 | - type: $x_pci_speed_ext_t 76 | name: "maxSpeed" 77 | desc: "[out] Fastest port configuration supported by the device (sum of all lanes)" 78 | --- #-------------------------------------------------------------------------- 79 | type: function 80 | desc: "Get PCI properties - address, max speed" 81 | version: "1.3" 82 | class: $xDevice 83 | name: PciGetPropertiesExt 84 | decl: static 85 | details: 86 | - "The application may call this function from simultaneous threads." 87 | - "The implementation of this function should be lock-free." 88 | analogue: 89 | - None 90 | params: 91 | - type: $x_device_handle_t 92 | name: hDevice 93 | desc: "[in] handle of the device object." 94 | - type: $x_pci_ext_properties_t* 95 | name: pPciProperties 96 | desc: "[in,out] returns the PCI properties of the device." 97 | -------------------------------------------------------------------------------- /scripts/core/SRGB.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2021-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension APIs for sRGB" 11 | version: "1.3" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "sRGB Extension Name" 15 | version: "1.3" 16 | name: $X_SRGB_EXT_NAME 17 | value: '"$X_extension_srgb"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "sRGB Extension Version(s)" 21 | version: "1.3" 22 | name: $x_srgb_ext_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: struct 29 | desc: "sRGB image descriptor" 30 | version: "1.3" 31 | class: $xImage 32 | name: $x_srgb_ext_desc_t 33 | base: $x_base_desc_t 34 | members: 35 | - type: ze_bool_t 36 | name: sRGB 37 | desc: "[in] Is sRGB." 38 | details: 39 | - "This structure may be passed to $xImageCreate via the `pNext` member of $x_image_desc_t" 40 | - "Used for specifying that the image is in sRGB format." 41 | -------------------------------------------------------------------------------- /scripts/core/bandwidth.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2021-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension APIs for Bandwidth" 11 | version: "1.4" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Bandwidth Extension Name" 15 | version: "1.4" 16 | name: $X_BANDWIDTH_PROPERTIES_EXP_NAME 17 | value: '"$X_experimental_bandwidth_properties"' 18 | --- #-------------------------------------------------------------------------- 19 | type: struct 20 | desc: "P2P Bandwidth Properties" 21 | version: "1.4" 22 | class: $xDevice 23 | name: $x_device_p2p_bandwidth_exp_properties_t 24 | base: $x_base_properties_t 25 | members: 26 | - type: uint32_t 27 | name: "logicalBandwidth" 28 | desc: "[out] total logical design bandwidth for all links connecting the two devices" 29 | - type: uint32_t 30 | name: "physicalBandwidth" 31 | desc: "[out] total physical design bandwidth for all links connecting the two devices" 32 | - type: $x_bandwidth_unit_t 33 | name: "bandwidthUnit" 34 | desc: "[out] bandwidth unit" 35 | - type: uint32_t 36 | name: "logicalLatency" 37 | desc: "[out] average logical design latency for all links connecting the two devices" 38 | - type: uint32_t 39 | name: "physicalLatency" 40 | desc: "[out] average physical design latency for all links connecting the two devices" 41 | - type: $x_latency_unit_t 42 | name: "latencyUnit" 43 | desc: "[out] latency unit" 44 | details: 45 | - "This structure may be passed to $xDeviceGetP2PProperties by having the pNext member of $x_device_p2p_properties_t point at this struct." 46 | --- #-------------------------------------------------------------------------- 47 | type: struct 48 | desc: "Copy Bandwidth Properties" 49 | version: "1.4" 50 | class: $xCommandQueue 51 | name: $x_copy_bandwidth_exp_properties_t 52 | base: $x_base_properties_t 53 | members: 54 | - type: uint32_t 55 | name: "copyBandwidth" 56 | desc: "[out] design bandwidth supported by this engine type for copy operations" 57 | - type: $x_bandwidth_unit_t 58 | name: "copyBandwidthUnit" 59 | desc: "[out] copy bandwidth unit" 60 | details: 61 | - "This structure may be passed to $xDeviceGetCommandQueueGroupProperties by having the pNext member of $x_command_queue_group_properties_t point at this struct." 62 | -------------------------------------------------------------------------------- /scripts/core/bfloat16conversions.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension APIs for Bfloat16 Conversions" 11 | version: "1.5" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Bfloat16 Conversions Extension Name" 15 | version: "1.5" 16 | name: $X_BFLOAT16_CONVERSIONS_EXT_NAME 17 | value: '"$X_extension_bfloat16_conversions"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Bfloat16 Conversions Extension Version(s)" 21 | version: "1.5" 22 | name: $x_bfloat16_conversions_ext_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | -------------------------------------------------------------------------------- /scripts/core/commandListClone.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2024 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension for supporting compute graphs." 11 | version: "1.9" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Command List Clone Extension Name" 15 | version: "1.9" 16 | name: $X_COMMAND_LIST_CLONE_EXP_NAME 17 | value: '"$X_experimental_command_list_clone"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Command List Clone Extension Version(s)" 21 | version: "1.9" 22 | name: $x_command_list_clone_exp_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: function 29 | desc: "Creates a command list as the clone of another command list." 30 | version: "1.9" 31 | class: $xCommandList 32 | name: CreateCloneExp 33 | decl: static 34 | ordinal: "0" 35 | details: 36 | - "The source command list must be created with the $X_COMMAND_LIST_FLAG_EXP_CLONEABLE flag." 37 | - "The source command list must be closed prior to cloning." 38 | - "The source command list may be cloned while it is running on the device." 39 | - "The cloned command list inherits all properties of the source command list." 40 | - "The cloned command list must be destroyed prior to the source command list." 41 | - "The application must only use the command list for the device, or its sub-devices, which was provided during creation." 42 | - "The application may call this function from simultaneous threads." 43 | - "The implementation of this function must be thread-safe." 44 | params: 45 | - type: "$x_command_list_handle_t" 46 | name: hCommandList 47 | desc: "[in] handle to source command list (the command list to clone)" 48 | - type: $x_command_list_handle_t* 49 | name: phClonedCommandList 50 | desc: "[out] pointer to handle of the cloned command list" 51 | -------------------------------------------------------------------------------- /scripts/core/counterbasedeventpool.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2019-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension APIs for Counter-based Event Pools" 11 | version: "1.8" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Counter-based Event Pools Extension Name" 15 | version: "1.8" 16 | name: $X_EVENT_POOL_COUNTER_BASED_EXP_NAME 17 | value: '"$X_experimental_event_pool_counter_based"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Counter-based Event Pools Extension Version(s)" 21 | version: "1.8" 22 | name: $x_event_pool_counter_based_exp_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: enum 29 | desc: "Supported event flags for defining counter-based event pools." 30 | class: $xEventPool 31 | name: $x_event_pool_counter_based_exp_flags_t 32 | version: "1.8" 33 | etors: 34 | - name: IMMEDIATE 35 | desc: "Counter-based event pool is used for immediate command lists (default)" 36 | - name: NON_IMMEDIATE 37 | desc: "Counter-based event pool is for non-immediate command lists" 38 | --- #-------------------------------------------------------------------------- 39 | type: struct 40 | desc: "Event pool descriptor for counter-based events. This structure may be passed to $xEventPoolCreate as pNext member of $x_event_pool_desc_t." 41 | class: $xEventPool 42 | version: "1.8" 43 | name: $x_event_pool_counter_based_exp_desc_t 44 | base: $x_base_desc_t 45 | members: 46 | - type: $x_event_pool_counter_based_exp_flags_t 47 | name: flags 48 | desc: | 49 | [in] mode flags. 50 | must be 0 (default) or a valid value of $x_event_pool_counter_based_exp_flag_t 51 | default behavior is counter-based event pool is only used for immediate command lists. 52 | init: "0" -------------------------------------------------------------------------------- /scripts/core/deviceLUID.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension APIs for Device Local Identifier (LUID)" 11 | version: "1.4" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Device Local Identifier (LUID) Extension Name" 15 | version: "1.4" 16 | name: $X_DEVICE_LUID_EXT_NAME 17 | value: '"$X_extension_device_luid"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Device Local Identifier (LUID) Extension Version(s)" 21 | version: "1.4" 22 | name: $x_device_luid_ext_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: macro 29 | desc: "Maximum device local identifier (LUID) size in bytes" 30 | version: "1.4" 31 | name: $X_MAX_DEVICE_LUID_SIZE_EXT 32 | value: "8" 33 | --- #-------------------------------------------------------------------------- 34 | type: struct 35 | desc: "Device local identifier (LUID)" 36 | name: "$x_device_luid_ext_t" 37 | members: 38 | - type: uint8_t 39 | name: "id[$X_MAX_DEVICE_LUID_SIZE_EXT]" 40 | desc: "[out] opaque data representing a device LUID" 41 | --- #-------------------------------------------------------------------------- 42 | type: struct 43 | desc: "Device LUID properties queried using $xDeviceGetProperties" 44 | version: "1.4" 45 | class: $xDevice 46 | name: $x_device_luid_ext_properties_t 47 | base: $x_base_properties_t 48 | members: 49 | - type: $x_device_luid_ext_t 50 | name: luid 51 | desc: | 52 | [out] locally unique identifier (LUID). 53 | The returned LUID can be cast to a LUID object and must be equal to the locally 54 | unique identifier of an IDXGIAdapter1 object that corresponds to the device. 55 | - type: "uint32_t" 56 | name: nodeMask 57 | desc: | 58 | [out] node mask. 59 | The returned node mask must contain exactly one bit. 60 | If the device is running on an operating system that supports the Direct3D 12 API 61 | and the device corresponds to an individual device in a linked device adapter, the 62 | returned node mask identifies the Direct3D 12 node corresponding to the device. 63 | Otherwise, the returned node mask must be 1. 64 | 65 | details: 66 | - "This structure may be returned from $xDeviceGetProperties, via the `pNext` member of $x_device_properties_t." 67 | -------------------------------------------------------------------------------- /scripts/core/deviceipversion.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension APIs for Device IP Version" 11 | version: "1.5" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Device IP Version Extension Name" 15 | version: "1.5" 16 | name: $X_DEVICE_IP_VERSION_EXT_NAME 17 | value: '"$X_extension_device_ip_version"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Device IP Version Extension Version(s)" 21 | version: "1.5" 22 | name: $x_device_ip_version_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: struct 29 | desc: "Device IP version queried using $xDeviceGetProperties" 30 | version: "1.5" 31 | class: $xDevice 32 | name: $x_device_ip_version_ext_t 33 | base: $x_base_desc_t 34 | members: 35 | - type: uint32_t 36 | name: ipVersion 37 | desc: | 38 | [out] Device IP version. The meaning of the device IP version is 39 | implementation-defined, but newer devices should have a higher 40 | version than older devices. 41 | 42 | details: 43 | - "This structure may be returned from $xDeviceGetProperties via the `pNext` member of $x_device_properties_t" 44 | -------------------------------------------------------------------------------- /scripts/core/driverDDIHandles.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2024 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension for Driver Direct Device Interface (DDI) Handles" 11 | version: "1.12" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Driver Direct Device Interface (DDI) Handles Extension Name" 15 | version: "1.12" 16 | name: $X_DRIVER_DDI_HANDLES_EXT_NAME 17 | value: '"$X_extension_driver_ddi_handles"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Driver Direct Device Interface (DDI) Handles Extension Version(s)" 21 | version: "1.12" 22 | name: $x_driver_ddi_handles_ext_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: enum 29 | desc: "Driver Direct Device Interface (DDI) Handle Extension Flags" 30 | class: $xDriver 31 | name: $x_driver_ddi_handle_ext_flags_t 32 | etors: 33 | - name: DDI_HANDLE_EXT_SUPPORTED 34 | desc: "Driver Supports DDI Handles Extension" 35 | --- #-------------------------------------------------------------------------- 36 | type: struct 37 | desc: "Driver DDI Handles properties queried using $xDriverGetProperties" 38 | version: "1.12" 39 | class: $xDriver 40 | name: $x_driver_ddi_handles_ext_properties_t 41 | base: $x_base_properties_t 42 | members: 43 | - type: $x_driver_ddi_handle_ext_flags_t 44 | name: flags 45 | desc: | 46 | [out] 0 (none) or a valid combination of ::ze_driver_ddi_handle_ext_flags_t 47 | details: 48 | - "This structure may be returned from $xDriverGetProperties, via the `pNext` member of $x_driver_properties_t." 49 | -------------------------------------------------------------------------------- /scripts/core/eventquerytimestamps.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2021-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension for supporting event query timestamps." 11 | version: "1.2" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Event Query Timestamps Extension Name" 15 | version: "1.2" 16 | name: $X_EVENT_QUERY_TIMESTAMPS_EXP_NAME 17 | value: '"$X_experimental_event_query_timestamps"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Event Query Timestamps Extension Version(s)" 21 | version: "1.2" 22 | name: $x_event_query_timestamps_exp_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: function 29 | desc: "Query event timestamps for a device or sub-device." 30 | version: "1.2" 31 | class: $xEvent 32 | name: QueryTimestampsExp 33 | decl: static 34 | ordinal: "0" 35 | details: 36 | - "The application may call this function from simultaneous threads." 37 | - "The implementation of this function must be thread-safe." 38 | - "The implementation must support $X_experimental_event_query_timestamps." 39 | - "The implementation must return all timestamps for the specified event and device pair." 40 | - "The implementation must return all timestamps for all sub-devices when device handle is parent device." 41 | - "The implementation may return all timestamps for sub-devices when device handle is sub-device or may return 0 for count." 42 | analogue: 43 | - None 44 | params: 45 | - type: $x_event_handle_t 46 | name: hEvent 47 | desc: "[in] handle of the event" 48 | - type: $x_device_handle_t 49 | name: hDevice 50 | desc: "[in] handle of the device to query" 51 | - type: "uint32_t*" 52 | name: pCount 53 | desc: | 54 | [in,out] pointer to the number of timestamp results. 55 | if count is zero, then the driver shall update the value with the total number of timestamps available. 56 | if count is greater than the number of timestamps available, then the driver shall update the value with the correct number of timestamps available. 57 | - type: "$x_kernel_timestamp_result_t*" 58 | name: pTimestamps 59 | desc: | 60 | [in,out][optional][range(0, *pCount)] array of timestamp results. 61 | if count is less than the number of timestamps available, then driver shall only retrieve that number of timestamps. -------------------------------------------------------------------------------- /scripts/core/floatAtomics.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2019-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension APIs for Floating-Point Atomics" 11 | version: "1.1" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Floating-Point Atomics Extension Name" 15 | version: "1.1" 16 | name: $X_FLOAT_ATOMICS_EXT_NAME 17 | value: '"$X_extension_float_atomics"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Floating-Point Atomics Extension Version(s)" 21 | version: "1.1" 22 | name: $x_float_atomics_ext_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: enum 29 | desc: "Supported floating-point atomic capability flags" 30 | version: "1.1" 31 | class: $xDevice 32 | name: $x_device_fp_atomic_ext_flags_t 33 | etors: 34 | - name: GLOBAL_LOAD_STORE 35 | desc: "Supports atomic load, store, and exchange" 36 | - name: GLOBAL_ADD 37 | desc: "Supports atomic add and subtract" 38 | - name: GLOBAL_MIN_MAX 39 | desc: "Supports atomic min and max" 40 | - name: LOCAL_LOAD_STORE 41 | value: $X_BIT(16) 42 | desc: "Supports atomic load, store, and exchange" 43 | - name: LOCAL_ADD 44 | desc: "Supports atomic add and subtract" 45 | - name: LOCAL_MIN_MAX 46 | desc: "Supports atomic min and max" 47 | --- #-------------------------------------------------------------------------- 48 | type: struct 49 | desc: "Device floating-point atomic properties queried using $xDeviceGetModuleProperties" 50 | version: "1.1" 51 | class: $xDevice 52 | name: $x_float_atomic_ext_properties_t 53 | base: $x_base_properties_t 54 | members: 55 | - type: $x_device_fp_atomic_ext_flags_t 56 | name: fp16Flags 57 | desc: "[out] Capabilities for half-precision floating-point atomic operations" 58 | - type: $x_device_fp_atomic_ext_flags_t 59 | name: fp32Flags 60 | desc: "[out] Capabilities for single-precision floating-point atomic operations" 61 | - type: $x_device_fp_atomic_ext_flags_t 62 | name: fp64Flags 63 | desc: "[out] Capabilities for double-precision floating-point atomic operations" 64 | details: 65 | - "This structure may be returned from $xDeviceGetModuleProperties, via the `pNext` member of $x_device_module_properties_t." 66 | -------------------------------------------------------------------------------- /scripts/core/globaloffset.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension for supporting kernel global work offset." 11 | version: "1.1" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Global Offset Extension Name" 15 | version: "1.1" 16 | name: $X_GLOBAL_OFFSET_EXP_NAME 17 | value: '"$X_experimental_global_offset"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Global Offset Extension Version(s)" 21 | version: "1.1" 22 | name: $x_global_offset_exp_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: function 29 | desc: "Set global work offset for a kernel." 30 | version: "1.1" 31 | class: $xKernel 32 | name: SetGlobalOffsetExp 33 | details: 34 | - "The global work offset will be used when a $xCommandListAppendLaunchKernel() variant is called." 35 | - "The application must **not** call this function from simultaneous threads with the same kernel handle." 36 | - "The implementation of this function should be lock-free." 37 | params: 38 | - type: "$x_kernel_handle_t" 39 | name: hKernel 40 | desc: "[in] handle of the kernel object" 41 | - type: "uint32_t" 42 | name: offsetX 43 | desc: "[in] global offset for X dimension to use for this kernel" 44 | - type: "uint32_t" 45 | name: offsetY 46 | desc: "[in] global offset for Y dimension to use for this kernel" 47 | - type: "uint32_t" 48 | name: offsetZ 49 | desc: "[in] global offset for Z dimension to use for this kernel" 50 | -------------------------------------------------------------------------------- /scripts/core/imageQueryAllocProperties.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2021-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension for Querying Image Allocation Properties." 11 | version: "1.3" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Image Query Allocation Properties Extension Name" 15 | version: "1.3" 16 | name: $X_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_NAME 17 | value: '"$X_extension_image_query_alloc_properties"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Image Query Allocation Properties Extension Version(s)" 21 | version: "1.3" 22 | name: $x_image_query_alloc_properties_ext_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: struct 29 | desc: "Image allocation properties queried using $xImageGetAllocPropertiesExt" 30 | version: "1.3" 31 | class: $xImage 32 | name: $x_image_allocation_ext_properties_t 33 | base: $x_base_properties_t 34 | members: 35 | - type: uint64_t 36 | name: id 37 | desc: "[out] identifier for this allocation" 38 | --- #-------------------------------------------------------------------------- 39 | type: function 40 | desc: "Retrieves attributes of an image allocation" 41 | version: "1.3" 42 | class: $xImage 43 | name: GetAllocPropertiesExt 44 | decl: static 45 | details: 46 | - "The application may call this function from simultaneous threads." 47 | params: 48 | - type: $x_context_handle_t 49 | name: hContext 50 | desc: "[in] handle of the context object" 51 | - type: $x_image_handle_t 52 | name: hImage 53 | desc: "[in] handle of image object to query" 54 | - type: "$x_image_allocation_ext_properties_t*" 55 | name: pImageAllocProperties 56 | desc: "[in,out] query result for image allocation properties" 57 | -------------------------------------------------------------------------------- /scripts/core/imagememoryproperties.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2021-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension for supporting image memory properties." 11 | version: "1.2" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Image Memory Properties Extension Name" 15 | version: "1.2" 16 | name: $X_IMAGE_MEMORY_PROPERTIES_EXP_NAME 17 | value: '"$X_experimental_image_memory_properties"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Image Memory Properties Extension Version(s)" 21 | version: "1.2" 22 | name: $x_image_memory_properties_exp_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: struct 29 | desc: "Image memory properties" 30 | version: "1.2" 31 | class: $xImage 32 | name: $x_image_memory_properties_exp_t 33 | base: $x_base_desc_t 34 | members: 35 | - type: uint64_t 36 | name: size 37 | desc: "[out] size of image allocation in bytes." 38 | - type: uint64_t 39 | name: rowPitch 40 | desc: "[out] size of image row in bytes." 41 | - type: uint64_t 42 | name: slicePitch 43 | desc: "[out] size of image slice in bytes." 44 | --- #-------------------------------------------------------------------------- 45 | type: function 46 | desc: "Query image memory properties." 47 | version: "1.2" 48 | class: $xImage 49 | name: GetMemoryPropertiesExp 50 | decl: static 51 | ordinal: "0" 52 | details: 53 | - "The application may call this function from simultaneous threads." 54 | - "The implementation of this function must be thread-safe." 55 | - "The implementation must support $X_experimental_image_memory_properties extension." 56 | analogue: 57 | - None 58 | params: 59 | - type: "$x_image_handle_t" 60 | name: hImage 61 | desc: "[in] handle of image object" 62 | - type: "$x_image_memory_properties_exp_t*" 63 | name: pMemoryProperties 64 | desc: "[in,out] query result for image memory properties." -------------------------------------------------------------------------------- /scripts/core/imageviewplanar.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2021-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension for supporting image views for planar images." 11 | version: "1.5" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Image View Planar Extension Name" 15 | version: "1.5" 16 | name: $X_IMAGE_VIEW_PLANAR_EXT_NAME 17 | value: '"$X_extension_image_view_planar"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Image View Planar Extension Version(s)" 21 | version: "1.5" 22 | name: $x_image_view_planar_ext_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: struct 29 | desc: "Image view planar descriptor" 30 | version: "1.5" 31 | class: $xImage 32 | name: $x_image_view_planar_ext_desc_t 33 | base: $x_base_desc_t 34 | members: 35 | - type: uint32_t 36 | name: planeIndex 37 | desc: "[in] the 0-based plane index (e.g. NV12 is 0 = Y plane, 1 UV plane)" 38 | --- #-------------------------------------------------------------------------- 39 | type: header 40 | desc: "Intel $OneApi Level-Zero Extension for supporting image views for planar images." 41 | version: "1.2" 42 | --- #-------------------------------------------------------------------------- 43 | type: macro 44 | desc: "Image View Planar Extension Name" 45 | version: "1.2" 46 | name: $X_IMAGE_VIEW_PLANAR_EXP_NAME 47 | value: '"$X_experimental_image_view_planar"' 48 | --- #-------------------------------------------------------------------------- 49 | type: enum 50 | desc: "Image View Planar Extension Version(s)" 51 | version: "1.2" 52 | name: $x_image_view_planar_exp_version_t 53 | etors: 54 | - name: "1_0" 55 | value: "$X_MAKE_VERSION( 1, 0 )" 56 | desc: "version 1.0" 57 | --- #-------------------------------------------------------------------------- 58 | type: struct 59 | desc: "Image view planar descriptor" 60 | version: "1.2" 61 | class: $xImage 62 | name: $x_image_view_planar_exp_desc_t 63 | base: $x_base_desc_t 64 | members: 65 | - type: uint32_t 66 | name: planeIndex 67 | desc: 68 | "1.0": "[in] the 0-based plane index (e.g. NV12 is 0 = Y plane, 1 UV plane)" 69 | "1.5": "[DEPRECATED] no longer supported, use $x_image_view_planar_ext_desc_t instead" -------------------------------------------------------------------------------- /scripts/core/immediateCommandListAppend.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2024 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension for supporting compute graphs." 11 | version: "1.9" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Immediate Command List Append Extension Name" 15 | version: "1.9" 16 | name: $X_IMMEDIATE_COMMAND_LIST_APPEND_EXP_NAME 17 | value: '"$X_experimental_immediate_command_list_append"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Immediate Command List Append Extension Version(s)" 21 | version: "1.9" 22 | name: $x_immediate_command_list_append_exp_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: function 29 | desc: "Appends command lists to dispatch from an immediate command list." 30 | version: "1.9" 31 | class: $xCommandList 32 | name: ImmediateAppendCommandListsExp 33 | details: 34 | - "The application must call this function only with command lists created with $xCommandListCreateImmediate." 35 | - "The command lists passed to this function in the `phCommandLists` argument must be regular command lists (i.e. not immediate command lists)." 36 | - "The application may call this function from simultaneous threads." 37 | - "The implementation of this function should be lock-free." 38 | params: 39 | - type: "$x_command_list_handle_t" 40 | name: hCommandListImmediate 41 | desc: "[in] handle of the immediate command list" 42 | - type: uint32_t 43 | name: numCommandLists 44 | desc: "[in] number of command lists" 45 | - type: "$x_command_list_handle_t*" 46 | name: phCommandLists 47 | desc: "[in][range(0, numCommandLists)] handles of command lists" 48 | - type: $x_event_handle_t 49 | name: hSignalEvent 50 | desc: | 51 | [in][optional] handle of the event to signal on completion 52 | - if not null, this event is signaled after the completion of all appended command lists 53 | - type: uint32_t 54 | name: numWaitEvents 55 | desc: "[in][optional] number of events to wait on before executing appended command lists; must be 0 if nullptr == phWaitEvents" 56 | - type: "$x_event_handle_t*" 57 | name: phWaitEvents 58 | desc: | 59 | [in][optional][range(0, numWaitEvents)] handle of the events to wait on before executing appended command lists. 60 | - if not null, all wait events must be satisfied prior to the start of any appended command list(s) 61 | -------------------------------------------------------------------------------- /scripts/core/kernelBinary.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2024 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension for retrieving kernel binary program data." 11 | version: "1.11" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Get Kernel Binary Extension Name" 15 | version: "1.11" 16 | name: $X_GET_KERNEL_BINARY_EXP_NAME 17 | value: '"$X_extension_kernel_binary_exp"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Get Kernel Binary Extension Version(s)" 21 | version: "1.11" 22 | name: $x_kernel_get_binary_exp_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: function 29 | desc: "Retrieves kernel binary program data (ISA GEN format)." 30 | version: "1.11" 31 | class: $xKernel 32 | name: GetBinaryExp 33 | decl: static 34 | ordinal: "0" 35 | details: 36 | - "A valid kernel handle must be created with $xKernelCreate." 37 | - "Returns Intel Graphics Assembly (GEN ISA) format binary program data for kernel handle." 38 | - "The application may call this function from simultaneous threads." 39 | - "The implementation of this function must be thread-safe." 40 | params: 41 | - type: $x_kernel_handle_t 42 | name: hKernel 43 | desc: "[in] Kernel handle." 44 | - type: size_t* 45 | name: pSize 46 | desc: "[in,out] pointer to variable with size of GEN ISA binary." 47 | - type: uint8_t* 48 | name: pKernelBinary 49 | desc: "[in,out] pointer to storage area for GEN ISA binary function." -------------------------------------------------------------------------------- /scripts/core/kernelMaxGroupSizeProperties.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2021-2023 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension for querying kernel max group size properties." 11 | version: "1.5" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Kernel Max Group Size Properties Extension Name" 15 | version: "1.5" 16 | name: $X_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_NAME 17 | value: '"$X_extension_kernel_max_group_size_properties"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Kernel Max Group Size Properties Extension Version(s)" 21 | version: "1.5" 22 | name: $x_kernel_max_group_size_properties_ext_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: struct 29 | desc: "Additional kernel max group size properties" 30 | version: "1.5" 31 | class: $xKernel 32 | name: $x_kernel_max_group_size_properties_ext_t 33 | base: $x_base_properties_t 34 | members: 35 | - type: uint32_t 36 | name: maxGroupSize 37 | desc: "[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 $x_device_compute_properties_t." 38 | details: 39 | - "This structure may be passed to $xKernelGetProperties, via the `pNext` member of $x_kernel_properties_t, to query additional kernel max group size properties." 40 | --- #-------------------------------------------------------------------------- 41 | type: typedef 42 | desc: "compiler-independent type" 43 | name: $x_kernel_max_group_size_ext_properties_t 44 | version: "1.7" 45 | value: $x_kernel_max_group_size_properties_ext_t 46 | -------------------------------------------------------------------------------- /scripts/core/kernelSchedulingHints.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2021-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension for specifying kernel scheduling hints." 11 | version: "1.2" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Kernel Scheduling Hints Extension Name" 15 | version: "1.2" 16 | name: $X_KERNEL_SCHEDULING_HINTS_EXP_NAME 17 | value: '"$X_experimental_scheduling_hints"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Kernel Scheduling Hints Extension Version(s)" 21 | version: "1.2" 22 | name: $x_scheduling_hints_exp_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: enum 29 | desc: "Supported kernel scheduling hint flags" 30 | version: "1.2" 31 | class: $xKernel 32 | name: $x_scheduling_hint_exp_flags_t 33 | etors: 34 | - name: OLDEST_FIRST 35 | desc: "Hint that the kernel prefers oldest-first scheduling" 36 | - name: ROUND_ROBIN 37 | desc: "Hint that the kernel prefers round-robin scheduling" 38 | - name: STALL_BASED_ROUND_ROBIN 39 | desc: "Hint that the kernel prefers stall-based round-robin scheduling" 40 | --- #-------------------------------------------------------------------------- 41 | type: struct 42 | desc: "Device kernel scheduling hint properties queried using $xDeviceGetModuleProperties" 43 | version: "1.2" 44 | class: $xDevice 45 | name: $x_scheduling_hint_exp_properties_t 46 | base: $x_base_properties_t 47 | members: 48 | - type: $x_scheduling_hint_exp_flags_t 49 | name: schedulingHintFlags 50 | desc: | 51 | [out] Supported kernel scheduling hints. 52 | May be 0 (none) or a valid combination of $x_scheduling_hint_exp_flag_t. 53 | details: 54 | - "This structure may be returned from $xDeviceGetModuleProperties, via the `pNext` member of $x_device_module_properties_t." 55 | --- #-------------------------------------------------------------------------- 56 | type: struct 57 | desc: "Kernel scheduling hint descriptor" 58 | version: "1.2" 59 | class: $xKernel 60 | name: $x_scheduling_hint_exp_desc_t 61 | base: $x_base_desc_t 62 | members: 63 | - type: $x_scheduling_hint_exp_flags_t 64 | name: flags 65 | desc: | 66 | [in] flags specifying kernel scheduling hints. 67 | must be 0 (default) or a valid combination of $x_scheduling_hint_exp_flag_t. 68 | init: "0" 69 | details: 70 | - "This structure may be passed to $xKernelSchedulingHintExp." 71 | --- #-------------------------------------------------------------------------- 72 | type: function 73 | desc: "Provide kernel scheduling hints that may improve performance" 74 | version: "1.2" 75 | class: $xKernel 76 | name: SchedulingHintExp 77 | details: 78 | - "The scheduling hints may improve performance only and are not required for correctness." 79 | - "If a specified scheduling hint is unsupported it will be silently ignored." 80 | - | 81 | If two conflicting scheduling hints are specified there is no defined behavior; 82 | the hints may be ignored or one hint may be chosen arbitrarily. 83 | - "The application must not call this function from simultaneous threads with the same kernel handle." 84 | - "The implementation of this function should be lock-free." 85 | params: 86 | - type: "$x_kernel_handle_t" 87 | name: hKernel 88 | desc: "[in] handle of the kernel object" 89 | - type: "$x_scheduling_hint_exp_desc_t*" 90 | name: pHint 91 | desc: "[in] pointer to kernel scheduling hint descriptor" 92 | -------------------------------------------------------------------------------- /scripts/core/linkageInspection.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2021-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension APIs for Linkage Inspection" 11 | version: "1.3" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Linkage Inspection Extension Name" 15 | version: "1.3" 16 | name: $X_LINKAGE_INSPECTION_EXT_NAME 17 | value: '"$X_extension_linkage_inspection"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Linkage Inspection Extension Version(s)" 21 | version: "1.3" 22 | name: $x_linkage_inspection_ext_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: enum 29 | desc: "Supported module linkage inspection flags" 30 | version: "1.3" 31 | class: $xModule 32 | name: $x_linkage_inspection_ext_flags_t 33 | etors: 34 | - name: IMPORTS 35 | desc: "List all imports of modules" 36 | - name: UNRESOLVABLE_IMPORTS 37 | desc: "List all imports of modules that do not have a corresponding export" 38 | - name: EXPORTS 39 | desc: "List all exports of modules" 40 | --- #-------------------------------------------------------------------------- 41 | type: struct 42 | desc: "Module linkage inspection descriptor" 43 | version: "1.3" 44 | class: $xModule 45 | name: $x_linkage_inspection_ext_desc_t 46 | base: $x_base_desc_t 47 | members: 48 | - type: $x_linkage_inspection_ext_flags_t 49 | name: flags 50 | desc: | 51 | [in] flags specifying module linkage inspection. 52 | must be 0 (default) or a valid combination of $x_linkage_inspection_ext_flag_t. 53 | init: "0" 54 | details: 55 | - "This structure may be passed to $xModuleInspectLinkageExt." 56 | --- #-------------------------------------------------------------------------- 57 | type: function 58 | desc: "List Imports & Exports" 59 | version: "1.3" 60 | class: $xModule 61 | name: InspectLinkageExt 62 | decl: static 63 | details: 64 | - "List all the import & unresolveable import dependencies & exports of a set of modules" 65 | analogue: 66 | - None 67 | params: 68 | - type: "$x_linkage_inspection_ext_desc_t*" 69 | name: pInspectDesc 70 | desc: "[in] pointer to linkage inspection descriptor structure." 71 | - type: uint32_t 72 | name: numModules 73 | desc: "[in] number of modules to be inspected pointed to by phModules." 74 | - type: "$x_module_handle_t*" 75 | name: phModules 76 | desc: "[in][range(0, numModules)] pointer to an array of modules to be inspected for import dependencies." 77 | - type: "$x_module_build_log_handle_t*" 78 | name: phLog 79 | desc: "[out] pointer to handle of linkage inspection log. Log object will contain separate lists of imports, un-resolvable imports, and exports." 80 | -------------------------------------------------------------------------------- /scripts/core/linkonceodr.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2021-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension APIs for One-Definition-Rule Linkage Types" 11 | version: "1.2" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Linkonce ODR Extension Name" 15 | version: "1.2" 16 | name: $X_LINKONCE_ODR_EXT_NAME 17 | value: '"$X_extension_linkonce_odr"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Linkonce ODR Extension Version(s)" 21 | version: "1.2" 22 | name: $x_linkonce_odr_ext_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | -------------------------------------------------------------------------------- /scripts/core/memoryCompressionHints.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2021-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension for supporting memory compression hints." 11 | version: "1.3" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Memory Compression Hints Extension Name" 15 | version: "1.3" 16 | name: $X_MEMORY_COMPRESSION_HINTS_EXT_NAME 17 | value: '"$X_extension_memory_compression_hints"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Memory Compression Hints Extension Version(s)" 21 | version: "1.3" 22 | name: $x_memory_compression_hints_ext_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: enum 29 | desc: "Supported memory compression hints flags" 30 | version: "1.3" 31 | class: $xMem 32 | name: $x_memory_compression_hints_ext_flags_t 33 | etors: 34 | - name: COMPRESSED 35 | desc: "Hint Driver implementation to make allocation compressible" 36 | - name: UNCOMPRESSED 37 | desc: "Hint Driver implementation to make allocation not compressible" 38 | --- #-------------------------------------------------------------------------- 39 | type: struct 40 | desc: "Compression hints memory allocation descriptor" 41 | version: "1.3" 42 | class: $xMem 43 | name: $x_memory_compression_hints_ext_desc_t 44 | base: $x_base_desc_t 45 | members: 46 | - type: $x_memory_compression_hints_ext_flags_t 47 | name: flags 48 | desc: | 49 | [in] flags specifying if allocation should be compressible or not. 50 | Must be set to one of the $x_memory_compression_hints_ext_flag_t; 51 | init: "0" 52 | details: 53 | - "This structure may be passed to $xMemAllocShared or $xMemAllocDevice, via the `pNext` member of $x_device_mem_alloc_desc_t." 54 | - "This structure may be passed to $xMemAllocHost, via the `pNext` member of $x_host_mem_alloc_desc_t." 55 | - "This structure may be passed to $xImageCreate, via the `pNext` member of $x_image_desc_t." 56 | -------------------------------------------------------------------------------- /scripts/core/memoryProperties.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2019-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension APIs for Device Memory Properties" 11 | version: "1.4" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Device Memory Properties Extension Name" 15 | version: "1.4" 16 | name: $X_DEVICE_MEMORY_PROPERTIES_EXT_NAME 17 | value: '"$X_extension_device_memory_properties"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Device Memory Properties Extension Version(s)" 21 | version: "1.4" 22 | name: $x_device_memory_properties_ext_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: enum 29 | desc: "Memory module types" 30 | version: "1.4" 31 | class: $xDevice 32 | name: $x_device_memory_ext_type_t 33 | etors: 34 | - name: HBM 35 | value: "0" 36 | desc: "HBM memory" 37 | - name: HBM2 38 | desc: "HBM2 memory" 39 | - name: DDR 40 | desc: "DDR memory" 41 | - name: DDR2 42 | desc: "DDR2 memory" 43 | - name: DDR3 44 | desc: "DDR3 memory" 45 | - name: DDR4 46 | desc: "DDR4 memory" 47 | - name: DDR5 48 | desc: "DDR5 memory" 49 | - name: LPDDR 50 | desc: "LPDDR memory" 51 | - name: LPDDR3 52 | desc: "LPDDR3 memory" 53 | - name: LPDDR4 54 | desc: "LPDDR4 memory" 55 | - name: LPDDR5 56 | desc: "LPDDR5 memory" 57 | - name: SRAM 58 | desc: "SRAM memory" 59 | - name: L1 60 | desc: "L1 cache" 61 | - name: L3 62 | desc: "L3 cache" 63 | - name: GRF 64 | desc: "Execution unit register file" 65 | - name: SLM 66 | desc: "Execution unit shared local memory" 67 | - name: GDDR4 68 | desc: "GDDR4 memory" 69 | - name: GDDR5 70 | desc: "GDDR5 memory" 71 | - name: GDDR5X 72 | desc: "GDDR5X memory" 73 | - name: GDDR6 74 | desc: "GDDR6 memory" 75 | - name: GDDR6X 76 | desc: "GDDR6X memory" 77 | - name: GDDR7 78 | desc: "GDDR7 memory" 79 | --- #-------------------------------------------------------------------------- 80 | type: struct 81 | desc: "Memory properties" 82 | version: "1.4" 83 | class: $xDevice 84 | name: $x_device_memory_ext_properties_t 85 | base: $x_base_properties_t 86 | members: 87 | - type: $x_device_memory_ext_type_t 88 | name: type 89 | desc: "[out] The memory type" 90 | - type: uint64_t 91 | name: physicalSize 92 | desc: "[out] Physical memory size in bytes. A value of 0 indicates that this property is not known. However, a call to $sMemoryGetState() will correctly return the total size of usable memory." 93 | - type: uint32_t 94 | name: readBandwidth 95 | desc: "[out] Design bandwidth for reads" 96 | - type: uint32_t 97 | name: writeBandwidth 98 | desc: "[out] Design bandwidth for writes" 99 | - type: $x_bandwidth_unit_t 100 | name: bandwidthUnit 101 | desc: "[out] bandwidth unit" 102 | details: 103 | - "This structure may be returned from $xDeviceGetMemoryProperties via the `pNext` member of $x_device_memory_properties_t" 104 | -------------------------------------------------------------------------------- /scripts/core/powersavinghint.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2021-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension for supporting power saving hint." 11 | version: "1.2" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Power Saving Hint Extension Name" 15 | version: "1.2" 16 | name: $X_CONTEXT_POWER_SAVING_HINT_EXP_NAME 17 | value: '"$X_experimental_power_saving_hint"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Power Saving Hint Extension Version(s)" 21 | version: "1.2" 22 | name: $x_power_saving_hint_exp_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: enum 29 | desc: "Supported device types" 30 | version: "1.2" 31 | class: $xContext 32 | name: $x_power_saving_hint_type_t 33 | etors: 34 | - name: MIN 35 | value: "0" 36 | desc: "Minumum power savings. The device will make no attempt to save power while executing work submitted to this context." 37 | - name: MAX 38 | desc: "Maximum power savings. The device will do everything to bring power to a minimum while executing work submitted to this context." 39 | value: "100" 40 | --- #-------------------------------------------------------------------------- 41 | type: struct 42 | desc: "Extended context descriptor containing power saving hint." 43 | version: "1.2" 44 | class: $xContext 45 | name: $x_context_power_saving_hint_exp_desc_t 46 | base: $x_base_desc_t 47 | members: 48 | - type: uint32_t 49 | name: hint 50 | desc: | 51 | [in] power saving hint (default value = 0). This is value from [0,100] and can use pre-defined settings from $x_power_saving_hint_type_t. 52 | init: "0" -------------------------------------------------------------------------------- /scripts/core/program.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2019-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension for supporting module programs." 11 | version: "1.0" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Module Program Extension Name" 15 | version: "1.0" 16 | name: $X_MODULE_PROGRAM_EXP_NAME 17 | value: '"$X_experimental_module_program"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Module Program Extension Version(s)" 21 | version: "1.0" 22 | name: $x_module_program_exp_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: struct 29 | desc: "Module extended descriptor to support multiple input modules." 30 | details: 31 | - "Implementation must support $X_experimental_module_program extension" 32 | - "Modules support import and export linkage for functions and global variables." 33 | - "SPIR-V import and export linkage types are used. See SPIR-V specification for linkage details." 34 | - "pInputModules, pBuildFlags, and pConstants from $x_module_desc_t is ignored." 35 | - "Format in $x_module_desc_t needs to be set to $X_MODULE_FORMAT_IL_SPIRV." 36 | class: $xModule 37 | name: $x_module_program_exp_desc_t 38 | base: $x_base_desc_t 39 | members: 40 | - type: "uint32_t" 41 | name: count 42 | desc: "[in] Count of input modules" 43 | - type: "const size_t*" 44 | name: inputSizes 45 | desc: "[in][range(0, count)] sizes of each input IL module in pInputModules." 46 | - type: "const uint8_t**" 47 | name: pInputModules 48 | desc: "[in][range(0, count)] pointer to an array of IL (e.g. SPIR-V modules). Valid only for SPIR-V input." 49 | init: nullptr 50 | - type: "const char**" 51 | name: pBuildFlags 52 | desc: "[in][optional][range(0, count)] array of strings containing build flags. See pBuildFlags in $x_module_desc_t." 53 | init: nullptr 54 | - type: "const $x_module_constants_t**" 55 | name: pConstants 56 | desc: "[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." 57 | init: nullptr -------------------------------------------------------------------------------- /scripts/core/raytracing.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2019-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension APIs for Raytracing" 11 | version: "1.0" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Raytracing Extension Name" 15 | version: "1.0" 16 | name: $X_RAYTRACING_EXT_NAME 17 | value: '"$X_extension_raytracing"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Raytracing Extension Version(s)" 21 | version: "1.0" 22 | name: $x_raytracing_ext_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: enum 29 | desc: "Supported raytracing capability flags" 30 | version: "1.0" 31 | class: $xContext 32 | name: $x_device_raytracing_ext_flags_t 33 | etors: 34 | - name: RAYQUERY 35 | desc: "Supports rayquery" 36 | - name: MOTIONBLUR 37 | desc: "Supports motion blur" 38 | version: "2.0" 39 | --- #-------------------------------------------------------------------------- 40 | type: struct 41 | desc: "Raytracing properties queried using $xDeviceGetModuleProperties" 42 | version: "1.0" 43 | class: $xContext 44 | name: $x_device_raytracing_ext_properties_t 45 | base: $x_base_properties_t 46 | members: 47 | - type: $x_device_raytracing_ext_flags_t 48 | name: flags 49 | desc: "[out] 0 or a valid combination of $x_device_raytracing_ext_flags_t" 50 | - type: uint32_t 51 | name: maxBVHLevels 52 | desc: "[out] Maximum number of BVH levels supported" 53 | details: 54 | - "This structure may be returned from $xDeviceGetModuleProperties, via the `pNext` member of $x_device_module_properties_t." 55 | --- #-------------------------------------------------------------------------- 56 | type: enum 57 | desc: "Supported raytracing memory allocation flags" 58 | version: "1.0" 59 | class: $xContext 60 | name: $x_raytracing_mem_alloc_ext_flags_t 61 | etors: 62 | - name: TBD 63 | desc: "reserved for future use" 64 | --- #-------------------------------------------------------------------------- 65 | type: struct 66 | desc: "Raytracing memory allocation descriptor" 67 | version: "1.0" 68 | class: $xContext 69 | name: $x_raytracing_mem_alloc_ext_desc_t 70 | base: $x_base_desc_t 71 | members: 72 | - type: $x_raytracing_mem_alloc_ext_flags_t 73 | name: flags 74 | desc: | 75 | [in] flags specifying additional allocation controls. 76 | must be 0 (default) or a valid combination of $x_raytracing_mem_alloc_ext_flag_t; 77 | default behavior may use implicit driver-based heuristics. 78 | init: "0" 79 | details: 80 | - "This structure must be passed to $xMemAllocShared or $xMemAllocDevice, via the `pNext` member of $x_device_mem_alloc_desc_t, for any memory allocation that is to be accessed by raytracing fixed-function of the device." 81 | -------------------------------------------------------------------------------- /scripts/core/relaxedAllocLimits.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2021-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension for supporting relaxed allocation limits." 11 | version: "1.1" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Relaxed Allocation Limits Extension Name" 15 | version: "1.1" 16 | name: $X_RELAXED_ALLOCATION_LIMITS_EXP_NAME 17 | value: '"$X_experimental_relaxed_allocation_limits"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Relaxed Allocation Limits Extension Version(s)" 21 | version: "1.1" 22 | name: $x_relaxed_allocation_limits_exp_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: enum 29 | desc: "Supported relaxed memory allocation flags" 30 | version: "1.1" 31 | class: $xMem 32 | name: $x_relaxed_allocation_limits_exp_flags_t 33 | etors: 34 | - name: MAX_SIZE 35 | desc: "Allocation size may exceed the `maxMemAllocSize` member of $x_device_properties_t." 36 | --- #-------------------------------------------------------------------------- 37 | type: struct 38 | desc: "Relaxed limits memory allocation descriptor" 39 | version: "1.1" 40 | class: $xMem 41 | name: $x_relaxed_allocation_limits_exp_desc_t 42 | base: $x_base_desc_t 43 | members: 44 | - type: $x_relaxed_allocation_limits_exp_flags_t 45 | name: flags 46 | desc: | 47 | [in] flags specifying allocation limits to relax. 48 | must be 0 (default) or a valid combination of $x_relaxed_allocation_limits_exp_flag_t; 49 | init: "0" 50 | details: 51 | - "This structure may be passed to $xMemAllocShared or $xMemAllocDevice, via the `pNext` member of $x_device_mem_alloc_desc_t." 52 | - "This structure may also be passed to $xMemAllocHost, via the `pNext` member of $x_host_mem_alloc_desc_t." 53 | -------------------------------------------------------------------------------- /scripts/core/subAllocationsProperties.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension for querying sub-allocations properties." 11 | version: "1.5" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Sub-Allocations Properties Extension Name" 15 | version: "1.5" 16 | name: $X_SUB_ALLOCATIONS_EXP_NAME 17 | value: '"$X_experimental_sub_allocations"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Sub-Allocations Properties Extension Version(s)" 21 | version: "1.5" 22 | name: $x_sub_allocations_exp_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: struct 29 | desc: "Properties returned for a sub-allocation" 30 | version: "1.5" 31 | class: $xMem 32 | name: $x_sub_allocation_t 33 | members: 34 | - type: "void*" 35 | name: base 36 | desc: "[in,out][optional] base address of the sub-allocation" 37 | - type: size_t 38 | name: size 39 | desc: "[in,out][optional] size of the allocation" 40 | --- #-------------------------------------------------------------------------- 41 | type: struct 42 | desc: "Sub-Allocations Properties" 43 | version: "1.5" 44 | class: $xMem 45 | name: $x_memory_sub_allocations_exp_properties_t 46 | base: $x_base_properties_t 47 | members: 48 | - type: uint32_t* 49 | name: pCount 50 | desc: | 51 | [in,out] pointer to the number of sub-allocations. 52 | 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. 53 | if count is greater than the number of sub-allocations, then the driver shall update the value with the correct number of sub-allocations. 54 | - type: "$x_sub_allocation_t*" 55 | name: pSubAllocations 56 | desc: | 57 | [in,out][optional][range(0, *pCount)] array of properties for sub-allocations. 58 | if count is less than the number of sub-allocations available, then driver shall only retrieve properties for that number of sub-allocations. 59 | details: 60 | - "This structure may be passed to $xMemGetAllocProperties, via the `pNext` member of $x_memory_allocation_properties_t." 61 | -------------------------------------------------------------------------------- /scripts/core/subgroups.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2021-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Extension APIs for Subgroups" 11 | version: "1.2" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Subgroups Extension Name" 15 | version: "1.2" 16 | name: $X_SUBGROUPS_EXT_NAME 17 | value: '"$X_extension_subgroups"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Subgroups Extension Version(s)" 21 | version: "1.2" 22 | name: $x_subgroup_ext_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | -------------------------------------------------------------------------------- /scripts/sysman/EXT_EngineActivity.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | s=tags['$s'] 9 | S=s.upper() 10 | %> 11 | :orphan: 12 | 13 | .. _ZES_extension_engine_activity: 14 | 15 | ========================== 16 | Engine Activity Extension 17 | ========================== 18 | 19 | API 20 | ---- 21 | 22 | * Functions 23 | 24 | * ${s}EngineGetActivityExt 25 | 26 | * Structures 27 | 28 | * ${s}_engine_ext_properties_t 29 | 30 | Engine Activity 31 | ~~~~~~~~~~~~~~~~~~ 32 | 33 | This extension provides capability to user to gather the activity stats for each Virtual Function (VF) associated with engine group. 34 | Intended use case of the feature is to query utilization stats from Physical Function (PF) interface. However, the extension 35 | may return error code ${X}_RESULT_ERROR_UNSUPPORTED_FEATURE if an environment does not support it. 36 | If VF has no activity value to report, then implementation shall reflect that appropriately in ${s}_engine_stats_t struct so that percentage 37 | calculation results in value of 0. 38 | If PF has no activity value to report, then implementation shall reflect that appropriately in ${s}_engine_stats_t struct which is 39 | at index 0 of the output vector such that utilization calculation results in value of 0. 40 | 41 | The following pseudo-code demonstrates a sequence for obtaining the engine activity for all Virtual Functions from Physical Function environment: 42 | 43 | .. parsed-literal:: 44 | 45 | // Query for engine properties and gather number of virtual function instances by passing extension structure. 46 | // Number of VFs is per engine handle and equates to number of VFs actively using 47 | // the resource represented by the engine handle. 48 | // Together with pCount from GetActivityExt, user can gather the full view of engine 49 | // utilization for all VFs and PF as shown below 50 | 51 | ${s}_engine_properties_t engineProps; 52 | ${s}_engine_ext_properties_t engineExtProps; 53 | engineProps.stype = ZES_STRUCTURE_TYPE_ENGINE_PROPERTIES; 54 | engineProps.pNext = &engineExtProps; 55 | engineExtProps.stype = ZES_STRUCTURE_TYPE_ENGINE_EXT_PROPERTIES; 56 | 57 | ${s}EngineGetProperties(hEngine, &engineProps); 58 | 59 | // Query count of engine stats to gather 60 | // this count is inclusive of PF and N number of VFs 61 | // i.e. if engineStatCount = 4, then this implies, one PF engine stat at index 0 62 | // of output vector followed by engine stats for 3 VFs 63 | uint32_t engineStatCount = 0; 64 | {s}EngineGetActivityExt(hEngine, &engineStatCount, nullptr); 65 | 66 | // Gather engine stats for all VFs and PF. 67 | // Gather two snapshots of engine activity and calculate percentage 68 | // utilization per formula in ${s}_engine_stats_t 69 | ${s}_engine_stats_t* engineStats0 = (${s}_engine_stats_t*) allocate(engineStatCount * sizeof(${s}_engine_stats_t)); 70 | {s}EngineGetActivityExt(hEngine, &engineStatCount, engineStats0); 71 | sleep(1); 72 | ${s}_engine_stats_t* engineStats1 = (${s}_engine_stats_t*) allocate(engineStatCount * sizeof(${s}_engine_stats_t)); 73 | {s}EngineGetActivityExt(hEngine, &engineStatCount, engineStats1); 74 | 75 | for (uint32_t idx = 0; idx < engineStatCount; ++idx) { 76 | double utilization = (engineStats1[idx].activeTime - engineStats0[idx].activeTime)/(engineStats1[idx].timestamp - engineStats0[idx].timestamp); 77 | output("%s Utilization of engine type pertaining to this handle = %.2f\n", (idx == 0) ? "PF" : "VF", utilization); 78 | } 79 | -------------------------------------------------------------------------------- /scripts/sysman/EXT_Exp_EccState.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | s=tags['$s'] 9 | S=s.upper() 10 | %> 11 | :orphan: 12 | 13 | .. _ZES_extension_device_ecc_default_properties: 14 | 15 | ========================================= 16 | Device-ECC default properties Extension 17 | ========================================= 18 | 19 | API 20 | ---- 21 | 22 | * Structures 23 | 24 | * ${s}_device_ecc_default_properties_ext_t 25 | 26 | Device-ECC properties 27 | ~~~~~~~~~~~~~~~~~~~~~ 28 | 29 | By default, {s}DeviceGetEccState returns the current state of the ECC counters. 30 | 31 | Additionally to get default ECC state, pass ${s}_device_ecc_default_properties_ext_t to {s}DeviceGetEccState as pNext member of ${s}_device_ecc_properties_t. 32 | 33 | .. parsed-literal:: 34 | 35 | ${s}_device_ecc_properties_t getState = {${S}_STRUCTURE_TYPE_DEVICE_ECC_PROPERTIES}; 36 | ${s}_device_ecc_default_properties_ext_t ext = {${S}_STRUCTURE_TYPE_DEVICE_ECC_DEFAULT_PROPERTIES_EXT}; 37 | getState.pNext = &ext; 38 | ${x}_result_t = ${s}DeviceGetEccState(device, &getState); 39 | 40 | -------------------------------------------------------------------------------- /scripts/sysman/EXT_Exp_FirmwareSecurityVersion.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | s=tags['$s'] 7 | S=s.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZES_experimental_firmware_security_version: 12 | 13 | =========================== 14 | Firmware Security Version 15 | =========================== 16 | 17 | API 18 | ---- 19 | 20 | * Functions 21 | 22 | * ${s}FirmwareGetSecurityVersionExp 23 | * ${s}FirmwareSetSecurityVersionExp 24 | 25 | * Enumerations 26 | 27 | * ${s}_firmware_security_exp_version_t 28 | 29 | Security Version 30 | ~~~~~~~~~~~~~~~~ 31 | 32 | This feature helps to prevent flashing of older firmware that have certain security vulnerabilities by using an hardware enforced anti-rollback scheme. 33 | User can flash a firmware image and sets its version as the security version number (SVN). Images with lower SVN cannot be applied to device with 34 | higher SVN for security considerations. 35 | 36 | .. parsed-literal:: 37 | 38 | // Fetch current security version from the fuses 39 | char* version = allocate(version_size); 40 | ${s}FirmwareGetSecurityVersionExp(hFirmware, version); 41 | 42 | // Set security version 43 | ${s}FirmwareSetSecurityVersionExp(hFirmware); 44 | -------------------------------------------------------------------------------- /scripts/sysman/EXT_Exp_MemPageOfflineState.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | s=tags['$s'] 9 | S=s.upper() 10 | %> 11 | :orphan: 12 | 13 | .. _ZES_extension_mem_state: 14 | 15 | ======================== 16 | Memory State Extension 17 | ======================== 18 | 19 | API 20 | ---- 21 | * Enumerations 22 | 23 | * ${s}_mem_page_offline_state_exp_version_t 24 | 25 | * Structures 26 | 27 | * ${s}_mem_page_offline_state_exp_t 28 | 29 | Memory State 30 | ~~~~~~~~~~~~~~~~~~ 31 | 32 | This extension extends the functionality provided by the ${s}MemoryGetState in the Sysman API. Additional MemoryOffline metrics are added to this extension. -------------------------------------------------------------------------------- /scripts/sysman/EXT_Exp_VirtualFunctionManagement.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | s=tags['$s'] 9 | S=s.upper() 10 | %> 11 | :orphan: 12 | 13 | .. _ZES_experimental_virtual_function_management: 14 | 15 | ======================================== 16 | Virtual Function Management Extension 17 | ======================================== 18 | 19 | API 20 | ---- 21 | 22 | * Functions 23 | 24 | * ${s}DeviceEnumEnabledVFExp 25 | * ${s}DeviceEnumActiveVFExp 26 | * ${s}VFManagementGetVFCapabilitiesExp 27 | * ${s}VFManagementGetVFCapabilitiesExp2 28 | * ${s}VFManagementGetVFMemoryUtilizationExp2 29 | * ${s}VFManagementGetVFEngineUtilizationExp2 30 | * ${s}VFManagementGetVFPropertiesExp 31 | * ${s}VFManagementGetVFMemoryUtilizationExp 32 | * ${s}VFManagementGetVFEngineUtilizationExp 33 | * ${s}VFManagementSetVFTelemetryModeExp 34 | * ${s}VFManagementSetVFTelemetrySamplingIntervalExp 35 | 36 | * Enumerations 37 | 38 | * ${s}_vf_management_exp_version_t 39 | * ${s}_vf_info_mem_type_exp_flags_t 40 | * ${s}_vf_info_util_exp_flags_t 41 | 42 | * Structures 43 | 44 | * ${s}_vf_exp_capabilities_t 45 | * ${s}_vf_util_mem_exp2_t 46 | * ${s}_vf_util_engine_exp2_t 47 | * ${s}_vf_exp_properties_t 48 | * ${s}_vf_util_mem_exp_t 49 | * ${s}_vf_util_engine_exp_t 50 | * ${s}_vf_exp2_capabilities_t 51 | 52 | Virtual Function Management 53 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 54 | This feature adds the ability to retrieve telemetry from PF domain for monitoring per VF memory and engine utilization. 55 | This telemetry is used to determine if a VM has oversubscribed GPU memory or observe engine business for a targeted workload. 56 | If VF has no activity value to report, then implementation shall reflect that appropriately in ${s}_vf_util_engine_exp2_t struct so that percentage 57 | calculation results in value of 0. 58 | 59 | The following pseudo-code demonstrates a sequence for obtaining the engine activity for all Virtual Functions from Physical Function environment: 60 | 61 | .. parsed-literal:: 62 | 63 | // Gather count of VF handles 64 | uint32_t numVf = 0; 65 | ${s}DeviceEnumEnabledVFExp(hDevice, &numVf, nullptr); 66 | 67 | // Allocate memory for vf handles and call back in to gather handles 68 | std::vector<${s}_vf_handle_t> vfs(numVf, nullptr); 69 | ${s}DeviceEnumEnabledVFExp(hDevice, &numVf, vfs.data()); 70 | 71 | // Gather VF capabilities 72 | std::vector <${s}_vf_exp2_capabilities_t> vfCapabs(numVf); 73 | for (uint32_t i = 0; i < numVf; i++) { 74 | ${s}VFManagementGetVFCapabilitiesExp2(vfs[i], &vfCapabs[i]); 75 | } 76 | 77 | // Detect the info types a particular VF supports 78 | 79 | // Using VF# 0 to demonstrate how to detect engine info type and query engine util info 80 | ${s}_vf_handle_t activeVf = vfs[0]; 81 | uint32_t engineStatCount = 0; 82 | 83 | ${s}VFManagementGetVFEngineUtilizationExp2(activeVf, &engineStatCount, nullptr); 84 | // Allocate memory for vf engine stats 85 | ${s}_vf_util_engine_exp2_t* engineStats0 = (${s}_vf_util_engine_exp2_t*) allocate(engineStatCount * sizeof(${s}_vf_util_engine_exp2_t)); 86 | ${s}VFManagementGetVFEngineUtilizationExp2(activeVf, &engineStatCount, engineStats0); 87 | sleep(1) 88 | ${s}_vf_util_engine_exp2_t* engineStats1 = (${s}_vf_util_engine_exp2_t*) allocate(engineStatCount * sizeof(${s}_vf_util_engine_exp2_t)); 89 | ${s}VFManagementGetVFEngineUtilizationExp2(activeVf, &engineStatCount, &engineStats1); 90 | -------------------------------------------------------------------------------- /scripts/sysman/EXT_Exp_power_domain.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | s=tags['$s'] 7 | S=s.upper() 8 | %> 9 | :orphan: 10 | 11 | .. _ZES_extension_power_domain_properties: 12 | 13 | ================================== 14 | Power Domain Properties Extension 15 | ================================== 16 | 17 | API 18 | ---- 19 | 20 | * Enumerations 21 | 22 | * ${s}_power_domain_properties_exp_version_t 23 | 24 | * Structures 25 | 26 | * ${s}_power_domain_exp_properties_t 27 | -------------------------------------------------------------------------------- /scripts/sysman/EXT_MemoryBwCounterValidBits.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | s=tags['$s'] 9 | S=s.upper() 10 | %> 11 | :orphan: 12 | 13 | .. _ZES_extension_mem_bandwidth_counter_bits_properties: 14 | 15 | ============================================== 16 | Memory Bandwidth Counter Valid Bits Extension 17 | ============================================== 18 | 19 | API 20 | ---- 21 | 22 | * Enumerations 23 | 24 | * ${s}_mem_bandwidth_counter_bits_exp_version_t 25 | 26 | * Structures 27 | 28 | * ${s}_mem_bandwidth_counter_bits_exp_properties_t 29 | -------------------------------------------------------------------------------- /scripts/sysman/EXT_PowerLimits.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | s=tags['$s'] 9 | S=s.upper() 10 | %> 11 | :orphan: 12 | 13 | .. _ZES_extension_power_limits: 14 | 15 | ======================== 16 | Power Limits Extension 17 | ======================== 18 | 19 | API 20 | ---- 21 | 22 | * Functions 23 | 24 | * ${s}PowerGetLimitsExt 25 | * ${s}PowerSetLimitsExt 26 | 27 | * Structures 28 | 29 | * ${s}_power_limit_ext_desc_t 30 | * ${s}_power_ext_properties_t 31 | 32 | Power Limits 33 | ~~~~~~~~~~~~~~~~~~ 34 | 35 | This extension replaces the functionality provided by the ${s}PowerGetLimits & ${s}PowerSetLimits calls in the Sysman API. The correct usage of the new API 36 | is shown in the Sysman Programming Guide. 37 | -------------------------------------------------------------------------------- /scripts/sysman/EXT_SysmanDeviceMapping.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | s=tags['$s'] 9 | S=s.upper() 10 | %> 11 | :orphan: 12 | 13 | .. _ZES_experimental_sysman_device_mapping: 14 | 15 | ===================================== 16 | Sysman Device mapping Extension 17 | ===================================== 18 | 19 | API 20 | ---- 21 | 22 | * Functions 23 | 24 | * ${s}DriverGetDeviceByUuidExp 25 | * ${s}DeviceGetSubDevicePropertiesExp 26 | 27 | * Enumerations 28 | 29 | * ${s}_sysman_device_mapping_exp_version_t 30 | 31 | * Structures 32 | 33 | * ${s}_subdevice_exp_properties_t 34 | 35 | 36 | Sysman Device Mapping 37 | ~~~~~~~~~~~~~~~~~~~~~ 38 | 39 | Three types of device hierarchy models FLAT, COMPOSITE and COMBINED are exposed by Level Zero driver implementation. 40 | Core could use any model it needs for better performance, while SYSMAN keeps a uniform view of the system. 41 | 42 | This extension is defined with intent to provide an interface to the user for mapping core device 43 | handle to sysman device or vice versa using UUID. 44 | 45 | 46 | The following pseudo-code demonstrates a sequence for querying the sub device properties 47 | and also how to query sysman device handle from the UUID. 48 | 49 | .. parsed-literal:: 50 | 51 | // Query Sysman device handle corresponding to given UUID 52 | uint32_t subDeviceId = 0; 53 | bool onSubDevice = false; 54 | ${s}_uuid_t coreDeviceUuid; 55 | ${s}_device_handle_t* phDevice = (${s}_device_handle_t*)allocate(sizeof(${s}_device_handle_t)); 56 | ${s}DriverGetDeviceByUuidExp(pSysmanDriverHandle, coreDeviceUuid, phDevice, &subDeviceId, &onSubDevice); 57 | 58 | // Query for number of sub devices of the sysman device 59 | uint32_t subDeviceCount = 0; 60 | ${s}DeviceGetSubDevicePropertiesExp(pSysmanDeviceHandle, &subDeviceCount, nullptr); 61 | 62 | ${s}_subdevice_exp_properties_t* subDeviceProperties = (${s}_subdevice_exp_properties_t*) allocate(subDeviceCount * sizeof(${s}_subdevice_exp_properties_t)); 63 | 64 | //Query sub device properties 65 | ${s}DeviceGetSubDevicePropertiesExp(pSysmanDeviceHandle, &subDeviceCount, subDeviceProperties); 66 | 67 | // Print sub device property details 68 | for(uint32_t i = 0; i < subDeviceCount; i++) { 69 | output(" Sub Device Id : %lu \\n", subDeviceProperties[i]->subdeviceId); 70 | output("UUID : \\n"); 71 | for (uint32_t j = 0; j < ZE_MAX_UUID_SIZE; j++) { 72 | output("%x ",subDeviceProperties[i]->uuid.id[j]); 73 | } 74 | output("\\n"); 75 | } 76 | 77 | -------------------------------------------------------------------------------- /scripts/sysman/eccState.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2025 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Sysman Extension APIs Device-ECC default properties" 11 | version: "1.13" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Device ECC default properties Extension Name" 15 | version: "1.13" 16 | name: $S_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_NAME 17 | value: '"$S_extension_device_ecc_default_properties"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Device ECC default properties Extension Version(s)" 21 | version: "1.13" 22 | name: $s_device_ecc_default_properties_ext_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: struct 29 | desc: "This structure may be passed to $sDeviceGetEccState as pNext member of $s_device_ecc_properties_t." 30 | class: $sDevice 31 | version: "1.13" 32 | name: $s_device_ecc_default_properties_ext_t 33 | base: $s_base_properties_t 34 | members: 35 | - type: $s_device_ecc_state_t 36 | name: defaultState 37 | desc: "[out] Default ECC state" 38 | -------------------------------------------------------------------------------- /scripts/sysman/engineActivity.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2023 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Sysman Extension APIs for Engine Activity" 11 | version: "1.7" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Engine Activity Extension Name" 15 | version: "1.7" 16 | name: $S_ENGINE_ACTIVITY_EXT_NAME 17 | value: '"$XS_extension_engine_activity"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Engine Activity Extension Version(s)" 21 | version: "1.7" 22 | name: $s_engine_activity_ext_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: struct 29 | desc: "Extension properties related to Engine Groups" 30 | version: "1.7" 31 | class: $sEngine 32 | name: $s_engine_ext_properties_t 33 | base: $s_base_properties_t 34 | members: 35 | - type: uint32_t 36 | name: "countOfVirtualFunctionInstance" 37 | desc: | 38 | [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. 39 | These VF-by-VF views should provide engine group and individual engine level granularity. 40 | This count represents the number of VF instances that are actively using the resource represented by the engine handle. 41 | details: 42 | - "This structure may be passed to $sEngineGetProperties by having the pNext member of $s_engine_properties_t point at this struct." 43 | - "Used for SRIOV per Virtual Function device utilization by $s_engine_group_t" 44 | --- #-------------------------------------------------------------------------- 45 | type: function 46 | desc: "Get activity stats for Physical Function (PF) and each Virtual Function (VF) associated with engine group." 47 | version: "1.7" 48 | class: $sEngine 49 | name: GetActivityExt 50 | details: 51 | - "The application may call this function from simultaneous threads." 52 | - "The implementation of this function should be lock-free." 53 | params: 54 | - type: $s_engine_handle_t 55 | name: hEngine 56 | desc: "[in] Handle for the component." 57 | - type: uint32_t* 58 | name: pCount 59 | desc: | 60 | [in,out] Pointer to the number of VF engine stats descriptors. 61 | - if count is zero, the driver shall update the value with the total number of engine stats available. 62 | - 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. 63 | - The count returned is the sum of number of VF instances currently available and the PF instance. 64 | - type: $s_engine_stats_t* 65 | name: pStats 66 | desc: | 67 | [in,out][optional][range(0, *pCount)] array of engine group activity counters. 68 | - if count is less than the total number of engine stats available, then driver shall only retrieve that number of stats. 69 | - the implementation shall populate the vector with engine stat for PF at index 0 of the vector followed by user provided pCount-1 number of VF engine stats. 70 | returns: 71 | - $X_RESULT_ERROR_UNSUPPORTED_FEATURE 72 | - "Engine activity extension is not supported in the environment." -------------------------------------------------------------------------------- /scripts/sysman/firmwareSecurityVersion.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2024 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #---------------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Sysman Extension APIs for firmware security version" 11 | version: "1.9" 12 | --- #---------------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Firmware security version" 15 | version: "1.9" 16 | name: $S_FIRMWARE_SECURITY_VERSION_EXP_NAME 17 | value: '"$XS_experimental_firmware_security_version"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Firmware security version Extension Version(s)" 21 | version: "1.9" 22 | name: $s_firmware_security_exp_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: function 29 | desc: "Get the firmware security version number of the currently running firmware" 30 | version: "1.9" 31 | class: $sFirmware 32 | name: GetSecurityVersionExp 33 | details: 34 | - "The application should create a character array of size $S_STRING_PROPERTY_SIZE and reference it for the `pVersion` parameter." 35 | - "The application may call this function from simultaneous threads." 36 | - "The implementation of this function should be lock-free." 37 | params: 38 | - type: $s_firmware_handle_t 39 | name: hFirmware 40 | desc: "[in] Handle for the component." 41 | - type: "char*" 42 | name: "pVersion" 43 | desc: "[in,out] NULL terminated string value. The string \"unknown\" will be returned if this property cannot be determined." 44 | --- #-------------------------------------------------------------------------- 45 | type: function 46 | desc: "Set the firmware security version number" 47 | version: "1.9" 48 | class: $sFirmware 49 | name: SetSecurityVersionExp 50 | details: 51 | - "The application may call this function from simultaneous threads." 52 | - "The implementation of this function should be lock-free." 53 | params: 54 | - type: $s_firmware_handle_t 55 | name: hFirmware 56 | desc: "[in] Handle for the component." -------------------------------------------------------------------------------- /scripts/sysman/memPageOfflineState.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2023 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Sysman Extension APIs for Memory State" 11 | version: "1.8" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Memory State Extension Name" 15 | version: "1.8" 16 | name: $S_MEM_PAGE_OFFLINE_STATE_EXP_NAME 17 | value: '"$XS_extension_mem_state"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Memory State Extension Version(s)" 21 | version: "1.8" 22 | name: $s_mem_page_offline_state_exp_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: struct 29 | desc: "Extension properties for Memory State" 30 | version: "1.8" 31 | class: $sMemory 32 | name: $s_mem_page_offline_state_exp_t 33 | base: $s_base_state_t 34 | members: 35 | - type: uint32_t 36 | name: memoryPageOffline 37 | desc: "[out] Returns the number of Memory Pages Offline" 38 | - type: uint32_t 39 | name: maxMemoryPageOffline 40 | desc: "[out] Returns the Allowed Memory Pages Offline" 41 | details: 42 | - "This structure may be returned from $sMemoryGetState via the `pNext` member of $s_mem_state_t" 43 | - "These additional parameters get Memory Page Offline Metrics" 44 | -------------------------------------------------------------------------------- /scripts/sysman/memoryBwCounterValidBits.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2023 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #---------------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Sysman Extension APIs for Memory Bandwidth Counter Valid Bits" 11 | version: "1.8" 12 | --- #---------------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Memory Bandwidth Counter Valid Bits Extension Name" 15 | version: "1.8" 16 | name: $S_MEMORY_BANDWIDTH_COUNTER_BITS_EXP_PROPERTIES_NAME 17 | value: '"$XS_extension_mem_bandwidth_counter_bits_properties"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Memory Bandwidth Counter Valid Bits Extension Version(s)" 21 | version: "1.8" 22 | name: $s_mem_bandwidth_counter_bits_exp_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: struct 29 | desc: "Extension properties for reporting valid bit count for memory bandwidth counter value" 30 | version: "1.8" 31 | class: $sMemory 32 | name: $s_mem_bandwidth_counter_bits_exp_properties_t 33 | base: $s_base_properties_t 34 | members: 35 | - type: uint32_t 36 | name: validBitsCount 37 | desc: "[out] Returns the number of valid bits in the counter values" 38 | details: 39 | - "Number of valid read and write counter bits of memory bandwidth" 40 | - "This structure may be returned from $sMemoryGetProperties via the `pNext` member of $s_mem_properties_t." 41 | - "Used for denoting number of valid bits in the counter value returned in $s_mem_bandwidth_t." 42 | -------------------------------------------------------------------------------- /scripts/sysman/powerDomainProperties.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2023 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Sysman Extension APIs for Power Domain Properties" 11 | version: "1.8" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Power Domain Properties Name" 15 | version: "1.8" 16 | name: $S_POWER_DOMAIN_PROPERTIES_EXP_NAME 17 | value: '"$XS_extension_power_domain_properties"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Power Domain Properties Extension Version(s)" 21 | version: "1.8" 22 | name: $s_power_domain_properties_exp_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: struct 29 | desc: "Extension structure for providing power domain information associated with a power handle" 30 | version: "1.8" 31 | class: $sPower 32 | name: $s_power_domain_exp_properties_t 33 | base: $s_base_properties_t 34 | members: 35 | - type: $s_power_domain_t 36 | name: "powerDomain" 37 | desc: "[out] Power domain associated with the power handle." 38 | details: 39 | - "This structure may be returned from $sPowerGetProperties via the `pNext` member of $s_power_properties_t." 40 | - "Used for associating a power handle with a power domain." -------------------------------------------------------------------------------- /scripts/sysman/sysmanDeviceMapping.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2024 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #---------------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Sysman Extension APIs for Sysman Device Mapping" 11 | version: "1.9" 12 | --- #---------------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Sysman Device Mapping Extension Name" 15 | version: "1.9" 16 | name: $S_SYSMAN_DEVICE_MAPPING_EXP_NAME 17 | value: '"$XS_experimental_sysman_device_mapping"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Sysman Device Mapping Extension Version(s)" 21 | version: "1.9" 22 | name: $s_sysman_device_mapping_exp_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: struct 29 | desc: "Sub Device Properties" 30 | version: "1.9" 31 | class: $sDevice 32 | name: $s_subdevice_exp_properties_t 33 | base: $s_base_properties_t 34 | members: 35 | - type: uint32_t 36 | name: "subdeviceId" 37 | desc: "[out] this gives the ID of the sub device" 38 | - type: $s_uuid_t 39 | name: "uuid" 40 | desc: "[out] universal unique identifier of the sub device." 41 | --- #-------------------------------------------------------------------------- 42 | type: function 43 | desc: "Retrieves sub device properties for the given sysman device handle" 44 | version: "1.9" 45 | class: $sDevice 46 | name: GetSubDevicePropertiesExp 47 | details: 48 | - "The application may call this function from simultaneous threads." 49 | - "The implementation of this function should be lock-free." 50 | params: 51 | - type: $s_device_handle_t 52 | name: "hDevice" 53 | desc: "[in] Sysman handle of the device." 54 | - type: "uint32_t*" 55 | name: pCount 56 | desc: | 57 | [in,out] pointer to the number of sub devices. 58 | if count is zero, then the driver shall update the value with the total number of sub devices currently attached to the device. 59 | if count is greater than the number of sub devices currently attached to the device, then the driver shall update the value with the correct number of sub devices. 60 | - type: $s_subdevice_exp_properties_t* 61 | name: pSubdeviceProps 62 | desc: | 63 | [in,out][optional][range(0, *pCount)] array of sub device property structures. 64 | if count is less than the number of sysman sub devices available, then the driver shall only retrieve that number of sub device property structures. 65 | --- #-------------------------------------------------------------------------- 66 | type: function 67 | desc: "Retrieves sysman device and subdevice index for the given UUID and sysman driver" 68 | version: "1.9" 69 | class: $sDriver 70 | name: GetDeviceByUuidExp 71 | details: 72 | - "The application may call this function from simultaneous threads." 73 | - "The implementation of this function should be lock-free." 74 | params: 75 | - type: $s_driver_handle_t 76 | name: "hDriver" 77 | desc: "[in] handle of the sysman driver instance" 78 | - type: $s_uuid_t 79 | name: "uuid" 80 | desc: "[in] universal unique identifier." 81 | - type: $s_device_handle_t* 82 | name: "phDevice" 83 | desc: "[out] Sysman handle of the device." 84 | - type: $x_bool_t* 85 | name: "onSubdevice" 86 | desc: "[out] True if the UUID belongs to the sub-device; false means that UUID belongs to the root device." 87 | - type: "uint32_t*" 88 | name: "subdeviceId" 89 | desc: "[out] If onSubdevice is true, this gives the ID of the sub-device" 90 | -------------------------------------------------------------------------------- /scripts/templates/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/scripts/templates/__init__.py -------------------------------------------------------------------------------- /scripts/templates/api.cpp.mako: -------------------------------------------------------------------------------- 1 | <%! 2 | import re 3 | from templates import helper as th 4 | %><% 5 | n=namespace 6 | N=n.upper() 7 | 8 | x=tags['$x'] 9 | X=x.upper() 10 | %>/* 11 | * 12 | * Copyright (C) 2020 Intel Corporation 13 | * 14 | * SPDX-License-Identifier: MIT 15 | * 16 | * @file ${n}_api.cpp 17 | * @version v${ver}-r${rev} 18 | * 19 | */ 20 | #include "${n}_api.h" 21 | 22 | %for obj in th.extract_objs(specs, r"function"): 23 | /////////////////////////////////////////////////////////////////////////////// 24 | %if 'condition' in obj: 25 | #if ${th.subt(n, tags, obj['condition'])} 26 | %endif 27 | %for line in th.make_desc_lines(n, tags, obj): 28 | /// ${line} 29 | %endfor 30 | %for line in th.make_details_lines(n, tags, obj): 31 | /// ${line} 32 | %endfor 33 | /// 34 | %for line in th.make_returns_lines(n, tags, obj, meta=meta): 35 | /// ${line} 36 | %endfor 37 | ${x}_result_t ${X}_APICALL 38 | ${th.make_func_name(n, tags, obj)}( 39 | %for line in th.make_param_lines(n, tags, obj): 40 | ${line} 41 | %endfor 42 | ) 43 | { 44 | ${x}_result_t result = ${X}_RESULT_SUCCESS; 45 | return result; 46 | } 47 | %if 'condition' in obj: 48 | #endif // ${th.subt(n, tags, obj['condition'])} 49 | %endif 50 | 51 | %endfor 52 | -------------------------------------------------------------------------------- /scripts/templates/api.rst.mako: -------------------------------------------------------------------------------- 1 | <% 2 | import os 3 | 4 | apidocs = [] 5 | for section in sections: 6 | apidocs.append(section + "/api.rst") 7 | %> 8 | =================== 9 | API Documentation 10 | =================== 11 | 12 | .. toctree:: 13 | 14 | %for apidoc in apidocs: 15 | %if os.path.exists(os.path.join(sourcepath, apidoc)): 16 | ${apidoc} 17 | %endif 18 | %endfor -------------------------------------------------------------------------------- /scripts/templates/ddi.h.mako: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | n=namespace 6 | N=n.upper() 7 | 8 | x=tags['$x'] 9 | X=x.upper() 10 | %>/* 11 | * 12 | * Copyright (C) 2019-2021 Intel Corporation 13 | * 14 | * SPDX-License-Identifier: MIT 15 | * 16 | * @file ${n}_ddi.h 17 | * @version v${ver}-r${rev} 18 | * 19 | */ 20 | #ifndef _${N}_DDI_H 21 | #define _${N}_DDI_H 22 | #if defined(__cplusplus) 23 | #pragma once 24 | #endif 25 | #include "${n}_api.h" 26 | 27 | #if defined(__cplusplus) 28 | extern "C" { 29 | #endif 30 | 31 | %for tbl in th.get_pfntables(specs, meta, n, tags): 32 | %for obj in tbl['functions']: 33 | /////////////////////////////////////////////////////////////////////////////// 34 | /// @brief Function-pointer for ${th.make_func_name(n, tags, obj)} 35 | %if 'condition' in obj: 36 | #if ${th.subt(n, tags, obj['condition'])} 37 | %endif 38 | typedef ${x}_result_t (${X}_APICALL *${th.make_pfn_type(n, tags, obj)})( 39 | %for line in th.make_param_lines(n, tags, obj, format=["type", "delim"]): 40 | ${line} 41 | %endfor 42 | ); 43 | %if 'condition' in obj: 44 | #endif // ${th.subt(n, tags, obj['condition'])} 45 | %endif 46 | 47 | %endfor 48 | /////////////////////////////////////////////////////////////////////////////// 49 | /// @brief Table of ${tbl['name']} functions pointers 50 | typedef struct _${tbl['type']} 51 | { 52 | %for obj in tbl['functions']: 53 | %if 'condition' in obj: 54 | #if ${th.subt(n, tags, obj['condition'])} 55 | %endif 56 | ${th.append_ws(th.make_pfn_type(n, tags, obj), 59)} ${th.make_pfn_name(n, tags, obj)}; 57 | %if 'condition' in obj: 58 | #else 59 | ${th.append_ws("void*", 59)} ${th.make_pfn_name(n, tags, obj)}; 60 | #endif // ${th.subt(n, tags, obj['condition'])} 61 | %endif 62 | %endfor 63 | } ${tbl['type']}; 64 | 65 | /////////////////////////////////////////////////////////////////////////////// 66 | /// @brief Exported function for filling application's ${tbl['name']} table 67 | /// with current process' addresses 68 | /// 69 | /// @returns 70 | /// - ::${X}_RESULT_SUCCESS 71 | /// - ::${X}_RESULT_ERROR_UNINITIALIZED 72 | /// - ::${X}_RESULT_ERROR_INVALID_NULL_POINTER 73 | /// - ::${X}_RESULT_ERROR_UNSUPPORTED_VERSION 74 | ${X}_DLLEXPORT ${x}_result_t ${X}_APICALL 75 | ${tbl['export']['name']}( 76 | %for line in th.make_param_lines(n, tags, tbl['export']): 77 | ${line} 78 | %endfor 79 | ); 80 | 81 | /////////////////////////////////////////////////////////////////////////////// 82 | /// @brief Function-pointer for ${tbl['export']['name']} 83 | typedef ${x}_result_t (${X}_APICALL *${tbl['pfn']})( 84 | %for line in th.make_param_lines(n, tags, tbl['export'], format=["type", "delim"]): 85 | ${line} 86 | %endfor 87 | ); 88 | 89 | %endfor 90 | /////////////////////////////////////////////////////////////////////////////// 91 | /// @brief Container for all DDI tables 92 | typedef struct _${n}_dditable_t 93 | { 94 | %for tbl in th.get_pfntables(specs, meta, n, tags): 95 | ${th.append_ws(tbl['type'], 35)} ${tbl['name']}; 96 | %endfor 97 | } ${n}_dditable_t; 98 | /// @brief Container for all DDI tables with version and tables set by the Driver 99 | typedef struct _${n}_dditable_driver_t 100 | { 101 | ze_api_version_t version; 102 | uint8_t isValidFlag; 103 | %for tbl in th.get_pfntables(specs, meta, n, tags): 104 | ${th.append_ws(tbl['ptype'], 35)} ${tbl['name']}; 105 | %endfor 106 | } ${n}_dditable_driver_t; 107 | 108 | #if defined(__cplusplus) 109 | } // extern "C" 110 | #endif 111 | 112 | #endif // _${N}_DDI_H -------------------------------------------------------------------------------- /scripts/templates/ddi_common.h.mako: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | n=namespace 6 | N=n.upper() 7 | 8 | x=tags['$x'] 9 | X=x.upper() 10 | %>/* 11 | * 12 | * Copyright (C) 2024 Intel Corporation 13 | * 14 | * SPDX-License-Identifier: MIT 15 | * 16 | * @file ${n}_ddi_common.h 17 | * @version v${ver}-r${rev} 18 | * 19 | */ 20 | #ifndef _${N}_DDI_COMMON_H 21 | #define _${N}_DDI_COMMON_H 22 | #if defined(__cplusplus) 23 | #pragma once 24 | #endif 25 | #include "ze_ddi.h" 26 | #include "zet_ddi.h" 27 | #include "zes_ddi.h" 28 | 29 | #if defined(__cplusplus) 30 | extern "C" { 31 | #endif 32 | 33 | /// @brief Handle with pointers to Dispatch Tables allocated by the driver at the beginning of every L0 object handle. 34 | typedef struct _${n}_handle_t 35 | { 36 | ze_dditable_driver_t *pCore; // [in] pointer to _ze_dditable_t_ object related to this handle 37 | zet_dditable_driver_t *pTools; // [in] pointer to _zet_dditable_t_ object related to this handle 38 | zes_dditable_driver_t *pSysman; // [in] pointer to _zes_dditable_t_ object related to this handle 39 | } ${n}_handle_t; 40 | 41 | #if defined(__cplusplus) 42 | } // extern "C" 43 | #endif 44 | 45 | #endif // _${N}_DDI_COMMON_H -------------------------------------------------------------------------------- /scripts/templates/index.rst.mako: -------------------------------------------------------------------------------- 1 | .. 2 | Copyright 2020 Intel Corporation 3 | 4 | .. oneAPI Level Zero Specification v${ver} 5 | 6 | .. _l0-section: 7 | 8 | =================================== 9 | |l0_full_name|: |l0_spec_version| 10 | =================================== 11 | 12 | .. toctree:: 13 | 14 | core/INTRO.rst 15 | core/PROG.rst 16 | tools/PROG.rst 17 | sysman/PROG.rst 18 | core/SPIRV.rst 19 | core/EXT.rst 20 | api.rst 21 | versions.rst 22 | -------------------------------------------------------------------------------- /scripts/templates/versions.rst.mako: -------------------------------------------------------------------------------- 1 | <% 2 | %> 3 | =================== 4 | Versions 5 | =================== 6 | 7 | https://oneapi-src.github.io/level-zero-spec/releases/index.html#level-zero 8 | -------------------------------------------------------------------------------- /scripts/tools/EXT_Exp_APITracing.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | t=tags['$t'] 9 | T=t.upper() 10 | %> 11 | :orphan: 12 | 13 | .. _ZET_experimental_api_tracing: 14 | 15 | ========================= 16 | API Tracing Extension 17 | ========================= 18 | 19 | API 20 | ---- 21 | 22 | * Functions 23 | 24 | 25 | * ${t}TracerExpCreate 26 | * ${t}TracerExpDestroy 27 | * ${t}TracerExpSetPrologues 28 | * ${t}TracerExpSetEpilogues 29 | * ${t}TracerExpSetEnabled 30 | 31 | 32 | * Enumerations 33 | 34 | 35 | * ${t}_api_tracing_exp_version_t 36 | 37 | 38 | * Structures 39 | 40 | 41 | * ${t}_tracer_exp_desc_t 42 | 43 | -------------------------------------------------------------------------------- /scripts/tools/EXT_Exp_ConcurrentMetricGroup.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | t=tags['$t'] 9 | T=t.upper() 10 | %> 11 | :orphan: 12 | 13 | .. _ZET_experimental_concurrent_metric_groups: 14 | 15 | ======================================================= 16 | Concurrent Metric Groups Experimental Extension 17 | ======================================================= 18 | 19 | API 20 | ---- 21 | 22 | * Functions 23 | 24 | * ${t}DeviceGetConcurrentMetricGroupsExp 25 | 26 | Concurrent Metric Groups 27 | ~~~~~~~~~~~~~~~~~~~~~~~~ 28 | 29 | Metric groups enumerated or created cannot be collected or activated concurrently if the metric groups use shared HW resources. 30 | Currently Metric "Domains" are used to determine if a metric group can be collected along with another metric group. 31 | Since Metric "Domains" are at a metric group level, it cannot represent metric level HW dependencies. 32 | This API replaces using "domain" property of metric group to determine independent HW usage and provides sets of metric groups which could be collected concurrently. 33 | ${t}DeviceGetConcurrentMetricGroupsExp allows an input list of metric groups to be re-arranged to sequential sets of metric groups which could be collected concurrently. 34 | This API also allows the application to calculate the number of replays or workload executions necessary to collect a set of overlapping metric groups. 35 | 36 | 37 | Sample Code 38 | ------------ 39 | 40 | The following pseudo-code shows how an application could query for sets of concurrent metric groups within a list of metric groups 41 | 42 | .. parsed-literal:: 43 | 44 | // Input metric group count; 45 | uint32_t inputMetricGroupCount; 46 | 47 | // Input and output list of metric groups 48 | zet_metric_group_handle_t * phMetricGroups; 49 | 50 | // Output concurrent group information 51 | uint32_t concurrentGroupCount = 0; 52 | 53 | // Get number of concurrent groups / number of replays necessary 54 | ${t}DeviceGetConcurrentMetricGroupsExp(hDevice, inputMetricGroupCount, phMetricGroups, &concurrentGroupCount, nullptr); 55 | 56 | // Allocate for count per concurrent group 57 | uint32_t * pCountPerConcurrentGroup = malloc(sizeof(uint32_t) * concurrentGroupCount); 58 | 59 | // Retrieve the rearranged metric groups along with the count per concurrent group 60 | ${t}DeviceGetConcurrentMetricGroupsExp(hDevice, inputMetricGroupCount, phMetricGroups, &concurrentGroupCount, pCountPerConcurrentGroup); 61 | 62 | // Activate the concurrent groups and Replay the workload 63 | for(uint32_t concurrentGroupIndex = 0; concurrentGroupIndex < concurrentGroupCount; concurrentGroupIndex ++){ 64 | ${t}ContextActivateMetricGroups(hContext, hDevice, pCountPerConcurrentGroup[concurrentGroupIndex], phMetricGroups); 65 | 66 | // run workload 67 | 68 | phMetricGroups += pCountPerConcurrentGroup[concurrentGroupIndex]; 69 | } 70 | -------------------------------------------------------------------------------- /scripts/tools/EXT_Exp_GlobalTimestamps.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | t=tags['$t'] 9 | T=t.upper() 10 | %> 11 | :orphan: 12 | 13 | .. _ZET_experimental_global_metric_timestamps: 14 | 15 | ========================================== 16 | Global Metrics Timestamps Extension 17 | ========================================== 18 | 19 | API 20 | ---- 21 | 22 | * Structures 23 | 24 | * ${t}_metric_global_timestamps_resolution_exp_t 25 | 26 | * Functions 27 | 28 | * ${t}MetricGroupGetGlobalTimestampsExp -------------------------------------------------------------------------------- /scripts/tools/EXT_Exp_MetricExportData.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | t=tags['$t'] 9 | T=t.upper() 10 | %> 11 | :orphan: 12 | 13 | .. _ZET_experimental_metric_export_data: 14 | 15 | ========================================== 16 | Metrics Export Data Experimental Extension 17 | ========================================== 18 | 19 | API 20 | ---- 21 | 22 | * Structures 23 | 24 | * ${t}_metric_calculate_exp_desc_t 25 | 26 | * Functions 27 | 28 | * ${t}MetricGroupGetExportDataExp 29 | * ${t}MetricGroupCalculateMetricExportDataExp 30 | 31 | Sample Code 32 | ------------ 33 | 34 | The following code shows how to export metrics raw data for a metric group. 35 | 36 | .. parsed-literal:: 37 | 38 | // Get size for export data 39 | size_t exportDataSize = 0; 40 | ${t}MetricGroupGetExportDataExp(hMetricGroup, rawData, rawDataSize, &exportDataSize, nullptr); 41 | 42 | // Allocate buffer for export data 43 | uint8_t* pExportData = malloc(exportDataSize); 44 | 45 | // Retrieve export data 46 | ${t}MetricGroupGetExportDataExp(hMetricGroup, rawData, rawDataSize, &exportDataSize, pExportData); 47 | 48 | 49 | The following code shows how to perform metrics calculation of collected data, which can be done in a different system than where data was collected. 50 | 51 | .. parsed-literal:: 52 | 53 | // Get data count and total metric count 54 | ${t}_metric_group_calculation_type_t type = ${T}_METRIC_GROUP_CALCULATION_TYPE_METRIC_VALUES; 55 | ${t}_metric_calculate_exp_desc_t calculateDesc; 56 | calculateDesc.rawReportSkipCount = 0; 57 | ${t}MetricGroupCalculateMetricExportDataExp(hDriver, type, exportDataSize, pExportData, &calculateDesc, &dataCount, &totalMetricCount, nullptr, nullptr); 58 | 59 | void* pMetricCounts = malloc(dataCount * sizeof(uint32_t)); 60 | void* pMetricValues = malloc(totalMetricCount * sizeof(zet_typed_value_t)); 61 | 62 | // Get metric counts and metric values 63 | ${t}MetricGroupCalculateMetricExportDataExp(hDriver, type, exportDataSize, pExportData, &calculateDesc, &dataCount, &totalMetricCount, pMetricCounts, pMetricValues); 64 | -------------------------------------------------------------------------------- /scripts/tools/EXT_Exp_MetricGroupMarker.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | t=tags['$t'] 9 | T=t.upper() 10 | %> 11 | :orphan: 12 | 13 | .. _ZET_experimental_metric_group_marker: 14 | 15 | ==================================== 16 | MetricGroup Marker Support Extension 17 | ==================================== 18 | 19 | API 20 | ---- 21 | 22 | * Structures 23 | 24 | * ${t}_metric_source_id_exp_t 25 | 26 | * Functions 27 | 28 | * ${t}CommandListAppendMarkerExp 29 | 30 | 31 | Metric Source ID 32 | ~~~~~~~~~~~~~~~~~ 33 | 34 | Devices can include more than one HW architecture for profiling. 35 | Each individual profiling architecture can generate separate metrics data and can behave as individual Metric Source. 36 | The Metric Sources can be identified by an unique id that can be retrieved using {t}_metric_source_id_exp_t 37 | 38 | MetricGroup Marker 39 | ~~~~~~~~~~~~~~~~~~~ 40 | 41 | Markers could be added to command list to uniquely identify profiling data that are generated before and after the marker. 42 | MetricGroups enumerated from a Metric Source could be used to generate Marker using that specific Metric Source. 43 | 44 | Sample Code 45 | ------------ 46 | 47 | The following pseudo-code demonstrates how Metric Group Markers could be generated and collected. 48 | 49 | .. parsed-literal:: 50 | 51 | // 1. Select the metric group for the metrics to be collected using zetMetricGroupGet 52 | 53 | // 2. Identify sourceId of the selected metric group 54 | ${t}_metric_source_id_exp_t metricGroupSourceId{}; 55 | metricGroupSourceId.stype = ZET_STRUCTURE_TYPE_METRIC_SOURCE_ID_EXP; 56 | 57 | ${t}_metric_group_properties_t metricGroupProperties; 58 | metricGroupProperties.pNext = &metricGroupSourceId; 59 | 60 | // Get the SourceId from the metricGroupProperties 61 | ${t}MetricGroupGetProperties(hInterestedMetricGroup, &metricGroupProperties); 62 | uint32_t markerSourceId = metricGroupSourceId.sourceId; 63 | 64 | // 3. Get Metric Group which support Marker Generation for that Metric Source 65 | zet_metric_group_handle_t hMarkerMetricGroup{}; 66 | for (hMetricGroup : allMetricGroups){ 67 | ${t}_metric_group_type_exp_t metricGroupType{}; 68 | metricGroupType.stype = {ZET_STRUCTURE_TYPE_METRIC_GROUP_TYPE_EXP}; 69 | 70 | // Get Metric Group Type and Source Id using zetMetricGroupGetProperties 71 | metricGroupProperties.pNext = &metricGroupType; 72 | metricGroupType.pNext = &metricGroupSourceId; 73 | ${t}MetricGroupGetProperties(hMetricGroup, &metricGroupProperties); 74 | 75 | if(metricGroupType.type == ZET_METRIC_GROUP_TYPE_EXP_FLAG_MARKER && 76 | markerSourceId == metricGroupSourceId.sourceId){ 77 | hMarkerMetricGroup = hMetricGroup; 78 | } 79 | } 80 | 81 | // 4. Generate marker using the interested MetricGroup 82 | ${t}CommandListAppendMarkerExp(hCommandList, hMarkerMetricGroup, 100); 83 | 84 | // 5. Collect metrics for the hMarkerMetricGroup using tracer (or) streamer sampling type 85 | 86 | -------------------------------------------------------------------------------- /scripts/tools/EXT_Exp_MetricsRuntimeEnableDisable.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | t=tags['$t'] 9 | T=t.upper() 10 | %> 11 | :orphan: 12 | 13 | .. _ZET_experimental_metrics_runtime_enable_disable: 14 | 15 | 16 | ======================================================= 17 | Metrics Runtime Enable and Disable Extension 18 | ======================================================= 19 | 20 | API 21 | ---- 22 | 23 | * Functions 24 | 25 | * ${t}DeviceEnableMetricsExp 26 | * ${t}DeviceDisableMetricsExp 27 | -------------------------------------------------------------------------------- /scripts/tools/EXT_Exp_MultiMetricValues.rst: -------------------------------------------------------------------------------- 1 | <% 2 | import re 3 | from templates import helper as th 4 | %><% 5 | OneApi=tags['$OneApi'] 6 | x=tags['$x'] 7 | X=x.upper() 8 | t=tags['$t'] 9 | T=t.upper() 10 | %> 11 | :orphan: 12 | 13 | .. _ZET_experimental_calculate_multiple_metrics: 14 | 15 | ========================================== 16 | Calculating Multiple Metrics Extension 17 | ========================================== 18 | 19 | API 20 | ---- 21 | 22 | * Functions 23 | 24 | * ${t}MetricGroupCalculateMultipleMetricValuesExp 25 | 26 | Sample Code 27 | ------------ 28 | 29 | The following code demonstrates how to calculate and process multiple metric values: 30 | 31 | .. parsed-literal:: 32 | 33 | // Get data count and total metric count 34 | uint32_t dataCount = 0; 35 | uint32_t totalMetricCount = 0; 36 | ${t}MetricGroupCalculateMultipleMetricValuesExp(hMetricGroup, type, rawDataSize, pRawData, &dataCount, &totalMetricCount, nullptr, nullptr); 37 | 38 | // Get metric counts and metric values 39 | std::vector metricCounts(dataCount); 40 | std::vector<${t}_typed_value_t> metricValues(totalMetricCount); 41 | ${t}MetricGroupCalculateMultipleMetricValuesExp(hMetricGroup, type, rawDataSize, pRawData, &dataCount, &totalMetricCount, metricCounts.data(), metricValues.data()); 42 | 43 | // Example showing how to process the metric values 44 | 45 | // Setup 46 | uint32_t metricCount = 0; 47 | ${t}MetricGet(hMetricGroup, &metricCount, nullptr); 48 | 49 | ${t}_metric_handle_t* phMetrics = malloc(metricCount * sizeof(${t}_metric_handle_t)); 50 | ${t}MetricGet(hMetricGroup, &metricCount, phMetrics); 51 | 52 | // This loop over metric data is new for this extension 53 | uint32_t startIndex = 0; 54 | for (uint32_t dataIndex = 0; dataIndex < dataCount; dataIndex++) { 55 | 56 | // Processing each metric data is the same as for the single 57 | // calculate metric values 58 | const uint32_t metricCountForDataIndex = metricCounts[dataIndex]; 59 | const uint32_t reportCount = metricCountForDataIndex / metricCount; 60 | for (uint32_t report = 0; report < reportCount; report++) { 61 | for (uint32_t metric = 0; metric < metricCount ; metric++) { 62 | const size_t metricIndex = report * metricCount + metric; 63 | process_metric_value(metricValues[startIndex + metricIndex])); 64 | } 65 | } 66 | 67 | startIndex += metricCountForDataIndex; 68 | } 69 | assert(startIndex == totalMetricCount); 70 | -------------------------------------------------------------------------------- /scripts/tools/GlobalTimestamps.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2023 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Tool Experimental Extension for Global Metric Timestamps" 11 | version: "1.5" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Global Metric Timestamps Experimental Extension Name" 15 | version: "1.5" 16 | name: $T_GLOBAL_METRICS_TIMESTAMPS_EXP_NAME 17 | value: '"$XT_experimental_global_metric_timestamps"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Global Metric Timestamps Experimental Extension Version(s)" 21 | version: "1.5" 22 | name: $x_metric_global_timestamps_exp_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: struct 29 | desc: "Metric timestamps resolution" 30 | version: "1.5" 31 | class: $tMetric 32 | name: $t_metric_global_timestamps_resolution_exp_t 33 | base: $t_base_desc_t 34 | members: 35 | - type: uint64_t 36 | name: timerResolution 37 | desc: "[out] Returns the resolution of metrics timer (used for timestamps) in cycles/sec." 38 | - type: uint64_t 39 | name: timestampValidBits 40 | desc: "[out] Returns the number of valid bits in the timestamp value." 41 | details: 42 | - "This structure may be returned from $tMetricGroupGetProperties via the `pNext` member of $t_metric_group_properties_t." 43 | - "Used for mapping metric timestamps to other timers." 44 | --- #-------------------------------------------------------------------------- 45 | type: function 46 | desc: "Returns metric timestamps synchronized with global device timestamps, optionally synchronized with host" 47 | version: "1.5" 48 | class: $tMetricGroup 49 | name: GetGlobalTimestampsExp 50 | decl: static 51 | details: 52 | - "The application may call this function from simultaneous threads." 53 | - "By default, the global and metrics timestamps are synchronized to the device." 54 | params: 55 | - type: "$t_metric_group_handle_t" 56 | name: hMetricGroup 57 | desc: "[in] handle of the metric group" 58 | - type: "$x_bool_t" 59 | name: synchronizedWithHost 60 | desc: "[in] Returns the timestamps synchronized to the host or the device." 61 | init: "false" 62 | - type: "uint64_t*" 63 | name: globalTimestamp 64 | desc: | 65 | [out] Device timestamp. 66 | - type: "uint64_t*" 67 | name: metricTimestamp 68 | desc: | 69 | [out] Metric timestamp. 70 | -------------------------------------------------------------------------------- /scripts/tools/cmdlist.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2019-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Tool APIs for Command List" 11 | ordinal: "5" 12 | --- #-------------------------------------------------------------------------- 13 | type: class 14 | desc: "C++ wrapper for command list" 15 | name: $tCommandList 16 | base: $xCommandList 17 | -------------------------------------------------------------------------------- /scripts/tools/concurrentMetricGroup.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2024 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Tool Experimental Extension to get Concurrent Metric Groups" 11 | version: "1.10" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Concurrent Metric Groups Experimental Extension Name" 15 | version: "1.10" 16 | name: $T_CONCURRENT_METRIC_GROUPS_EXP_NAME 17 | value: '"$XT_experimental_concurrent_metric_groups"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Concurrent Metric Groups Experimental Extension Version(s)" 21 | version: "1.10" 22 | name: $t_concurrent_metric_groups_exp_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: function 29 | desc: "Get sets of metric groups which could be collected concurrently." 30 | version: "1.10" 31 | class: $tDevice 32 | name: GetConcurrentMetricGroupsExp 33 | decl: static 34 | details: 35 | - "Re-arrange the input metric groups to provide sets of concurrent metric groups." 36 | params: 37 | - type: "$t_device_handle_t" 38 | name: hDevice 39 | desc: "[in] handle of the device" 40 | - type: "uint32_t" 41 | name: metricGroupCount 42 | desc: "[in] metric group count" 43 | - type: "$t_metric_group_handle_t *" 44 | name: phMetricGroups 45 | desc: "[in,out] metrics groups to be re-arranged to be sets of concurrent groups" 46 | - type: "uint32_t *" 47 | name: pMetricGroupsCountPerConcurrentGroup 48 | desc: | 49 | [in,out][optional][*pConcurrentGroupCount] count of metric groups per concurrent group. 50 | - type: "uint32_t *" 51 | name: pConcurrentGroupCount 52 | desc: | 53 | [out] number of concurrent groups. 54 | The value of this parameter could be used to determine the number of replays necessary. -------------------------------------------------------------------------------- /scripts/tools/context.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2019-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Tool APIs for Context" 11 | ordinal: "3" 12 | --- #-------------------------------------------------------------------------- 13 | type: class 14 | desc: "C++ wrapper for context" 15 | name: $tContext 16 | base: $xContext 17 | -------------------------------------------------------------------------------- /scripts/tools/device.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2019-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Tool APIs for Device" 11 | ordinal: "2" 12 | --- #-------------------------------------------------------------------------- 13 | type: class 14 | desc: "C++ wrapper for driver instance" 15 | name: $tDriver 16 | base: $xDriver 17 | --- #-------------------------------------------------------------------------- 18 | type: class 19 | desc: "C++ wrapper for device" 20 | name: $tDevice 21 | base: $xDevice 22 | -------------------------------------------------------------------------------- /scripts/tools/metricExportMemory.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2024 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Tool Experimental Extension for Metrics/Metric Groups which export Memory" 11 | version: "1.11" 12 | --- #-------------------------------------------------------------------------- 13 | type: enum 14 | desc: "Metric group type" 15 | version: "1.13" 16 | class: $tMetricGroup 17 | name: $t_metric_group_type_exp_flags_t 18 | etors: 19 | - name: EXPORT_DMA_BUF 20 | desc: 21 | Metric group and metrics exports memory using linux dma-buf, which could be imported/mapped to the host process. 22 | Properties of the dma_buf could be queried using $t_export_dma_buf_exp_properties_t. 23 | - name: USER_CREATED 24 | desc: "Metric group created using $tDeviceCreateMetricGroupsFromMetricsExp" 25 | - name: OTHER 26 | desc: "Metric group which has a collection of metrics" 27 | - name: MARKER 28 | desc: "Metric group is capable of generating Marker metric" 29 | --- #-------------------------------------------------------------------------- 30 | type: struct 31 | desc: "Query the metric group type using `pNext` of $t_metric_group_properties_t" 32 | class: $tMetricGroup 33 | name: $t_metric_group_type_exp_t 34 | base: $t_base_properties_t 35 | members: 36 | - type: "$t_metric_group_type_exp_flags_t" 37 | name: "type" 38 | desc: | 39 | [out] metric group type. 40 | returns a combination of $t_metric_group_type_exp_flags_t. 41 | --- #-------------------------------------------------------------------------- 42 | type: struct 43 | desc: "Exported dma_buf properties queried using `pNext` of $t_metric_group_properties_t or $t_metric_properties_t" 44 | class: $tMetric 45 | name: $t_export_dma_buf_exp_properties_t 46 | base: $t_base_properties_t 47 | members: 48 | - type: int 49 | name: "fd" 50 | desc: "[out] the file descriptor handle that could be used to import the memory by the host process." 51 | - type: size_t 52 | name: "size" 53 | desc: "[out] size in bytes of the dma_buf" -------------------------------------------------------------------------------- /scripts/tools/metricGroupMarker.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2025 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #------------------------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Tool Experimental Extension to support Markers using MetricGroup" 11 | version: "1.13" 12 | --- #------------------------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Marker Support Using MetricGroup Experimental Extension Name" 15 | version: "1.13" 16 | name: $T_METRIC_GROUP_MARKER_EXP_NAME 17 | value: '"$XT_experimental_metric_group_marker"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Marker Support Using MetricGroup Experimental Extension Version(s)" 21 | version: "1.13" 22 | name: $t_metric_group_marker_exp_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: struct 29 | desc: "Query the metric source unique identifier using `pNext` of $t_metric_group_properties_t" 30 | version: "1.13" 31 | class: $tMetricGroup 32 | name: $t_metric_source_id_exp_t 33 | base: $t_base_properties_t 34 | members: 35 | - type: uint32_t 36 | name: "sourceId" 37 | desc: "[out] unique number representing the Metric Source." 38 | --- #-------------------------------------------------------------------------- 39 | type: function 40 | desc: "Append a Marker based on the Metric source of the Metric Group, to a Command List." 41 | version: "1.13" 42 | class: $tCommandList 43 | name: AppendMarkerExp 44 | decl: static 45 | details: 46 | - "This function appends a Marker based on the Metric source of the Metric Group, to Command List." 47 | params: 48 | - type: "$t_command_list_handle_t" 49 | name: hCommandList 50 | desc: "[in] handle to the command list" 51 | - type: "$t_metric_group_handle_t" 52 | name: hMetricGroup 53 | desc: | 54 | [in] handle to the marker metric group. 55 | $t_metric_group_type_exp_flags_t could be used to check whether marker is supoported by the metric group. 56 | - type: uint32_t 57 | name: value 58 | desc: "[in] marker value" 59 | -------------------------------------------------------------------------------- /scripts/tools/metricRuntimeEnableDisable.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2025 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Tool Experimental Extension for Runtime Enabling and Disabling metrics" 11 | version: "1.13" 12 | --- #--------------------------------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Runtime Enabling and Disabling Metrics Extension Name" 15 | version: "1.13" 16 | name: $T_METRICS_RUNTIME_ENABLE_DISABLE_EXP_NAME 17 | value: '"$XT_experimental_metrics_runtime_enable_disable"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Runtime Enabling and Disabling Metrics Extension Version(s)" 21 | version: "1.13" 22 | name: $t_metrics_runtime_enable_disable_exp_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: function 29 | desc: "Enable Metrics collection during runtime." 30 | version: "1.13" 31 | class: $tDevice 32 | name: EnableMetricsExp 33 | decl: static 34 | details: 35 | - "This API enables metric collection for a device/sub-device if not already enabled." 36 | - "if ZET_ENABLE_METRICS=1 was already set, then calling this api would be a NOP." 37 | - "This api should be called after calling zeInit()." 38 | - "If device is a root-device handle, then its sub-devices are also enabled." 39 | - "$tDeviceDisableMetricsExp need not be called if if this api returns error." 40 | - "This API can be used as runtime alternative to setting ZET_ENABLE_METRICS=1." 41 | params: 42 | - type: "$t_device_handle_t" 43 | name: hDevice 44 | desc: "[in] handle of the device where metrics collection has to be enabled." 45 | --- #-------------------------------------------------------------------------- 46 | type: function 47 | desc: "Disable Metrics collection during runtime, if it was already enabled." 48 | version: "1.13" 49 | class: $tDevice 50 | name: DisableMetricsExp 51 | decl: static 52 | details: 53 | - "This API disables metrics collection for a device/sub-device, if it was previously enabled." 54 | - "If device is a root-device handle, then its sub-devices are also disabled." 55 | - "The application has to ensure that all metric operations are complete and all metric resources are released before this API is called." 56 | - "If there are metric operations in progress or metric resources are not released, then ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE is returned." 57 | params: 58 | - type: "$t_device_handle_t" 59 | name: hDevice 60 | desc: "[in] handle of the device where metrics collection has to be disabled" -------------------------------------------------------------------------------- /scripts/tools/module.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2019-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Tool APIs for Module" 11 | ordinal: "6" 12 | --- #-------------------------------------------------------------------------- 13 | type: enum 14 | desc: "Supported module debug info formats." 15 | class: $tModule 16 | name: $t_module_debug_info_format_t 17 | etors: 18 | - name: ELF_DWARF 19 | desc: "Format is ELF/DWARF" 20 | --- #-------------------------------------------------------------------------- 21 | type: function 22 | desc: "Retrieve debug info from module." 23 | class: $tModule 24 | name: GetDebugInfo 25 | details: 26 | - "The caller can pass nullptr for pDebugInfo when querying only for size." 27 | - "The implementation will copy the native binary into a buffer supplied by the caller." 28 | - "The application may call this function from simultaneous threads." 29 | - "The implementation of this function should be lock-free." 30 | params: 31 | - type: $t_module_handle_t 32 | name: hModule 33 | desc: "[in] handle of the module" 34 | - type: $t_module_debug_info_format_t 35 | name: format 36 | desc: "[in] debug info format requested" 37 | - type: "size_t*" 38 | name: pSize 39 | desc: "[in,out] size of debug info in bytes" 40 | - type: "uint8_t*" 41 | name: pDebugInfo 42 | desc: "[in,out][optional] byte pointer to debug info" 43 | --- #-------------------------------------------------------------------------- 44 | type: class 45 | desc: "C++ wrapper for module" 46 | name: $tModule 47 | base: $xModule 48 | --- #-------------------------------------------------------------------------- 49 | type: class 50 | desc: "C++ wrapper for kernel" 51 | name: $tKernel 52 | base: $xKernel 53 | -------------------------------------------------------------------------------- /scripts/tools/multiMetricValues.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2021-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Tool Experimental Extension for Calculating Multiple Metrics" 11 | version: "1.2" 12 | --- #-------------------------------------------------------------------------- 13 | type: macro 14 | desc: "Calculating Multiple Metrics Experimental Extension Name" 15 | version: "1.2" 16 | name: $T_MULTI_METRICS_EXP_NAME 17 | value: '"$XT_experimental_calculate_multiple_metrics"' 18 | --- #-------------------------------------------------------------------------- 19 | type: enum 20 | desc: "Calculating Multiple Metrics Experimental Extension Version(s)" 21 | version: "1.2" 22 | name: $x_calculate_multiple_metrics_exp_version_t 23 | etors: 24 | - name: "1_0" 25 | value: "$X_MAKE_VERSION( 1, 0 )" 26 | desc: "version 1.0" 27 | --- #-------------------------------------------------------------------------- 28 | type: function 29 | desc: "Calculate one or more sets of metric values from raw data." 30 | version: "1.2" 31 | class: $tMetricGroup 32 | name: CalculateMultipleMetricValuesExp 33 | decl: static 34 | details: 35 | - "This function is similar to $tMetricGroupCalculateMetricValues 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." 36 | - "Each set of metric values may consist of a different number of metric values, returned as the metric value count." 37 | - "All metric values are calculated into a single buffer; use the metric counts to determine which metric values belong to which set." 38 | - "The application may call this function from simultaneous threads." 39 | params: 40 | - type: "$t_metric_group_handle_t" 41 | name: hMetricGroup 42 | desc: "[in] handle of the metric group" 43 | - type: "$t_metric_group_calculation_type_t" 44 | name: type 45 | desc: "[in] calculation type to be applied on raw data" 46 | - type: size_t 47 | name: rawDataSize 48 | desc: "[in] size in bytes of raw data buffer" 49 | - type: "const uint8_t*" 50 | name: pRawData 51 | desc: "[in][range(0, rawDataSize)] buffer of raw data to calculate" 52 | - type: uint32_t* 53 | name: pSetCount 54 | desc: | 55 | [in,out] pointer to number of metric sets. 56 | if count is zero, then the driver shall update the value with the total number of metric sets to be calculated. 57 | 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. 58 | - type: uint32_t* 59 | name: pTotalMetricValueCount 60 | desc: | 61 | [in,out] pointer to number of the total number of metric values calculated, for all metric sets. 62 | if count is zero, then the driver shall update the value with the total number of metric values to be calculated. 63 | 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. 64 | - type: uint32_t* 65 | name: pMetricCounts 66 | desc: | 67 | [in,out][optional][range(0, *pSetCount)] buffer of metric counts per metric set. 68 | - type: "$t_typed_value_t*" 69 | name: pMetricValues 70 | desc: | 71 | [in,out][optional][range(0, *pTotalMetricValueCount)] buffer of calculated metrics. 72 | if count is less than the number available in the raw data buffer, then driver shall only calculate that number of metric values. 73 | -------------------------------------------------------------------------------- /scripts/tools/pin.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2019-2022 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # 6 | # See YaML.md for syntax definition 7 | # 8 | --- #-------------------------------------------------------------------------- 9 | type: header 10 | desc: "Intel $OneApi Level-Zero Tool APIs for Program Instrumentation (PIN)" 11 | --- #-------------------------------------------------------------------------- 12 | type: enum 13 | desc: "Supportted profile features" 14 | class: $tKernel 15 | name: $t_profile_flags_t 16 | etors: 17 | - name: REGISTER_REALLOCATION 18 | desc: "request the compiler attempt to minimize register usage as much as possible to allow for instrumentation" 19 | - name: FREE_REGISTER_INFO 20 | desc: "request the compiler generate free register info" 21 | --- #-------------------------------------------------------------------------- 22 | type: struct 23 | desc: "Profiling meta-data for instrumentation" 24 | class: $tKernel 25 | name: $t_profile_properties_t 26 | base: $t_base_properties_t 27 | members: 28 | - type: $t_profile_flags_t 29 | name: flags 30 | desc: | 31 | [out] indicates which flags were enabled during compilation. 32 | returns 0 (none) or a combination of $t_profile_flag_t 33 | - type: uint32_t 34 | name: numTokens 35 | desc: "[out] number of tokens immediately following this structure" 36 | --- #-------------------------------------------------------------------------- 37 | type: enum 38 | desc: "Supported profile token types" 39 | class: $tKernel 40 | name: $t_profile_token_type_t 41 | etors: 42 | - name: FREE_REGISTER 43 | desc: "GRF info" 44 | --- #-------------------------------------------------------------------------- 45 | type: struct 46 | desc: "Profile free register token detailing unused registers in the current function" 47 | class: $tKernel 48 | name: $t_profile_free_register_token_t 49 | members: 50 | - type: $t_profile_token_type_t 51 | name: type 52 | desc: "[out] type of token" 53 | - type: uint32_t 54 | name: size 55 | desc: "[out] total size of the token, in bytes" 56 | - type: uint32_t 57 | name: count 58 | desc: "[out] number of register sequences immediately following this structure" 59 | --- #-------------------------------------------------------------------------- 60 | type: struct 61 | desc: "Profile register sequence detailing consecutive bytes, all of which are unused" 62 | class: $tKernel 63 | name: $t_profile_register_sequence_t 64 | members: 65 | - type: uint32_t 66 | name: start 67 | desc: "[out] starting byte in the register table, representing the start of unused bytes in the current function" 68 | - type: uint32_t 69 | name: count 70 | desc: "[out] number of consecutive bytes in the sequence, starting from start" 71 | --- #-------------------------------------------------------------------------- 72 | type: function 73 | desc: "Retrieve profiling information generated for the kernel." 74 | class: $tKernel 75 | name: GetProfileInfo 76 | details: 77 | - "Module must be created using the following build option:": 78 | - "\"-$t-profile-flags \" - enable generation of profile information" 79 | - "\"\" must be a combination of $t_profile_flag_t, in hex" 80 | - "The application may call this function from simultaneous threads." 81 | - "The implementation of this function should be lock-free." 82 | params: 83 | - type: $t_kernel_handle_t 84 | name: hKernel 85 | desc: "[in] handle to kernel" 86 | - type: "$t_profile_properties_t*" 87 | name: pProfileProperties 88 | desc: "[out] pointer to profile properties" 89 | -------------------------------------------------------------------------------- /source/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(TARGET_NAME ze_test) 2 | 3 | add_library(${TARGET_NAME} 4 | STATIC 5 | ${CMAKE_CURRENT_SOURCE_DIR}/ze_api.cpp 6 | ${CMAKE_CURRENT_SOURCE_DIR}/zet_api.cpp 7 | ${CMAKE_CURRENT_SOURCE_DIR}/zes_api.cpp 8 | ) 9 | 10 | target_link_libraries(${TARGET_NAME} 11 | ${CMAKE_DL_LIBS} 12 | ) -------------------------------------------------------------------------------- /third_party/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneapi-src/level-zero-spec/4f7b0cede25c6055cfd38e4909ba8979abccc5cc/third_party/CMakeLists.txt -------------------------------------------------------------------------------- /third_party/requirements.txt: -------------------------------------------------------------------------------- 1 | accessible-pygments >= 0.0.4 2 | alabaster >= 0.7.16 3 | Babel >= 2.14.0 4 | beautifulsoup4 >= 4.12.3 5 | breathe >= 4.35.0 6 | bs4 >= 0.0.2 7 | certifi >= 2024.2.2 8 | chardet >= 5.2.0 9 | charset-normalizer >= 3.3.2 10 | colorama >= 0.4.6 11 | colorlog >= 6.8.2 12 | docutils >= 0.21.2 13 | exhale >= 0.3.7 14 | idna >= 3.7 15 | imagesize >= 1.4.1 16 | importlib_metadata >= 7.1.0 17 | Jinja2 >= 3.1.3 18 | lxml >= 5.2.1 19 | Mako >= 1.3.3 20 | MarkupSafe >= 2.1.5 21 | packaging >= 24.0 22 | pillow >= 10.3.0 23 | pydata-sphinx-theme >= 0.14.4 24 | Pygments >= 2.17.2 25 | pyparsing >= 3.1.2 26 | pytz >= 2024.1 27 | PyYAML >= 6.0.1 28 | reportlab >= 4.2.0 29 | requests >= 2.31.0 30 | rst2pdf >= 0.101 31 | six >= 1.16.0 32 | smartypants >= 2.0.1 33 | snowballstemmer >= 2.2.0 34 | soupsieve >= 2.5 35 | Sphinx >= 7.3.7 36 | sphinx-book-theme >= 1.1.2 37 | sphinxcontrib-applehelp >= 1.0.8 38 | sphinxcontrib-devhelp >= 1.0.6 39 | sphinxcontrib-htmlhelp >= 2.0.5 40 | sphinxcontrib-jsmath >= 1.0.1 41 | sphinxcontrib-qthelp >= 1.0.7 42 | sphinxcontrib-serializinghtml >= 1.1.10 43 | sphinxcontrib-websupport >= 1.2.7 44 | tomli >= 2.0.1 45 | typing_extensions >= 4.11.0 46 | urllib3 >= 2.2.1 47 | zipp >= 3.18.1 48 | --------------------------------------------------------------------------------