diff --git a/CHANGELOG.md b/CHANGELOG.md index 08bda86e..3ca2579a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ # Level zero loader changelog +## v1.28.2 +* fix logging of apis in validation layer to only print successful apis given ZEL_LOADER_LOGGING_ENABLE_SUCCESS_PRINT ## v1.28.1 * feature: Improve API Call Tracing and add ults * add performance validation layer checker diff --git a/CMakeLists.txt b/CMakeLists.txt index f77c11ac..b70dc128 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ if(MSVC AND (MSVC_VERSION LESS 1900)) endif() # This project follows semantic versioning (https://semver.org/) -project(level-zero VERSION 1.28.1) +project(level-zero VERSION 1.28.2) include(GNUInstallDirs) find_package(Git) diff --git a/PRODUCT_GUID.txt b/PRODUCT_GUID.txt index e4343e52..12701109 100644 --- a/PRODUCT_GUID.txt +++ b/PRODUCT_GUID.txt @@ -1,2 +1,2 @@ -1.28.1 -3622767c-2b40-4af8-961d-06eda1231409 \ No newline at end of file +1.28.2 +115378b3-db3b-44cf-8c29-eb1184210c18 \ No newline at end of file diff --git a/README.md b/README.md index a7413753..5ebc023d 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,11 @@ validation layer is enabled. Following variables need to be set to enable API lo `ZE_ENABLE_VALIDATION_LAYER=1` +To print successful API call results, set +`ZEL_LOADER_LOGGING_ENABLE_SUCCESS_PRINT=1` +Otherwise, only error results will be printed in the API trace output. +NOTE: This will become the default behavior in future releases. for now, please set the env var to enable this logging feature. + By default logs will be written to the log file, as described above. To print the logs to stderr instead, `ZEL_LOADER_LOG_CONSOLE=1` needs to be set. diff --git a/scripts/templates/validation/valddi.cpp.mako b/scripts/templates/validation/valddi.cpp.mako index 77317939..623c43e6 100644 --- a/scripts/templates/validation/valddi.cpp.mako +++ b/scripts/templates/validation/valddi.cpp.mako @@ -65,6 +65,10 @@ namespace validation_layer %endfor %endif ) { + // Only log success results if verbose logging is enabled + if (result == ${X}_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ${X}_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; %if is_void_params: context.logger->log_trace(status + " (" + loader::to_string(result) + ") in ${func_name}()"); @@ -117,6 +121,10 @@ namespace validation_layer const void* desc, ze_event_handle_t* phEvent ) { + // Only log success results if verbose logging is enabled + if (result == ${X}_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ${X}_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zexCounterBasedEventCreate2(" diff --git a/source/layers/validation/ze_valddi.cpp b/source/layers/validation/ze_valddi.cpp index d9b63c47..91b4f546 100644 --- a/source/layers/validation/ze_valddi.cpp +++ b/source/layers/validation/ze_valddi.cpp @@ -40,6 +40,10 @@ namespace validation_layer ze_init_flags_t flags ///< [in] initialization flags. ///< must be 0 (default) or a combination of ::ze_init_flag_t. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeInit("; @@ -62,6 +66,10 @@ namespace validation_layer ///< if count is less than the number of drivers available, then the loader ///< shall only retrieve that number of drivers. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDriverGet("; @@ -90,6 +98,10 @@ namespace validation_layer ze_init_driver_type_desc_t* desc ///< [in] descriptor containing the driver type initialization details ///< including ::ze_init_driver_type_flag_t combinations. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeInitDrivers("; @@ -114,6 +126,10 @@ namespace validation_layer ze_driver_handle_t hDriver, ///< [in] handle of the driver instance ze_api_version_t* version ///< [out] api version ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDriverGetApiVersion("; @@ -139,6 +155,10 @@ namespace validation_layer ze_driver_handle_t hDriver, ///< [in] handle of the driver instance ze_driver_properties_t* pDriverProperties ///< [in,out] query result for driver properties ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDriverGetProperties("; @@ -159,6 +179,10 @@ namespace validation_layer ze_driver_handle_t hDriver, ///< [in] handle of the driver instance ze_driver_ipc_properties_t* pIpcProperties ///< [in,out] query result for IPC properties ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDriverGetIpcProperties("; @@ -188,6 +212,10 @@ namespace validation_layer ///< if count is less than the number of extension properties available, ///< then driver shall only retrieve that number of extension properties. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDriverGetExtensionProperties("; @@ -213,6 +241,10 @@ namespace validation_layer const char* name, ///< [in] extension function name void** ppFunctionAddress ///< [out] pointer to function pointer ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDriverGetExtensionFunctionAddress("; @@ -243,6 +275,10 @@ namespace validation_layer const char** ppString ///< [in,out] pointer to a null-terminated array of characters describing ///< cause of error. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDriverGetLastErrorDescription("; @@ -262,6 +298,10 @@ namespace validation_layer ze_result_t result, ze_driver_handle_t hDriver ///< [in] handle of the driver instance ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDriverGetDefaultContext("; @@ -285,6 +325,10 @@ namespace validation_layer ///< if count is less than the number of devices available, then driver ///< shall only retrieve that number of devices. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceGet("; @@ -309,6 +353,10 @@ namespace validation_layer ze_device_handle_t hDevice, ///< [in] handle of the device object ze_device_handle_t* phRootDevice ///< [in,out] parent root device. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceGetRootDevice("; @@ -336,6 +384,10 @@ namespace validation_layer ///< if count is less than the number of sub-devices available, then driver ///< shall only retrieve that number of sub-devices. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceGetSubDevices("; @@ -360,6 +412,10 @@ namespace validation_layer ze_device_handle_t hDevice, ///< [in] handle of the device ze_device_properties_t* pDeviceProperties ///< [in,out] query result for device properties ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceGetProperties("; @@ -380,6 +436,10 @@ namespace validation_layer ze_device_handle_t hDevice, ///< [in] handle of the device ze_device_compute_properties_t* pComputeProperties ///< [in,out] query result for compute properties ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceGetComputeProperties("; @@ -400,6 +460,10 @@ namespace validation_layer ze_device_handle_t hDevice, ///< [in] handle of the device ze_device_module_properties_t* pModuleProperties///< [in,out] query result for module properties ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceGetModuleProperties("; @@ -434,6 +498,10 @@ namespace validation_layer ///< The order of properties in the array corresponds to the command queue ///< group ordinal. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceGetCommandQueueGroupProperties("; @@ -467,6 +535,10 @@ namespace validation_layer ///< if count is less than the number of memory properties available, then ///< driver shall only retrieve that number of memory properties. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceGetMemoryProperties("; @@ -491,6 +563,10 @@ namespace validation_layer ze_device_handle_t hDevice, ///< [in] handle of the device ze_device_memory_access_properties_t* pMemAccessProperties ///< [in,out] query result for memory access properties ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceGetMemoryAccessProperties("; @@ -519,6 +595,10 @@ namespace validation_layer ///< if count is less than the number of cache properties available, then ///< driver shall only retrieve that number of cache properties. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceGetCacheProperties("; @@ -543,6 +623,10 @@ namespace validation_layer ze_device_handle_t hDevice, ///< [in] handle of the device ze_device_image_properties_t* pImageProperties ///< [in,out] query result for image properties ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceGetImageProperties("; @@ -563,6 +647,10 @@ namespace validation_layer ze_device_handle_t hDevice, ///< [in] handle of the device ze_device_external_memory_properties_t* pExternalMemoryProperties ///< [in,out] query result for external memory properties ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceGetExternalMemoryProperties("; @@ -584,6 +672,10 @@ namespace validation_layer ze_device_handle_t hPeerDevice, ///< [in] handle of the peer device with the allocation ze_device_p2p_properties_t* pP2PProperties ///< [in,out] Peer-to-Peer properties between source and peer device ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceGetP2PProperties("; @@ -609,6 +701,10 @@ namespace validation_layer ze_device_handle_t hPeerDevice, ///< [in] handle of the peer device with the allocation ze_bool_t* value ///< [out] returned access capability ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceCanAccessPeer("; @@ -637,6 +733,10 @@ namespace validation_layer ze_result_t result, ze_device_handle_t hDevice ///< [in] handle of the device ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceGetStatus("; @@ -656,6 +756,10 @@ namespace validation_layer uint64_t* deviceTimestamp ///< [out] value of the Device's global timestamp that correlates with the ///< Host's global timestamp value. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceGetGlobalTimestamps("; @@ -689,6 +793,10 @@ namespace validation_layer ze_result_t result, ze_device_handle_t hDevice ///< [in] handle of the device ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceSynchronize("; @@ -705,6 +813,10 @@ namespace validation_layer ze_device_handle_t hDevice, ///< [in] handle of the device uint32_t* incrementValue ///< [out] increment value that can be used for Event creation ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceGetAggregatedCopyOffloadIncrementValue("; @@ -731,6 +843,10 @@ namespace validation_layer const ze_context_desc_t* desc, ///< [in] pointer to context descriptor ze_context_handle_t* phContext ///< [out] pointer to handle of context object created ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeContextCreate("; @@ -771,6 +887,10 @@ namespace validation_layer ///< devices in this array. ze_context_handle_t* phContext ///< [out] pointer to handle of context object created ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeContextCreateEx("; @@ -807,6 +927,10 @@ namespace validation_layer ze_result_t result, ze_context_handle_t hContext ///< [in][release] handle of context object to destroy ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeContextDestroy("; @@ -822,6 +946,10 @@ namespace validation_layer ze_result_t result, ze_context_handle_t hContext ///< [in] handle of context object ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeContextGetStatus("; @@ -840,6 +968,10 @@ namespace validation_layer const ze_command_queue_desc_t* desc, ///< [in] pointer to command queue descriptor ze_command_queue_handle_t* phCommandQueue ///< [out] pointer to handle of command queue object created ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandQueueCreate("; @@ -872,6 +1004,10 @@ namespace validation_layer ze_result_t result, ze_command_queue_handle_t hCommandQueue ///< [in][release] handle of command queue object to destroy ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandQueueDestroy("; @@ -891,6 +1027,10 @@ namespace validation_layer ///< to execute ze_fence_handle_t hFence ///< [in][optional] handle of the fence to signal on completion ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandQueueExecuteCommandLists("; @@ -925,6 +1065,10 @@ namespace validation_layer ///< Due to external dependencies, timeout may be rounded to the closest ///< value allowed by the accuracy of those dependencies. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandQueueSynchronize("; @@ -945,6 +1089,10 @@ namespace validation_layer ze_command_queue_handle_t hCommandQueue, ///< [in] handle of the command queue uint32_t* pOrdinal ///< [out] command queue group ordinal ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandQueueGetOrdinal("; @@ -970,6 +1118,10 @@ namespace validation_layer ze_command_queue_handle_t hCommandQueue, ///< [in] handle of the command queue uint32_t* pIndex ///< [out] command queue index within the group ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandQueueGetIndex("; @@ -997,6 +1149,10 @@ namespace validation_layer const ze_command_list_desc_t* desc, ///< [in] pointer to command list descriptor ze_command_list_handle_t* phCommandList ///< [out] pointer to handle of command list object created ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListCreate("; @@ -1032,6 +1188,10 @@ namespace validation_layer const ze_command_queue_desc_t* altdesc, ///< [in] pointer to command queue descriptor ze_command_list_handle_t* phCommandList ///< [out] pointer to handle of command list object created ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListCreateImmediate("; @@ -1064,6 +1224,10 @@ namespace validation_layer ze_result_t result, ze_command_list_handle_t hCommandList ///< [in][release] handle of command list object to destroy ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListDestroy("; @@ -1079,6 +1243,10 @@ namespace validation_layer ze_result_t result, ze_command_list_handle_t hCommandList ///< [in] handle of command list object to close ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListClose("; @@ -1094,6 +1262,10 @@ namespace validation_layer ze_result_t result, ze_command_list_handle_t hCommandList ///< [in] handle of command list object to reset ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListReset("; @@ -1116,6 +1288,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before executing query ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendWriteGlobalTimestamp("; @@ -1154,6 +1330,10 @@ namespace validation_layer ///< Due to external dependencies, timeout may be rounded to the closest ///< value allowed by the accuracy of those dependencies. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListHostSynchronize("; @@ -1174,6 +1354,10 @@ namespace validation_layer ze_command_list_handle_t hCommandList, ///< [in] handle of the command list ze_device_handle_t* phDevice ///< [out] handle of the device on which the command list was created ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListGetDeviceHandle("; @@ -1199,6 +1383,10 @@ namespace validation_layer ze_command_list_handle_t hCommandList, ///< [in] handle of the command list ze_context_handle_t* phContext ///< [out] handle of the context on which the command list was created ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListGetContextHandle("; @@ -1224,6 +1412,10 @@ namespace validation_layer ze_command_list_handle_t hCommandList, ///< [in] handle of the command list uint32_t* pOrdinal ///< [out] command queue group ordinal to which command list is submitted ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListGetOrdinal("; @@ -1250,6 +1442,10 @@ namespace validation_layer uint32_t* pIndex ///< [out] command queue index within the group to which the immediate ///< command list is submitted ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListImmediateGetIndex("; @@ -1276,6 +1472,10 @@ namespace validation_layer ze_bool_t* pIsImmediate ///< [out] Boolean indicating whether the command list is an immediate ///< command list (true) or not (false) ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListIsImmediate("; @@ -1305,6 +1505,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before executing barrier ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendBarrier("; @@ -1340,6 +1544,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before executing barrier ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendMemoryRangesBarrier("; @@ -1380,6 +1588,10 @@ namespace validation_layer ze_context_handle_t hContext, ///< [in] handle of context object ze_device_handle_t hDevice ///< [in] handle of the device ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeContextSystemBarrier("; @@ -1407,6 +1619,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before launching ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendMemoryCopy("; @@ -1455,6 +1671,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before launching ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendMemoryFill("; @@ -1515,6 +1735,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before launching ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendMemoryCopyRegion("; @@ -1583,6 +1807,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before launching ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendMemoryCopyFromContext("; @@ -1633,6 +1861,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before launching ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendImageCopy("; @@ -1677,6 +1909,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before launching ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendImageCopyRegion("; @@ -1728,6 +1964,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before launching ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendImageCopyToMemory("; @@ -1775,6 +2015,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before launching ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendImageCopyFromMemory("; @@ -1816,6 +2060,10 @@ namespace validation_layer const void* ptr, ///< [in] pointer to start of the memory range to prefetch size_t size ///< [in] size in bytes of the memory range to prefetch ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendMemoryPrefetch("; @@ -1843,6 +2091,10 @@ namespace validation_layer size_t size, ///< [in] Size in bytes of the memory range ze_memory_advice_t advice ///< [in] Memory advice for the memory range ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendMemAdvise("; @@ -1882,6 +2134,10 @@ namespace validation_layer ///< driver instance. ze_event_pool_handle_t* phEventPool ///< [out] pointer handle of event pool object created ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventPoolCreate("; @@ -1918,6 +2174,10 @@ namespace validation_layer ze_result_t result, ze_event_pool_handle_t hEventPool ///< [in][release] handle of event pool object to destroy ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventPoolDestroy("; @@ -1935,6 +2195,10 @@ namespace validation_layer const ze_event_desc_t* desc, ///< [in] pointer to event descriptor ze_event_handle_t* phEvent ///< [out] pointer to handle of event object created ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventCreate("; @@ -1966,6 +2230,10 @@ namespace validation_layer const ze_event_counter_based_desc_t* desc, ///< [in] pointer to counter based event descriptor ze_event_handle_t* phEvent ///< [out] pointer to handle of event object created ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventCounterBasedCreate("; @@ -1998,6 +2266,10 @@ namespace validation_layer ze_result_t result, ze_event_handle_t hEvent ///< [in][release] handle of event object to destroy ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventDestroy("; @@ -2014,6 +2286,10 @@ namespace validation_layer ze_event_pool_handle_t hEventPool, ///< [in] handle of event pool object ze_ipc_event_pool_handle_t* phIpc ///< [out] Returned IPC event handle ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventPoolGetIpcHandle("; @@ -2040,6 +2316,10 @@ namespace validation_layer ///< handle ze_ipc_event_pool_handle_t hIpc ///< [in] IPC event pool handle ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventPoolPutIpcHandle("; @@ -2062,6 +2342,10 @@ namespace validation_layer ze_ipc_event_pool_handle_t hIpc, ///< [in] IPC event pool handle ze_event_pool_handle_t* phEventPool ///< [out] pointer handle of event pool object created ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventPoolOpenIpcHandle("; @@ -2090,6 +2374,10 @@ namespace validation_layer ze_result_t result, ze_event_pool_handle_t hEventPool ///< [in][release] handle of event pool object ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventPoolCloseIpcHandle("; @@ -2106,6 +2394,10 @@ namespace validation_layer ze_event_handle_t hEvent, ///< [in] handle of event object ze_ipc_event_counter_based_handle_t* phIpc ///< [out] Returned IPC event handle ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventCounterBasedGetIpcHandle("; @@ -2133,6 +2425,10 @@ namespace validation_layer ze_ipc_event_counter_based_handle_t hIpc, ///< [in] IPC event handle ze_event_handle_t* phEvent ///< [out] pointer handle of event object created ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventCounterBasedOpenIpcHandle("; @@ -2161,6 +2457,10 @@ namespace validation_layer ze_result_t result, ze_event_handle_t hEvent ///< [in][release] handle of event object ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventCounterBasedCloseIpcHandle("; @@ -2178,6 +2478,10 @@ namespace validation_layer uint64_t* completionValue, ///< [in][out] completion value uint64_t* deviceAddress ///< [in][out] counter device address ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventCounterBasedGetDeviceAddress("; @@ -2212,6 +2516,10 @@ namespace validation_layer ze_command_list_handle_t hCommandList, ///< [in] handle of the command list ze_event_handle_t hEvent ///< [in] handle of the event ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendSignalEvent("; @@ -2234,6 +2542,10 @@ namespace validation_layer ze_event_handle_t* phEvents ///< [in][range(0, numEvents)] handles of the events to wait on before ///< continuing ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendWaitOnEvents("; @@ -2257,6 +2569,10 @@ namespace validation_layer ze_result_t result, ze_event_handle_t hEvent ///< [in] handle of the event ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventHostSignal("; @@ -2279,6 +2595,10 @@ namespace validation_layer ///< Due to external dependencies, timeout may be rounded to the closest ///< value allowed by the accuracy of those dependencies. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventHostSynchronize("; @@ -2298,6 +2618,10 @@ namespace validation_layer ze_result_t result, ze_event_handle_t hEvent ///< [in] handle of the event ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventQueryStatus("; @@ -2314,6 +2638,10 @@ namespace validation_layer ze_command_list_handle_t hCommandList, ///< [in] handle of the command list ze_event_handle_t hEvent ///< [in] handle of the event ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendEventReset("; @@ -2333,6 +2661,10 @@ namespace validation_layer ze_result_t result, ze_event_handle_t hEvent ///< [in] handle of the event ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventHostReset("; @@ -2349,6 +2681,10 @@ namespace validation_layer ze_event_handle_t hEvent, ///< [in] handle of the event ze_kernel_timestamp_result_t* dstptr ///< [in,out] pointer to memory for where timestamp result will be written. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventQueryKernelTimestamp("; @@ -2380,6 +2716,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before executing query ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendQueryKernelTimestamps("; @@ -2424,6 +2764,10 @@ namespace validation_layer ze_event_handle_t hEvent, ///< [in] handle of the event ze_event_pool_handle_t* phEventPool ///< [out] handle of the event pool for the event ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventGetEventPool("; @@ -2451,6 +2795,10 @@ namespace validation_layer ///< hierarchies that are flushed on a signal action before the event is ///< triggered. May be 0 or a valid combination of ::ze_event_scope_flag_t. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventGetSignalScope("; @@ -2478,6 +2826,10 @@ namespace validation_layer ///< hierarchies invalidated on a wait action after the event is complete. ///< May be 0 or a valid combination of ::ze_event_scope_flag_t. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventGetWaitScope("; @@ -2503,6 +2855,10 @@ namespace validation_layer ze_event_pool_handle_t hEventPool, ///< [in] handle of the event pool ze_context_handle_t* phContext ///< [out] handle of the context on which the event pool was created ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventPoolGetContextHandle("; @@ -2529,6 +2885,10 @@ namespace validation_layer ze_event_pool_flags_t* pFlags ///< [out] creation flags used to create the event pool; may be 0 or a ///< valid combination of ::ze_event_pool_flag_t ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventPoolGetFlags("; @@ -2555,6 +2915,10 @@ namespace validation_layer const ze_fence_desc_t* desc, ///< [in] pointer to fence descriptor ze_fence_handle_t* phFence ///< [out] pointer to handle of fence object created ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeFenceCreate("; @@ -2583,6 +2947,10 @@ namespace validation_layer ze_result_t result, ze_fence_handle_t hFence ///< [in][release] handle of fence object to destroy ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeFenceDestroy("; @@ -2605,6 +2973,10 @@ namespace validation_layer ///< Due to external dependencies, timeout may be rounded to the closest ///< value allowed by the accuracy of those dependencies. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeFenceHostSynchronize("; @@ -2624,6 +2996,10 @@ namespace validation_layer ze_result_t result, ze_fence_handle_t hFence ///< [in] handle of the fence ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeFenceQueryStatus("; @@ -2639,6 +3015,10 @@ namespace validation_layer ze_result_t result, ze_fence_handle_t hFence ///< [in] handle of the fence ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeFenceReset("; @@ -2656,6 +3036,10 @@ namespace validation_layer const ze_image_desc_t* desc, ///< [in] pointer to image descriptor ze_image_properties_t* pImageProperties ///< [out] pointer to image properties ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeImageGetProperties("; @@ -2687,6 +3071,10 @@ namespace validation_layer const ze_image_desc_t* desc, ///< [in] pointer to image descriptor ze_image_handle_t* phImage ///< [out] pointer to handle of image object created ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeImageCreate("; @@ -2719,6 +3107,10 @@ namespace validation_layer ze_result_t result, ze_image_handle_t hImage ///< [in][release] handle of image object to destroy ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeImageDestroy("; @@ -2742,6 +3134,10 @@ namespace validation_layer ze_device_handle_t hDevice, ///< [in][optional] device handle to associate with void** pptr ///< [out] pointer to shared allocation ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeMemAllocShared("; @@ -2793,6 +3189,10 @@ namespace validation_layer ze_device_handle_t hDevice, ///< [in] handle of the device void** pptr ///< [out] pointer to device allocation ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeMemAllocDevice("; @@ -2839,6 +3239,10 @@ namespace validation_layer ///< two void** pptr ///< [out] pointer to host allocation ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeMemAllocHost("; @@ -2876,6 +3280,10 @@ namespace validation_layer ze_context_handle_t hContext, ///< [in] handle of the context object void* ptr ///< [in][release] pointer to memory to free ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeMemFree("; @@ -2898,6 +3306,10 @@ namespace validation_layer ze_memory_allocation_properties_t* pMemAllocProperties, ///< [in,out] query result for memory allocation properties ze_device_handle_t* phDevice ///< [out][optional] device associated with this allocation ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeMemGetAllocProperties("; @@ -2933,6 +3345,10 @@ namespace validation_layer void** pBase, ///< [in,out][optional] base address of the allocation size_t* pSize ///< [in,out][optional] size of the allocation ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeMemGetAddressRange("; @@ -2962,6 +3378,10 @@ namespace validation_layer const void* ptr, ///< [in] pointer to the device memory allocation ze_ipc_mem_handle_t* pIpcHandle ///< [out] Returned IPC memory handle ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeMemGetIpcHandle("; @@ -2992,6 +3412,10 @@ namespace validation_layer uint64_t handle, ///< [in] file descriptor ze_ipc_mem_handle_t* pIpcHandle ///< [out] Returned IPC memory handle ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeMemGetIpcHandleFromFileDescriptorExp("; @@ -3022,6 +3446,10 @@ namespace validation_layer ze_ipc_mem_handle_t ipcHandle, ///< [in] IPC memory handle uint64_t* pHandle ///< [out] Returned file descriptor ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeMemGetFileDescriptorFromIpcHandleExp("; @@ -3051,6 +3479,10 @@ namespace validation_layer ze_context_handle_t hContext, ///< [in] handle of the context object ze_ipc_mem_handle_t handle ///< [in] IPC memory handle ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeMemPutIpcHandle("; @@ -3075,6 +3507,10 @@ namespace validation_layer ///< must be 0 (default) or a valid combination of ::ze_ipc_memory_flag_t. void** pptr ///< [out] pointer to device allocation in this process ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeMemOpenIpcHandle("; @@ -3112,6 +3548,10 @@ namespace validation_layer ze_context_handle_t hContext, ///< [in] handle of the context object const void* ptr ///< [in][release] pointer to device allocation in this process ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeMemCloseIpcHandle("; @@ -3136,6 +3576,10 @@ namespace validation_layer ze_memory_atomic_attr_exp_flags_t attr ///< [in] Atomic access attributes to set for the specified range. ///< Must be 0 (default) or a valid combination of ::ze_memory_atomic_attr_exp_flag_t. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeMemSetAtomicAccessAttributeExp("; @@ -3171,6 +3615,10 @@ namespace validation_layer size_t size, ///< [in] Size in bytes of the memory range ze_memory_atomic_attr_exp_flags_t* pAttr ///< [out] Atomic access attributes for the specified range ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeMemGetAtomicAccessAttributeExp("; @@ -3211,6 +3659,10 @@ namespace validation_layer ze_module_handle_t* phModule, ///< [out] pointer to handle of module object created ze_module_build_log_handle_t* phBuildLog ///< [out][optional] pointer to handle of module's build log. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeModuleCreate("; @@ -3252,6 +3704,10 @@ namespace validation_layer ze_result_t result, ze_module_handle_t hModule ///< [in][release] handle of the module ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeModuleDestroy("; @@ -3270,6 +3726,10 @@ namespace validation_layer ///< dynamically link together. ze_module_build_log_handle_t* phLinkLog ///< [out][optional] pointer to handle of dynamic link log. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeModuleDynamicLink("; @@ -3298,6 +3758,10 @@ namespace validation_layer ze_result_t result, ze_module_build_log_handle_t hModuleBuildLog ///< [in][release] handle of the module build log object. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeModuleBuildLogDestroy("; @@ -3315,6 +3779,10 @@ namespace validation_layer size_t* pSize, ///< [in,out] size of build log string. char* pBuildLog ///< [in,out][optional] pointer to null-terminated string of the log. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeModuleBuildLogGetString("; @@ -3340,6 +3808,10 @@ namespace validation_layer size_t* pSize, ///< [in,out] size of native binary in bytes. uint8_t* pModuleNativeBinary ///< [in,out][optional] byte pointer to native binary ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeModuleGetNativeBinary("; @@ -3366,6 +3838,10 @@ namespace validation_layer size_t* pSize, ///< [in,out][optional] size of global variable void** pptr ///< [in,out][optional] device visible pointer ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeModuleGetGlobalPointer("; @@ -3401,6 +3877,10 @@ namespace validation_layer ///< if count is less than the number of names available, then driver shall ///< only retrieve that number of names. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeModuleGetKernelNames("; @@ -3425,6 +3905,10 @@ namespace validation_layer ze_module_handle_t hModule, ///< [in] handle of the module ze_module_properties_t* pModuleProperties ///< [in,out] query result for module properties. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeModuleGetProperties("; @@ -3446,6 +3930,10 @@ namespace validation_layer const ze_kernel_desc_t* desc, ///< [in] pointer to kernel descriptor ze_kernel_handle_t* phKernel ///< [out] handle of the Function object ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeKernelCreate("; @@ -3474,6 +3962,10 @@ namespace validation_layer ze_result_t result, ze_kernel_handle_t hKernel ///< [in][release] handle of the kernel object ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeKernelDestroy("; @@ -3491,6 +3983,10 @@ namespace validation_layer const char* pFunctionName, ///< [in] Name of function to retrieve function pointer for. void** pfnFunction ///< [out] pointer to function. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeModuleGetFunctionPointer("; @@ -3522,6 +4018,10 @@ namespace validation_layer uint32_t groupSizeY, ///< [in] group size for Y dimension to use for this kernel uint32_t groupSizeZ ///< [in] group size for Z dimension to use for this kernel ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeKernelSetGroupSize("; @@ -3555,6 +4055,10 @@ namespace validation_layer uint32_t* groupSizeY, ///< [out] recommended size of group for Y dimension uint32_t* groupSizeZ ///< [out] recommended size of group for Z dimension ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeKernelSuggestGroupSize("; @@ -3610,6 +4114,10 @@ namespace validation_layer ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object uint32_t* totalGroupCount ///< [out] recommended total group count. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeKernelSuggestMaxCooperativeGroupCount("; @@ -3638,6 +4146,10 @@ namespace validation_layer const void* pArgValue ///< [in][optional] argument value represented as matching arg type. If ///< null then argument value is considered null. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeKernelSetArgumentValue("; @@ -3666,6 +4178,10 @@ namespace validation_layer ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object ze_kernel_indirect_access_flags_t flags ///< [in] kernel indirect access flags ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeKernelSetIndirectAccess("; @@ -3686,6 +4202,10 @@ namespace validation_layer ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object ze_kernel_indirect_access_flags_t* pFlags ///< [out] query result for kernel indirect access flags. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeKernelGetIndirectAccess("; @@ -3723,6 +4243,10 @@ namespace validation_layer ///< compatible reasons. It can be corrected in v2.0. Suggestion is to ///< create your own char *pString and then pass to this API with &pString. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeKernelGetSourceAttributes("; @@ -3748,6 +4272,10 @@ namespace validation_layer ze_cache_config_flags_t flags ///< [in] cache configuration. ///< must be 0 (default configuration) or a valid combination of ::ze_cache_config_flag_t. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeKernelSetCacheConfig("; @@ -3768,6 +4296,10 @@ namespace validation_layer ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object ze_kernel_properties_t* pKernelProperties ///< [in,out] query result for kernel properties. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeKernelGetProperties("; @@ -3790,6 +4322,10 @@ namespace validation_layer ///< bytes. char* pName ///< [in,out][optional] char pointer to kernel name. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeKernelGetName("; @@ -3820,6 +4356,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before launching ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendLaunchKernel("; @@ -3863,6 +4403,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before launching ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendLaunchKernelWithParameters("; @@ -3912,6 +4456,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before launching ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendLaunchKernelWithArguments("; @@ -3966,6 +4514,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before launching ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendLaunchCooperativeKernel("; @@ -4009,6 +4561,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before launching ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendLaunchKernelIndirect("; @@ -4056,6 +4612,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before launching ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendLaunchMultipleKernelsIndirect("; @@ -4102,6 +4662,10 @@ namespace validation_layer void* ptr, ///< [in] pointer to memory to make resident size_t size ///< [in] size in bytes to make resident ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeContextMakeMemoryResident("; @@ -4132,6 +4696,10 @@ namespace validation_layer void* ptr, ///< [in] pointer to memory to evict size_t size ///< [in] size in bytes to evict ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeContextEvictMemory("; @@ -4161,6 +4729,10 @@ namespace validation_layer ze_device_handle_t hDevice, ///< [in] handle of the device ze_image_handle_t hImage ///< [in] handle of image to make resident ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeContextMakeImageResident("; @@ -4186,6 +4758,10 @@ namespace validation_layer ze_device_handle_t hDevice, ///< [in] handle of the device ze_image_handle_t hImage ///< [in] handle of image to make evict ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeContextEvictImage("; @@ -4212,6 +4788,10 @@ namespace validation_layer const ze_sampler_desc_t* desc, ///< [in] pointer to sampler descriptor ze_sampler_handle_t* phSampler ///< [out] handle of the sampler ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeSamplerCreate("; @@ -4244,6 +4824,10 @@ namespace validation_layer ze_result_t result, ze_sampler_handle_t hSampler ///< [in][release] handle of the sampler ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeSamplerDestroy("; @@ -4263,6 +4847,10 @@ namespace validation_layer size_t size, ///< [in] size in bytes to reserve; must be page aligned. void** pptr ///< [out] pointer to virtual reservation. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeVirtualMemReserve("; @@ -4297,6 +4885,10 @@ namespace validation_layer const void* ptr, ///< [in] pointer to start of region to free. size_t size ///< [in] size in bytes to free; must be page aligned. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeVirtualMemFree("; @@ -4324,6 +4916,10 @@ namespace validation_layer size_t* pagesize ///< [out] pointer to page size to use for start address and size ///< alignments. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeVirtualMemQueryPageSize("; @@ -4358,6 +4954,10 @@ namespace validation_layer ze_physical_mem_handle_t hPhysicalMem, ///< [in] handle of the physical memory object ze_physical_mem_properties_t* pMemProperties ///< [in,out] pointer to physical memory properties structure. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zePhysicalMemGetProperties("; @@ -4385,6 +4985,10 @@ namespace validation_layer ze_physical_mem_desc_t* desc, ///< [in] pointer to physical memory descriptor. ze_physical_mem_handle_t* phPhysicalMemory ///< [out] pointer to handle of physical memory object created ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zePhysicalMemCreate("; @@ -4418,6 +5022,10 @@ namespace validation_layer ze_context_handle_t hContext, ///< [in] handle of the context object ze_physical_mem_handle_t hPhysicalMemory ///< [in][release] handle of physical memory object to destroy ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zePhysicalMemDestroy("; @@ -4445,6 +5053,10 @@ namespace validation_layer ze_memory_access_attribute_t access ///< [in] specifies page access attributes to apply to the virtual address ///< range. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeVirtualMemMap("; @@ -4482,6 +5094,10 @@ namespace validation_layer const void* ptr, ///< [in] pointer to start of region to unmap. size_t size ///< [in] size in bytes to unmap; must be page aligned. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeVirtualMemUnmap("; @@ -4509,6 +5125,10 @@ namespace validation_layer ze_memory_access_attribute_t access ///< [in] specifies page access attributes to apply to the virtual address ///< range. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeVirtualMemSetAccessAttribute("; @@ -4541,6 +5161,10 @@ namespace validation_layer size_t* outSize ///< [out] query result for size of virtual address range, starting at ptr, ///< that shares same access attribute. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeVirtualMemGetAccessAttribute("; @@ -4585,6 +5209,10 @@ namespace validation_layer uint32_t offsetY, ///< [in] global offset for Y dimension to use for this kernel uint32_t offsetZ ///< [in] global offset for Z dimension to use for this kernel ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeKernelSetGlobalOffsetExp("; @@ -4614,6 +5242,10 @@ namespace validation_layer size_t* pSize, ///< [in,out] pointer to variable with size of GEN ISA binary. uint8_t* pKernelBinary ///< [in,out] pointer to storage area for GEN ISA binary function. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeKernelGetBinaryExp("; @@ -4639,6 +5271,10 @@ namespace validation_layer const ze_external_semaphore_ext_desc_t* desc, ///< [in] The pointer to external semaphore descriptor. ze_external_semaphore_ext_handle_t* phSemaphore ///< [out] The handle of the external semaphore imported. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceImportExternalSemaphoreExt("; @@ -4667,6 +5303,10 @@ namespace validation_layer ze_result_t result, ze_external_semaphore_ext_handle_t hSemaphore ///< [in] The handle of the external semaphore. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceReleaseExternalSemaphoreExt("; @@ -4692,6 +5332,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before launching ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendSignalExternalSemaphoreExt("; @@ -4741,6 +5385,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before launching ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendWaitExternalSemaphoreExt("; @@ -4782,6 +5430,10 @@ namespace validation_layer const ze_rtas_builder_ext_desc_t* pDescriptor, ///< [in] pointer to builder descriptor ze_rtas_builder_ext_handle_t* phBuilder ///< [out] handle of builder object ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeRTASBuilderCreateExt("; @@ -4812,6 +5464,10 @@ namespace validation_layer const ze_rtas_builder_build_op_ext_desc_t* pBuildOpDescriptor, ///< [in] pointer to build operation descriptor ze_rtas_builder_ext_properties_t* pProperties ///< [in,out] query result for builder properties ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeRTASBuilderGetBuildPropertiesExt("; @@ -4837,6 +5493,10 @@ namespace validation_layer ze_rtas_format_ext_t rtasFormatA, ///< [in] operand A ze_rtas_format_ext_t rtasFormatB ///< [in] operand B ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDriverRTASFormatCompatibilityCheckExt("; @@ -4872,6 +5532,10 @@ namespace validation_layer size_t* pRtasBufferSizeBytes ///< [out][optional] updated acceleration structure size requirement, in ///< bytes ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeRTASBuilderBuildExt("; @@ -4938,6 +5602,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before launching ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeRTASBuilderCommandListAppendCopyExt("; @@ -4977,6 +5645,10 @@ namespace validation_layer ze_result_t result, ze_rtas_builder_ext_handle_t hBuilder ///< [in][release] handle of builder object to destroy ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeRTASBuilderDestroyExt("; @@ -4993,6 +5665,10 @@ namespace validation_layer ze_driver_handle_t hDriver, ///< [in] handle of driver object ze_rtas_parallel_operation_ext_handle_t* phParallelOperation///< [out] handle of parallel operation object ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeRTASParallelOperationCreateExt("; @@ -5018,6 +5694,10 @@ namespace validation_layer ze_rtas_parallel_operation_ext_handle_t hParallelOperation, ///< [in] handle of parallel operation object ze_rtas_parallel_operation_ext_properties_t* pProperties///< [in,out] query result for parallel operation properties ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeRTASParallelOperationGetPropertiesExt("; @@ -5037,6 +5717,10 @@ namespace validation_layer ze_result_t result, ze_rtas_parallel_operation_ext_handle_t hParallelOperation ///< [in] handle of parallel operation object ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeRTASParallelOperationJoinExt("; @@ -5052,6 +5736,10 @@ namespace validation_layer ze_result_t result, ze_rtas_parallel_operation_ext_handle_t hParallelOperation ///< [in][release] handle of parallel operation object to destroy ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeRTASParallelOperationDestroyExt("; @@ -5076,6 +5764,10 @@ namespace validation_layer ///< if count is less than the number of properties available, then the ///< driver will return only the number requested. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceGetVectorWidthPropertiesExt("; @@ -5109,6 +5801,10 @@ namespace validation_layer ///< available, then driver shall only retrieve that number of kernel ///< allocation properties. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeKernelGetAllocationPropertiesExp("; @@ -5135,6 +5831,10 @@ namespace validation_layer void* pNext, ///< [in][optional] Pointer to extension-specific structure. ze_ipc_mem_handle_t* pIpcHandle ///< [out] Returned IPC memory handle ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeMemGetIpcHandleWithProperties("; @@ -5172,6 +5872,10 @@ namespace validation_layer size_t cacheReservationSize ///< [in] value for reserving size, in bytes. If zero, then the driver ///< shall remove prior reservation ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceReserveCacheExt("; @@ -5198,6 +5902,10 @@ namespace validation_layer size_t regionSize, ///< [in] region size, in pages ze_cache_ext_region_t cacheRegion ///< [in] reservation region ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceSetCacheAdviceExt("; @@ -5234,6 +5942,10 @@ namespace validation_layer ///< if count is less than the number of timestamps available, then driver ///< shall only retrieve that number of timestamps. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventQueryTimestampsExp("; @@ -5262,6 +5974,10 @@ namespace validation_layer ze_image_handle_t hImage, ///< [in] handle of image object ze_image_memory_properties_exp_t* pMemoryProperties ///< [in,out] query result for image memory properties. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeImageGetMemoryPropertiesExp("; @@ -5285,6 +6001,10 @@ namespace validation_layer ze_image_handle_t hImage, ///< [in] handle of image object to create view from ze_image_handle_t* phImageView ///< [out] pointer to handle of image object created for view ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeImageViewCreateExt("; @@ -5325,6 +6045,10 @@ namespace validation_layer ze_image_handle_t hImage, ///< [in] handle of image object to create view from ze_image_handle_t* phImageView ///< [out] pointer to handle of image object created for view ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeImageViewCreateExp("; @@ -5362,6 +6086,10 @@ namespace validation_layer ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object ze_scheduling_hint_exp_desc_t* pHint ///< [in] pointer to kernel scheduling hint descriptor ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeKernelSchedulingHintExp("; @@ -5382,6 +6110,10 @@ namespace validation_layer ze_device_handle_t hDevice, ///< [in] handle of the device object. ze_pci_ext_properties_t* pPciProperties ///< [in,out] returns the PCI properties of the device. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDevicePciGetPropertiesExt("; @@ -5413,6 +6145,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before launching ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendImageCopyToMemoryExt("; @@ -5472,6 +6208,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before launching ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListAppendImageCopyFromMemoryExt("; @@ -5521,6 +6261,10 @@ namespace validation_layer ze_image_handle_t hImage, ///< [in] handle of image object to query ze_image_allocation_ext_properties_t* pImageAllocProperties ///< [in,out] query result for image allocation properties ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeImageGetAllocPropertiesExt("; @@ -5549,6 +6293,10 @@ namespace validation_layer ze_module_build_log_handle_t* phLog ///< [out] pointer to handle of linkage inspection log. Log object will ///< contain separate lists of imports, un-resolvable imports, and exports. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeModuleInspectLinkageExt("; @@ -5583,6 +6331,10 @@ namespace validation_layer const ze_memory_free_ext_desc_t* pMemFreeDesc, ///< [in] pointer to memory free descriptor void* ptr ///< [in][release] pointer to memory to free ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeMemFreeExt("; @@ -5615,6 +6367,10 @@ namespace validation_layer ///< if count is less than the number of fabric vertices available, then ///< driver shall only retrieve that number of fabric vertices. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeFabricVertexGetExp("; @@ -5647,6 +6403,10 @@ namespace validation_layer ///< if count is less than the number of sub-vertices available, then ///< driver shall only retrieve that number of sub-vertices. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeFabricVertexGetSubVerticesExp("; @@ -5671,6 +6431,10 @@ namespace validation_layer ze_fabric_vertex_handle_t hVertex, ///< [in] handle of the fabric vertex ze_fabric_vertex_exp_properties_t* pVertexProperties///< [in,out] query result for fabric vertex properties ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeFabricVertexGetPropertiesExp("; @@ -5691,6 +6455,10 @@ namespace validation_layer ze_fabric_vertex_handle_t hVertex, ///< [in] handle of the fabric vertex ze_device_handle_t* phDevice ///< [out] device handle corresponding to fabric vertex ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeFabricVertexGetDeviceExp("; @@ -5716,6 +6484,10 @@ namespace validation_layer ze_device_handle_t hDevice, ///< [in] handle of the device ze_fabric_vertex_handle_t* phVertex ///< [out] fabric vertex handle corresponding to device ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDeviceGetFabricVertexExp("; @@ -5750,6 +6522,10 @@ namespace validation_layer ///< if count is less than the number of fabric edges available, then ///< driver shall only retrieve that number of fabric edges. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeFabricEdgeGetExp("; @@ -5779,6 +6555,10 @@ namespace validation_layer ze_fabric_vertex_handle_t* phVertexA, ///< [out] fabric vertex connected to one end of the given fabric edge. ze_fabric_vertex_handle_t* phVertexB ///< [out] fabric vertex connected to other end of the given fabric edge. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeFabricEdgeGetVerticesExp("; @@ -5813,6 +6593,10 @@ namespace validation_layer ze_fabric_edge_handle_t hEdge, ///< [in] handle of the fabric edge ze_fabric_edge_exp_properties_t* pEdgeProperties///< [in,out] query result for fabric edge properties ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeFabricEdgeGetPropertiesExp("; @@ -5848,6 +6632,10 @@ namespace validation_layer ///< - if `*pCount` is greater than the number of event packets ///< available, the driver may only update the valid elements. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeEventQueryKernelTimestampsExt("; @@ -5877,6 +6665,10 @@ namespace validation_layer const ze_rtas_builder_exp_desc_t* pDescriptor, ///< [in] pointer to builder descriptor ze_rtas_builder_exp_handle_t* phBuilder ///< [out] handle of builder object ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeRTASBuilderCreateExp("; @@ -5907,6 +6699,10 @@ namespace validation_layer const ze_rtas_builder_build_op_exp_desc_t* pBuildOpDescriptor, ///< [in] pointer to build operation descriptor ze_rtas_builder_exp_properties_t* pProperties ///< [in,out] query result for builder properties ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeRTASBuilderGetBuildPropertiesExp("; @@ -5932,6 +6728,10 @@ namespace validation_layer ze_rtas_format_exp_t rtasFormatA, ///< [in] operand A ze_rtas_format_exp_t rtasFormatB ///< [in] operand B ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeDriverRTASFormatCompatibilityCheckExp("; @@ -5967,6 +6767,10 @@ namespace validation_layer size_t* pRtasBufferSizeBytes ///< [out][optional] updated acceleration structure size requirement, in ///< bytes ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeRTASBuilderBuildExp("; @@ -6023,6 +6827,10 @@ namespace validation_layer ze_result_t result, ze_rtas_builder_exp_handle_t hBuilder ///< [in][release] handle of builder object to destroy ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeRTASBuilderDestroyExp("; @@ -6039,6 +6847,10 @@ namespace validation_layer ze_driver_handle_t hDriver, ///< [in] handle of driver object ze_rtas_parallel_operation_exp_handle_t* phParallelOperation///< [out] handle of parallel operation object ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeRTASParallelOperationCreateExp("; @@ -6064,6 +6876,10 @@ namespace validation_layer ze_rtas_parallel_operation_exp_handle_t hParallelOperation, ///< [in] handle of parallel operation object ze_rtas_parallel_operation_exp_properties_t* pProperties///< [in,out] query result for parallel operation properties ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeRTASParallelOperationGetPropertiesExp("; @@ -6083,6 +6899,10 @@ namespace validation_layer ze_result_t result, ze_rtas_parallel_operation_exp_handle_t hParallelOperation ///< [in] handle of parallel operation object ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeRTASParallelOperationJoinExp("; @@ -6098,6 +6918,10 @@ namespace validation_layer ze_result_t result, ze_rtas_parallel_operation_exp_handle_t hParallelOperation ///< [in][release] handle of parallel operation object to destroy ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeRTASParallelOperationDestroyExp("; @@ -6118,6 +6942,10 @@ namespace validation_layer unsigned int elementSizeInBytes, ///< [in] Element size in bytes size_t * rowPitch ///< [out] rowPitch ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeMemGetPitchFor2dImage("; @@ -6159,6 +6987,10 @@ namespace validation_layer ze_image_handle_t hImage, ///< [in] handle of the image uint64_t* pDeviceOffset ///< [out] bindless device offset for image ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeImageGetDeviceOffsetExp("; @@ -6184,6 +7016,10 @@ namespace validation_layer ze_command_list_handle_t hCommandList, ///< [in] handle to source command list (the command list to clone) ze_command_list_handle_t* phClonedCommandList ///< [out] pointer to handle of the cloned command list ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListCreateCloneExp("; @@ -6219,6 +7055,10 @@ namespace validation_layer ///< - if not null, all wait events must be satisfied prior to the start ///< of any appended command list(s) ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListImmediateAppendCommandListsExp("; @@ -6256,6 +7096,10 @@ namespace validation_layer const ze_mutable_command_id_exp_desc_t* desc, ///< [in] pointer to mutable command identifier descriptor uint64_t* pCommandId ///< [out] pointer to mutable command identifier to be written ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListGetNextCommandIdExp("; @@ -6290,6 +7134,10 @@ namespace validation_layer ///< call uint64_t* pCommandId ///< [out] pointer to mutable command identifier to be written ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListGetNextCommandIdWithKernelsExp("; @@ -6333,6 +7181,10 @@ namespace validation_layer const ze_mutable_commands_exp_desc_t* desc ///< [in] pointer to mutable commands descriptor; multiple descriptors may ///< be chained via `pNext` member ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListUpdateMutableCommandsExp("; @@ -6354,6 +7206,10 @@ namespace validation_layer uint64_t commandId, ///< [in] command identifier ze_event_handle_t hSignalEvent ///< [in][optional] handle of the event to signal on completion ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListUpdateMutableCommandSignalEventExp("; @@ -6381,6 +7237,10 @@ namespace validation_layer ze_event_handle_t* phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait ///< on before launching ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListUpdateMutableCommandWaitEventsExp("; @@ -6412,6 +7272,10 @@ namespace validation_layer ze_kernel_handle_t* phKernels ///< [in][range(0, numKernels)] handle of the kernel for a command ///< identifier to switch to ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zeCommandListUpdateMutableCommandKernelsExp("; @@ -6443,6 +7307,10 @@ namespace validation_layer const void* desc, ze_event_handle_t* phEvent ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zexCounterBasedEventCreate2(" diff --git a/source/layers/validation/ze_validation_layer.cpp b/source/layers/validation/ze_validation_layer.cpp index ce60431f..cff427c6 100644 --- a/source/layers/validation/ze_validation_layer.cpp +++ b/source/layers/validation/ze_validation_layer.cpp @@ -23,6 +23,7 @@ namespace validation_layer handleLifetime = std::make_unique(); } enableThreadingValidation = getenv_tobool( "ZE_ENABLE_THREADING_VALIDATION" ); + verboseLogging = getenv_tobool( "ZEL_LOADER_LOGGING_ENABLE_SUCCESS_PRINT" ); logger = loader::createLogger(); } diff --git a/source/layers/validation/ze_validation_layer.h b/source/layers/validation/ze_validation_layer.h index 8f50dcdb..6b2cbd0d 100644 --- a/source/layers/validation/ze_validation_layer.h +++ b/source/layers/validation/ze_validation_layer.h @@ -47,6 +47,7 @@ namespace validation_layer bool enableHandleLifetime = false; bool enableThreadingValidation = false; + bool verboseLogging = false; ze_dditable_t zeDdiTable = {}; zet_dditable_t zetDdiTable = {}; diff --git a/source/layers/validation/zer_valddi.cpp b/source/layers/validation/zer_valddi.cpp index 69598095..cc089452 100644 --- a/source/layers/validation/zer_valddi.cpp +++ b/source/layers/validation/zer_valddi.cpp @@ -31,6 +31,10 @@ namespace validation_layer const char** ppString ///< [in,out] pointer to a null-terminated array of characters describing ///< cause of error. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zerGetLastErrorDescription("; @@ -46,6 +50,10 @@ namespace validation_layer ze_result_t result, ze_device_handle_t hDevice ///< [in] handle of the device ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zerTranslateDeviceHandleToIdentifier("; @@ -61,6 +69,10 @@ namespace validation_layer ze_result_t result, uint32_t identifier ///< [in] integer identifier of the device ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zerTranslateIdentifierToDeviceHandle("; @@ -74,6 +86,10 @@ namespace validation_layer } VALIDATION_MAYBE_UNUSED static ze_result_t logAndPropagateResult_zerGetDefaultContext( ze_result_t result) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; context.logger->log_trace(status + " (" + loader::to_string(result) + ") in zerGetDefaultContext()"); return result; diff --git a/source/layers/validation/zes_valddi.cpp b/source/layers/validation/zes_valddi.cpp index 029bbdf9..42c38c3e 100644 --- a/source/layers/validation/zes_valddi.cpp +++ b/source/layers/validation/zes_valddi.cpp @@ -31,6 +31,10 @@ namespace validation_layer zes_init_flags_t flags ///< [in] initialization flags. ///< currently unused, must be 0 (default). ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesInit("; @@ -54,6 +58,10 @@ namespace validation_layer ///< if count is less than the number of sysman drivers available, then the ///< loader shall only retrieve that number of sysman drivers. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDriverGet("; @@ -83,6 +91,10 @@ namespace validation_layer ///< if count is less than the number of extension properties available, ///< then driver shall only retrieve that number of extension properties. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDriverGetExtensionProperties("; @@ -108,6 +120,10 @@ namespace validation_layer const char* name, ///< [in] extension function name void** ppFunctionAddress ///< [out] pointer to function pointer ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDriverGetExtensionFunctionAddress("; @@ -145,6 +161,10 @@ namespace validation_layer ///< if count is less than the number of sysman devices available, then ///< driver shall only retrieve that number of sysman devices. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceGet("; @@ -169,6 +189,10 @@ namespace validation_layer zes_device_handle_t hDevice, ///< [in] Sysman handle of the device. zes_device_properties_t* pProperties ///< [in,out] Structure that will contain information about the device. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceGetProperties("; @@ -189,6 +213,10 @@ namespace validation_layer zes_device_handle_t hDevice, ///< [in] Sysman handle of the device. zes_device_state_t* pState ///< [in,out] Structure that will contain information about the device. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceGetState("; @@ -210,6 +238,10 @@ namespace validation_layer ze_bool_t force ///< [in] If set to true, all applications that are currently using the ///< device will be forcibly killed. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceReset("; @@ -230,6 +262,10 @@ namespace validation_layer zes_device_handle_t hDevice, ///< [in] Sysman handle for the device zes_reset_properties_t* pProperties ///< [in] Device reset properties to apply ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceResetExt("; @@ -259,6 +295,10 @@ namespace validation_layer ///< the device, then the driver shall only retrieve information about that ///< number of processes. In this case, the return code will ::ZE_RESULT_ERROR_INVALID_SIZE. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceProcessesGetState("; @@ -283,6 +323,10 @@ namespace validation_layer zes_device_handle_t hDevice, ///< [in] Sysman handle of the device. zes_pci_properties_t* pProperties ///< [in,out] Will contain the PCI properties. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDevicePciGetProperties("; @@ -303,6 +347,10 @@ namespace validation_layer zes_device_handle_t hDevice, ///< [in] Sysman handle of the device. zes_pci_state_t* pState ///< [in,out] Will contain the PCI properties. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDevicePciGetState("; @@ -331,6 +379,10 @@ namespace validation_layer ///< if count is less than the number of PCI bars that are setup, then the ///< driver shall only retrieve information about that number of PCI bars. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDevicePciGetBars("; @@ -355,6 +407,10 @@ namespace validation_layer zes_device_handle_t hDevice, ///< [in] Sysman handle of the device. zes_pci_stats_t* pStats ///< [in,out] Will contain a snapshot of the latest stats. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDevicePciGetStats("; @@ -374,6 +430,10 @@ namespace validation_layer ze_result_t result, zes_device_handle_t hDevice ///< [in] Sysman handle of the device. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceSetOverclockWaiver("; @@ -392,6 +452,10 @@ namespace validation_layer ///< each of enum ::zes_overclock_domain_t). If no bits are set, the device ///< doesn't support overclocking. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceGetOverclockDomains("; @@ -415,6 +479,10 @@ namespace validation_layer ///< specified overclock domain (a bit for each of enum ///< ::zes_overclock_control_t). ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceGetOverclockControls("; @@ -440,6 +508,10 @@ namespace validation_layer ze_bool_t onShippedState ///< [in] True will reset to shipped state; false will reset to ///< manufacturing state ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceResetOverclockSettings("; @@ -465,6 +537,10 @@ namespace validation_layer ///< overclock control or reset overclock settings. ze_bool_t* pPendingReset ///< [out] Pending reset 0 =manufacturing state, 1= shipped state).. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceReadOverclockState("; @@ -536,6 +612,10 @@ namespace validation_layer ///< available, then the driver shall only retrieve that number of ///< component handles. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceEnumOverclockDomains("; @@ -560,6 +640,10 @@ namespace validation_layer zes_overclock_handle_t hDomainHandle, ///< [in] Handle for the component domain. zes_overclock_properties_t* pDomainProperties ///< [in,out] The overclock properties for the specified domain. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesOverclockGetDomainProperties("; @@ -580,6 +664,10 @@ namespace validation_layer zes_overclock_handle_t hDomainHandle, ///< [in] Handle for the component domain. zes_vf_property_t* pVFProperties ///< [in,out] The VF min,max,step for a specified domain. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesOverclockGetDomainVFProperties("; @@ -601,6 +689,10 @@ namespace validation_layer zes_overclock_control_t DomainControl, ///< [in] Handle for the component. zes_control_property_t* pControlProperties ///< [in,out] overclock control values. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesOverclockGetDomainControlProperties("; @@ -626,6 +718,10 @@ namespace validation_layer zes_overclock_control_t DomainControl, ///< [in] Overclock Control. double* pValue ///< [in,out] Getting overclock control value for the specified control. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesOverclockGetControlCurrentValue("; @@ -652,6 +748,10 @@ namespace validation_layer double* pValue ///< [out] Returns the pending value for a given control. The units and ///< format of the value depend on the control type. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesOverclockGetControlPendingValue("; @@ -684,6 +784,10 @@ namespace validation_layer ///< depend on the control type. zes_pending_action_t* pPendingAction ///< [out] Pending overclock setting. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesOverclockSetControlUserValue("; @@ -719,6 +823,10 @@ namespace validation_layer zes_control_state_t* pControlState, ///< [out] Current overclock control state. zes_pending_action_t* pPendingAction ///< [out] Pending overclock setting. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesOverclockGetControlState("; @@ -761,6 +869,10 @@ namespace validation_layer uint32_t* PointValue ///< [out] Returns the frequency in 1kHz units or voltage in millivolt ///< units from the custom V-F curve at the specified zero-based index ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesOverclockGetVFPointValues("; @@ -801,6 +913,10 @@ namespace validation_layer uint32_t PointValue ///< [in] Writes frequency in 1kHz units or voltage in millivolt units to ///< custom V-F curve at the specified zero-based index ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesOverclockSetVFPointValues("; @@ -839,6 +955,10 @@ namespace validation_layer ///< available, then the driver shall only retrieve that number of ///< component handles. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceEnumDiagnosticTestSuites("; @@ -864,6 +984,10 @@ namespace validation_layer zes_diag_properties_t* pProperties ///< [in,out] Structure describing the properties of a diagnostics test ///< suite ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDiagnosticsGetProperties("; @@ -892,6 +1016,10 @@ namespace validation_layer ///< if count is less than the number of tests that are available, then the ///< driver shall only retrieve that number of tests. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDiagnosticsGetTests("; @@ -920,6 +1048,10 @@ namespace validation_layer ///< ::ZES_DIAG_LAST_TEST_INDEX to complete all tests after the start test. zes_diag_result_t* pResult ///< [in,out] The result of the diagnostics ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDiagnosticsRunTests("; @@ -948,6 +1080,10 @@ namespace validation_layer zes_device_handle_t hDevice, ///< [in] Handle for the component. ze_bool_t* pAvailable ///< [out] ECC functionality is available (true)/unavailable (false). ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceEccAvailable("; @@ -973,6 +1109,10 @@ namespace validation_layer zes_device_handle_t hDevice, ///< [in] Handle for the component. ze_bool_t* pConfigurable ///< [out] ECC can be enabled/disabled (true)/enabled/disabled (false). ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceEccConfigurable("; @@ -998,6 +1138,10 @@ namespace validation_layer zes_device_handle_t hDevice, ///< [in] Handle for the component. zes_device_ecc_properties_t* pState ///< [out] ECC state, pending state, and pending action for state change. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceGetEccState("; @@ -1024,6 +1168,10 @@ namespace validation_layer const zes_device_ecc_desc_t* newState, ///< [in] Pointer to desired ECC state. zes_device_ecc_properties_t* pState ///< [out] ECC state, pending state, and pending action for state change. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceSetEccState("; @@ -1063,6 +1211,10 @@ namespace validation_layer ///< available, then the driver shall only retrieve that number of ///< component handles. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceEnumEngineGroups("; @@ -1087,6 +1239,10 @@ namespace validation_layer zes_engine_handle_t hEngine, ///< [in] Handle for the component. zes_engine_properties_t* pProperties ///< [in,out] The properties for the specified engine group. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesEngineGetProperties("; @@ -1108,6 +1264,10 @@ namespace validation_layer zes_engine_stats_t* pStats ///< [in,out] Will contain a snapshot of the engine group activity ///< counters. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesEngineGetActivity("; @@ -1128,6 +1288,10 @@ namespace validation_layer zes_device_handle_t hDevice, ///< [in] The device handle. zes_event_type_flags_t events ///< [in] List of events to listen to. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceEventRegister("; @@ -1164,6 +1328,10 @@ namespace validation_layer ///< no event was received for a given device, the corresponding array ///< entry will be zero. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDriverEventListen("; @@ -1216,6 +1384,10 @@ namespace validation_layer ///< no event was received for a given device, the corresponding array ///< entry will be zero. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDriverEventListenEx("; @@ -1262,6 +1434,10 @@ namespace validation_layer ///< available, then the driver shall only retrieve that number of ///< component handles. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceEnumFabricPorts("; @@ -1286,6 +1462,10 @@ namespace validation_layer zes_fabric_port_handle_t hPort, ///< [in] Handle for the component. zes_fabric_port_properties_t* pProperties ///< [in,out] Will contain properties of the Fabric Port. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFabricPortGetProperties("; @@ -1307,6 +1487,10 @@ namespace validation_layer zes_fabric_link_type_t* pLinkType ///< [in,out] Will contain details about the link attached to the Fabric ///< port. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFabricPortGetLinkType("; @@ -1327,6 +1511,10 @@ namespace validation_layer zes_fabric_port_handle_t hPort, ///< [in] Handle for the component. zes_fabric_port_config_t* pConfig ///< [in,out] Will contain configuration of the Fabric Port. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFabricPortGetConfig("; @@ -1347,6 +1535,10 @@ namespace validation_layer zes_fabric_port_handle_t hPort, ///< [in] Handle for the component. const zes_fabric_port_config_t* pConfig ///< [in] Contains new configuration of the Fabric Port. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFabricPortSetConfig("; @@ -1367,6 +1559,10 @@ namespace validation_layer zes_fabric_port_handle_t hPort, ///< [in] Handle for the component. zes_fabric_port_state_t* pState ///< [in,out] Will contain the current state of the Fabric Port ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFabricPortGetState("; @@ -1387,6 +1583,10 @@ namespace validation_layer zes_fabric_port_handle_t hPort, ///< [in] Handle for the component. zes_fabric_port_throughput_t* pThroughput ///< [in,out] Will contain the Fabric port throughput counters. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFabricPortGetThroughput("; @@ -1407,6 +1607,10 @@ namespace validation_layer zes_fabric_port_handle_t hPort, ///< [in] Handle for the component. zes_fabric_port_error_counters_t* pErrors ///< [in,out] Will contain the Fabric port Error counters. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFabricPortGetFabricErrorCounters("; @@ -1431,6 +1635,10 @@ namespace validation_layer zes_fabric_port_throughput_t** pThroughput ///< [out][range(0, numPorts)] array of fabric port throughput counters ///< from multiple ports of type ::zes_fabric_port_throughput_t. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFabricPortGetMultiPortThroughput("; @@ -1474,6 +1682,10 @@ namespace validation_layer ///< available, then the driver shall only retrieve that number of ///< component handles. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceEnumFans("; @@ -1498,6 +1710,10 @@ namespace validation_layer zes_fan_handle_t hFan, ///< [in] Handle for the component. zes_fan_properties_t* pProperties ///< [in,out] Will contain the properties of the fan. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFanGetProperties("; @@ -1518,6 +1734,10 @@ namespace validation_layer zes_fan_handle_t hFan, ///< [in] Handle for the component. zes_fan_config_t* pConfig ///< [in,out] Will contain the current configuration of the fan. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFanGetConfig("; @@ -1537,6 +1757,10 @@ namespace validation_layer ze_result_t result, zes_fan_handle_t hFan ///< [in] Handle for the component. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFanSetDefaultMode("; @@ -1553,6 +1777,10 @@ namespace validation_layer zes_fan_handle_t hFan, ///< [in] Handle for the component. const zes_fan_speed_t* speed ///< [in] The fixed fan speed setting ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFanSetFixedSpeedMode("; @@ -1573,6 +1801,10 @@ namespace validation_layer zes_fan_handle_t hFan, ///< [in] Handle for the component. const zes_fan_speed_table_t* speedTable ///< [in] A table containing temperature/speed pairs. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFanSetSpeedTableMode("; @@ -1596,6 +1828,10 @@ namespace validation_layer ///< requested. A value of -1 indicates that the fan speed cannot be ///< measured. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFanGetState("; @@ -1630,6 +1866,10 @@ namespace validation_layer ///< available, then the driver shall only retrieve that number of ///< component handles. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceEnumFirmwares("; @@ -1655,6 +1895,10 @@ namespace validation_layer zes_firmware_properties_t* pProperties ///< [in,out] Pointer to an array that will hold the properties of the ///< firmware ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFirmwareGetProperties("; @@ -1676,6 +1920,10 @@ namespace validation_layer void* pImage, ///< [in] Image of the new firmware to flash. uint32_t size ///< [in] Size of the flash image. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFirmwareFlash("; @@ -1700,6 +1948,10 @@ namespace validation_layer zes_firmware_handle_t hFirmware, ///< [in] Handle for the component. uint32_t* pCompletionPercent ///< [in,out] Pointer to the Completion Percentage of Firmware Update ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFirmwareGetFlashProgress("; @@ -1721,6 +1973,10 @@ namespace validation_layer size_t* pSize, ///< [in,out] size of firmware log char* pFirmwareLog ///< [in,out][optional] pointer to null-terminated string of the log. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFirmwareGetConsoleLogs("; @@ -1755,6 +2011,10 @@ namespace validation_layer ///< available, then the driver shall only retrieve that number of ///< component handles. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceEnumFrequencyDomains("; @@ -1779,6 +2039,10 @@ namespace validation_layer zes_freq_handle_t hFrequency, ///< [in] Handle for the component. zes_freq_properties_t* pProperties ///< [in,out] The frequency properties for the specified domain. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFrequencyGetProperties("; @@ -1807,6 +2071,10 @@ namespace validation_layer ///< if count is less than the number of frequencies that are available, ///< then the driver shall only retrieve that number of frequencies. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFrequencyGetAvailableClocks("; @@ -1832,6 +2100,10 @@ namespace validation_layer zes_freq_range_t* pLimits ///< [in,out] The range between which the hardware can operate for the ///< specified domain. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFrequencyGetRange("; @@ -1853,6 +2125,10 @@ namespace validation_layer const zes_freq_range_t* pLimits ///< [in] The limits between which the hardware can operate for the ///< specified domain. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFrequencySetRange("; @@ -1873,6 +2149,10 @@ namespace validation_layer zes_freq_handle_t hFrequency, ///< [in] Handle for the component. zes_freq_state_t* pState ///< [in,out] Frequency state for the specified domain. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFrequencyGetState("; @@ -1894,6 +2174,10 @@ namespace validation_layer zes_freq_throttle_time_t* pThrottleTime ///< [in,out] Will contain a snapshot of the throttle time counters for the ///< specified domain. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFrequencyGetThrottleTime("; @@ -1914,6 +2198,10 @@ namespace validation_layer zes_freq_handle_t hFrequency, ///< [in] Handle for the component. zes_oc_capabilities_t* pOcCapabilities ///< [in,out] Pointer to the capabilities structure. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFrequencyOcGetCapabilities("; @@ -1937,6 +2225,10 @@ namespace validation_layer ///< cannot be greater than the `maxOcFrequency` member of ///< ::zes_oc_capabilities_t. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFrequencyOcGetFrequencyTarget("; @@ -1965,6 +2257,10 @@ namespace validation_layer ///< cannot be greater than the `maxOcFrequency` member of ///< ::zes_oc_capabilities_t. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFrequencyOcSetFrequencyTarget("; @@ -1990,6 +2286,10 @@ namespace validation_layer ///< Valid range is between the `minOcVoltageOffset` and ///< `maxOcVoltageOffset` members of ::zes_oc_capabilities_t. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFrequencyOcGetVoltageTarget("; @@ -2029,6 +2329,10 @@ namespace validation_layer ///< Valid range is between the `minOcVoltageOffset` and ///< `maxOcVoltageOffset` members of ::zes_oc_capabilities_t. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFrequencyOcSetVoltageTarget("; @@ -2053,6 +2357,10 @@ namespace validation_layer zes_freq_handle_t hFrequency, ///< [in] Handle for the component. zes_oc_mode_t CurrentOcMode ///< [in] Current Overclocking Mode ::zes_oc_mode_t. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFrequencyOcSetMode("; @@ -2073,6 +2381,10 @@ namespace validation_layer zes_freq_handle_t hFrequency, ///< [in] Handle for the component. zes_oc_mode_t* pCurrentOcMode ///< [out] Current Overclocking Mode ::zes_oc_mode_t. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFrequencyOcGetMode("; @@ -2099,6 +2411,10 @@ namespace validation_layer double* pOcIccMax ///< [in,out] Will contain the maximum current limit in Amperes on ///< successful return. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFrequencyOcGetIccMax("; @@ -2119,6 +2435,10 @@ namespace validation_layer zes_freq_handle_t hFrequency, ///< [in] Handle for the component. double ocIccMax ///< [in] The new maximum current limit in Amperes. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFrequencyOcSetIccMax("; @@ -2140,6 +2460,10 @@ namespace validation_layer double* pOcTjMax ///< [in,out] Will contain the maximum temperature limit in degrees Celsius ///< on successful return. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFrequencyOcGetTjMax("; @@ -2160,6 +2484,10 @@ namespace validation_layer zes_freq_handle_t hFrequency, ///< [in] Handle for the component. double ocTjMax ///< [in] The new maximum temperature limit in degrees Celsius. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFrequencyOcSetTjMax("; @@ -2190,6 +2518,10 @@ namespace validation_layer ///< available, then the driver shall only retrieve that number of ///< component handles. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceEnumLeds("; @@ -2214,6 +2546,10 @@ namespace validation_layer zes_led_handle_t hLed, ///< [in] Handle for the component. zes_led_properties_t* pProperties ///< [in,out] Will contain the properties of the LED. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesLedGetProperties("; @@ -2234,6 +2570,10 @@ namespace validation_layer zes_led_handle_t hLed, ///< [in] Handle for the component. zes_led_state_t* pState ///< [in,out] Will contain the current state of the LED. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesLedGetState("; @@ -2254,6 +2594,10 @@ namespace validation_layer zes_led_handle_t hLed, ///< [in] Handle for the component. ze_bool_t enable ///< [in] Set to TRUE to turn the LED on, FALSE to turn off. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesLedSetState("; @@ -2274,6 +2618,10 @@ namespace validation_layer zes_led_handle_t hLed, ///< [in] Handle for the component. const zes_led_color_t* pColor ///< [in] New color of the LED. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesLedSetColor("; @@ -2304,6 +2652,10 @@ namespace validation_layer ///< available, then the driver shall only retrieve that number of ///< component handles. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceEnumMemoryModules("; @@ -2328,6 +2680,10 @@ namespace validation_layer zes_mem_handle_t hMemory, ///< [in] Handle for the component. zes_mem_properties_t* pProperties ///< [in,out] Will contain memory properties. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesMemoryGetProperties("; @@ -2348,6 +2704,10 @@ namespace validation_layer zes_mem_handle_t hMemory, ///< [in] Handle for the component. zes_mem_state_t* pState ///< [in,out] Will contain the current health and allocated memory. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesMemoryGetState("; @@ -2369,6 +2729,10 @@ namespace validation_layer zes_mem_bandwidth_t* pBandwidth ///< [in,out] Will contain the total number of bytes read from and written ///< to memory, as well as the current maximum bandwidth. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesMemoryGetBandwidth("; @@ -2399,6 +2763,10 @@ namespace validation_layer ///< available, then the driver shall only retrieve that number of ///< component handles. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceEnumPerformanceFactorDomains("; @@ -2424,6 +2792,10 @@ namespace validation_layer zes_perf_properties_t* pProperties ///< [in,out] Will contain information about the specified Performance ///< Factor domain. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesPerformanceFactorGetProperties("; @@ -2445,6 +2817,10 @@ namespace validation_layer double* pFactor ///< [in,out] Will contain the actual Performance Factor being used by the ///< hardware (may not be the same as the requested Performance Factor). ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesPerformanceFactorGetConfig("; @@ -2465,6 +2841,10 @@ namespace validation_layer zes_perf_handle_t hPerf, ///< [in] Handle for the Performance Factor domain. double factor ///< [in] The new Performance Factor. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesPerformanceFactorSetConfig("; @@ -2495,6 +2875,10 @@ namespace validation_layer ///< available, then the driver shall only retrieve that number of ///< component handles. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceEnumPowerDomains("; @@ -2519,6 +2903,10 @@ namespace validation_layer zes_device_handle_t hDevice, ///< [in] Sysman handle of the device. zes_pwr_handle_t* phPower ///< [in,out] power domain handle for the entire PCIe card. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceGetCardPowerDomain("; @@ -2539,6 +2927,10 @@ namespace validation_layer zes_pwr_handle_t hPower, ///< [in] Handle for the component. zes_power_properties_t* pProperties ///< [in,out] Structure that will contain property data. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesPowerGetProperties("; @@ -2560,6 +2952,10 @@ namespace validation_layer zes_power_energy_counter_t* pEnergy ///< [in,out] Will contain the latest snapshot of the energy counter and ///< timestamp when the last counter value was measured. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesPowerGetEnergyCounter("; @@ -2585,6 +2981,10 @@ namespace validation_layer zes_power_peak_limit_t* pPeak ///< [in,out][optional] The peak power limit. If this is null, the peak ///< power limits will not be returned. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesPowerGetLimits("; @@ -2618,6 +3018,10 @@ namespace validation_layer const zes_power_peak_limit_t* pPeak ///< [in][optional] The peak power limit. If this is null, no changes will ///< be made to the peak power limits. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesPowerSetLimits("; @@ -2647,6 +3051,10 @@ namespace validation_layer zes_energy_threshold_t* pThreshold ///< [in,out] Returns information about the energy threshold setting - ///< enabled/energy threshold/process ID. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesPowerGetEnergyThreshold("; @@ -2667,6 +3075,10 @@ namespace validation_layer zes_pwr_handle_t hPower, ///< [in] Handle for the component. double threshold ///< [in] The energy threshold to be set in joules. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesPowerSetEnergyThreshold("; @@ -2697,6 +3109,10 @@ namespace validation_layer ///< available, then the driver shall only retrieve that number of ///< component handles. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceEnumPsus("; @@ -2721,6 +3137,10 @@ namespace validation_layer zes_psu_handle_t hPsu, ///< [in] Handle for the component. zes_psu_properties_t* pProperties ///< [in,out] Will contain the properties of the power supply. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesPsuGetProperties("; @@ -2741,6 +3161,10 @@ namespace validation_layer zes_psu_handle_t hPsu, ///< [in] Handle for the component. zes_psu_state_t* pState ///< [in,out] Will contain the current state of the power supply. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesPsuGetState("; @@ -2771,6 +3195,10 @@ namespace validation_layer ///< available, then the driver shall only retrieve that number of ///< component handles. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceEnumRasErrorSets("; @@ -2795,6 +3223,10 @@ namespace validation_layer zes_ras_handle_t hRas, ///< [in] Handle for the component. zes_ras_properties_t* pProperties ///< [in,out] Structure describing RAS properties ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesRasGetProperties("; @@ -2816,6 +3248,10 @@ namespace validation_layer zes_ras_config_t* pConfig ///< [in,out] Will be populed with the current RAS configuration - ///< thresholds used to trigger events ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesRasGetConfig("; @@ -2836,6 +3272,10 @@ namespace validation_layer zes_ras_handle_t hRas, ///< [in] Handle for the component. const zes_ras_config_t* pConfig ///< [in] Change the RAS configuration - thresholds used to trigger events ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesRasSetConfig("; @@ -2857,6 +3297,10 @@ namespace validation_layer ze_bool_t clear, ///< [in] Set to 1 to clear the counters of this type zes_ras_state_t* pState ///< [in,out] Breakdown of where errors have occurred ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesRasGetState("; @@ -2891,6 +3335,10 @@ namespace validation_layer ///< available, then the driver shall only retrieve that number of ///< component handles. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceEnumSchedulers("; @@ -2915,6 +3363,10 @@ namespace validation_layer zes_sched_handle_t hScheduler, ///< [in] Handle for the component. zes_sched_properties_t* pProperties ///< [in,out] Structure that will contain property data. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesSchedulerGetProperties("; @@ -2935,6 +3387,10 @@ namespace validation_layer zes_sched_handle_t hScheduler, ///< [in] Sysman handle for the component. zes_sched_mode_t* pMode ///< [in,out] Will contain the current scheduler mode. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesSchedulerGetCurrentMode("; @@ -2957,6 +3413,10 @@ namespace validation_layer ///< this mode, otherwise it will return the current properties. zes_sched_timeout_properties_t* pConfig ///< [in,out] Will contain the current parameters for this mode. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesSchedulerGetTimeoutModeProperties("; @@ -2983,6 +3443,10 @@ namespace validation_layer ///< this mode, otherwise it will return the current properties. zes_sched_timeslice_properties_t* pConfig ///< [in,out] Will contain the current parameters for this mode. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesSchedulerGetTimesliceModeProperties("; @@ -3009,6 +3473,10 @@ namespace validation_layer ze_bool_t* pNeedReload ///< [in,out] Will be set to TRUE if a device driver reload is needed to ///< apply the new scheduler mode. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesSchedulerSetTimeoutMode("; @@ -3035,6 +3503,10 @@ namespace validation_layer ze_bool_t* pNeedReload ///< [in,out] Will be set to TRUE if a device driver reload is needed to ///< apply the new scheduler mode. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesSchedulerSetTimesliceMode("; @@ -3060,6 +3532,10 @@ namespace validation_layer ze_bool_t* pNeedReload ///< [in,out] Will be set to TRUE if a device driver reload is needed to ///< apply the new scheduler mode. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesSchedulerSetExclusiveMode("; @@ -3081,6 +3557,10 @@ namespace validation_layer ze_bool_t* pNeedReload ///< [in,out] Will be set to TRUE if a device driver reload is needed to ///< apply the new scheduler mode. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesSchedulerSetComputeUnitDebugMode("; @@ -3111,6 +3591,10 @@ namespace validation_layer ///< available, then the driver shall only retrieve that number of ///< component handles. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceEnumStandbyDomains("; @@ -3135,6 +3619,10 @@ namespace validation_layer zes_standby_handle_t hStandby, ///< [in] Handle for the component. zes_standby_properties_t* pProperties ///< [in,out] Will contain the standby hardware properties. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesStandbyGetProperties("; @@ -3155,6 +3643,10 @@ namespace validation_layer zes_standby_handle_t hStandby, ///< [in] Handle for the component. zes_standby_promo_mode_t* pMode ///< [in,out] Will contain the current standby mode. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesStandbyGetMode("; @@ -3175,6 +3667,10 @@ namespace validation_layer zes_standby_handle_t hStandby, ///< [in] Handle for the component. zes_standby_promo_mode_t mode ///< [in] New standby mode. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesStandbySetMode("; @@ -3205,6 +3701,10 @@ namespace validation_layer ///< available, then the driver shall only retrieve that number of ///< component handles. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceEnumTemperatureSensors("; @@ -3229,6 +3729,10 @@ namespace validation_layer zes_temp_handle_t hTemperature, ///< [in] Handle for the component. zes_temp_properties_t* pProperties ///< [in,out] Will contain the temperature sensor properties. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesTemperatureGetProperties("; @@ -3249,6 +3753,10 @@ namespace validation_layer zes_temp_handle_t hTemperature, ///< [in] Handle for the component. zes_temp_config_t* pConfig ///< [in,out] Returns current configuration. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesTemperatureGetConfig("; @@ -3269,6 +3777,10 @@ namespace validation_layer zes_temp_handle_t hTemperature, ///< [in] Handle for the component. const zes_temp_config_t* pConfig ///< [in] New configuration. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesTemperatureSetConfig("; @@ -3290,6 +3802,10 @@ namespace validation_layer double* pTemperature ///< [in,out] Will contain the temperature read from the specified sensor ///< in degrees Celsius. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesTemperatureGetState("; @@ -3312,6 +3828,10 @@ namespace validation_layer ///< or set to default speed(false) zes_device_action_t* pendingAction ///< [out] Pending action ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDevicePciLinkSpeedUpdateExt("; @@ -3349,6 +3869,10 @@ namespace validation_layer ///< this type that are available, then the driver shall only retrieve that ///< number of components. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesPowerGetLimitsExt("; @@ -3374,6 +3898,10 @@ namespace validation_layer uint32_t* pCount, ///< [in] Pointer to the number of power limit descriptors. zes_power_limit_ext_desc_t* pSustained ///< [in][optional][range(0, *pCount)] Array of power limit descriptors. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesPowerSetLimitsExt("; @@ -3411,6 +3939,10 @@ namespace validation_layer ///< PF at index 0 of the vector followed by user provided pCount-1 number ///< of VF engine stats. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesEngineGetActivityExt("; @@ -3443,6 +3975,10 @@ namespace validation_layer ///< if count is less than the number of RAS states available, then driver ///< shall only retrieve that number of RAS states. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesRasGetStateExp("; @@ -3467,6 +4003,10 @@ namespace validation_layer zes_ras_handle_t hRas, ///< [in] Handle for the component. zes_ras_error_category_exp_t category ///< [in] category for which error counter is to be cleared. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesRasClearStateExp("; @@ -3488,6 +4028,10 @@ namespace validation_layer char* pVersion ///< [in,out] NULL terminated string value. The string "unknown" will be ///< returned if this property cannot be determined. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFirmwareGetSecurityVersionExp("; @@ -3507,6 +4051,10 @@ namespace validation_layer ze_result_t result, zes_firmware_handle_t hFirmware ///< [in] Handle for the component. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesFirmwareSetSecurityVersionExp("; @@ -3531,6 +4079,10 @@ namespace validation_layer ///< 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. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceGetSubDevicePropertiesExp("; @@ -3559,6 +4111,10 @@ namespace validation_layer ///< UUID belongs to the root device. uint32_t* subdeviceId ///< [out] If onSubdevice is true, this gives the ID of the sub-device ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDriverGetDeviceByUuidExp("; @@ -3616,6 +4172,10 @@ namespace validation_layer ///< available, then the driver shall only retrieve that number of ///< component handles. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceEnumActiveVFExp("; @@ -3640,6 +4200,10 @@ namespace validation_layer zes_vf_handle_t hVFhandle, ///< [in] Sysman handle for the VF component. zes_vf_exp_properties_t* pProperties ///< [in,out] Will contain VF properties. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesVFManagementGetVFPropertiesExp("; @@ -3672,6 +4236,10 @@ namespace validation_layer ///< - the implementation shall populate the vector pCount-1 number of VF ///< memory stats. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesVFManagementGetVFMemoryUtilizationExp("; @@ -3708,6 +4276,10 @@ namespace validation_layer ///< - the implementation shall populate the vector pCount-1 number of VF ///< engine stats. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesVFManagementGetVFEngineUtilizationExp("; @@ -3734,6 +4306,10 @@ namespace validation_layer ///< combination of ::zes_vf_info_util_exp_flag_t. ze_bool_t enable ///< [in] Enable utilization telemetry. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesVFManagementSetVFTelemetryModeExp("; @@ -3760,6 +4336,10 @@ namespace validation_layer ///< combination of ::zes_vf_info_util_exp_flag_t. uint64_t samplingInterval ///< [in] Sampling interval value. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesVFManagementSetVFTelemetrySamplingIntervalExp("; @@ -3794,6 +4374,10 @@ namespace validation_layer ///< available, then the driver shall only retrieve that number of ///< component handles. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesDeviceEnumEnabledVFExp("; @@ -3818,6 +4402,10 @@ namespace validation_layer zes_vf_handle_t hVFhandle, ///< [in] Sysman handle for the VF component. zes_vf_exp_capabilities_t* pCapability ///< [in,out] Will contain VF capability. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesVFManagementGetVFCapabilitiesExp("; @@ -3848,6 +4436,10 @@ namespace validation_layer ///< - the implementation shall populate the vector pCount-1 number of VF ///< memory stats. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesVFManagementGetVFMemoryUtilizationExp2("; @@ -3882,6 +4474,10 @@ namespace validation_layer ///< - the implementation shall populate the vector pCount-1 number of VF ///< engine stats. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesVFManagementGetVFEngineUtilizationExp2("; @@ -3906,6 +4502,10 @@ namespace validation_layer zes_vf_handle_t hVFhandle, ///< [in] Sysman handle for the VF component. zes_vf_exp2_capabilities_t* pCapability ///< [in,out] Will contain VF capability. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zesVFManagementGetVFCapabilitiesExp2("; diff --git a/source/layers/validation/zet_valddi.cpp b/source/layers/validation/zet_valddi.cpp index ef289516..e66d6b69 100644 --- a/source/layers/validation/zet_valddi.cpp +++ b/source/layers/validation/zet_valddi.cpp @@ -33,6 +33,10 @@ namespace validation_layer size_t* pSize, ///< [in,out] size of debug info in bytes uint8_t* pDebugInfo ///< [in,out][optional] byte pointer to debug info ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetModuleGetDebugInfo("; @@ -61,6 +65,10 @@ namespace validation_layer zet_device_handle_t hDevice, ///< [in] device handle zet_device_debug_properties_t* pDebugProperties ///< [in,out] query result for debug properties ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetDeviceGetDebugProperties("; @@ -82,6 +90,10 @@ namespace validation_layer const zet_debug_config_t* config, ///< [in] the debug configuration zet_debug_session_handle_t* phDebug ///< [out] debug session handle ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetDebugAttach("; @@ -110,6 +122,10 @@ namespace validation_layer ze_result_t result, zet_debug_session_handle_t hDebug ///< [in][release] debug session handle ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetDebugDetach("; @@ -133,6 +149,10 @@ namespace validation_layer ///< value allowed by the accuracy of those dependencies. zet_debug_event_t* event ///< [in,out] a pointer to a ::zet_debug_event_t. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetDebugReadEvent("; @@ -157,6 +177,10 @@ namespace validation_layer zet_debug_session_handle_t hDebug, ///< [in] debug session handle const zet_debug_event_t* event ///< [in] a pointer to a ::zet_debug_event_t. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetDebugAcknowledgeEvent("; @@ -177,6 +201,10 @@ namespace validation_layer zet_debug_session_handle_t hDebug, ///< [in] debug session handle ze_device_thread_t thread ///< [in] the thread to interrupt ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetDebugInterrupt("; @@ -197,6 +225,10 @@ namespace validation_layer zet_debug_session_handle_t hDebug, ///< [in] debug session handle ze_device_thread_t thread ///< [in] the thread to resume ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetDebugResume("; @@ -220,6 +252,10 @@ namespace validation_layer size_t size, ///< [in] the number of bytes to read void* buffer ///< [in,out] a buffer to hold a copy of the memory ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetDebugReadMemory("; @@ -255,6 +291,10 @@ namespace validation_layer size_t size, ///< [in] the number of bytes to write const void* buffer ///< [in] a buffer holding the pattern to write ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetDebugWriteMemory("; @@ -296,6 +336,10 @@ namespace validation_layer ///< if count is less than the number of register set properties available, ///< then driver shall only retrieve that number of register set properties. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetDebugGetRegisterSetProperties("; @@ -330,6 +374,10 @@ namespace validation_layer ///< if count is less than the number of register set properties available, ///< then driver shall only retrieve that number of register set properties. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetDebugGetThreadRegisterSetProperties("; @@ -366,6 +414,10 @@ namespace validation_layer ///< type void* pRegisterValues ///< [in,out][optional][range(0, count)] buffer of register values ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetDebugReadRegisters("; @@ -410,6 +462,10 @@ namespace validation_layer ///< the type void* pRegisterValues ///< [in,out][optional][range(0, count)] buffer of register values ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetDebugWriteRegisters("; @@ -454,6 +510,10 @@ namespace validation_layer ///< if count is less than the number of metric groups available, then ///< driver shall only retrieve that number of metric groups. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricGroupGet("; @@ -478,6 +538,10 @@ namespace validation_layer zet_metric_group_handle_t hMetricGroup, ///< [in] handle of the metric group zet_metric_group_properties_t* pProperties ///< [in,out] metric group properties ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricGroupGetProperties("; @@ -509,6 +573,10 @@ namespace validation_layer ///< if count is less than the number available in the raw data buffer, ///< then driver shall only calculate that number of metric values. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricGroupCalculateMetricValues("; @@ -552,6 +620,10 @@ namespace validation_layer ///< if count is less than the number of metrics available, then driver ///< shall only retrieve that number of metrics. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricGet("; @@ -576,6 +648,10 @@ namespace validation_layer zet_metric_handle_t hMetric, ///< [in] handle of the metric zet_metric_properties_t* pProperties ///< [in,out] metric properties ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricGetProperties("; @@ -602,6 +678,10 @@ namespace validation_layer ///< all metrics groups must come from a different domains. ///< metric query and metric stream must use activated metric groups. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetContextActivateMetricGroups("; @@ -634,6 +714,10 @@ namespace validation_layer ze_event_handle_t hNotificationEvent, ///< [in][optional] event used for report availability notification zet_metric_streamer_handle_t* phMetricStreamer ///< [out] handle of metric streamer ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricStreamerOpen("; @@ -676,6 +760,10 @@ namespace validation_layer zet_metric_streamer_handle_t hMetricStreamer, ///< [in] handle of the metric streamer uint32_t value ///< [in] streamer marker value ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetCommandListAppendMetricStreamerMarker("; @@ -699,6 +787,10 @@ namespace validation_layer ze_result_t result, zet_metric_streamer_handle_t hMetricStreamer ///< [in][release] handle of the metric streamer ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricStreamerClose("; @@ -725,6 +817,10 @@ namespace validation_layer uint8_t* pRawData ///< [in,out][optional][range(0, *pRawDataSize)] buffer containing streamer ///< reports in raw format ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricStreamerReadData("; @@ -756,6 +852,10 @@ namespace validation_layer const zet_metric_query_pool_desc_t* desc, ///< [in] metric query pool descriptor zet_metric_query_pool_handle_t* phMetricQueryPool ///< [out] handle of metric query pool ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricQueryPoolCreate("; @@ -792,6 +892,10 @@ namespace validation_layer ze_result_t result, zet_metric_query_pool_handle_t hMetricQueryPool ///< [in][release] handle of the metric query pool ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricQueryPoolDestroy("; @@ -809,6 +913,10 @@ namespace validation_layer uint32_t index, ///< [in] index of the query within the pool zet_metric_query_handle_t* phMetricQuery ///< [out] handle of metric query ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricQueryCreate("; @@ -837,6 +945,10 @@ namespace validation_layer ze_result_t result, zet_metric_query_handle_t hMetricQuery ///< [in][release] handle of metric query ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricQueryDestroy("; @@ -852,6 +964,10 @@ namespace validation_layer ze_result_t result, zet_metric_query_handle_t hMetricQuery ///< [in] handle of metric query ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricQueryReset("; @@ -868,6 +984,10 @@ namespace validation_layer zet_command_list_handle_t hCommandList, ///< [in] handle of the command list zet_metric_query_handle_t hMetricQuery ///< [in] handle of the metric query ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetCommandListAppendMetricQueryBegin("; @@ -891,6 +1011,10 @@ namespace validation_layer uint32_t numWaitEvents, ///< [in] must be zero ze_event_handle_t* phWaitEvents ///< [in][mbz] must be nullptr ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetCommandListAppendMetricQueryEnd("; @@ -922,6 +1046,10 @@ namespace validation_layer ze_result_t result, zet_command_list_handle_t hCommandList ///< [in] handle of the command list ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetCommandListAppendMetricMemoryBarrier("; @@ -946,6 +1074,10 @@ namespace validation_layer uint8_t* pRawData ///< [in,out][optional][range(0, *pRawDataSize)] buffer containing query ///< reports in raw format ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricQueryGetData("; @@ -970,6 +1102,10 @@ namespace validation_layer zet_kernel_handle_t hKernel, ///< [in] handle to kernel zet_profile_properties_t* pProfileProperties ///< [out] pointer to profile properties ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetKernelGetProfileInfo("; @@ -996,6 +1132,10 @@ namespace validation_layer const zet_tracer_exp_desc_t* desc, ///< [in] pointer to tracer descriptor zet_tracer_exp_handle_t* phTracer ///< [out] pointer to handle of tracer object created ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetTracerExpCreate("; @@ -1024,6 +1164,10 @@ namespace validation_layer ze_result_t result, zet_tracer_exp_handle_t hTracer ///< [in][release] handle of tracer object to destroy ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetTracerExpDestroy("; @@ -1040,6 +1184,10 @@ namespace validation_layer zet_tracer_exp_handle_t hTracer, ///< [in] handle of the tracer zet_core_callbacks_t* pCoreCbs ///< [in] pointer to table of 'core' callback function pointers ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetTracerExpSetPrologues("; @@ -1060,6 +1208,10 @@ namespace validation_layer zet_tracer_exp_handle_t hTracer, ///< [in] handle of the tracer zet_core_callbacks_t* pCoreCbs ///< [in] pointer to table of 'core' callback function pointers ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetTracerExpSetEpilogues("; @@ -1080,6 +1232,10 @@ namespace validation_layer zet_tracer_exp_handle_t hTracer, ///< [in] handle of the tracer ze_bool_t enable ///< [in] enable the tracer if true; disable if false ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetTracerExpSetEnabled("; @@ -1107,6 +1263,10 @@ namespace validation_layer ///< The value of this parameter could be used to determine the number of ///< replays necessary. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetDeviceGetConcurrentMetricGroupsExp("; @@ -1152,6 +1312,10 @@ namespace validation_layer ///< HW event buffer being overrun zet_metric_tracer_exp_handle_t* phMetricTracer ///< [out] handle of the metric tracer ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricTracerCreateExp("; @@ -1196,6 +1360,10 @@ namespace validation_layer ze_result_t result, zet_metric_tracer_exp_handle_t hMetricTracer ///< [in] handle of the metric tracer ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricTracerDestroyExp("; @@ -1216,6 +1384,10 @@ namespace validation_layer ///< when the tracer is inactive. ::ZE_RESULT_SUCCESS will be returned ///< when the tracer is active. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricTracerEnableExp("; @@ -1241,6 +1413,10 @@ namespace validation_layer ///< ::ZE_RESULT_NOT_READY will be returned when the tracer is inactive and ///< has no more data to be retrieved. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricTracerDisableExp("; @@ -1269,6 +1445,10 @@ namespace validation_layer uint8_t* pRawData ///< [in,out][optional][range(0, *pRawDataSize)] buffer containing tracer ///< data in raw format ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricTracerReadDataExp("; @@ -1293,6 +1473,10 @@ namespace validation_layer zet_metric_tracer_exp_handle_t hMetricTracer, ///< [in] handle of the metric tracer zet_metric_decoder_exp_handle_t* phMetricDecoder///< [out] handle of the metric decoder object ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricDecoderCreateExp("; @@ -1317,6 +1501,10 @@ namespace validation_layer ze_result_t result, zet_metric_decoder_exp_handle_t phMetricDecoder ///< [in] handle of the metric decoder object ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricDecoderDestroyExp("; @@ -1343,6 +1531,10 @@ namespace validation_layer zet_metric_handle_t* phMetrics ///< [in,out] [range(0, *pCount)] array of handles of decodable metrics in ///< the hMetricDecoder handle provided. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricDecoderGetDecodableMetricsExp("; @@ -1405,6 +1597,10 @@ namespace validation_layer zet_metric_entry_exp_t* pMetricEntries ///< [in,out][optional][range(0, *pMetricEntriesCount)] buffer containing ///< decoded metric entries ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricTracerDecodeExp("; @@ -1456,6 +1652,10 @@ namespace validation_layer ///< marker is supoported by the metric group. uint32_t value ///< [in] marker value ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetCommandListAppendMarkerExp("; @@ -1479,6 +1679,10 @@ namespace validation_layer ze_result_t result, zet_device_handle_t hDevice ///< [in] handle of the device where metrics collection has to be enabled. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetDeviceEnableMetricsExp("; @@ -1494,6 +1698,10 @@ namespace validation_layer ze_result_t result, zet_device_handle_t hDevice ///< [in] handle of the device where metrics collection has to be disabled ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetDeviceDisableMetricsExp("; @@ -1531,6 +1739,10 @@ namespace validation_layer ///< if count is less than the number available in the raw data buffer, ///< then driver shall only calculate that number of metric values. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricGroupCalculateMultipleMetricValuesExp("; @@ -1577,6 +1789,10 @@ namespace validation_layer uint64_t* globalTimestamp, ///< [out] Device timestamp. uint64_t* metricTimestamp ///< [out] Metric timestamp. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricGroupGetGlobalTimestampsExp("; @@ -1622,6 +1838,10 @@ namespace validation_layer ///< value with the actual number of bytes necessary to store the exported data. uint8_t * pExportData ///< [in,out][optional][range(0, *pExportDataSize)] buffer of exported data. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricGroupGetExportDataExp("; @@ -1676,6 +1896,10 @@ namespace validation_layer ///< if count is less than the number available in the raw data buffer, ///< then driver shall only calculate that number of metric values. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricGroupCalculateMetricExportDataExp("; @@ -1732,6 +1956,10 @@ namespace validation_layer ///< if count is less than the number of metric programmables available, ///< then driver shall only retrieve that number of metric programmables. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricProgrammableGetExp("; @@ -1756,6 +1984,10 @@ namespace validation_layer zet_metric_programmable_exp_handle_t hMetricProgrammable, ///< [in] handle of the metric programmable zet_metric_programmable_exp_properties_t* pProperties ///< [in,out] properties of the metric programmable ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricProgrammableGetPropertiesExp("; @@ -1783,6 +2015,10 @@ namespace validation_layer ///< if parameterCount is less than the number of parameters available, ///< then driver shall only retrieve that number of parameter info. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricProgrammableGetParamInfoExp("; @@ -1815,6 +2051,10 @@ namespace validation_layer ///< if pValueInfoCount is less than the number of value info available, ///< then driver shall only retrieve that number of value info. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricProgrammableGetParamValueInfoExp("; @@ -1858,6 +2098,10 @@ namespace validation_layer ///< if count is less than the number of metrics available, then driver ///< shall only retrieve that number of metric handles. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricCreateFromProgrammableExp2("; @@ -1913,6 +2157,10 @@ namespace validation_layer ///< if count is less than the number of metrics available, then driver ///< shall only retrieve that number of metric handles. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricCreateFromProgrammableExp("; @@ -1971,6 +2219,10 @@ namespace validation_layer ///< metric group handles. ///< Created Metric group handles. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetDeviceCreateMetricGroupsFromMetricsExp("; @@ -2017,6 +2269,10 @@ namespace validation_layer zet_metric_group_sampling_type_flags_t samplingType,///< [in] Sampling type for the metric group. zet_metric_group_handle_t* phMetricGroup ///< [in,out] Created Metric group handle ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricGroupCreateExp("; @@ -2056,6 +2312,10 @@ namespace validation_layer ///< if *pErrorStringSize is less than the length of the error string ///< available, then driver shall only retrieve that length of error string. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricGroupAddMetricExp("; @@ -2084,6 +2344,10 @@ namespace validation_layer zet_metric_group_handle_t hMetricGroup, ///< [in] Handle of the metric group zet_metric_handle_t hMetric ///< [in] Metric handle to be removed from the metric group. ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricGroupRemoveMetricExp("; @@ -2103,6 +2367,10 @@ namespace validation_layer ze_result_t result, zet_metric_group_handle_t hMetricGroup ///< [in] Handle of the metric group ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricGroupCloseExp("; @@ -2118,6 +2386,10 @@ namespace validation_layer ze_result_t result, zet_metric_group_handle_t hMetricGroup ///< [in] Handle of the metric group to destroy ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricGroupDestroyExp("; @@ -2133,6 +2405,10 @@ namespace validation_layer ze_result_t result, zet_metric_handle_t hMetric ///< [in] Handle of the metric to destroy ) { + // Only log success results if verbose logging is enabled + if (result == ZE_RESULT_SUCCESS && !context.verboseLogging) { + return result; + } std::string status = (result == ZE_RESULT_SUCCESS) ? "SUCCESS" : "ERROR"; std::ostringstream oss; oss << status << " (" << loader::to_string(result) << ") in zetMetricDestroyExp(";