### Run pyzes example after pip install Source: https://github.com/oneapi-src/level-zero/blob/master/bindings/sysman/python/source/examples/README.md Execute the main pyzes example script after installing the module via pip. This command runs the script as a module. ```bash python3 -m examples.pyzes_example ``` -------------------------------- ### Initialize pyzes and Get Driver Count Source: https://github.com/oneapi-src/level-zero/blob/master/bindings/sysman/python/README.md Basic usage example to initialize the Level-Zero driver and retrieve the number of available drivers. ```python >>> from pyzes import * >>> rc = zesInit(0) >>> driver_count = c_uint32(0) >>> rc = pyzes.zesDriverGet(byref(driver_count), None) >>> print(f"Driver Count: {driver_count.value}") ``` -------------------------------- ### Navigate to pyzes examples directory Source: https://github.com/oneapi-src/level-zero/blob/master/bindings/sysman/python/source/examples/README.md Change the current directory to the pyzes examples directory within the cloned repository. This is necessary for running examples directly from source. ```bash cd bindings/sysman/python/source/examples ``` -------------------------------- ### Run pyzes example from cloned repository Source: https://github.com/oneapi-src/level-zero/blob/master/bindings/sysman/python/source/examples/README.md Execute the main pyzes example script directly from the cloned repository. This command is used when running examples from the source directory. ```bash python3 pyzes_example.py ``` -------------------------------- ### Build and Install Level Zero on Linux Source: https://github.com/oneapi-src/level-zero/blob/master/README.md Standard CMake build and installation process for Linux. Use to build, package, and install the Level Zero project. ```bash mkdir build cd build cmake .. -D CMAKE_BUILD_TYPE=Release cmake --build . --target package --parallel $(nproc) cmake --build . --target install ``` -------------------------------- ### Install Null Test Targets Source: https://github.com/oneapi-src/level-zero/blob/master/source/drivers/null/CMakeLists.txt Installs the ze_null_test1 and ze_null_test2 targets to the standard installation directories when INSTALL_NULL_DRIVER is enabled. ```cmake if(INSTALL_NULL_DRIVER) install(TARGETS ze_null_test1 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT level-zero-devel RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT level-zero LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT level-zero NAMELINK_COMPONENT level-zero-devel ) install(TARGETS ze_null_test2 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT level-zero-devel RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT level-zero LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT level-zero NAMELINK_COMPONENT level-zero-devel ) endif() ``` -------------------------------- ### Install Null Driver Targets Source: https://github.com/oneapi-src/level-zero/blob/master/source/drivers/null/CMakeLists.txt Installs the ze_intel_gpu and ze_intel_npu targets to a separate fake driver directory when INSTALL_NULL_DRIVER is enabled. ```cmake if(INSTALL_NULL_DRIVER) install(TARGETS ze_intel_gpu ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}_fake COMPONENT level-zero-devel RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}_fake COMPONENT level-zero LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}_fake COMPONENT level-zero NAMELINK_COMPONENT level-zero-devel ) install(TARGETS ze_intel_npu ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}_fake COMPONENT level-zero-devel RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}_fake COMPONENT level-zero LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}_fake COMPONENT level-zero NAMELINK_COMPONENT level-zero-devel ) endif() ``` -------------------------------- ### Dynamic Tracing Layer Control Example Source: https://github.com/oneapi-src/level-zero/blob/master/source/layers/tracing/README.md Demonstrates dynamic control of the Level Zero tracing layer using `zelEnableTracingLayer` and `zelDisableTracingLayer`. This example also shows how to enable/disable individual tracers. ```c // An example demonstrating dynamic tracing layer control void DynamicTracingExample( ... ) { // Query current tracing layer state bool tracingEnabled = false; zelGetTracingLayerState(&tracingEnabled); printf("Tracing layer initially %s\n", tracingEnabled ? "enabled" : "disabled"); // Enable the tracing layer dynamically ze_result_t result = zelEnableTracingLayer(); if (result == ZE_RESULT_SUCCESS) { printf("Tracing layer enabled successfully\n"); } // Create and configure tracer my_tracer_data_t tracer_data = {}; zel_tracer_desc_t tracer_desc; tracer_desc.stype = ZEL_STRUCTURE_TYPE_TRACER_DESC; tracer_desc.pUserData = &tracer_data; zel_tracer_handle_t hTracer; zelTracerCreate(&tracer_desc, &hTracer); zelTracerCommandListAppendLaunchKernelRegisterCallback(hTracer, ZEL_REGISTER_PROLOGUE, OnEnterCommandListAppendLaunchKernel); zelTracerCommandListAppendLaunchKernelRegisterCallback(hTracer, ZEL_REGISTER_EPILOGUE, OnExitCommandListAppendLaunchKernel); // Enable the tracer (note: tracing layer must also be enabled) zelTracerSetEnabled(hTracer, true); // Code section where tracing is active zeCommandListAppendLaunchKernel(hCommandList, hFunction, &launchArgs, nullptr, 0, nullptr); // Disable the tracer zelTracerSetEnabled(hTracer, false); zelTracerDestroy(hTracer); // Disable the tracing layer to reduce overhead for subsequent code zelDisableTracingLayer(); // Subsequent API calls will not be traced zeCommandListAppendLaunchKernel(hCommandList, hFunction, &launchArgs, nullptr, 0, nullptr); } ``` -------------------------------- ### Manually Generate New GUID Source: https://github.com/oneapi-src/level-zero/blob/master/CONTRIBUTING.md If manual GUID generation is needed, execute this Python script. The output should then be manually added to PRODUCT_GUID.txt. ```bash python3 scripts/generate_wix_guid.py ``` -------------------------------- ### Get Device Properties using pyzes Source: https://github.com/oneapi-src/level-zero/blob/master/bindings/sysman/python/README.md Example of retrieving detailed properties for a specific device using the zesDeviceGetProperties function. ```python >>> props = zes_device_properties_t() >>> props.stype = ZES_STRUCTURE_TYPE_DEVICE_PROPERTIES >>> props.pNext = None >>> pyzes.zesDeviceGetProperties(devices[i], byref(props)) ``` -------------------------------- ### Example Memory Leak Detection Output Source: https://github.com/oneapi-src/level-zero/blob/master/source/layers/validation/checkers/system_resource_tracker/system_resource_tracker.md Shows an example of the console output from the memory leak detection algorithm, highlighting detected leaks and their details. ```text === MEMORY LEAK DETECTION === ⚠️ LEAKS DETECTED! Total leaked memory: 0.19 MB (192.00 KB) Number of leak events: 1 Leak events by API: zeEventPoolDestroy: 1 events, 0.19 MB total, 0.19 MB avg ``` -------------------------------- ### Tracing Example using RegisterCallback Source: https://github.com/oneapi-src/level-zero/blob/master/source/layers/tracing/README.md Shows how to register tracing callbacks for specific API calls using `zelTracerCommandListAppendLaunchKernelRegisterCallback`. This method is preferred over deprecated functions. ```c // an example using RegisterCallback functions void TracingExample2( ... ) { my_tracer_data_t tracer_data = {}; zel_tracer_desc_t tracer_desc; tracer_desc.stype = ZEL_STRUCTURE_TYPE_TRACER_DESC; tracer_desc.pUserData = &tracer_data; zel_tracer_handle_t hTracer; zelTracerCreate(&tracer_desc, &hTracer); zelTracerCommandListAppendLaunchKernelRegisterCallback(hTracer, ZEL_REGISTER_PROLOGUE, OnEnterCommandListAppendLaunchKernel); zelTracerCommandListAppendLaunchKernelRegisterCallback(hTracer, ZEL_REGISTER_EPILOGUE, OnExitCommandListAppendLaunchKernel); zelTracerSetEnabled(hTracer, true); zeCommandListAppendLaunchKernel(hCommandList, hFunction, &launchArgs, nullptr, 0, nullptr); zelTracerSetEnabled(hTracer, false); zelTracerDestroy(hTracer); } ``` -------------------------------- ### Enable Component Installation for CPack Source: https://github.com/oneapi-src/level-zero/blob/master/CMakeLists.txt Enables component-based installation for both DEB and archive packaging formats. This allows for more granular control over which parts of the package are installed. ```cmake set(CPACK_DEB_COMPONENT_INSTALL ON) set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) ``` -------------------------------- ### Install Python Packages and Generate Plots Source: https://github.com/oneapi-src/level-zero/blob/master/source/layers/validation/checkers/system_resource_tracker/system_resource_tracker.md Installs necessary Python packages and runs the plotting script to generate visualizations from tracker output CSV files. ```bash pip install pandas matplotlib python3 scripts/plot_resource_tracker.py tracker_output.csv ``` -------------------------------- ### Example Level Zero API Logging Output Source: https://github.com/oneapi-src/level-zero/blob/master/README.md This is an example of the detailed API logging output, showing function entry and exit information, parameter values, and result codes. Logs are timestamped and include thread ID and log level. ```text [2026-02-13 18:51:29.960] [thread-id: 3139] [trace] zeDriverGet(pCount, phDrivers) [2026-02-13 18:51:29.960] [thread-id: 3139] [trace] SUCCESS (ZE_RESULT_SUCCESS) in zeDriverGet(pCount=1, phDrivers=nullptr) [2026-02-13 18:51:29.960] [thread-id: 3139] [trace] zeDriverGet(pCount, phDrivers) [2026-02-13 18:51:29.960] [thread-id: 3139] [trace] SUCCESS (ZE_RESULT_SUCCESS) in zeDriverGet(pCount=1, phDrivers=0x5651c11920f0) [2026-02-13 18:51:29.961010] [0x00007f5d45f57780] [info] Default Driver retrieved at index 0 [2026-02-13 18:51:29.961] [thread-id: 3139] [trace] zeContextCreate(hDriver, desc, phContext) [2026-02-13 18:51:29.961] [thread-id: 3139] [trace] SUCCESS (ZE_RESULT_SUCCESS) in zeContextCreate(hDriver=0x5651c1166418, desc={stype=0x7ffdb52dc060, flags=0}, phContext=0x5651c0276c48) [2026-02-13 18:51:29.962] [thread-id: 3139] [trace] zeDeviceGet(hDriver, pCount, phDevices) [2026-02-13 18:51:29.962] [thread-id: 3139] [trace] SUCCESS (ZE_RESULT_SUCCESS) in zeDeviceGet(hDriver=0x5651c1166418, pCount=2, phDevices=nullptr) [2026-02-13 18:51:29.962] [thread-id: 3139] [trace] zeDeviceGet(hDriver, pCount, phDevices) [2026-02-13 18:51:29.962] [thread-id: 3139] [trace] SUCCESS (ZE_RESULT_SUCCESS) in zeDeviceGet(hDriver=0x5651c1166418, pCount=2, phDevices=0x5651c1192230) [2026-02-13 18:51:29.962] [thread-id: 3139] [trace] zeDeviceGet(hDriver, pCount, phDevices) [2026-02-13 18:51:29.962] [thread-id: 3139] [trace] SUCCESS (ZE_RESULT_SUCCESS) in zeDeviceGet(hDriver=0x5651c1166418, pCount=2, phDevices=nullptr) [2026-02-13 18:51:29.962692] [0x00007f5d45f57780] [info] Default Device retrieved at index 0 [2026-02-13 18:51:29.963] [thread-id: 3139] [trace] zeCommandQueueCreate(hContext, hDevice, desc, phCommandQueue) [2026-02-13 18:51:29.963] [thread-id: 3139] [trace] SUCCESS (ZE_RESULT_SUCCESS) in zeCommandQueueCreate(hContext=0x5651c0276c48, hDevice=0x5651c1166778, desc={stype=0x7ffdb52dbf90, ordinal=0, index=0, flags=0, mode=0x7ffdb52dbfac, priority=0x7ffdb52dbfb0}, phCommandQueue=0x5651c1192748) [2026-02-13 18:51:29.963] [thread-id: 3139] [trace] zeCommandListCreate(hContext, hDevice, desc, phCommandList) [2026-02-13 18:51:29.964] [thread-id: 3139] [trace] SUCCESS (ZE_RESULT_SUCCESS) in zeCommandListCreate(hContext=0x5651c0276c48, hDevice=0x5651c1166778, desc={stype=0x7ffdb52dbf70, commandQueueGroupOrdinal=0, flags=0}, phCommandList=0x5651c119af68) [2026-02-13 18:51:29.965] [thread-id: 3139] [trace] zeMemOpenIpcHandle(hContext, hDevice, handle, flags, pptr) ``` -------------------------------- ### Manual PRODUCT_GUID.txt Update Format Source: https://github.com/oneapi-src/level-zero/blob/master/CONTRIBUTING.md When manually updating PRODUCT_GUID.txt, provide the new version on the first line and the newly generated GUID on the second line. ```text ``` -------------------------------- ### Install pyzes Package Source: https://github.com/oneapi-src/level-zero/blob/master/bindings/sysman/python/README.md Install the pyzes package using pip. Ensure Python 3.10 is installed and accessible. ```bash # Ensure you have Python 3.10 installed python3.10 --version # Install the package (when available) pip install pyzes ``` -------------------------------- ### Product GUID Generation and Validation Source: https://github.com/oneapi-src/level-zero/blob/master/CMakeLists.txt Reads a product GUID from PRODUCT_GUID.txt, compares it with the project version, and regenerates it using a Python script if it's missing or outdated. This process is critical for build consistency and requires user intervention to commit updated files. ```cmake set(PRODUCT_GUID_FILE "${CMAKE_CURRENT_SOURCE_DIR}/PRODUCT_GUID.txt") if(EXISTS "${PRODUCT_GUID_FILE}") file(STRINGS "${PRODUCT_GUID_FILE}" SAVED_PRODUCT_GUID) list(GET SAVED_PRODUCT_GUID 0 SAVED_PRODUCT_GUID_VERSION) message(STATUS "Saved Product GUID: ${SAVED_PRODUCT_GUID_VERSION}") message(STATUS "project version: ${PROJECT_VERSION}") if(NOT SAVED_PRODUCT_GUID_VERSION STREQUAL "${PROJECT_VERSION}") execute_process( COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_wix_guid.py OUTPUT_VARIABLE GENERATED_PRODUCT_GUID OUTPUT_STRIP_TRAILING_WHITESPACE ) file(WRITE "${PRODUCT_GUID_FILE}" "${PROJECT_VERSION}\n${GENERATED_PRODUCT_GUID}") message(STATUS "Generated Product GUID: ${GENERATED_PRODUCT_GUID} for version ${PROJECT_VERSION}") message(FATAL_ERROR "PRODUCT_GUID.txt has been regenerated for version ${PROJECT_VERSION}.\n" "Please commit the updated PRODUCT_GUID.txt before continuing:\n" " git add ${PRODUCT_GUID_FILE}\n" " git commit -m 'Update PRODUCT_GUID.txt for version ${PROJECT_VERSION}'\n" "Then re-run cmake.") else() list(GET SAVED_PRODUCT_GUID 1 GENERATED_PRODUCT_GUID) endif() else() execute_process( COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_wix_guid.py OUTPUT_VARIABLE GENERATED_PRODUCT_GUID OUTPUT_STRIP_TRAILING_WHITESPACE ) file(WRITE "${PRODUCT_GUID_FILE}" "${PROJECT_VERSION}\n${GENERATED_PRODUCT_GUID}") message(FATAL_ERROR "PRODUCT_GUID.txt did not exist and has been created for version ${PROJECT_VERSION}.\n" "Please commit it before continuing:\n" " git add ${PRODUCT_GUID_FILE}\n" " git commit -m 'Add PRODUCT_GUID.txt for version ${PROJECT_VERSION}'\n" "Then re-run cmake.") endif() message(STATUS "Using Product GUID: ${GENERATED_PRODUCT_GUID} for version ${PROJECT_VERSION}") ``` -------------------------------- ### Tracing Example using Deprecated SetEpilogue/SetPrologue Source: https://github.com/oneapi-src/level-zero/blob/master/source/layers/tracing/README.md Demonstrates setting tracing callbacks using the deprecated `zelTracerSetPrologues` and `zelTracerSetEpilogues` functions. Ensure the tracer is enabled before API calls and disabled afterward. ```c // An example using deprecated setepilogue/setprologue functions void TracingExample1( ... ) { my_tracer_data_t tracer_data = {}; zel_tracer_desc_t tracer_desc; tracer_desc.stype = ZEL_STRUCTURE_TYPE_TRACER_DESC; tracer_desc.pUserData = &tracer_data; zel_tracer_handle_t hTracer; zelTracerCreate(&tracer_desc, &hTracer); // Set all callbacks zel_core_callbacks_t prologCbs = {}; zel_core_callbacks_t epilogCbs = {}; prologCbs.CommandList.pfnAppendLaunchKernelCb = OnEnterCommandListAppendLaunchKernel; epilogCbs.CommandList.pfnAppendLaunchKernelCb = OnExitCommandListAppendLaunchKernel; zelTracerSetPrologues(hTracer, &prologCbs); zelTracerSetEpilogues(hTracer, &epilogCbs); zelTracerSetEnabled(hTracer, true); zeCommandListAppendLaunchKernel(hCommandList, hFunction, &launchArgs, nullptr, 0, nullptr); zelTracerSetEnabled(hTracer, false); zelTracerDestroy(hTracer); } ``` -------------------------------- ### Conditional Header Installation for Canonical SDK Source: https://github.com/oneapi-src/level-zero/blob/master/CMakeLists.txt Installs Level Zero API and layer headers to specific directories when the CANONICAL_SDK_COMPONENT is defined. Headers are excluded from 'make install' but included in component packages. ```cmake if(CANONICAL_SDK_COMPONENT) install(FILES ${LEVEL_ZERO_API_HEADERS} DESTINATION ./include/level_zero COMPONENT ${CANONICAL_SDK_COMPONENT} EXCLUDE_FROM_ALL ) install(FILES ${LEVEL_ZERO_LAYERS_API_HEADERS} DESTINATION ./include/level_zero/layers COMPONENT ${CANONICAL_SDK_COMPONENT} EXCLUDE_FROM_ALL ) install(FILES ${LEVEL_ZERO_LOADER_API_HEADERS} DESTINATION ./include/level_zero/loader COMPONENT ${CANONICAL_SDK_COMPONENT} EXCLUDE_FROM_ALL ) endif() ``` -------------------------------- ### Install pyzes via pip Source: https://github.com/oneapi-src/level-zero/blob/master/bindings/sysman/python/source/examples/README.md Install the pyzes module using pip. This is the recommended method for users who do not need to modify the module's source code. ```bash pip install pyzes ``` -------------------------------- ### Run pyzes black box test with help Source: https://github.com/oneapi-src/level-zero/blob/master/bindings/sysman/python/source/examples/README.md Execute the pyzes black box test script with the help flag after installing via pip. This displays available command-line arguments. ```bash python3 -m examples.pyzes_black_box_test -h ``` -------------------------------- ### Generate Checker Template Source: https://github.com/oneapi-src/level-zero/blob/master/source/layers/validation/CONTRIBUTING.md Use this command to generate a skeleton for a new validation checker. Replace `` with your checker's name and `` with the path to your Level Zero installation. ```bash python3 ./scripts/generate_checker.py ``` -------------------------------- ### Write a New Test Case with Google Test Source: https://github.com/oneapi-src/level-zero/blob/master/test/README.md Demonstrates how to write a basic test case using Google Test macros. Include necessary headers and use `EXPECT_EQ` for assertions. ```cpp #include "gtest/gtest.h" #include "ze_api.h" TEST(MyTestSuite, GivenConditionWhenActionThenExpectedResult) { // Setup ze_result_t result; // Execute result = zeInit(0); // Verify EXPECT_EQ(ZE_RESULT_SUCCESS, result); } ``` -------------------------------- ### Run All Tests with CTest Source: https://github.com/oneapi-src/level-zero/blob/master/test/README.md Navigate to the build directory, set the ZEL_LIBRARY_PATH, and then execute all tests using the ctest command. ```bash cd build export ZEL_LIBRARY_PATH=$PWD/lib # Set library path first ctest ``` -------------------------------- ### Build Project on Windows Source: https://github.com/oneapi-src/level-zero/blob/master/README.md Commands to build the project on Windows using Visual Studio x64 command prompt with CMake. ```shell mkdir build cd build cmake -G "NMake Makefiles" CMAKE_CXX_FLAGS="/EHsc" .. nmake ``` -------------------------------- ### Build and Run Tests with CTest Source: https://github.com/oneapi-src/level-zero/blob/master/test/README.md Commands to build the project, set the library path, and run a specific test using `ctest`. ```bash cd build cmake .. make tests export ZEL_LIBRARY_PATH=$PWD/lib # Set library path ctest -R tests_my_new_feature --verbose ``` -------------------------------- ### Custom Command for Fake Driver Copy (Windows) Source: https://github.com/oneapi-src/level-zero/blob/master/test/CMakeLists.txt Sets up a post-build custom command to copy fake driver DLLs for unit tests on Windows when not building statically. ```cmake if(NOT BUILD_STATIC) if(MSVC) add_custom_command(TARGET tests POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $/ze_fake_gpu.dll COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $/ze_fake_npu.dll COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $/ze_fake_vpu.dll COMMENT "Copying null drivers to fake driver names for init_driver_unit_tests" ) else() add_custom_command(TARGET tests POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $/libze_fake_gpu.so.1 COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $/libze_fake_npu.so.1 COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $/libze_fake_vpu.so.1 COMMENT "Copying null drivers to fake driver names for init_driver_unit_tests" ) endif() endif() ``` -------------------------------- ### Get Git Commit SHA Source: https://github.com/oneapi-src/level-zero/blob/master/CMakeLists.txt Retrieves the current Git commit SHA for versioning purposes. Handles Windows CMD execution separately. ```cmake if(MSVC) execute_process( COMMAND CMD /c ${GIT_EXECUTABLE} rev-parse HEAD OUTPUT_VARIABLE VERSION_SHA OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) else() execute_process( COMMAND ${GIT_EXECUTABLE} rev-parse HEAD OUTPUT_VARIABLE VERSION_SHA OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) endif() ``` -------------------------------- ### Enable System Resource Tracker and CSV Export Source: https://github.com/oneapi-src/level-zero/blob/master/source/layers/validation/README.md Enable the system resource tracker checker and optionally export resource metrics to a CSV file for analysis. Loader logging is also enabled. ```bash export ZE_ENABLE_VALIDATION_LAYER=1 export ZEL_ENABLE_SYSTEM_RESOURCE_TRACKER_CHECKER=1 export ZEL_SYSTEM_RESOURCE_TRACKER_CSV=tracker_output.csv export ZEL_ENABLE_LOADER_LOGGING=1 export ZEL_LOADER_LOGGING_LEVEL=debug ``` -------------------------------- ### Set Environment Variables for a Test Source: https://github.com/oneapi-src/level-zero/blob/master/test/README.md Configures environment variables for a specific CTest test case. This example enables loader debug tracing and the null driver. ```cmake set_property(TEST tests_api PROPERTY ENVIRONMENT "ZE_ENABLE_LOADER_DEBUG_TRACE=1;ZE_ENABLE_NULL_DRIVER=1") ``` -------------------------------- ### Signed-off-by Line Example Source: https://github.com/oneapi-src/level-zero/blob/master/source/layers/validation/CONTRIBUTING.md Include this line at the end of your git commit message to certify your contribution. Replace 'Kris Smith ' with your actual name and email. ```git Signed-off-by: Kris Smith ``` -------------------------------- ### Basic Leak Checker Sample Output Source: https://github.com/oneapi-src/level-zero/blob/master/source/layers/validation/README.md Sample output from the Basic Leak Checker, illustrating the count of create and destroy calls for various Level Zero handles. It highlights potential leaks where create counts do not match destroy counts. ```text ---------------------------------------------------------------------- zeContextCreate = 1 \---> zeContextDestroy = 1 zeCommandQueueCreate = 1 \---> zeCommandQueueDestroy = 1 zeModuleCreate = 1 \---> zeModuleDestroy = 1 zeKernelCreate = 1 \---> zeKernelDestroy = 1 zeEventPoolCreate = 1 \---> zeEventPoolDestroy = 1 zeCommandListCreateImmediate = 1 | zeCommandListCreate = 1 \---> zeCommandListDestroy = 1 ---> LEAK = 1 zeEventCreate = 2 \---> zeEventDestroy = 2 zeFenceCreate = 1 \---> zeFenceDestroy = 1 zeImageCreate = 0 \---> zeImageDestroy = 0 zeSamplerCreate = 0 \---> zeSamplerDestroy = 0 zeMemAllocDevice = 0 | zeMemAllocHost = 1 | zeMemAllocShared = 0 \---> zeMemFree = 1 ``` -------------------------------- ### Set Explicit Certification Checker Version Source: https://github.com/oneapi-src/level-zero/blob/master/source/layers/validation/checkers/certification/README.md To restrict API usage to a specific version, set the ZEL_CERTIFICATION_CHECKER_VERSION environment variable. This example restricts usage to version 1.6. ```bash export ZEL_CERTIFICATION_CHECKER_VERSION=1.6 ``` -------------------------------- ### Configure Init Driver Unit Tests Source: https://github.com/oneapi-src/level-zero/blob/master/test/CMakeLists.txt Adds a test for initializing the driver and sets environment variables for debugging and null driver usage. Conditional logic applies different environment variable settings for MSVC and non-static builds. ```cmake add_test(NAME init_driver_unit_tests COMMAND tests --gtest_filter=InitDriverUnitTest.*) if (MSVC) set_property(TEST init_driver_unit_tests PROPERTY ENVIRONMENT "ZE_ENABLE_LOADER_DEBUG_TRACE=1;ZE_ENABLE_NULL_DRIVER=1") elseif(NOT BUILD_STATIC) set_property(TEST init_driver_unit_tests PROPERTY ENVIRONMENT "ZE_ENABLE_LOADER_DEBUG_TRACE=1;ZE_ENABLE_NULL_DRIVER=1;LD_LIBRARY_PATH=$:$") else() set_property(TEST init_driver_unit_tests PROPERTY ENVIRONMENT "ZE_ENABLE_LOADER_DEBUG_TRACE=1;ZE_ENABLE_NULL_DRIVER=1") endif() ``` -------------------------------- ### Add Test for Single-Driver Sysman ECC API Source: https://github.com/oneapi-src/level-zero/blob/master/test/CMakeLists.txt Configures a test to run with a single null driver for Sysman ECC APIs. This setup is for testing ECC-related functionalities in isolation. ```cmake add_test(NAME tests_single_driver_sysman_ecc_api COMMAND tests --gtest_filter=*GivenLevelZeroLoaderPresentWhenCallingSysManEccApisThenExpectNullDriverIsReachedSuccessfully) set_property(TEST tests_single_driver_sysman_ecc_api PROPERTY ENVIRONMENT "ZE_ENABLE_NULL_DRIVER=1") ``` -------------------------------- ### Run pyzes black box test from cloned repository with help Source: https://github.com/oneapi-src/level-zero/blob/master/bindings/sysman/python/source/examples/README.md Execute the pyzes black box test script with the help flag directly from the cloned repository. This displays available command-line arguments. ```bash python3 pyzes_black_box_test.py -h ``` -------------------------------- ### Level Zero API Tracing Callbacks Source: https://github.com/oneapi-src/level-zero/blob/master/source/layers/tracing/README.md Defines entry and exit callbacks for tracing kernel launches. These callbacks measure and print the execution time of `zeCommandListAppendLaunchKernel`. ```c #include "level_zero/ze_api.h" #include "level_zero/layers/zel_tracing_api.h" #include "level_zero/loader/ze_loader.h" typedef struct _my_tracer_data_t { uint32_t instance; } my_tracer_data_t; typedef struct _my_instance_data_t { clock_t start; } my_instance_data_t; void OnEnterCommandListAppendLaunchKernel( ze_command_list_append_launch_kernel_params_t* params, ze_result_t result, void* pTracerUserData, void** ppTracerInstanceUserData ) { my_instance_data_t* instance_data = malloc( sizeof(my_instance_data_t) ); *ppTracerInstanceUserData = instance_data; instance_data->start = clock(); } void OnExitCommandListAppendLaunchKernel( ze_command_list_append_launch_kernel_params_t* params, ze_result_t result, void* pTracerUserData, void** ppTracerInstanceUserData ) { clock_t end = clock(); my_tracer_data_t* tracer_data = (my_tracer_data_t*)pTracerUserData; my_instance_data_t* instance_data = *(my_instance_data_t**)ppTracerInstanceUserData; float time = 1000.f * ( end - instance_data->start ) / CLOCKS_PER_SEC; printf("zeCommandListAppendLaunchKernel #%d takes %.4f msn", tracer_data->instance++, time); free(instance_data); } ``` -------------------------------- ### Add Test for Single-Driver Sysman Memory API Source: https://github.com/oneapi-src/level-zero/blob/master/test/CMakeLists.txt Configures a test to run with a single null driver for Sysman Memory APIs. This setup is for testing memory-related functionalities in isolation. ```cmake add_test(NAME tests_single_driver_sysman_memory_api COMMAND tests --gtest_filter=*GivenLevelZeroLoaderPresentWhenCallingSysManMemoryApisThenExpectNullDriverIsReachedSuccessfully) set_property(TEST tests_single_driver_sysman_memory_api PROPERTY ENVIRONMENT "ZE_ENABLE_NULL_DRIVER=1") ``` -------------------------------- ### Using Structure Chaining for Extensions Source: https://github.com/oneapi-src/level-zero/blob/master/bindings/sysman/python/README.md Demonstrates how to chain extension structures when calling zesDeviceGetProperties to retrieve extended properties. The extension structure's flags are then accessed. ```python >>> props = zes_device_properties_t() >>> props.stype = ZES_STRUCTURE_TYPE_DEVICE_PROPERTIES >>> ext = zes_device_ext_properties_t() >>> ext.stype = ZES_STRUCTURE_TYPE_DEVICE_EXT_PROPERTIES >>> ext.pNext = None >>> base.pNext = cast(pointer(ext), c_void_p) >>> pyzes.zesDeviceGetProperties(devices[i], byref(props)) >>> print(f"Extension properties flags: {ext.flags}") ``` -------------------------------- ### Set Environment Variables for Multi-Driver Testing Source: https://github.com/oneapi-src/level-zero/blob/master/test/README.md Configures environment variables for a CTest test case involving multiple drivers. This example enables loader debug tracing and specifies alternative driver paths. ```cmake set_property(TEST tests_multi_driver_sort PROPERTY ENVIRONMENT "ZE_ENABLE_LOADER_DEBUG_TRACE=1;ZE_ENABLE_ALT_DRIVERS=/path/to/ze_null_test1.so,/path/to/ze_null_test2.so") ``` -------------------------------- ### Enable Level Zero API Logging Source: https://github.com/oneapi-src/level-zero/blob/master/README.md Set these environment variables to enable API logging with trace level and validation. ```bash ZEL_ENABLE_LOADER_LOGGING=1 ZEL_LOADER_LOGGING_LEVEL=trace ZE_ENABLE_VALIDATION_LAYER=1 ``` -------------------------------- ### zelGetLoaderVersion Source: https://github.com/oneapi-src/level-zero/blob/master/doc/loader_api.md Retrieves the version information of the Level Zero loader itself. This API provides a simplified interface to get only the loader's version without needing to query all components. It does not require prior initialization and is thread-safe. ```APIDOC ## zelGetLoaderVersion ### Description Retrieves the version information of the Level Zero loader itself. This API provides a simplified interface to get only the loader's version without needing to query all components. ### Method [Not specified, assumed C function call] ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **version** (*zel_component_version_t*) - Output - Pointer to a `zel_component_version_t` structure that will be filled with the loader's version information. Must be a valid, non-null pointer. ### Returns - `ZE_RESULT_SUCCESS` on successful retrieval of the loader version - `ZE_RESULT_ERROR_INVALID_NULL_POINTER` if `version` is `nullptr` - `ZE_RESULT_ERROR_UNINITIALIZED` if the loader library cannot be found or loaded ### Notes - Does not require `zeInit()` or `zeInitDrivers()` to be called prior to invocation. - Works with both static and dynamic loader builds without initialization. - Is thread-safe and can be called from multiple threads. ### Response Example ```c zel_component_version_t loader_version; ze_result_t result = zelGetLoaderVersion(&loader_version); if (result == ZE_RESULT_SUCCESS) { // Use loader_version.component_name, loader_version.spec_version, loader_version.component_lib_version } ``` The returned `zel_component_version_t` structure contains: - `component_name`: Set to "loader" - `spec_version`: The Level Zero API specification version (`ZE_API_VERSION_CURRENT`) - `component_lib_version`: The loader library version with `major`, `minor`, and `patch` fields ``` -------------------------------- ### Fetch and Configure Google Test Source: https://github.com/oneapi-src/level-zero/blob/master/CMakeLists.txt Fetches the Google Test framework if tests are enabled and configures it for use. ```cmake if(BUILD_L0_LOADER_TESTS) set(INSTALL_GTEST OFF) FetchContent_Declare( googletest GIT_REPOSITORY https://github.com/google/googletest.git GIT_TAG v1.14.0 ) add_library(GTest::GTest INTERFACE IMPORTED) target_link_libraries(GTest::GTest INTERFACE gtest_main) FetchContent_MakeAvailable(googletest) enable_testing() endif() ``` -------------------------------- ### Enable CSV Output for System Resource Tracker Source: https://github.com/oneapi-src/level-zero/blob/master/source/layers/validation/checkers/system_resource_tracker/system_resource_tracker.md Configure environment variables to enable the validation layer and the system resource tracker checker, and specify the output CSV file path using ZEL_SYSTEM_RESOURCE_TRACKER_CSV. The output file will include the process ID for uniqueness. ```bash export ZE_ENABLE_VALIDATION_LAYER=1 export ZEL_ENABLE_SYSTEM_RESOURCE_TRACKER_CHECKER=1 export ZEL_SYSTEM_RESOURCE_TRACKER_CSV=tracker_output.csv # Run your Level Zero application ./my_level_zero_app ``` ```powershell $env:ZE_ENABLE_VALIDATION_LAYER=1 $env:ZEL_ENABLE_SYSTEM_RESOURCE_TRACKER_CHECKER=1 $env:ZEL_SYSTEM_RESOURCE_TRACKER_CSV="tracker_output.csv" # Run your Level Zero application .ar my_level_zero_app.exe ``` -------------------------------- ### Include Directories and Library Linking for Tests Source: https://github.com/oneapi-src/level-zero/blob/master/test/CMakeLists.txt Configures include directories and links necessary libraries to the 'tests' target, including Google Test and Level Zero specific libraries. ```cmake target_include_directories(tests PRIVATE ${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/source/inc) target_link_libraries( tests PRIVATE GTest::gtest_main ${TARGET_LOADER_NAME} level_zero_utils ) ``` -------------------------------- ### Checkout Specific Specification Version Source: https://github.com/oneapi-src/level-zero/blob/master/CONTRIBUTING.md Navigate into the cloned specification repository and checkout the desired version. This ensures you are working with the correct specification. ```bash cd level-zero-spec git checkout v1.12.15 ``` -------------------------------- ### Device Management Functions Source: https://github.com/oneapi-src/level-zero/blob/master/bindings/sysman/python/README.md Functions for initializing the driver, retrieving device information, and managing device processes. ```APIDOC ## zesInit ### Description Initializes the Level Zero driver. This is typically the first function to call. ### Method Not Applicable (Function Call) ### Endpoint Not Applicable ### Parameters None explicitly documented. ### Request Example ```python # Example usage (conceptual) zesInit() ``` ### Response Success Response: - Returns success code upon successful initialization. ### Response Example ```python # Conceptual success indication 0 # Assuming 0 indicates success ``` ``` ```APIDOC ## zesDriverGet ### Description Retrieves handles for available Level Zero drivers. ### Method Not Applicable (Function Call) ### Endpoint Not Applicable ### Parameters None explicitly documented. ### Request Example ```python # Example usage (conceptual) driver_handles = zesDriverGet() ``` ### Response Success Response: - A list or array of driver handles. ### Response Example ```python # Conceptual response [, ] ``` ``` ```APIDOC ## zesDeviceGet ### Description Retrieves handles for devices associated with a given driver. ### Method Not Applicable (Function Call) ### Endpoint Not Applicable ### Parameters - **driverHandle** (handle) - Required - Handle to the driver. ### Request Example ```python # Example usage (conceptual) device_handles = zesDeviceGet(driver_handle) ``` ### Response Success Response: - A list or array of device handles. ### Response Example ```python # Conceptual response [, ] ``` ``` ```APIDOC ## zesDeviceGetProperties ### Description Retrieves properties of a specific device. ### Method Not Applicable (Function Call) ### Endpoint Not Applicable ### Parameters - **deviceHandle** (handle) - Required - Handle to the device. ### Request Example ```python # Example usage (conceptual) properties = zesDeviceGetProperties(device_handle) ``` ### Response Success Response: - A structure or object containing device properties (e.g., name, vendor ID, device ID). ### Response Example ```python # Conceptual response { "name": "Intel(R) Graphics", "vendorId": "0x8086", "deviceId": "0x1234" } ``` ``` ```APIDOC ## zesDriverGetDeviceByUuidExp ### Description Retrieves a device handle using its UUID. This is an experimental API. ### Method Not Applicable (Function Call) ### Endpoint Not Applicable ### Parameters - **driverHandle** (handle) - Required - Handle to the driver. - **uuid** (string) - Required - The UUID of the device. ### Request Example ```python # Example usage (conceptual) device_handle = zesDriverGetDeviceByUuidExp(driver_handle, "some-uuid") ``` ### Response Success Response: - Handle to the device. ### Response Example ```python # Conceptual response ``` ``` ```APIDOC ## zesDeviceProcessesGetState ### Description Retrieves the state of processes running on a specific device. ### Method Not Applicable (Function Call) ### Endpoint Not Applicable ### Parameters - **deviceHandle** (handle) - Required - Handle to the device. ### Request Example ```python # Example usage (conceptual) process_states = zesDeviceProcessesGetState(device_handle) ``` ### Response Success Response: - A list or array of process states. ### Response Example ```python # Conceptual response [ { "processId": 1234, "state": "running" } ] ``` ``` -------------------------------- ### Project Versioning Source: https://github.com/oneapi-src/level-zero/blob/master/CMakeLists.txt Sets the project name and follows semantic versioning. ```cmake project(level-zero VERSION 1.30.0) ``` -------------------------------- ### Set Include Directories for Null Test Binaries Source: https://github.com/oneapi-src/level-zero/blob/master/source/drivers/null/CMakeLists.txt Configures public include directories for ze_null_test1 and ze_null_test2 targets. ```cmake target_include_directories(ze_null_test1 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) target_include_directories(ze_null_test2 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) ``` -------------------------------- ### Multi-Driver Test with Missing InitDrivers (Non-MSVC) Source: https://github.com/oneapi-src/level-zero/blob/master/test/CMakeLists.txt Sets up environment variables for a multi-driver test on non-MSVC systems where initDrivers might be missing. Includes debug trace and alternative drivers. ```cmake else() set_property(TEST tests_multi_driver_missing_initDrivers PROPERTY ENVIRONMENT "ZE_ENABLE_LOADER_DEBUG_TRACE=1;ZE_ENABLE_ALT_DRIVERS=$,$") endif() ``` -------------------------------- ### Additional System Libraries for Static Builds Source: https://github.com/oneapi-src/level-zero/blob/master/test/CMakeLists.txt Links additional system libraries like C dynamic library and pthreads for static builds on Unix-like systems. ```cmake if(BUILD_STATIC) target_link_libraries(tests PRIVATE ${CMAKE_DL_LIBS}) if(UNIX AND NOT APPLE) target_link_libraries(tests PRIVATE pthread) endif() endif() ``` -------------------------------- ### Multi-Driver Test with Missing InitDrivers (MSVC) Source: https://github.com/oneapi-src/level-zero/blob/master/test/CMakeLists.txt Sets up environment variables for a multi-driver test on MSVC where initDrivers might be missing. Includes debug trace and alternative drivers. ```cmake if (MSVC) set_property(TEST tests_multi_driver_missing_initDrivers PROPERTY ENVIRONMENT "ZE_ENABLE_LOADER_DEBUG_TRACE=1;ZE_ENABLE_ALT_DRIVERS=$/ze_null_test1.dll,$/ze_null_test2.dll") else() set_property(TEST tests_multi_driver_missing_initDrivers PROPERTY ENVIRONMENT "ZE_ENABLE_LOADER_DEBUG_TRACE=1;ZE_ENABLE_ALT_DRIVERS=$,$") endif() ``` -------------------------------- ### Define Executable and Source Files Source: https://github.com/oneapi-src/level-zero/blob/master/samples/zello_world/CMakeLists.txt Defines the target executable name and lists the source files for the project. ```cmake set(TARGET_NAME zello_world) add_executable(${TARGET_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/zello_world.cpp ) ``` -------------------------------- ### Generate Specification JSON and Headers Source: https://github.com/oneapi-src/level-zero/blob/master/CONTRIBUTING.md Run the `run.py` script from the specification's scripts directory to generate the JSON file and headers. Use the `--debug` flag for detailed output and exclude HTML, RST, and build artifacts. ```bash cd level-zero-spec/scripts python3 ./run.py --debug '--!html' '--!rst' '--!build' --ver 1.16 ``` -------------------------------- ### Run a Single Test with Verbose Output Source: https://github.com/oneapi-src/level-zero/blob/master/test/README.md Execute a specific test with verbose logging enabled. Ensure the library path is set correctly before running. ```bash cd build export ZEL_LIBRARY_PATH=$PWD/lib # Set library path first ctest -R tests_api -V ``` -------------------------------- ### Copy Headers from Specification to Loader Repository Source: https://github.com/oneapi-src/level-zero/blob/master/CONTRIBUTING.md Copy the generated header files from the specification repository's include directory to the Level Zero Loader's include directory. ```bash cp level-zero-spec/include/* level-zero/include/ ``` -------------------------------- ### Add Driver Ordering Unit Test with Environment Variables Source: https://github.com/oneapi-src/level-zero/blob/master/test/CMakeLists.txt Defines a test case for driver ordering and sets specific environment variables for its execution. Use this to isolate and test specific driver ordering behaviors. ```cmake add_test(NAME driver_ordering_no_env COMMAND tests --gtest_filter=DriverOrderingUnitTest.NoEnvironmentVariable_ShouldNotChangeOrder) set_property(TEST driver_ordering_no_env PROPERTY ENVIRONMENT "ZE_ENABLE_LOADER_DEBUG_TRACE=1;ZE_ENABLE_NULL_DRIVER=1") ``` ```cmake add_test(NAME driver_ordering_empty_env COMMAND tests --gtest_filter=DriverOrderingUnitTest.EmptyEnvironmentVariable_ShouldNotChangeOrder) set_property(TEST driver_ordering_empty_env PROPERTY ENVIRONMENT "ZE_ENABLE_LOADER_DEBUG_TRACE=1;ZE_ENABLE_NULL_DRIVER=1") ``` ```cmake add_test(NAME driver_ordering_global_index COMMAND tests --gtest_filter=DriverOrderingUnitTest.GlobalIndex_*) set_property(TEST driver_ordering_global_index PROPERTY ENVIRONMENT "ZE_ENABLE_LOADER_DEBUG_TRACE=1;ZE_ENABLE_NULL_DRIVER=1") ``` ```cmake add_test(NAME driver_ordering_driver_type COMMAND tests --gtest_filter=DriverOrderingUnitTest.DriverType_*) set_property(TEST driver_ordering_driver_type PROPERTY ENVIRONMENT "ZE_ENABLE_LOADER_DEBUG_TRACE=1;ZE_ENABLE_NULL_DRIVER=1") ``` ```cmake add_test(NAME driver_ordering_type_and_index COMMAND tests --gtest_filter=DriverOrderingUnitTest.DriverTypeAndIndex_*) set_property(TEST driver_ordering_type_and_index PROPERTY ENVIRONMENT "ZE_ENABLE_LOADER_DEBUG_TRACE=1;ZE_ENABLE_NULL_DRIVER=1") ``` ```cmake add_test(NAME driver_ordering_mixed_syntax COMMAND tests --gtest_filter=DriverOrderingUnitTest.MixedSyntax_*) set_property(TEST driver_ordering_mixed_syntax PROPERTY ENVIRONMENT "ZE_ENABLE_LOADER_DEBUG_TRACE=1;ZE_ENABLE_NULL_DRIVER=1") ``` ```cmake add_test(NAME driver_ordering_edge_cases COMMAND tests --gtest_filter=DriverOrderingUnitTest.GlobalIndex_OutOfBounds_*:DriverOrderingUnitTest.DriverTypeAndIndex_OutOfBoundsIndex_*:DriverOrderingUnitTest.DriverTypeAndIndex_InvalidDriverType_*:DriverOrderingUnitTest.DuplicateSpecifications_*:DriverOrderingUnitTest.InvalidSyntax_*:DriverOrderingUnitTest.ColonWithoutIndex_*:DriverOrderingUnitTest.OnlyCommas_*) set_property(TEST driver_ordering_edge_cases PROPERTY ENVIRONMENT "ZE_ENABLE_LOADER_DEBUG_TRACE=1;ZE_ENABLE_NULL_DRIVER=1") ``` ```cmake add_test(NAME driver_ordering_boundary_conditions COMMAND tests --gtest_filter=DriverOrderingUnitTest.SingleDriver_*:DriverOrderingUnitTest.MaxOrderSpecifications_*) set_property(TEST driver_ordering_boundary_conditions PROPERTY ENVIRONMENT "ZE_ENABLE_LOADER_DEBUG_TRACE=1;ZE_ENABLE_NULL_DRIVER=1") ``` -------------------------------- ### Enable Debug Logging for System Resource Tracker Source: https://github.com/oneapi-src/level-zero/blob/master/source/layers/validation/checkers/system_resource_tracker/system_resource_tracker.md Configure environment variables to enable the validation layer, the system resource tracker checker, and set the loader logging level to debug. This allows resource usage to be logged to the Level Zero debug log. ```bash export ZE_ENABLE_VALIDATION_LAYER=1 export ZEL_ENABLE_SYSTEM_RESOURCE_TRACKER_CHECKER=1 export ZEL_ENABLE_LOADER_LOGGING=1 export ZEL_LOADER_LOGGING_LEVEL=debug # Run your Level Zero application ./my_level_zero_app ``` ```powershell $env:ZE_ENABLE_VALIDATION_LAYER=1 $env:ZEL_ENABLE_SYSTEM_RESOURCE_TRACKER_CHECKER=1 $env:ZEL_ENABLE_LOADER_LOGGING=1 $env:ZEL_LOADER_LOGGING_LEVEL="debug" # Run your Level Zero application .ar my_level_zero_app.exe ``` -------------------------------- ### Include Init Driver Tests for Non-Windows Source: https://github.com/oneapi-src/level-zero/blob/master/test/CMakeLists.txt Includes 'init_driver_unit_tests.cpp' for non-Windows platforms. These tests rely on locating fake drivers by specific names, which is not supported on Windows. ```cmake if(NOT WIN32) target_sources(tests PRIVATE init_driver_unit_tests.cpp) endif() ``` -------------------------------- ### Enable Performance Checker and Loader Logging Source: https://github.com/oneapi-src/level-zero/blob/master/source/layers/validation/README.md Enable the performance checker and loader logging for API usage validation and immediate feedback. Ensure the validation layer is also enabled. ```bash export ZEL_ENABLE_PERFORMANCE_CHECKER=1 export ZEL_ENABLE_LOADER_LOGGING=1 export ZE_ENABLE_VALIDATION_LAYER=1 export ZEL_LOADER_LOG_CONSOLE=1 ``` -------------------------------- ### Create Git Tag for Release Source: https://github.com/oneapi-src/level-zero/blob/master/CONTRIBUTING.md After committing all version-related changes, create an annotated git tag for the release using this command format. ```bash git tag -a v1.28.3 -m "Release v1.28.3" ``` -------------------------------- ### Configure Single-Driver Test for Sysman LED API Source: https://github.com/oneapi-src/level-zero/blob/master/test/CMakeLists.txt Sets the environment variable to enable a single null driver for a test targeting the Sysman LED API. ```cmake add_test(NAME tests_single_driver_sysman_led_api COMMAND tests --gtest_filter=*GivenLevelZeroLoaderPresentWhenCallingSysManLedApisThenExpectNullDriverIsReachedSuccessfully) set_property(TEST tests_single_driver_sysman_led_api PROPERTY ENVIRONMENT "ZE_ENABLE_NULL_DRIVER=1") ```