diff --git a/.clang-tidy b/.clang-tidy index 70f354fb58..26638713e9 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -22,6 +22,8 @@ CheckOptions: value: camelBack - key: readability-identifier-naming.LocalVariableCase value: camelBack + - key: readability-identifier-naming.FunctionCase + value: camelBack - key: modernize-loop-convert.MaxCopySize value: '16' - key: modernize-loop-convert.MinConfidence diff --git a/level_zero/api/core/ze_core_loader.cpp b/level_zero/api/core/ze_core_loader.cpp index 4fa3e2e008..da785f146f 100644 --- a/level_zero/api/core/ze_core_loader.cpp +++ b/level_zero/api/core/ze_core_loader.cpp @@ -25,7 +25,7 @@ zeGetDriverProcAddrTable( if (ZE_MAJOR_VERSION(driver_ddiTable.version) != ZE_MAJOR_VERSION(version) || ZE_MINOR_VERSION(driver_ddiTable.version) > ZE_MINOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; - driver_ddiTable.enableTracing = getenv_tobool("ZET_ENABLE_API_TRACING_EXP"); + driver_ddiTable.enableTracing = getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; pDdiTable->pfnGet = zeDriverGet; pDdiTable->pfnGetApiVersion = zeDriverGetApiVersion; @@ -35,11 +35,11 @@ zeGetDriverProcAddrTable( pDdiTable->pfnGetExtensionFunctionAddress = zeDriverGetExtensionFunctionAddress; driver_ddiTable.core_ddiTable.Driver = *pDdiTable; if (driver_ddiTable.enableTracing) { - pDdiTable->pfnGet = zeDriverGet_Tracing; - pDdiTable->pfnGetApiVersion = zeDriverGetApiVersion_Tracing; - pDdiTable->pfnGetProperties = zeDriverGetProperties_Tracing; - pDdiTable->pfnGetIpcProperties = zeDriverGetIpcProperties_Tracing; - pDdiTable->pfnGetExtensionProperties = zeDriverGetExtensionProperties_Tracing; + pDdiTable->pfnGet = zeDriverGetTracing; + pDdiTable->pfnGetApiVersion = zeDriverGetApiVersionTracing; + pDdiTable->pfnGetProperties = zeDriverGetPropertiesTracing; + pDdiTable->pfnGetIpcProperties = zeDriverGetIpcPropertiesTracing; + pDdiTable->pfnGetExtensionProperties = zeDriverGetExtensionPropertiesTracing; } return result; } @@ -53,7 +53,7 @@ zeGetMemProcAddrTable( if (ZE_MAJOR_VERSION(driver_ddiTable.version) != ZE_MAJOR_VERSION(version) || ZE_MINOR_VERSION(driver_ddiTable.version) > ZE_MINOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; - driver_ddiTable.enableTracing = getenv_tobool("ZET_ENABLE_API_TRACING_EXP"); + driver_ddiTable.enableTracing = getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; pDdiTable->pfnAllocShared = zeMemAllocShared; @@ -68,15 +68,15 @@ zeGetMemProcAddrTable( pDdiTable->pfnCloseIpcHandle = zeMemCloseIpcHandle; driver_ddiTable.core_ddiTable.Mem = *pDdiTable; if (driver_ddiTable.enableTracing) { - pDdiTable->pfnAllocShared = zeMemAllocShared_Tracing; - pDdiTable->pfnAllocDevice = zeMemAllocDevice_Tracing; - pDdiTable->pfnAllocHost = zeMemAllocHost_Tracing; - pDdiTable->pfnFree = zeMemFree_Tracing; - pDdiTable->pfnGetAllocProperties = zeMemGetAllocProperties_Tracing; - pDdiTable->pfnGetAddressRange = zeMemGetAddressRange_Tracing; - pDdiTable->pfnGetIpcHandle = zeMemGetIpcHandle_Tracing; - pDdiTable->pfnOpenIpcHandle = zeMemOpenIpcHandle_Tracing; - pDdiTable->pfnCloseIpcHandle = zeMemCloseIpcHandle_Tracing; + pDdiTable->pfnAllocShared = zeMemAllocSharedTracing; + pDdiTable->pfnAllocDevice = zeMemAllocDeviceTracing; + pDdiTable->pfnAllocHost = zeMemAllocHostTracing; + pDdiTable->pfnFree = zeMemFreeTracing; + pDdiTable->pfnGetAllocProperties = zeMemGetAllocPropertiesTracing; + pDdiTable->pfnGetAddressRange = zeMemGetAddressRangeTracing; + pDdiTable->pfnGetIpcHandle = zeMemGetIpcHandleTracing; + pDdiTable->pfnOpenIpcHandle = zeMemOpenIpcHandleTracing; + pDdiTable->pfnCloseIpcHandle = zeMemCloseIpcHandleTracing; } return result; } @@ -91,7 +91,7 @@ zeGetContextProcAddrTable( ZE_MINOR_VERSION(driver_ddiTable.version) > ZE_MINOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; - driver_ddiTable.enableTracing = getenv_tobool("ZET_ENABLE_API_TRACING_EXP"); + driver_ddiTable.enableTracing = getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; pDdiTable->pfnCreate = zeContextCreate; @@ -106,14 +106,14 @@ zeGetContextProcAddrTable( driver_ddiTable.core_ddiTable.Context = *pDdiTable; if (driver_ddiTable.enableTracing) { - pDdiTable->pfnCreate = zeContextCreate_Tracing; - pDdiTable->pfnDestroy = zeContextDestroy_Tracing; - pDdiTable->pfnGetStatus = zeContextGetStatus_Tracing; - pDdiTable->pfnSystemBarrier = zeContextSystemBarrier_Tracing; - pDdiTable->pfnMakeMemoryResident = zeContextMakeMemoryResident_Tracing; - pDdiTable->pfnEvictMemory = zeContextEvictMemory_Tracing; - pDdiTable->pfnMakeImageResident = zeContextMakeImageResident_Tracing; - pDdiTable->pfnEvictImage = zeContextEvictImage_Tracing; + pDdiTable->pfnCreate = zeContextCreateTracing; + pDdiTable->pfnDestroy = zeContextDestroyTracing; + pDdiTable->pfnGetStatus = zeContextGetStatusTracing; + pDdiTable->pfnSystemBarrier = zeContextSystemBarrierTracing; + pDdiTable->pfnMakeMemoryResident = zeContextMakeMemoryResidentTracing; + pDdiTable->pfnEvictMemory = zeContextEvictMemoryTracing; + pDdiTable->pfnMakeImageResident = zeContextMakeImageResidentTracing; + pDdiTable->pfnEvictImage = zeContextEvictImageTracing; } return result; } @@ -128,7 +128,7 @@ zeGetPhysicalMemProcAddrTable( ZE_MINOR_VERSION(driver_ddiTable.version) > ZE_MINOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; - driver_ddiTable.enableTracing = getenv_tobool("ZET_ENABLE_API_TRACING_EXP"); + driver_ddiTable.enableTracing = getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; pDdiTable->pfnCreate = zePhysicalMemCreate; @@ -136,8 +136,8 @@ zeGetPhysicalMemProcAddrTable( driver_ddiTable.core_ddiTable.PhysicalMem = *pDdiTable; if (driver_ddiTable.enableTracing) { - pDdiTable->pfnCreate = zePhysicalMemCreate_Tracing; - pDdiTable->pfnDestroy = zePhysicalMemDestroy_Tracing; + pDdiTable->pfnCreate = zePhysicalMemCreateTracing; + pDdiTable->pfnDestroy = zePhysicalMemDestroyTracing; } return result; } @@ -151,7 +151,7 @@ zeGetVirtualMemProcAddrTable( if (ZE_MAJOR_VERSION(driver_ddiTable.version) != ZE_MAJOR_VERSION(version) || ZE_MINOR_VERSION(driver_ddiTable.version) > ZE_MINOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; - driver_ddiTable.enableTracing = getenv_tobool("ZET_ENABLE_API_TRACING_EXP"); + driver_ddiTable.enableTracing = getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; pDdiTable->pfnReserve = zeVirtualMemReserve; @@ -164,13 +164,13 @@ zeGetVirtualMemProcAddrTable( driver_ddiTable.core_ddiTable.VirtualMem = *pDdiTable; if (driver_ddiTable.enableTracing) { - pDdiTable->pfnReserve = zeVirtualMemReserve_Tracing; - pDdiTable->pfnFree = zeVirtualMemFree_Tracing; - pDdiTable->pfnQueryPageSize = zeVirtualMemQueryPageSize_Tracing; - pDdiTable->pfnMap = zeVirtualMemMap_Tracing; - pDdiTable->pfnUnmap = zeVirtualMemUnmap_Tracing; - pDdiTable->pfnSetAccessAttribute = zeVirtualMemSetAccessAttribute_Tracing; - pDdiTable->pfnGetAccessAttribute = zeVirtualMemGetAccessAttribute_Tracing; + pDdiTable->pfnReserve = zeVirtualMemReserveTracing; + pDdiTable->pfnFree = zeVirtualMemFreeTracing; + pDdiTable->pfnQueryPageSize = zeVirtualMemQueryPageSizeTracing; + pDdiTable->pfnMap = zeVirtualMemMapTracing; + pDdiTable->pfnUnmap = zeVirtualMemUnmapTracing; + pDdiTable->pfnSetAccessAttribute = zeVirtualMemSetAccessAttributeTracing; + pDdiTable->pfnGetAccessAttribute = zeVirtualMemGetAccessAttributeTracing; } return result; } @@ -184,13 +184,13 @@ zeGetGlobalProcAddrTable( if (ZE_MAJOR_VERSION(driver_ddiTable.version) != ZE_MAJOR_VERSION(version) || ZE_MINOR_VERSION(driver_ddiTable.version) > ZE_MINOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; - driver_ddiTable.enableTracing = getenv_tobool("ZET_ENABLE_API_TRACING_EXP"); + driver_ddiTable.enableTracing = getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; pDdiTable->pfnInit = zeInit; driver_ddiTable.core_ddiTable.Global = *pDdiTable; if (driver_ddiTable.enableTracing) { - pDdiTable->pfnInit = zeInit_Tracing; + pDdiTable->pfnInit = zeInitTracing; } return result; } @@ -204,7 +204,7 @@ zeGetDeviceProcAddrTable( if (ZE_MAJOR_VERSION(driver_ddiTable.version) != ZE_MAJOR_VERSION(version) || ZE_MINOR_VERSION(driver_ddiTable.version) > ZE_MINOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; - driver_ddiTable.enableTracing = getenv_tobool("ZET_ENABLE_API_TRACING_EXP"); + driver_ddiTable.enableTracing = getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; pDdiTable->pfnGet = zeDeviceGet; @@ -227,20 +227,20 @@ zeGetDeviceProcAddrTable( pDdiTable->pfnPciGetPropertiesExt = zeDevicePciGetPropertiesExt; driver_ddiTable.core_ddiTable.Device = *pDdiTable; if (driver_ddiTable.enableTracing) { - pDdiTable->pfnGet = zeDeviceGet_Tracing; - pDdiTable->pfnGetCommandQueueGroupProperties = zeDeviceGetCommandQueueGroupProperties_Tracing; - pDdiTable->pfnGetSubDevices = zeDeviceGetSubDevices_Tracing; - pDdiTable->pfnGetProperties = zeDeviceGetProperties_Tracing; - pDdiTable->pfnGetComputeProperties = zeDeviceGetComputeProperties_Tracing; - pDdiTable->pfnGetModuleProperties = zeDeviceGetModuleProperties_Tracing; - pDdiTable->pfnGetMemoryProperties = zeDeviceGetMemoryProperties_Tracing; - pDdiTable->pfnGetMemoryAccessProperties = zeDeviceGetMemoryAccessProperties_Tracing; - pDdiTable->pfnGetCacheProperties = zeDeviceGetCacheProperties_Tracing; - pDdiTable->pfnGetImageProperties = zeDeviceGetImageProperties_Tracing; - pDdiTable->pfnGetP2PProperties = zeDeviceGetP2PProperties_Tracing; - pDdiTable->pfnCanAccessPeer = zeDeviceCanAccessPeer_Tracing; - pDdiTable->pfnGetStatus = zeDeviceGetStatus_Tracing; - pDdiTable->pfnGetExternalMemoryProperties = zeDeviceGetExternalMemoryProperties_Tracing; + pDdiTable->pfnGet = zeDeviceGetTracing; + pDdiTable->pfnGetCommandQueueGroupProperties = zeDeviceGetCommandQueueGroupPropertiesTracing; + pDdiTable->pfnGetSubDevices = zeDeviceGetSubDevicesTracing; + pDdiTable->pfnGetProperties = zeDeviceGetPropertiesTracing; + pDdiTable->pfnGetComputeProperties = zeDeviceGetComputePropertiesTracing; + pDdiTable->pfnGetModuleProperties = zeDeviceGetModulePropertiesTracing; + pDdiTable->pfnGetMemoryProperties = zeDeviceGetMemoryPropertiesTracing; + pDdiTable->pfnGetMemoryAccessProperties = zeDeviceGetMemoryAccessPropertiesTracing; + pDdiTable->pfnGetCacheProperties = zeDeviceGetCachePropertiesTracing; + pDdiTable->pfnGetImageProperties = zeDeviceGetImagePropertiesTracing; + pDdiTable->pfnGetP2PProperties = zeDeviceGetP2PPropertiesTracing; + pDdiTable->pfnCanAccessPeer = zeDeviceCanAccessPeerTracing; + pDdiTable->pfnGetStatus = zeDeviceGetStatusTracing; + pDdiTable->pfnGetExternalMemoryProperties = zeDeviceGetExternalMemoryPropertiesTracing; } return result; } @@ -254,7 +254,7 @@ zeGetCommandQueueProcAddrTable( if (ZE_MAJOR_VERSION(driver_ddiTable.version) != ZE_MAJOR_VERSION(version) || ZE_MINOR_VERSION(driver_ddiTable.version) > ZE_MINOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; - driver_ddiTable.enableTracing = getenv_tobool("ZET_ENABLE_API_TRACING_EXP"); + driver_ddiTable.enableTracing = getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; pDdiTable->pfnCreate = zeCommandQueueCreate; @@ -263,10 +263,10 @@ zeGetCommandQueueProcAddrTable( pDdiTable->pfnSynchronize = zeCommandQueueSynchronize; driver_ddiTable.core_ddiTable.CommandQueue = *pDdiTable; if (driver_ddiTable.enableTracing) { - pDdiTable->pfnCreate = zeCommandQueueCreate_Tracing; - pDdiTable->pfnDestroy = zeCommandQueueDestroy_Tracing; - pDdiTable->pfnExecuteCommandLists = zeCommandQueueExecuteCommandLists_Tracing; - pDdiTable->pfnSynchronize = zeCommandQueueSynchronize_Tracing; + pDdiTable->pfnCreate = zeCommandQueueCreateTracing; + pDdiTable->pfnDestroy = zeCommandQueueDestroyTracing; + pDdiTable->pfnExecuteCommandLists = zeCommandQueueExecuteCommandListsTracing; + pDdiTable->pfnSynchronize = zeCommandQueueSynchronizeTracing; } return result; } @@ -280,7 +280,7 @@ zeGetCommandListProcAddrTable( if (ZE_MAJOR_VERSION(driver_ddiTable.version) != ZE_MAJOR_VERSION(version) || ZE_MINOR_VERSION(driver_ddiTable.version) > ZE_MINOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; - driver_ddiTable.enableTracing = getenv_tobool("ZET_ENABLE_API_TRACING_EXP"); + driver_ddiTable.enableTracing = getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; pDdiTable->pfnAppendBarrier = zeCommandListAppendBarrier; @@ -311,32 +311,32 @@ zeGetCommandListProcAddrTable( pDdiTable->pfnAppendQueryKernelTimestamps = zeCommandListAppendQueryKernelTimestamps; driver_ddiTable.core_ddiTable.CommandList = *pDdiTable; if (driver_ddiTable.enableTracing) { - pDdiTable->pfnAppendBarrier = zeCommandListAppendBarrier_Tracing; - pDdiTable->pfnAppendMemoryRangesBarrier = zeCommandListAppendMemoryRangesBarrier_Tracing; - pDdiTable->pfnCreate = zeCommandListCreate_Tracing; - pDdiTable->pfnCreateImmediate = zeCommandListCreateImmediate_Tracing; - pDdiTable->pfnDestroy = zeCommandListDestroy_Tracing; - pDdiTable->pfnClose = zeCommandListClose_Tracing; - pDdiTable->pfnReset = zeCommandListReset_Tracing; - pDdiTable->pfnAppendMemoryCopy = zeCommandListAppendMemoryCopy_Tracing; - pDdiTable->pfnAppendMemoryCopyRegion = zeCommandListAppendMemoryCopyRegion_Tracing; - pDdiTable->pfnAppendMemoryFill = zeCommandListAppendMemoryFill_Tracing; - pDdiTable->pfnAppendImageCopy = zeCommandListAppendImageCopy_Tracing; - pDdiTable->pfnAppendImageCopyRegion = zeCommandListAppendImageCopyRegion_Tracing; - pDdiTable->pfnAppendImageCopyToMemory = zeCommandListAppendImageCopyToMemory_Tracing; - pDdiTable->pfnAppendImageCopyFromMemory = zeCommandListAppendImageCopyFromMemory_Tracing; - pDdiTable->pfnAppendMemoryPrefetch = zeCommandListAppendMemoryPrefetch_Tracing; - pDdiTable->pfnAppendMemAdvise = zeCommandListAppendMemAdvise_Tracing; - pDdiTable->pfnAppendSignalEvent = zeCommandListAppendSignalEvent_Tracing; - pDdiTable->pfnAppendWaitOnEvents = zeCommandListAppendWaitOnEvents_Tracing; - pDdiTable->pfnAppendEventReset = zeCommandListAppendEventReset_Tracing; - pDdiTable->pfnAppendLaunchKernel = zeCommandListAppendLaunchKernel_Tracing; - pDdiTable->pfnAppendLaunchCooperativeKernel = zeCommandListAppendLaunchCooperativeKernel_Tracing; - pDdiTable->pfnAppendLaunchKernelIndirect = zeCommandListAppendLaunchKernelIndirect_Tracing; - pDdiTable->pfnAppendLaunchMultipleKernelsIndirect = zeCommandListAppendLaunchMultipleKernelsIndirect_Tracing; - pDdiTable->pfnAppendWriteGlobalTimestamp = zeCommandListAppendWriteGlobalTimestamp_Tracing; - pDdiTable->pfnAppendMemoryCopyFromContext = zeCommandListAppendMemoryCopyFromContext_Tracing; - pDdiTable->pfnAppendQueryKernelTimestamps = zeCommandListAppendQueryKernelTimestamps_Tracing; + pDdiTable->pfnAppendBarrier = zeCommandListAppendBarrierTracing; + pDdiTable->pfnAppendMemoryRangesBarrier = zeCommandListAppendMemoryRangesBarrierTracing; + pDdiTable->pfnCreate = zeCommandListCreateTracing; + pDdiTable->pfnCreateImmediate = zeCommandListCreateImmediateTracing; + pDdiTable->pfnDestroy = zeCommandListDestroyTracing; + pDdiTable->pfnClose = zeCommandListCloseTracing; + pDdiTable->pfnReset = zeCommandListResetTracing; + pDdiTable->pfnAppendMemoryCopy = zeCommandListAppendMemoryCopyTracing; + pDdiTable->pfnAppendMemoryCopyRegion = zeCommandListAppendMemoryCopyRegionTracing; + pDdiTable->pfnAppendMemoryFill = zeCommandListAppendMemoryFillTracing; + pDdiTable->pfnAppendImageCopy = zeCommandListAppendImageCopyTracing; + pDdiTable->pfnAppendImageCopyRegion = zeCommandListAppendImageCopyRegionTracing; + pDdiTable->pfnAppendImageCopyToMemory = zeCommandListAppendImageCopyToMemoryTracing; + pDdiTable->pfnAppendImageCopyFromMemory = zeCommandListAppendImageCopyFromMemoryTracing; + pDdiTable->pfnAppendMemoryPrefetch = zeCommandListAppendMemoryPrefetchTracing; + pDdiTable->pfnAppendMemAdvise = zeCommandListAppendMemAdviseTracing; + pDdiTable->pfnAppendSignalEvent = zeCommandListAppendSignalEventTracing; + pDdiTable->pfnAppendWaitOnEvents = zeCommandListAppendWaitOnEventsTracing; + pDdiTable->pfnAppendEventReset = zeCommandListAppendEventResetTracing; + pDdiTable->pfnAppendLaunchKernel = zeCommandListAppendLaunchKernelTracing; + pDdiTable->pfnAppendLaunchCooperativeKernel = zeCommandListAppendLaunchCooperativeKernelTracing; + pDdiTable->pfnAppendLaunchKernelIndirect = zeCommandListAppendLaunchKernelIndirectTracing; + pDdiTable->pfnAppendLaunchMultipleKernelsIndirect = zeCommandListAppendLaunchMultipleKernelsIndirectTracing; + pDdiTable->pfnAppendWriteGlobalTimestamp = zeCommandListAppendWriteGlobalTimestampTracing; + pDdiTable->pfnAppendMemoryCopyFromContext = zeCommandListAppendMemoryCopyFromContextTracing; + pDdiTable->pfnAppendQueryKernelTimestamps = zeCommandListAppendQueryKernelTimestampsTracing; } return result; } @@ -350,7 +350,7 @@ zeGetFenceProcAddrTable( if (ZE_MAJOR_VERSION(driver_ddiTable.version) != ZE_MAJOR_VERSION(version) || ZE_MINOR_VERSION(driver_ddiTable.version) > ZE_MINOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; - driver_ddiTable.enableTracing = getenv_tobool("ZET_ENABLE_API_TRACING_EXP"); + driver_ddiTable.enableTracing = getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; pDdiTable->pfnCreate = zeFenceCreate; @@ -360,11 +360,11 @@ zeGetFenceProcAddrTable( pDdiTable->pfnReset = zeFenceReset; driver_ddiTable.core_ddiTable.Fence = *pDdiTable; if (driver_ddiTable.enableTracing) { - pDdiTable->pfnCreate = zeFenceCreate_Tracing; - pDdiTable->pfnDestroy = zeFenceDestroy_Tracing; - pDdiTable->pfnHostSynchronize = zeFenceHostSynchronize_Tracing; - pDdiTable->pfnQueryStatus = zeFenceQueryStatus_Tracing; - pDdiTable->pfnReset = zeFenceReset_Tracing; + pDdiTable->pfnCreate = zeFenceCreateTracing; + pDdiTable->pfnDestroy = zeFenceDestroyTracing; + pDdiTable->pfnHostSynchronize = zeFenceHostSynchronizeTracing; + pDdiTable->pfnQueryStatus = zeFenceQueryStatusTracing; + pDdiTable->pfnReset = zeFenceResetTracing; } return result; } @@ -378,7 +378,7 @@ zeGetEventPoolProcAddrTable( if (ZE_MAJOR_VERSION(driver_ddiTable.version) != ZE_MAJOR_VERSION(version) || ZE_MINOR_VERSION(driver_ddiTable.version) > ZE_MINOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; - driver_ddiTable.enableTracing = getenv_tobool("ZET_ENABLE_API_TRACING_EXP"); + driver_ddiTable.enableTracing = getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; pDdiTable->pfnCreate = zeEventPoolCreate; @@ -388,11 +388,11 @@ zeGetEventPoolProcAddrTable( pDdiTable->pfnCloseIpcHandle = zeEventPoolCloseIpcHandle; driver_ddiTable.core_ddiTable.EventPool = *pDdiTable; if (driver_ddiTable.enableTracing) { - pDdiTable->pfnCreate = zeEventPoolCreate_Tracing; - pDdiTable->pfnDestroy = zeEventPoolDestroy_Tracing; - pDdiTable->pfnGetIpcHandle = zeEventPoolGetIpcHandle_Tracing; - pDdiTable->pfnOpenIpcHandle = zeEventPoolOpenIpcHandle_Tracing; - pDdiTable->pfnCloseIpcHandle = zeEventPoolCloseIpcHandle_Tracing; + pDdiTable->pfnCreate = zeEventPoolCreateTracing; + pDdiTable->pfnDestroy = zeEventPoolDestroyTracing; + pDdiTable->pfnGetIpcHandle = zeEventPoolGetIpcHandleTracing; + pDdiTable->pfnOpenIpcHandle = zeEventPoolOpenIpcHandleTracing; + pDdiTable->pfnCloseIpcHandle = zeEventPoolCloseIpcHandleTracing; } return result; } @@ -406,7 +406,7 @@ zeGetEventProcAddrTable( if (ZE_MAJOR_VERSION(driver_ddiTable.version) != ZE_MAJOR_VERSION(version) || ZE_MINOR_VERSION(driver_ddiTable.version) > ZE_MINOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; - driver_ddiTable.enableTracing = getenv_tobool("ZET_ENABLE_API_TRACING_EXP"); + driver_ddiTable.enableTracing = getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; pDdiTable->pfnCreate = zeEventCreate; @@ -418,13 +418,13 @@ zeGetEventProcAddrTable( pDdiTable->pfnQueryKernelTimestamp = zeEventQueryKernelTimestamp; driver_ddiTable.core_ddiTable.Event = *pDdiTable; if (driver_ddiTable.enableTracing) { - pDdiTable->pfnCreate = zeEventCreate_Tracing; - pDdiTable->pfnDestroy = zeEventDestroy_Tracing; - pDdiTable->pfnHostSignal = zeEventHostSignal_Tracing; - pDdiTable->pfnHostSynchronize = zeEventHostSynchronize_Tracing; - pDdiTable->pfnQueryStatus = zeEventQueryStatus_Tracing; - pDdiTable->pfnHostReset = zeEventHostReset_Tracing; - pDdiTable->pfnQueryKernelTimestamp = zeEventQueryKernelTimestamp_Tracing; + pDdiTable->pfnCreate = zeEventCreateTracing; + pDdiTable->pfnDestroy = zeEventDestroyTracing; + pDdiTable->pfnHostSignal = zeEventHostSignalTracing; + pDdiTable->pfnHostSynchronize = zeEventHostSynchronizeTracing; + pDdiTable->pfnQueryStatus = zeEventQueryStatusTracing; + pDdiTable->pfnHostReset = zeEventHostResetTracing; + pDdiTable->pfnQueryKernelTimestamp = zeEventQueryKernelTimestampTracing; } return result; } @@ -454,7 +454,7 @@ zeGetImageProcAddrTable( if (ZE_MAJOR_VERSION(driver_ddiTable.version) != ZE_MAJOR_VERSION(version) || ZE_MINOR_VERSION(driver_ddiTable.version) > ZE_MINOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; - driver_ddiTable.enableTracing = getenv_tobool("ZET_ENABLE_API_TRACING_EXP"); + driver_ddiTable.enableTracing = getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; pDdiTable->pfnGetProperties = zeImageGetProperties; @@ -463,9 +463,9 @@ zeGetImageProcAddrTable( pDdiTable->pfnGetAllocPropertiesExt = zeImageGetAllocPropertiesExt; driver_ddiTable.core_ddiTable.Image = *pDdiTable; if (driver_ddiTable.enableTracing) { - pDdiTable->pfnGetProperties = zeImageGetProperties_Tracing; - pDdiTable->pfnCreate = zeImageCreate_Tracing; - pDdiTable->pfnDestroy = zeImageDestroy_Tracing; + pDdiTable->pfnGetProperties = zeImageGetPropertiesTracing; + pDdiTable->pfnCreate = zeImageCreateTracing; + pDdiTable->pfnDestroy = zeImageDestroyTracing; pDdiTable->pfnGetAllocPropertiesExt = zeImageGetAllocPropertiesExt; } return result; @@ -480,7 +480,7 @@ zeGetModuleProcAddrTable( if (ZE_MAJOR_VERSION(driver_ddiTable.version) != ZE_MAJOR_VERSION(version) || ZE_MINOR_VERSION(driver_ddiTable.version) > ZE_MINOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; - driver_ddiTable.enableTracing = getenv_tobool("ZET_ENABLE_API_TRACING_EXP"); + driver_ddiTable.enableTracing = getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; pDdiTable->pfnCreate = zeModuleCreate; @@ -493,14 +493,14 @@ zeGetModuleProcAddrTable( pDdiTable->pfnGetProperties = zeModuleGetProperties; driver_ddiTable.core_ddiTable.Module = *pDdiTable; if (driver_ddiTable.enableTracing) { - pDdiTable->pfnCreate = zeModuleCreate_Tracing; - pDdiTable->pfnDestroy = zeModuleDestroy_Tracing; - pDdiTable->pfnGetNativeBinary = zeModuleGetNativeBinary_Tracing; - pDdiTable->pfnDynamicLink = zeModuleDynamicLink_Tracing; - pDdiTable->pfnGetGlobalPointer = zeModuleGetGlobalPointer_Tracing; - pDdiTable->pfnGetFunctionPointer = zeModuleGetFunctionPointer_Tracing; - pDdiTable->pfnGetKernelNames = zeModuleGetKernelNames_Tracing; - pDdiTable->pfnGetProperties = zeModuleGetProperties_Tracing; + pDdiTable->pfnCreate = zeModuleCreateTracing; + pDdiTable->pfnDestroy = zeModuleDestroyTracing; + pDdiTable->pfnGetNativeBinary = zeModuleGetNativeBinaryTracing; + pDdiTable->pfnDynamicLink = zeModuleDynamicLinkTracing; + pDdiTable->pfnGetGlobalPointer = zeModuleGetGlobalPointerTracing; + pDdiTable->pfnGetFunctionPointer = zeModuleGetFunctionPointerTracing; + pDdiTable->pfnGetKernelNames = zeModuleGetKernelNamesTracing; + pDdiTable->pfnGetProperties = zeModuleGetPropertiesTracing; } return result; } @@ -514,15 +514,15 @@ zeGetModuleBuildLogProcAddrTable( if (ZE_MAJOR_VERSION(driver_ddiTable.version) != ZE_MAJOR_VERSION(version) || ZE_MINOR_VERSION(driver_ddiTable.version) > ZE_MINOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; - driver_ddiTable.enableTracing = getenv_tobool("ZET_ENABLE_API_TRACING_EXP"); + driver_ddiTable.enableTracing = getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; pDdiTable->pfnDestroy = zeModuleBuildLogDestroy; pDdiTable->pfnGetString = zeModuleBuildLogGetString; driver_ddiTable.core_ddiTable.ModuleBuildLog = *pDdiTable; if (driver_ddiTable.enableTracing) { - pDdiTable->pfnDestroy = zeModuleBuildLogDestroy_Tracing; - pDdiTable->pfnGetString = zeModuleBuildLogGetString_Tracing; + pDdiTable->pfnDestroy = zeModuleBuildLogDestroyTracing; + pDdiTable->pfnGetString = zeModuleBuildLogGetStringTracing; } return result; } @@ -536,7 +536,7 @@ zeGetKernelProcAddrTable( if (ZE_MAJOR_VERSION(driver_ddiTable.version) != ZE_MAJOR_VERSION(version) || ZE_MINOR_VERSION(driver_ddiTable.version) > ZE_MINOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; - driver_ddiTable.enableTracing = getenv_tobool("ZET_ENABLE_API_TRACING_EXP"); + driver_ddiTable.enableTracing = getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; pDdiTable->pfnCreate = zeKernelCreate; @@ -553,18 +553,18 @@ zeGetKernelProcAddrTable( pDdiTable->pfnGetName = zeKernelGetName; driver_ddiTable.core_ddiTable.Kernel = *pDdiTable; if (driver_ddiTable.enableTracing) { - pDdiTable->pfnCreate = zeKernelCreate_Tracing; - pDdiTable->pfnDestroy = zeKernelDestroy_Tracing; - pDdiTable->pfnSetGroupSize = zeKernelSetGroupSize_Tracing; - pDdiTable->pfnSuggestGroupSize = zeKernelSuggestGroupSize_Tracing; - pDdiTable->pfnSuggestMaxCooperativeGroupCount = zeKernelSuggestMaxCooperativeGroupCount_Tracing; - pDdiTable->pfnSetArgumentValue = zeKernelSetArgumentValue_Tracing; - pDdiTable->pfnSetIndirectAccess = zeKernelSetIndirectAccess_Tracing; - pDdiTable->pfnGetIndirectAccess = zeKernelGetIndirectAccess_Tracing; - pDdiTable->pfnGetSourceAttributes = zeKernelGetSourceAttributes_Tracing; - pDdiTable->pfnGetProperties = zeKernelGetProperties_Tracing; - pDdiTable->pfnSetCacheConfig = zeKernelSetCacheConfig_Tracing; - pDdiTable->pfnGetName = zeKernelGetName_Tracing; + pDdiTable->pfnCreate = zeKernelCreateTracing; + pDdiTable->pfnDestroy = zeKernelDestroyTracing; + pDdiTable->pfnSetGroupSize = zeKernelSetGroupSizeTracing; + pDdiTable->pfnSuggestGroupSize = zeKernelSuggestGroupSizeTracing; + pDdiTable->pfnSuggestMaxCooperativeGroupCount = zeKernelSuggestMaxCooperativeGroupCountTracing; + pDdiTable->pfnSetArgumentValue = zeKernelSetArgumentValueTracing; + pDdiTable->pfnSetIndirectAccess = zeKernelSetIndirectAccessTracing; + pDdiTable->pfnGetIndirectAccess = zeKernelGetIndirectAccessTracing; + pDdiTable->pfnGetSourceAttributes = zeKernelGetSourceAttributesTracing; + pDdiTable->pfnGetProperties = zeKernelGetPropertiesTracing; + pDdiTable->pfnSetCacheConfig = zeKernelSetCacheConfigTracing; + pDdiTable->pfnGetName = zeKernelGetNameTracing; } return result; } @@ -578,15 +578,15 @@ zeGetSamplerProcAddrTable( if (ZE_MAJOR_VERSION(driver_ddiTable.version) != ZE_MAJOR_VERSION(version) || ZE_MINOR_VERSION(driver_ddiTable.version) > ZE_MINOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; - driver_ddiTable.enableTracing = getenv_tobool("ZET_ENABLE_API_TRACING_EXP"); + driver_ddiTable.enableTracing = getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; pDdiTable->pfnCreate = zeSamplerCreate; pDdiTable->pfnDestroy = zeSamplerDestroy; driver_ddiTable.core_ddiTable.Sampler = *pDdiTable; if (driver_ddiTable.enableTracing) { - pDdiTable->pfnCreate = zeSamplerCreate_Tracing; - pDdiTable->pfnDestroy = zeSamplerDestroy_Tracing; + pDdiTable->pfnCreate = zeSamplerCreateTracing; + pDdiTable->pfnDestroy = zeSamplerDestroyTracing; } return result; } diff --git a/level_zero/core/source/cmdlist/cmdlist_hw_xehp_and_later.inl b/level_zero/core/source/cmdlist/cmdlist_hw_xehp_and_later.inl index 9e32ac237a..826061e1ed 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw_xehp_and_later.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw_xehp_and_later.inl @@ -77,7 +77,7 @@ void CommandListCoreFamily::applyMemoryRangesBarrier(uint32_t num } for (size_t subrangeNumber = 0; subrangeNumber < subranges.size(); subrangeNumber += NEO::maxFlushSubrangeCount) { size_t rangeCount = subranges.size() <= subrangeNumber + NEO::maxFlushSubrangeCount ? subranges.size() - subrangeNumber : NEO::maxFlushSubrangeCount; - NEO::Range range = CreateRange(subranges.begin() + subrangeNumber, rangeCount); + NEO::Range range = createRange(subranges.begin() + subrangeNumber, rangeCount); NEO::flushGpuCache(commandStream, range, postSyncAddressToFlush, device->getHwInfo()); } diff --git a/level_zero/core/test/aub_tests/fixtures/aub_fixture.cpp b/level_zero/core/test/aub_tests/fixtures/aub_fixture.cpp index edba0a422f..c8eeb59855 100644 --- a/level_zero/core/test/aub_tests/fixtures/aub_fixture.cpp +++ b/level_zero/core/test/aub_tests/fixtures/aub_fixture.cpp @@ -82,7 +82,7 @@ void AUBFixtureL0::SetUp(const NEO::HardwareInfo *hardwareInfo, bool debuggingEn context = static_cast(Context::fromHandle(hContext)); ze_result_t returnValue; - commandList.reset(ult::whitebox_cast(CommandList::create(hwInfo.platform.eProductFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + commandList.reset(ult::whiteboxCast(CommandList::create(hwInfo.platform.eProductFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); returnValue = ZE_RESULT_ERROR_UNINITIALIZED; ze_command_queue_desc_t queueDesc = {}; diff --git a/level_zero/core/test/black_box_tests/zello_ipc_copy_dma_buf.cpp b/level_zero/core/test/black_box_tests/zello_ipc_copy_dma_buf.cpp index af5e7abdab..d03d0d09c8 100644 --- a/level_zero/core/test/black_box_tests/zello_ipc_copy_dma_buf.cpp +++ b/level_zero/core/test/black_box_tests/zello_ipc_copy_dma_buf.cpp @@ -133,7 +133,7 @@ inline void initializeProcess(ze_driver_handle_t &driverHandle, typedef ze_result_t (*pFnzexMemGetIpcHandle)(ze_context_handle_t, const void *, uint32_t *, ze_ipc_mem_handle_t *); typedef ze_result_t (*pFnzexMemOpenIpcHandle)(ze_context_handle_t, ze_device_handle_t, uint32_t, ze_ipc_mem_handle_t *, ze_ipc_memory_flags_t, void **); -void run_client(int commSocket, uint32_t clientId) { +void runClient(int commSocket, uint32_t clientId) { std::cout << "Client " << clientId << ", process ID: " << std::dec << getpid() << "\n"; ze_driver_handle_t driverHandle; @@ -202,7 +202,7 @@ void run_client(int commSocket, uint32_t clientId) { delete[] heapBuffer; } -void run_server(bool &validRet) { +void runServer(bool &validRet) { std::cout << "Server process ID " << std::dec << getpid() << "\n"; ze_driver_handle_t driverHandle; @@ -331,13 +331,13 @@ int main(int argc, char *argv[]) { exit(1); } else if (childPids[i] == 0) { close(sv[i][0]); - run_client(sv[i][1], i); + runClient(sv[i][1], i); close(sv[i][1]); exit(0); } } - run_server(outputValidationSuccessful); + runServer(outputValidationSuccessful); std::cout << "\nZello IPC Results validation " << (outputValidationSuccessful ? "PASSED" : "FAILED") diff --git a/level_zero/core/test/black_box_tests/zello_ipc_copy_dma_buf_p2p.cpp b/level_zero/core/test/black_box_tests/zello_ipc_copy_dma_buf_p2p.cpp index 4803052bc2..580f2b27a1 100644 --- a/level_zero/core/test/black_box_tests/zello_ipc_copy_dma_buf_p2p.cpp +++ b/level_zero/core/test/black_box_tests/zello_ipc_copy_dma_buf_p2p.cpp @@ -20,7 +20,7 @@ uint8_t uinitializedPattern = 1; uint8_t expectedPattern = 7; size_t allocSize = 4096 + 7; // +7 to break alignment and make it harder -static int sendmsg_fd(int socket, int fd) { +static int sendmsgFd(int socket, int fd) { char sendBuf[sizeof(ze_ipc_mem_handle_t)] = {}; char cmsgBuf[CMSG_SPACE(sizeof(ze_ipc_mem_handle_t))]; @@ -48,7 +48,7 @@ static int sendmsg_fd(int socket, int fd) { return 0; } -static int recvmsg_fd(int socket) { +static int recvmsgFd(int socket) { int fd = -1; char recvBuf[sizeof(ze_ipc_mem_handle_t)] = {}; char cmsgBuf[CMSG_SPACE(sizeof(ze_ipc_mem_handle_t))]; @@ -198,7 +198,7 @@ inline void initializeProcess(ze_context_handle_t &context, SUCCESS_OR_TERMINATE(zeCommandListCreate(context, device, &cmdListDescCopy, &cmdListCopy)); } -void run_client(int commSocket) { +void runClient(int commSocket) { std::cout << "Client process " << std::dec << getpid() << "\n"; ze_context_handle_t context; @@ -220,7 +220,7 @@ void run_client(int commSocket) { SUCCESS_OR_TERMINATE(zeCommandQueueSynchronize(cmdQueue, std::numeric_limits::max())); // get the dma_buf from the other process - int dmaBufFd = recvmsg_fd(commSocket); + int dmaBufFd = recvmsgFd(commSocket); if (dmaBufFd < 0) { std::cerr << "Failing to get dma_buf fd from server\n"; std::terminate(); @@ -249,7 +249,7 @@ void run_client(int commSocket) { SUCCESS_OR_TERMINATE(zeContextDestroy(context)); } -void run_server(int commSocket, bool &validRet) { +void runServer(int commSocket, bool &validRet) { std::cout << "Server process " << std::dec << getpid() << "\n"; ze_context_handle_t context; @@ -280,7 +280,7 @@ void run_server(int commSocket, bool &validRet) { // Pass the dma_buf to the other process int dmaBufFd; memcpy(static_cast(&dmaBufFd), &pIpcHandle, sizeof(dmaBufFd)); - if (sendmsg_fd(commSocket, static_cast(dmaBufFd)) < 0) { + if (sendmsgFd(commSocket, static_cast(dmaBufFd)) < 0) { std::cerr << "Failing to send dma_buf fd to client\n"; std::terminate(); } @@ -346,12 +346,12 @@ int main(int argc, char *argv[]) { exit(1); } else if (0 == child) { close(sv[0]); - run_client(sv[1]); + runClient(sv[1]); close(sv[1]); exit(0); } else { close(sv[1]); - run_server(sv[0], outputValidationSuccessful); + runServer(sv[0], outputValidationSuccessful); close(sv[0]); } diff --git a/level_zero/core/test/unit_tests/fixtures/cmdlist_fixture.h b/level_zero/core/test/unit_tests/fixtures/cmdlist_fixture.h index b4ee257995..fddee154a2 100644 --- a/level_zero/core/test/unit_tests/fixtures/cmdlist_fixture.h +++ b/level_zero/core/test/unit_tests/fixtures/cmdlist_fixture.h @@ -24,7 +24,7 @@ class CommandListFixture : public DeviceFixture { void SetUp() { DeviceFixture::SetUp(); ze_result_t returnValue; - commandList.reset(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + commandList.reset(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); ze_event_pool_desc_t eventPoolDesc = {}; eventPoolDesc.flags = ZE_EVENT_POOL_FLAG_HOST_VISIBLE; @@ -61,10 +61,10 @@ struct MultiTileCommandListFixture : public SingleRootMultiSubDeviceFixture { NEO::EngineGroupType cmdListEngineType = createCopy ? NEO::EngineGroupType::Copy : NEO::EngineGroupType::RenderCompute; if (!createImmediate) { - commandList.reset(whitebox_cast(CommandList::create(productFamily, device, cmdListEngineType, 0u, returnValue))); + commandList.reset(whiteboxCast(CommandList::create(productFamily, device, cmdListEngineType, 0u, returnValue))); } else { const ze_command_queue_desc_t desc = {}; - commandList.reset(whitebox_cast(CommandList::createImmediate(productFamily, device, &desc, createInternal, cmdListEngineType, returnValue))); + commandList.reset(whiteboxCast(CommandList::createImmediate(productFamily, device, &desc, createInternal, cmdListEngineType, returnValue))); } ASSERT_EQ(ZE_RESULT_SUCCESS, returnValue); diff --git a/level_zero/core/test/unit_tests/gen11/test_cmdqueue_thread_arbitration_policy_gen11.cpp b/level_zero/core/test/unit_tests/gen11/test_cmdqueue_thread_arbitration_policy_gen11.cpp index 3acd5ed053..12b3916d8e 100644 --- a/level_zero/core/test/unit_tests/gen11/test_cmdqueue_thread_arbitration_policy_gen11.cpp +++ b/level_zero/core/test/unit_tests/gen11/test_cmdqueue_thread_arbitration_policy_gen11.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -34,7 +34,7 @@ struct CommandQueueThreadArbitrationPolicyTests : public ::testing::Test { std::vector> devices; devices.push_back(std::unique_ptr(neoDevice)); - auto driverHandleUlt = whitebox_cast(DriverHandle::create(std::move(devices), L0EnvVariables{}, &returnValue)); + auto driverHandleUlt = whiteboxCast(DriverHandle::create(std::move(devices), L0EnvVariables{}, &returnValue)); driverHandle.reset(driverHandleUlt); ASSERT_NE(nullptr, driverHandle); @@ -47,12 +47,12 @@ struct CommandQueueThreadArbitrationPolicyTests : public ::testing::Test { ASSERT_NE(nullptr, device); ze_command_queue_desc_t queueDesc = {}; - commandQueue = whitebox_cast(CommandQueue::create(productFamily, device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &queueDesc, - false, - false, - returnValue)); + commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &queueDesc, + false, + false, + returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); commandList = CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue); diff --git a/level_zero/core/test/unit_tests/gen9/test_cmdqueue_enqueuecommandlist_gen9.cpp b/level_zero/core/test/unit_tests/gen9/test_cmdqueue_enqueuecommandlist_gen9.cpp index bb44fe70c1..c9ea5039cc 100644 --- a/level_zero/core/test/unit_tests/gen9/test_cmdqueue_enqueuecommandlist_gen9.cpp +++ b/level_zero/core/test/unit_tests/gen9/test_cmdqueue_enqueuecommandlist_gen9.cpp @@ -31,7 +31,7 @@ using CommandQueueExecuteCommandListsGen9 = Test; GEN9TEST_F(CommandQueueExecuteCommandListsGen9, WhenExecutingCmdListsThenPipelineSelectAndVfeStateAreAddedToCmdBuffer) { const ze_command_queue_desc_t desc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create( + auto commandQueue = whiteboxCast(CommandQueue::create( productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); @@ -72,7 +72,7 @@ GEN9TEST_F(CommandQueueExecuteCommandListsGen9, WhenExecutingCmdListsThenPipelin GEN9TEST_F(CommandQueueExecuteCommandListsGen9, WhenExecutingCmdListsThenStateBaseAddressForGeneralStateBaseAddressIsAdded) { const ze_command_queue_desc_t desc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create( + auto commandQueue = whiteboxCast(CommandQueue::create( productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); @@ -120,13 +120,13 @@ GEN9TEST_F(CommandQueueExecuteCommandListsGen9, WhenExecutingCmdListsThenStateBa GEN9TEST_F(CommandQueueExecuteCommandListsGen9, WhenExecutingCmdListsThenMidThreadPreemptionForFirstExecuteIsConfigured) { const ze_command_queue_desc_t desc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create( + auto commandQueue = whiteboxCast(CommandQueue::create( productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); auto usedSpaceBefore = commandQueue->commandStream->getUsed(); - auto commandList = whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)); + auto commandList = whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)); commandList->commandListPreemptionMode = NEO::PreemptionMode::MidThread; ze_command_list_handle_t commandLists[] = {commandList->toHandle()}; @@ -167,16 +167,16 @@ GEN9TEST_F(CommandQueueExecuteCommandListsGen9, WhenExecutingCmdListsThenMidThre GEN9TEST_F(CommandQueueExecuteCommandListsGen9, GivenCmdListsWithDifferentPreemptionModesWhenExecutingThenQueuePreemptionIsSwitchedFromMidThreadToThreadGroupAndMidThread) { const ze_command_queue_desc_t desc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create( + auto commandQueue = whiteboxCast(CommandQueue::create( productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); auto usedSpaceBefore = commandQueue->commandStream->getUsed(); - auto commandListMidThread = whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)); + auto commandListMidThread = whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)); commandListMidThread->commandListPreemptionMode = NEO::PreemptionMode::MidThread; - auto commandListThreadGroup = whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)); + auto commandListThreadGroup = whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)); commandListThreadGroup->commandListPreemptionMode = NEO::PreemptionMode::ThreadGroup; ze_command_list_handle_t commandLists[] = {commandListMidThread->toHandle(), diff --git a/level_zero/core/test/unit_tests/gen9/test_cmdqueue_gen9.cpp b/level_zero/core/test/unit_tests/gen9/test_cmdqueue_gen9.cpp index 3ea0d8fbab..65fbec2028 100644 --- a/level_zero/core/test/unit_tests/gen9/test_cmdqueue_gen9.cpp +++ b/level_zero/core/test/unit_tests/gen9/test_cmdqueue_gen9.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -36,7 +36,7 @@ struct CommandQueueThreadArbitrationPolicyTests : public ::testing::Test { std::vector> devices; devices.push_back(std::unique_ptr(neoDevice)); - auto driverHandleUlt = whitebox_cast(DriverHandle::create(std::move(devices), L0EnvVariables{}, &returnValue)); + auto driverHandleUlt = whiteboxCast(DriverHandle::create(std::move(devices), L0EnvVariables{}, &returnValue)); driverHandle.reset(driverHandleUlt); ASSERT_NE(nullptr, driverHandle); @@ -49,12 +49,12 @@ struct CommandQueueThreadArbitrationPolicyTests : public ::testing::Test { ASSERT_NE(nullptr, device); ze_command_queue_desc_t queueDesc = {}; - commandQueue = whitebox_cast(CommandQueue::create(productFamily, device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &queueDesc, - false, - false, - returnValue)); + commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &queueDesc, + false, + false, + returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); commandList = CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue); diff --git a/level_zero/core/test/unit_tests/main.cpp b/level_zero/core/test/unit_tests/main.cpp index 46c9c02d8e..5590b9f8a9 100644 --- a/level_zero/core/test/unit_tests/main.cpp +++ b/level_zero/core/test/unit_tests/main.cpp @@ -137,7 +137,7 @@ void applyWorkarounds() { //Create FileLogger to prevent false memory leaks { - NEO::FileLoggerInstance(); + NEO::fileLoggerInstance(); } } diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp index ca1ff468ca..8fa0e45936 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp @@ -78,7 +78,7 @@ TEST_F(CommandListCreate, whenCommandListIsCreatedThenItIsInitialized) { ASSERT_GT(commandList->commandContainer.getCmdBufferAllocations().size(), 0u); auto numAllocations = 0u; - auto allocation = whitebox_cast(commandList->commandContainer.getCmdBufferAllocations()[0]); + auto allocation = whiteboxCast(commandList->commandContainer.getCmdBufferAllocations()[0]); ASSERT_NE(allocation, nullptr); ++numAllocations; diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_event_reset.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_event_reset.cpp index b3fcb14813..d4e3fc8b69 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_event_reset.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_event_reset.cpp @@ -136,7 +136,7 @@ HWTEST_F(CommandListAppendEventReset, whenResetEventIsAppendedAndNoSpaceIsAvaila HWTEST_F(CommandListAppendEventReset, givenCopyOnlyCmdlistWhenResetEventAppendedThenMiFlushWithPostSyncIsGenerated) { using MI_FLUSH_DW = typename FamilyType::MI_FLUSH_DW; ze_result_t returnValue; - commandList.reset(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::Copy, 0u, returnValue))); + commandList.reset(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::Copy, 0u, returnValue))); auto usedSpaceBefore = commandList->commandContainer.getCommandStream()->getUsed(); diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_1.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_1.cpp index 8960ad0ce7..80f2a2f705 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_1.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_1.cpp @@ -573,11 +573,11 @@ HWTEST_F(CommandListAppendLaunchKernel, givenCommandListWhenResetCalledThenState createKernel(); ze_result_t returnValue; - auto commandList = std::unique_ptr(whitebox_cast(L0::CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandList = std::unique_ptr(whiteboxCast(L0::CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); ASSERT_NE(nullptr, commandList); ASSERT_NE(nullptr, commandList->commandContainer.getCommandStream()); - auto commandListControl = std::unique_ptr(whitebox_cast(L0::CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandListControl = std::unique_ptr(whiteboxCast(L0::CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); ASSERT_NE(nullptr, commandListControl); ASSERT_NE(nullptr, commandListControl->commandContainer.getCommandStream()); diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_2.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_2.cpp index cb0ca16560..960271b8c6 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_2.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_2.cpp @@ -802,11 +802,11 @@ HWTEST_F(CommandListArbitrationPolicyTest, whenCreatingCommandListThenDefaultThr using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS; ze_result_t returnValue; - auto commandList = std::unique_ptr(whitebox_cast(L0::CommandList::create(productFamily, - device, - NEO::EngineGroupType::RenderCompute, - 0u, - returnValue))); + auto commandList = std::unique_ptr(whiteboxCast(L0::CommandList::create(productFamily, + device, + NEO::EngineGroupType::RenderCompute, + 0u, + returnValue))); EXPECT_NE(nullptr, commandList); EXPECT_NE(nullptr, commandList->commandContainer.getCommandStream()); @@ -834,11 +834,11 @@ HWTEST_F(CommandListArbitrationPolicyTest, whenCreatingCommandListThenChosenThre using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS; ze_result_t returnValue; - auto commandList = std::unique_ptr(whitebox_cast(L0::CommandList::create(productFamily, - device, - NEO::EngineGroupType::RenderCompute, - 0u, - returnValue))); + auto commandList = std::unique_ptr(whiteboxCast(L0::CommandList::create(productFamily, + device, + NEO::EngineGroupType::RenderCompute, + 0u, + returnValue))); EXPECT_NE(nullptr, commandList); EXPECT_NE(nullptr, commandList->commandContainer.getCommandStream()); @@ -864,11 +864,11 @@ HWTEST_F(CommandListArbitrationPolicyTest, whenCommandListIsResetThenOriginalThr using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS; ze_result_t returnValue; - auto commandList = std::unique_ptr(whitebox_cast(L0::CommandList::create(productFamily, - device, - NEO::EngineGroupType::RenderCompute, - 0u, - returnValue))); + auto commandList = std::unique_ptr(whiteboxCast(L0::CommandList::create(productFamily, + device, + NEO::EngineGroupType::RenderCompute, + 0u, + returnValue))); EXPECT_NE(nullptr, commandList); EXPECT_NE(nullptr, commandList->commandContainer.getCommandStream()); @@ -1284,7 +1284,7 @@ struct MultiTileCommandListAppendLaunchFunctionXeHpCoreFixture : public MultiDev contextImp = static_cast(Context::fromHandle(hContext)); ze_result_t returnValue; - commandList = whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)); + commandList = whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)); EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue); } diff --git a/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_1.cpp b/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_1.cpp index 7e70b21a00..ffe0a01055 100644 --- a/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_1.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_1.cpp @@ -29,13 +29,13 @@ TEST_F(CommandQueueCreate, whenCreatingCommandQueueThenItIsInitialized) { csr->setupContext(*neoDevice->getDefaultEngine().osContext); const ze_command_queue_desc_t desc{}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - csr.get(), - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + csr.get(), + &desc, + false, + false, + returnValue)); EXPECT_EQ(returnValue, ZE_RESULT_SUCCESS); ASSERT_NE(nullptr, commandQueue); @@ -64,13 +64,13 @@ TEST_F(CommandQueueCreate, whenCreatingCommandQueueThenItIsInitialized) { TEST_F(CommandQueueCreate, whenSynchronizeByPollingTaskCountThenCallsPrintOutputOnPrintfFunctionsStoredAndClearsFunctionContainer) { const ze_command_queue_desc_t desc{}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + false, + returnValue)); Mock kernel1, kernel2; @@ -91,13 +91,13 @@ HWTEST_F(CommandQueueCreate, givenGpuHangOnSecondReserveWhenReservingLinearStrea ze_result_t returnValue; NEO::WaitStatus waitStatus{NEO::WaitStatus::NotReady}; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + false, + returnValue)); size_t maxSize = commandQueue->commandStream->getMaxAvailableSpace(); @@ -132,13 +132,13 @@ HWTEST_F(CommandQueueCreate, whenReserveLinearStreamThenBufferAllocationSwitched ze_result_t returnValue; NEO::WaitStatus waitStatus{NEO::WaitStatus::NotReady}; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + false, + returnValue)); size_t maxSize = commandQueue->commandStream->getMaxAvailableSpace(); @@ -206,13 +206,13 @@ TEST_F(CommandQueueCreate, whenCreatingCommandQueueWithInvalidProductFamilyThenF TEST_F(CommandQueueCreate, whenCmdBuffersAllocationsAreCreatedThenSizeIsNotLessThanQueuesLinearStreamSize) { const ze_command_queue_desc_t desc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + false, + returnValue)); size_t maxSize = commandQueue->commandStream->getMaxAvailableSpace(); @@ -238,19 +238,19 @@ HWTEST_F(CommandQueueCreate, given100CmdListsWhenExecutingThenCommandStreamIsNot const ze_command_queue_desc_t desc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + false, + returnValue)); ASSERT_NE(nullptr, commandQueue); Mock kernel; kernel.immutableData.device = device; - auto commandList = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandList = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); ASSERT_NE(nullptr, commandList); ze_group_count_t dispatchFunctionArguments{1, 1, 1}; @@ -288,7 +288,7 @@ HWTEST2_F(CommandQueueCreate, givenGpuHangInReservingLinearStreamWhenExecutingCo kernel.immutableData.device = device; ze_result_t returnValue; - auto commandList = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandList = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); ASSERT_NE(nullptr, commandList); ze_group_count_t dispatchFunctionArguments{1, 1, 1}; @@ -309,15 +309,15 @@ HWTEST_F(CommandQueueCreate, givenUpdateTaskCountFromWaitWhenDispatchTaskCountWr const ze_command_queue_desc_t desc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + false, + returnValue)); - auto commandList = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandList = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); ASSERT_NE(nullptr, commandList); ze_command_list_handle_t cmdListHandle = commandList->toHandle(); @@ -345,13 +345,13 @@ HWTEST_F(CommandQueueCreate, givenContainerWithAllocationsWhenResidencyContainer csr->setupContext(*neoDevice->getDefaultEngine().osContext); const ze_command_queue_desc_t desc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - csr.get(), - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + csr.get(), + &desc, + false, + false, + returnValue)); ResidencyContainer container; commandQueue->submitBatchBuffer(0, container, nullptr, false); EXPECT_EQ(csr->makeResidentCalledTimes, 0u); @@ -366,13 +366,13 @@ HWTEST_F(CommandQueueCreate, givenCommandStreamReceiverFailsThenSubmitBatchBuffe csr->setupContext(*neoDevice->getDefaultEngine().osContext); const ze_command_queue_desc_t desc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - csr.get(), - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + csr.get(), + &desc, + false, + false, + returnValue)); ResidencyContainer container; NEO::SubmissionStatus ret = commandQueue->submitBatchBuffer(0, container, nullptr, false); EXPECT_EQ(ret, NEO::SubmissionStatus::FAILED); @@ -385,13 +385,13 @@ HWTEST_F(CommandQueueCreate, givenOutOfMemoryThenSubmitBatchBufferReturnsOutOfMe csr->setupContext(*neoDevice->getDefaultEngine().osContext); const ze_command_queue_desc_t desc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - csr.get(), - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + csr.get(), + &desc, + false, + false, + returnValue)); ResidencyContainer container; NEO::SubmissionStatus ret = commandQueue->submitBatchBuffer(0, container, nullptr, false); EXPECT_EQ(ret, NEO::SubmissionStatus::OUT_OF_MEMORY); @@ -403,13 +403,13 @@ TEST_F(CommandQueueCreate, whenCommandQueueCreatedThenExpectLinearStreamInitiali const ze_command_queue_desc_t desc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + false, + returnValue)); ASSERT_NE(commandQueue, nullptr); size_t commandStreamSize = MemoryConstants::kiloByte * 128u; @@ -427,16 +427,16 @@ HWTEST_F(CommandQueueCreate, givenQueueInAsyncModeAndRugularCmdListWithAppendBar ze_command_queue_desc_t desc = {}; desc.mode = ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + false, + returnValue)); ASSERT_NE(nullptr, commandQueue); - auto commandList = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandList = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); ASSERT_NE(nullptr, commandList); commandList->appendBarrier(nullptr, 0, nullptr); @@ -448,16 +448,16 @@ HWTEST_F(CommandQueueCreate, givenQueueInSyncModeAndRugularCmdListWithAppendBarr ze_command_queue_desc_t desc = {}; desc.mode = ZE_COMMAND_QUEUE_MODE_SYNCHRONOUS; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + false, + returnValue)); ASSERT_NE(nullptr, commandQueue); - auto commandList = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandList = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); ASSERT_NE(nullptr, commandList); commandList->appendBarrier(nullptr, 0, nullptr); @@ -1579,16 +1579,16 @@ HWTEST2_F(ExecuteCommandListTests, givenCommandQueueHavingTwoB2BCommandListsThen NEO::CommandStreamReceiver *csr; device->getCsrForOrdinalAndIndex(&csr, 0u, 0u); ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - csr, - &desc, - false, - false, - returnValue)); - auto commandList0 = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + csr, + &desc, + false, + false, + returnValue)); + auto commandList0 = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); commandList0->setCommandListPerThreadScratchSize(0u); - auto commandList1 = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandList1 = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); commandList1->setCommandListPerThreadScratchSize(0u); auto commandListHandle0 = commandList0->toHandle(); auto commandListHandle1 = commandList1->toHandle(); @@ -1688,8 +1688,8 @@ HWTEST2_F(EngineInstancedDeviceExecuteTests, givenEngineInstancedDeviceWhenExecu NEO::CommandStreamReceiver *csr; l0Device->getCsrForOrdinalAndIndex(&csr, 0u, 0u); ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, l0Device, csr, &desc, false, false, returnValue)); - auto commandList = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, l0Device, NEO::EngineGroupType::Compute, 0u, returnValue))); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, l0Device, csr, &desc, false, false, returnValue)); + auto commandList = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, l0Device, NEO::EngineGroupType::Compute, 0u, returnValue))); auto commandListHandle = commandList->toHandle(); commandQueue->executeCommandLists(1, &commandListHandle, nullptr, false); @@ -1716,15 +1716,15 @@ HWTEST2_F(ExecuteCommandListTests, givenTwoCommandQueuesHavingTwoB2BCommandLists NEO::CommandStreamReceiver *csr; device->getCsrForOrdinalAndIndex(&csr, 0u, 0u); ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - csr, - &desc, - false, - false, - returnValue)); - auto commandList0 = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); - auto commandList1 = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + csr, + &desc, + false, + false, + returnValue)); + auto commandList0 = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandList1 = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); commandList0->setCommandListPerThreadScratchSize(512u); commandList1->setCommandListPerThreadScratchSize(0u); auto commandListHandle0 = commandList0->toHandle(); @@ -1752,13 +1752,13 @@ HWTEST2_F(ExecuteCommandListTests, givenTwoCommandQueuesHavingTwoB2BCommandLists commandList1->reset(); commandList1->setCommandListPerThreadScratchSize(0u); - auto commandQueue1 = whitebox_cast(CommandQueue::create(productFamily, - device, - csr, - &desc, - false, - false, - returnValue)); + auto commandQueue1 = whiteboxCast(CommandQueue::create(productFamily, + device, + csr, + &desc, + false, + false, + returnValue)); commandQueue1->executeCommandLists(1, &commandListHandle0, nullptr, false); EXPECT_EQ(512u, csr->getScratchSpaceController()->getPerThreadScratchSpaceSize()); @@ -1788,15 +1788,15 @@ HWTEST2_F(ExecuteCommandListTests, givenTwoCommandQueuesHavingTwoB2BCommandLists NEO::CommandStreamReceiver *csr; device->getCsrForOrdinalAndIndex(&csr, 0u, 0u); ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - csr, - &desc, - false, - false, - returnValue)); - auto commandList0 = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); - auto commandList1 = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + csr, + &desc, + false, + false, + returnValue)); + auto commandList0 = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandList1 = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); commandList0->setCommandListPerThreadScratchSize(0u); commandList1->setCommandListPerThreadScratchSize(512u); auto commandListHandle0 = commandList0->toHandle(); @@ -1824,13 +1824,13 @@ HWTEST2_F(ExecuteCommandListTests, givenTwoCommandQueuesHavingTwoB2BCommandLists commandList1->reset(); commandList1->setCommandListPerThreadScratchSize(0u); - auto commandQueue1 = whitebox_cast(CommandQueue::create(productFamily, - device, - csr, - &desc, - false, - false, - returnValue)); + auto commandQueue1 = whiteboxCast(CommandQueue::create(productFamily, + device, + csr, + &desc, + false, + false, + returnValue)); commandQueue1->executeCommandLists(1, &commandListHandle0, nullptr, false); EXPECT_EQ(512u, csr->getScratchSpaceController()->getPerThreadScratchSpaceSize()); @@ -1860,15 +1860,15 @@ HWTEST2_F(ExecuteCommandListTests, givenTwoCommandQueuesHavingTwoB2BCommandLists NEO::CommandStreamReceiver *csr; device->getCsrForOrdinalAndIndex(&csr, 0u, 0u); ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - csr, - &desc, - false, - false, - returnValue)); - auto commandList0 = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); - auto commandList1 = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + csr, + &desc, + false, + false, + returnValue)); + auto commandList0 = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandList1 = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); commandList0->setCommandListPerThreadScratchSize(512u); commandList1->setCommandListPerThreadScratchSize(512u); auto commandListHandle0 = commandList0->toHandle(); @@ -1896,13 +1896,13 @@ HWTEST2_F(ExecuteCommandListTests, givenTwoCommandQueuesHavingTwoB2BCommandLists commandList1->reset(); commandList1->setCommandListPerThreadScratchSize(1024u); - auto commandQueue1 = whitebox_cast(CommandQueue::create(productFamily, - device, - csr, - &desc, - false, - false, - returnValue)); + auto commandQueue1 = whiteboxCast(CommandQueue::create(productFamily, + device, + csr, + &desc, + false, + false, + returnValue)); commandQueue1->executeCommandLists(1, &commandListHandle0, nullptr, false); EXPECT_EQ(1024u, csr->getScratchSpaceController()->getPerThreadScratchSpaceSize()); @@ -1932,15 +1932,15 @@ HWTEST2_F(ExecuteCommandListTests, givenTwoCommandQueuesHavingTwoB2BCommandLists NEO::CommandStreamReceiver *csr; device->getCsrForOrdinalAndIndex(&csr, 0u, 0u); ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - csr, - &desc, - false, - false, - returnValue)); - auto commandList0 = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); - auto commandList1 = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + csr, + &desc, + false, + false, + returnValue)); + auto commandList0 = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandList1 = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); commandList0->setCommandListPerThreadScratchSize(0u); commandList1->setCommandListPerThreadScratchSize(512u); auto commandListHandle0 = commandList0->toHandle(); @@ -1968,13 +1968,13 @@ HWTEST2_F(ExecuteCommandListTests, givenTwoCommandQueuesHavingTwoB2BCommandLists commandList1->reset(); commandList1->setCommandListPerThreadScratchSize(2048u); - auto commandQueue1 = whitebox_cast(CommandQueue::create(productFamily, - device, - csr, - &desc, - false, - false, - returnValue)); + auto commandQueue1 = whiteboxCast(CommandQueue::create(productFamily, + device, + csr, + &desc, + false, + false, + returnValue)); commandQueue1->executeCommandLists(1, &commandListHandle0, nullptr, false); EXPECT_EQ(1024u, csr->getScratchSpaceController()->getPerThreadScratchSpaceSize()); commandQueue1->executeCommandLists(1, &commandListHandle1, nullptr, false); @@ -2002,15 +2002,15 @@ HWTEST2_F(ExecuteCommandListTests, givenTwoCommandQueuesHavingTwoB2BCommandLists NEO::CommandStreamReceiver *csr; device->getCsrForOrdinalAndIndex(&csr, 0u, 0u); ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - csr, - &desc, - false, - false, - returnValue)); - auto commandList0 = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); - auto commandList1 = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + csr, + &desc, + false, + false, + returnValue)); + auto commandList0 = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandList1 = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); commandList0->setCommandListPerThreadPrivateScratchSize(0u); commandList1->setCommandListPerThreadPrivateScratchSize(512u); auto commandListHandle0 = commandList0->toHandle(); @@ -2036,13 +2036,13 @@ HWTEST2_F(ExecuteCommandListTests, givenTwoCommandQueuesHavingTwoB2BCommandLists commandList1->reset(); commandList1->setCommandListPerThreadPrivateScratchSize(2048u); - auto commandQueue1 = whitebox_cast(CommandQueue::create(productFamily, - device, - csr, - &desc, - false, - false, - returnValue)); + auto commandQueue1 = whiteboxCast(CommandQueue::create(productFamily, + device, + csr, + &desc, + false, + false, + returnValue)); commandQueue1->executeCommandLists(1, &commandListHandle0, nullptr, false); EXPECT_EQ(1024u, csr->getScratchSpaceController()->getPerThreadPrivateScratchSize()); commandQueue1->executeCommandLists(1, &commandListHandle1, nullptr, false); @@ -2069,14 +2069,14 @@ HWTEST_F(ExecuteCommandListTests, givenDirectSubmissionEnabledWhenExecutingCmdLi device->getCsrForOrdinalAndIndex(&csr, 0u, 0u); static_cast *>(csr)->directSubmissionAvailable = true; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - csr, - &desc, - false, - false, - returnValue)); - auto commandList = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + csr, + &desc, + false, + false, + returnValue)); + auto commandList = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); commandList->setCommandListPerThreadPrivateScratchSize(0u); auto commandListHandle = commandList->toHandle(); @@ -2111,14 +2111,14 @@ HWTEST_F(ExecuteCommandListTests, givenDirectSubmissionEnabledAndDebugFlagSetWhe device->getCsrForOrdinalAndIndex(&csr, 0u, 0u); static_cast *>(csr)->directSubmissionAvailable = true; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - csr, - &desc, - false, - false, - returnValue)); - auto commandList = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + csr, + &desc, + false, + false, + returnValue)); + auto commandList = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); commandList->setCommandListPerThreadPrivateScratchSize(0u); auto commandListHandle = commandList->toHandle(); diff --git a/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_2.cpp b/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_2.cpp index 42ad4e82d9..39db1501a1 100644 --- a/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_2.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_2.cpp @@ -214,7 +214,7 @@ HWTEST_F(CommandQueueSynchronizeTest, givenGpuHangWhenCallingSynchronizeThenErro ASSERT_EQ(ZE_RESULT_SUCCESS, res); ASSERT_NE(nullptr, commandQueue); - auto queue = whitebox_cast(L0::CommandQueue::fromHandle(commandQueue)); + auto queue = whiteboxCast(L0::CommandQueue::fromHandle(commandQueue)); queue->csr = csr.get(); constexpr auto timeout{std::numeric_limits::max()}; @@ -243,7 +243,7 @@ HWTEST_F(CommandQueueSynchronizeTest, givenDebugOverrideEnabledAndGpuHangWhenCal ASSERT_EQ(ZE_RESULT_SUCCESS, res); ASSERT_NE(nullptr, commandQueue); - auto queue = whitebox_cast(L0::CommandQueue::fromHandle(commandQueue)); + auto queue = whiteboxCast(L0::CommandQueue::fromHandle(commandQueue)); queue->csr = csr.get(); constexpr auto timeout{std::numeric_limits::max()}; @@ -307,18 +307,18 @@ HWTEST2_F(MultiTileCommandQueueSynchronizeTest, givenMultiplePartitionCountWhenC tagAddress = ptrOffset(tagAddress, csr->getPostSyncWriteOffset()); } csr->activePartitions = 2u; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + false, + returnValue)); EXPECT_EQ(returnValue, ZE_RESULT_SUCCESS); ASSERT_NE(nullptr, commandQueue); EXPECT_EQ(2u, commandQueue->activeSubDevices); - auto commandList = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandList = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); ASSERT_NE(nullptr, commandList); commandList->partitionCount = 2; @@ -347,18 +347,18 @@ HWTEST2_F(MultiTileCommandQueueSynchronizeTest, givenCsrHasMultipleActivePartiti tagAddress = ptrOffset(tagAddress, csr->getPostSyncWriteOffset()); } csr->activePartitions = 2u; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + false, + returnValue)); EXPECT_EQ(returnValue, ZE_RESULT_SUCCESS); ASSERT_NE(nullptr, commandQueue); EXPECT_EQ(2u, commandQueue->activeSubDevices); - auto commandList = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandList = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); ASSERT_NE(nullptr, commandList); ze_command_list_handle_t cmdListHandle = commandList->toHandle(); @@ -374,18 +374,18 @@ HWTEST_F(CommandQueueSynchronizeTest, givenSingleTileCsrWhenExecutingMultiTileCo const ze_command_queue_desc_t desc{}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + false, + returnValue)); EXPECT_EQ(returnValue, ZE_RESULT_SUCCESS); ASSERT_NE(nullptr, commandQueue); EXPECT_EQ(1u, commandQueue->activeSubDevices); - auto commandList = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandList = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); ASSERT_NE(nullptr, commandList); commandList->partitionCount = 2; @@ -412,13 +412,13 @@ HWTEST_F(CommandQueueSynchronizeTest, givenSinglePartitionCountWhenWaitFunctionF const ze_command_queue_desc_t desc{}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - csr.get(), - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + csr.get(), + &desc, + false, + false, + returnValue)); EXPECT_EQ(returnValue, ZE_RESULT_SUCCESS); ASSERT_NE(nullptr, commandQueue); @@ -452,18 +452,18 @@ HWTEST_F(CommandQueueSynchronizeTest, givenSynchronousCommandQueueWhenTagUpdateF const ze_command_queue_desc_t desc{ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC, nullptr, 0, 0, 0, ZE_COMMAND_QUEUE_MODE_SYNCHRONOUS, ZE_COMMAND_QUEUE_PRIORITY_NORMAL}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + false, + returnValue)); EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue); ASSERT_NE(nullptr, commandQueue); EXPECT_EQ(ZE_COMMAND_QUEUE_MODE_SYNCHRONOUS, commandQueue->getSynchronousMode()); - auto commandList = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + auto commandList = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); ASSERT_NE(nullptr, commandList); //1st execute provides all preamble commands @@ -515,13 +515,13 @@ HWTEST_F(CommandQueuePowerHintTest, givenDriverHandleWithPowerHintAndOsContextPo const ze_command_queue_desc_t desc{}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - csr.get(), - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + csr.get(), + &desc, + false, + false, + returnValue)); EXPECT_EQ(returnValue, ZE_RESULT_SUCCESS); ASSERT_NE(nullptr, commandQueue); commandQueue->destroy(); @@ -538,13 +538,13 @@ HWTEST_F(CommandQueuePowerHintTest, givenDriverHandleWithPowerHintAndOsContextPo const ze_command_queue_desc_t desc{}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - csr.get(), - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + csr.get(), + &desc, + false, + false, + returnValue)); EXPECT_EQ(returnValue, ZE_RESULT_SUCCESS); ASSERT_NE(nullptr, commandQueue); commandQueue->destroy(); @@ -716,17 +716,17 @@ HWTEST2_F(DeviceWithDualStorage, givenCmdListWithAppendedKernelAndUsmTransferAnd ze_result_t res = ZE_RESULT_SUCCESS; const ze_command_queue_desc_t desc = {}; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getInternalEngine().commandStreamReceiver, - &desc, - false, - false, - res)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getInternalEngine().commandStreamReceiver, + &desc, + false, + false, + res)); EXPECT_EQ(ZE_RESULT_SUCCESS, res); ASSERT_NE(nullptr, commandQueue); - auto commandList = std::unique_ptr(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, res))); + auto commandList = std::unique_ptr(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, res))); EXPECT_EQ(ZE_RESULT_SUCCESS, res); ASSERT_NE(nullptr, commandList); Mock kernel; @@ -747,7 +747,7 @@ HWTEST2_F(DeviceWithDualStorage, givenCmdListWithAppendedKernelAndUsmTransferAnd ze_group_count_t dispatchFunctionArguments{1, 1, 1}; commandList->appendLaunchKernel(kernel.toHandle(), &dispatchFunctionArguments, nullptr, 0, nullptr); auto deviceImp = static_cast(device); - auto pageFaultCmdQueue = whitebox_cast(deviceImp->pageFaultCommandList->cmdQImmediate); + auto pageFaultCmdQueue = whiteboxCast(deviceImp->pageFaultCommandList->cmdQImmediate); auto sizeBefore = commandQueue->commandStream->getUsed(); auto pageFaultSizeBefore = pageFaultCmdQueue->commandStream->getUsed(); diff --git a/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_enqueue_cmdlist.cpp b/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_enqueue_cmdlist.cpp index 47a501bf0a..20f4b14ede 100644 --- a/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_enqueue_cmdlist.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_enqueue_cmdlist.cpp @@ -102,17 +102,17 @@ HWTEST_F(CommandQueueExecuteCommandLists, whenACommandListExecutedRequiresUncach const ze_command_queue_desc_t desc{}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + false, + returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); - auto commandList1 = whitebox_cast(CommandList::fromHandle(commandLists[0])); - auto commandList2 = whitebox_cast(CommandList::fromHandle(commandLists[1])); + auto commandList1 = whiteboxCast(CommandList::fromHandle(commandLists[0])); + auto commandList2 = whiteboxCast(CommandList::fromHandle(commandLists[1])); commandList1->requiresQueueUncachedMocs = true; commandList2->requiresQueueUncachedMocs = true; auto result = commandQueue->executeCommandLists(numCommandLists, commandLists, nullptr, true); @@ -128,13 +128,13 @@ HWTEST_F(CommandQueueExecuteCommandLists, givenCommandListThatRequiresDisabledEU const ze_command_queue_desc_t desc{}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + false, + returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); auto commandList1 = static_cast(CommandList::fromHandle(commandLists[0])); @@ -154,13 +154,13 @@ HWTEST_F(CommandQueueExecuteCommandLists, whenASecondLevelBatchBufferPerCommandL const ze_command_queue_desc_t desc{}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + false, + returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); auto usedSpaceBefore = commandQueue->commandStream->getUsed(); @@ -202,20 +202,20 @@ HWTEST_F(CommandQueueExecuteCommandLists, whenASecondLevelBatchBufferPerCommandL HWTEST_F(CommandQueueExecuteCommandLists, givenFenceWhenExecutingCmdListThenFenceStatusIsCorrect) { const ze_command_queue_desc_t desc{}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + false, + returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); auto &csr = neoDevice->getUltCommandStreamReceiver(); *csr.tagAddress = 10; csr.taskCount = 10; ze_fence_desc_t fenceDesc{}; - auto fence = whitebox_cast(Fence::create(commandQueue, &fenceDesc)); + auto fence = whiteboxCast(Fence::create(commandQueue, &fenceDesc)); ASSERT_NE(nullptr, fence); EXPECT_EQ(ZE_RESULT_NOT_READY, fence->queryStatus()); @@ -241,17 +241,17 @@ HWTEST2_F(CommandQueueExecuteCommandLists, whenUsingFenceThenExpectEndingPipeCon ze_command_queue_desc_t desc{}; ze_result_t returnValue; desc.mode = ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + false, + returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); ze_fence_desc_t fenceDesc{}; - auto fence = whitebox_cast(Fence::create(commandQueue, &fenceDesc)); + auto fence = whiteboxCast(Fence::create(commandQueue, &fenceDesc)); ASSERT_NE(nullptr, fence); ze_fence_handle_t fenceHandle = fence->toHandle(); @@ -293,13 +293,13 @@ HWTEST_F(CommandQueueExecuteCommandLists, whenExecutingCommandListsThenEndingPip const ze_command_queue_desc_t desc{}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + false, + returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); auto usedSpaceBefore = commandQueue->commandStream->getUsed(); @@ -336,13 +336,13 @@ HWTEST2_F(CommandQueueExecuteCommandLists, givenCommandQueueHaving2CommandListsT using PARSE = typename FamilyType::PARSE; ze_command_queue_desc_t desc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + false, + returnValue)); CommandList::fromHandle(commandLists[0])->setCommandListPerThreadScratchSize(512u); CommandList::fromHandle(commandLists[1])->setCommandListPerThreadScratchSize(1024u); @@ -410,13 +410,13 @@ HWTEST_F(CommandQueueExecuteCommandLists, givenMidThreadPreemptionWhenCommandsAr for (auto flagInternal : testedInternalFlags) { ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - flagInternal, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + flagInternal, + returnValue)); EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue); ASSERT_NE(nullptr, commandQueue->commandStream); @@ -461,13 +461,13 @@ HWTEST2_F(CommandQueueExecuteCommandLists, givenMidThreadPreemptionWhenCommandsA for (auto flagInternal : testedInternalFlags) { ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - flagInternal, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + flagInternal, + returnValue)); EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue); ASSERT_NE(nullptr, commandQueue->commandStream); @@ -637,7 +637,7 @@ void CommandQueueExecuteCommandLists::twoCommandListCommandPreemptionTest(bool p desc.mode = ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create( + auto commandQueue = whiteboxCast(CommandQueue::create( productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); @@ -645,10 +645,10 @@ void CommandQueueExecuteCommandLists::twoCommandListCommandPreemptionTest(bool p preemptionCmdProgramming = NEO::PreemptionHelper::getRequiredCmdStreamSize(NEO::PreemptionMode::ThreadGroup, NEO::PreemptionMode::Disabled) > 0u; auto usedSpaceBefore = commandQueue->commandStream->getUsed(); - auto commandListDisabled = whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)); + auto commandListDisabled = whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)); commandListDisabled->commandListPreemptionMode = NEO::PreemptionMode::Disabled; - auto commandListThreadGroup = whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)); + auto commandListThreadGroup = whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)); commandListThreadGroup->commandListPreemptionMode = NEO::PreemptionMode::ThreadGroup; ze_command_list_handle_t commandLists[] = {commandListDisabled->toHandle(), @@ -806,13 +806,13 @@ struct CommandQueueExecuteCommandListSWTagsTests : public Test { EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue); ze_command_queue_desc_t desc = {}; - commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - returnValue)); + commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + false, + returnValue)); EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue); ASSERT_NE(nullptr, commandQueue->commandStream); } @@ -863,7 +863,7 @@ HWTEST_F(CommandQueueExecuteCommandListSWTagsTests, givenEnableSWTagsAndCommandL using MI_NOOP = typename FamilyType::MI_NOOP; using PARSE = typename FamilyType::PARSE; - whitebox_cast(CommandList::fromHandle(commandLists[0]))->commandListPreemptionMode = PreemptionMode::Disabled; + whiteboxCast(CommandList::fromHandle(commandLists[0]))->commandListPreemptionMode = PreemptionMode::Disabled; auto usedSpaceBefore = commandQueue->commandStream->getUsed(); auto result = commandQueue->executeCommandLists(1, commandLists, nullptr, false); @@ -945,13 +945,13 @@ HWTEST2_F(MultiDeviceCommandQueueExecuteCommandLists, givenMultiplePartitionCoun ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - false, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + false, + false, + returnValue)); EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue); EXPECT_EQ(2u, commandQueue->partitionCount); ASSERT_NE(nullptr, commandQueue->commandStream); @@ -962,7 +962,7 @@ HWTEST2_F(MultiDeviceCommandQueueExecuteCommandLists, givenMultiplePartitionCoun } ze_fence_desc_t fenceDesc{}; - auto fence = whitebox_cast(Fence::create(commandQueue, &fenceDesc)); + auto fence = whiteboxCast(Fence::create(commandQueue, &fenceDesc)); ASSERT_NE(nullptr, fence); ze_fence_handle_t fenceHandle = fence->toHandle(); @@ -1039,18 +1039,18 @@ HWTEST_F(CommandQueueExecuteCommandLists, GivenUpdateTaskCountFromWaitWhenExecut csr->useNotifyEnableForPostSync = true; const ze_command_queue_desc_t desc{}; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - true, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + true, + false, + returnValue)); ASSERT_NE(nullptr, commandQueue); ASSERT_EQ(ZE_RESULT_SUCCESS, returnValue); ze_fence_desc_t fenceDesc{}; - auto fence = whitebox_cast(Fence::create(commandQueue, &fenceDesc)); + auto fence = whiteboxCast(Fence::create(commandQueue, &fenceDesc)); ASSERT_NE(nullptr, fence); ze_fence_handle_t fenceHandle = fence->toHandle(); @@ -1091,18 +1091,18 @@ HWTEST_F(CommandQueueExecuteCommandLists, GivenCopyCommandQueueWhenExecutingCopy csr->useNotifyEnableForPostSync = true; const ze_command_queue_desc_t desc{}; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, - device, - neoDevice->getDefaultEngine().commandStreamReceiver, - &desc, - true, - false, - returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, + device, + neoDevice->getDefaultEngine().commandStreamReceiver, + &desc, + true, + false, + returnValue)); ASSERT_NE(nullptr, commandQueue); ASSERT_EQ(ZE_RESULT_SUCCESS, returnValue); ze_fence_desc_t fenceDesc{}; - auto fence = whitebox_cast(Fence::create(commandQueue, &fenceDesc)); + auto fence = whiteboxCast(Fence::create(commandQueue, &fenceDesc)); ASSERT_NE(nullptr, fence); ze_fence_handle_t fenceHandle = fence->toHandle(); diff --git a/level_zero/core/test/unit_tests/sources/debugger/active_debugger_fixture.h b/level_zero/core/test/unit_tests/sources/debugger/active_debugger_fixture.h index 534fc54e59..75f7b91115 100644 --- a/level_zero/core/test/unit_tests/sources/debugger/active_debugger_fixture.h +++ b/level_zero/core/test/unit_tests/sources/debugger/active_debugger_fixture.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -54,7 +54,7 @@ struct ActiveDebuggerFixture { std::vector> devices; devices.push_back(std::unique_ptr(device)); - auto driverHandleUlt = whitebox_cast(DriverHandle::create(std::move(devices), L0EnvVariables{}, &returnValue)); + auto driverHandleUlt = whiteboxCast(DriverHandle::create(std::move(devices), L0EnvVariables{}, &returnValue)); driverHandle.reset(driverHandleUlt); ASSERT_NE(nullptr, driverHandle); diff --git a/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_1.cpp b/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_1.cpp index 8902a7abec..66ce13f784 100644 --- a/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_1.cpp +++ b/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_1.cpp @@ -135,7 +135,7 @@ HWTEST_F(L0DebuggerTest, givenDebuggingEnabledWhenCommandListIsExecutedThenValid ze_command_queue_desc_t queueDesc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); auto usedSpaceBefore = commandQueue->commandStream->getUsed(); @@ -470,7 +470,7 @@ HWTEST_F(L0DebuggerSimpleTest, givenUseCsrImmediateSubmissionEnabledForRegularCo ze_command_queue_desc_t queueDesc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); ze_command_list_handle_t commandLists[] = { @@ -504,7 +504,7 @@ HWTEST_F(L0DebuggerSimpleTest, givenUseCsrImmediateSubmissionDisabledForRegularC ze_command_queue_desc_t queueDesc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); ze_command_list_handle_t commandLists[] = { diff --git a/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_2.cpp b/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_2.cpp index a464e2479c..e9827c2581 100644 --- a/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_2.cpp +++ b/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_2.cpp @@ -306,7 +306,7 @@ HWTEST_F(L0DebuggerWithBlitterTest, givenUseCsrImmediateSubmissionEnabledForRegu ze_command_queue_desc_t queueDesc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); ze_command_list_handle_t commandLists[] = { diff --git a/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_sba_tracking.cpp b/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_sba_tracking.cpp index b4a7e3d9a0..247d1d5f26 100644 --- a/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_sba_tracking.cpp +++ b/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_sba_tracking.cpp @@ -169,7 +169,7 @@ HWTEST2_F(L0DebuggerTest, givenDebuggingEnabledAndRequiredGsbaWhenCommandListIsE auto cmdQ = CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue); ASSERT_NE(nullptr, cmdQ); - auto commandQueue = whitebox_cast(cmdQ); + auto commandQueue = whiteboxCast(cmdQ); auto cmdQHw = static_cast *>(cmdQ); if (cmdQHw->estimateStateBaseAddressCmdSize() == 0) { @@ -226,7 +226,7 @@ HWTEST_F(L0DebuggerTest, givenDebuggingEnabledAndDebuggerLogsWhenCommandQueueIsS ze_command_queue_desc_t queueDesc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); ze_command_list_handle_t commandLists[] = { @@ -262,7 +262,7 @@ HWTEST_F(L0DebuggerSimpleTest, givenNullL0DebuggerAndDebuggerLogsWhenCommandQueu ze_command_queue_desc_t queueDesc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); ze_command_list_handle_t commandLists[] = { @@ -293,7 +293,7 @@ HWTEST_F(L0DebuggerTest, givenL0DebuggerAndDebuggerLogsDisabledWhenCommandQueueI ze_command_queue_desc_t queueDesc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); ze_command_list_handle_t commandLists[] = { diff --git a/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_single_address_space.cpp b/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_single_address_space.cpp index 4e0aae84ae..79597b8df9 100644 --- a/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_single_address_space.cpp +++ b/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_single_address_space.cpp @@ -341,7 +341,7 @@ HWTEST2_F(L0DebuggerSingleAddressSpace, givenDebuggingEnabledWhenCommandListIsEx ze_command_queue_desc_t queueDesc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); auto usedSpaceBefore = commandQueue->commandStream->getUsed(); diff --git a/level_zero/core/test/unit_tests/sources/debugger/test_source_level_debugger.cpp b/level_zero/core/test/unit_tests/sources/debugger/test_source_level_debugger.cpp index 973ca249c2..8f5eeb0222 100644 --- a/level_zero/core/test/unit_tests/sources/debugger/test_source_level_debugger.cpp +++ b/level_zero/core/test/unit_tests/sources/debugger/test_source_level_debugger.cpp @@ -30,7 +30,7 @@ HWTEST2_F(CommandQueueDebugCommandsTest, givenDebuggingEnabledWhenCommandListIsE NEO::MockCompilerEnableGuard mock(true); ze_command_queue_desc_t queueDesc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, deviceL0, device->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, deviceL0, device->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); auto usedSpaceBefore = commandQueue->commandStream->getUsed(); @@ -79,7 +79,7 @@ HWTEST2_F(CommandQueueDebugCommandsTest, givenDebuggingEnabledWhenCommandListIsE ze_command_queue_desc_t queueDesc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, deviceL0, device->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, deviceL0, device->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); auto usedSpaceBefore = commandQueue->commandStream->getUsed(); diff --git a/level_zero/core/test/unit_tests/sources/driver/test_driver.cpp b/level_zero/core/test/unit_tests/sources/driver/test_driver.cpp index 1ec17ce3fa..5ef3cd6aa7 100644 --- a/level_zero/core/test/unit_tests/sources/driver/test_driver.cpp +++ b/level_zero/core/test/unit_tests/sources/driver/test_driver.cpp @@ -307,7 +307,7 @@ TEST(DriverTest, givenNullEnvVariableWhenCreatingDriverThenEnableProgramDebuggin L0EnvVariables envVariables = {}; envVariables.programDebugging = false; - auto driverHandle = whitebox_cast(DriverHandle::create(std::move(devices), envVariables, &returnValue)); + auto driverHandle = whiteboxCast(DriverHandle::create(std::move(devices), envVariables, &returnValue)); EXPECT_NE(nullptr, driverHandle); EXPECT_FALSE(driverHandle->enableProgramDebugging); @@ -408,7 +408,7 @@ TEST(DriverTest, givenProgramDebuggingEnvVarNonZeroWhenCreatingDriverThenEnableP L0EnvVariables envVariables = {}; envVariables.programDebugging = true; - auto driverHandle = whitebox_cast(DriverHandle::create(std::move(devices), envVariables, &returnValue)); + auto driverHandle = whiteboxCast(DriverHandle::create(std::move(devices), envVariables, &returnValue)); EXPECT_NE(nullptr, driverHandle); EXPECT_TRUE(driverHandle->enableProgramDebugging); @@ -525,7 +525,7 @@ struct DriverHandleTest : public ::testing::Test { L0EnvVariables envVariables = {}; envVariables.programDebugging = true; - driverHandle = whitebox_cast(DriverHandle::create(std::move(devices), envVariables, &returnValue)); + driverHandle = whiteboxCast(DriverHandle::create(std::move(devices), envVariables, &returnValue)); L0::GlobalDriverHandle = driverHandle; } void TearDown() override { diff --git a/level_zero/core/test/unit_tests/sources/event/test_event.cpp b/level_zero/core/test/unit_tests/sources/event/test_event.cpp index ae6d86ffab..6783a501a9 100644 --- a/level_zero/core/test/unit_tests/sources/event/test_event.cpp +++ b/level_zero/core/test/unit_tests/sources/event/test_event.cpp @@ -1613,7 +1613,7 @@ class EventFixture : public DeviceFixture { auto hDevice = device->toHandle(); ze_result_t result = ZE_RESULT_SUCCESS; - eventPool = whitebox_cast(EventPool::create(device->getDriverHandle(), context, 1, &hDevice, &eventPoolDesc, result)); + eventPool = whiteboxCast(EventPool::create(device->getDriverHandle(), context, 1, &hDevice, &eventPoolDesc, result)); } void TearDown() { @@ -1635,7 +1635,7 @@ class EventFixture : public DeviceFixture { using EventTests = Test; TEST_F(EventTests, WhenQueryingStatusThenSuccessIsReturned) { - auto event = whitebox_cast(Event::create(eventPool, &eventDesc, device)); + auto event = whiteboxCast(Event::create(eventPool, &eventDesc, device)); ASSERT_NE(event, nullptr); auto result = event->hostSignal(); @@ -1647,7 +1647,7 @@ TEST_F(EventTests, WhenQueryingStatusThenSuccessIsReturned) { } TEST_F(EventTests, GivenResetWhenQueryingStatusThenNotReadyIsReturned) { - auto event = whitebox_cast(Event::create(eventPool, &eventDesc, device)); + auto event = whiteboxCast(Event::create(eventPool, &eventDesc, device)); ASSERT_NE(event, nullptr); auto result = event->hostSignal(); @@ -1664,7 +1664,7 @@ TEST_F(EventTests, GivenResetWhenQueryingStatusThenNotReadyIsReturned) { } TEST_F(EventTests, WhenDestroyingAnEventThenSuccessIsReturned) { - auto event = whitebox_cast(Event::create(eventPool, &eventDesc, device)); + auto event = whiteboxCast(Event::create(eventPool, &eventDesc, device)); ASSERT_NE(event, nullptr); auto result = event->destroy(); @@ -1680,10 +1680,10 @@ TEST_F(EventTests, givenTwoEventsCreatedThenTheyHaveDifferentAddresses) { eventDesc1.index = 1; eventDesc.index = 1; - auto event0 = whitebox_cast(Event::create(eventPool, &eventDesc0, device)); + auto event0 = whiteboxCast(Event::create(eventPool, &eventDesc0, device)); ASSERT_NE(event0, nullptr); - auto event1 = whitebox_cast(Event::create(eventPool, &eventDesc1, device)); + auto event1 = whiteboxCast(Event::create(eventPool, &eventDesc1, device)); ASSERT_NE(event1, nullptr); EXPECT_NE(event0->hostAddress, event1->hostAddress); diff --git a/level_zero/core/test/unit_tests/sources/fence/test_fence.cpp b/level_zero/core/test/unit_tests/sources/fence/test_fence.cpp index 5aa6a340cb..5f48a38dcc 100644 --- a/level_zero/core/test/unit_tests/sources/fence/test_fence.cpp +++ b/level_zero/core/test/unit_tests/sources/fence/test_fence.cpp @@ -97,7 +97,7 @@ TEST_F(FenceTest, GivenGpuHangWhenHostSynchronizeIsCalledThenDeviceLostIsReturne ze_fence_desc_t desc = {}; std::unique_ptr> fence; - fence.reset(whitebox_cast(Fence::create(&cmdqueue, &desc))); + fence.reset(whiteboxCast(Fence::create(&cmdqueue, &desc))); ASSERT_NE(nullptr, fence); fence->taskCount = 1; @@ -118,7 +118,7 @@ TEST_F(FenceTest, GivenNoGpuHangAndOneNanosecondTimeoutWhenHostSynchronizeIsCall ze_fence_desc_t desc = {}; std::unique_ptr> fence; - fence.reset(whitebox_cast(Fence::create(&cmdqueue, &desc))); + fence.reset(whiteboxCast(Fence::create(&cmdqueue, &desc))); ASSERT_NE(nullptr, fence); fence->taskCount = 1; @@ -138,7 +138,7 @@ TEST_F(FenceTest, GivenLongPeriodOfGpuCheckAndOneNanosecondTimeoutWhenHostSynchr ze_fence_desc_t desc = {}; std::unique_ptr> fence; - fence.reset(whitebox_cast(Fence::create(&cmdqueue, &desc))); + fence.reset(whiteboxCast(Fence::create(&cmdqueue, &desc))); ASSERT_NE(nullptr, fence); fence->taskCount = 1; @@ -158,7 +158,7 @@ TEST_F(FenceTest, GivenSuccessfulQueryResultAndNoTimeoutWhenHostSynchronizeIsCal ze_fence_desc_t desc = {}; std::unique_ptr> fence; - fence.reset(whitebox_cast(Fence::create(&cmdqueue, &desc))); + fence.reset(whiteboxCast(Fence::create(&cmdqueue, &desc))); ASSERT_NE(nullptr, fence); fence->taskCount = 1; @@ -205,7 +205,7 @@ TEST_F(FenceSynchronizeTest, givenCallToFenceHostSynchronizeWithTimeoutZeroAndTa Mock cmdQueue(device, csr.get()); ze_fence_desc_t fenceDesc = {}; - auto fence = std::unique_ptr(whitebox_cast(Fence::create(&cmdQueue, &fenceDesc))); + auto fence = std::unique_ptr(whiteboxCast(Fence::create(&cmdQueue, &fenceDesc))); EXPECT_NE(nullptr, fence); fence->taskCount = 1; @@ -220,7 +220,7 @@ TEST_F(FenceSynchronizeTest, givenCallToFenceHostSynchronizeWithTimeoutNonZeroAn Mock cmdQueue(device, csr.get()); ze_fence_desc_t fenceDesc = {}; - auto fence = std::unique_ptr(whitebox_cast(Fence::create(&cmdQueue, &fenceDesc))); + auto fence = std::unique_ptr(whiteboxCast(Fence::create(&cmdQueue, &fenceDesc))); EXPECT_NE(nullptr, fence); fence->taskCount = 1; @@ -242,7 +242,7 @@ TEST_F(FenceSynchronizeTest, givenInfiniteTimeoutWhenWaitingForFenceCompletionTh ze_fence_desc_t desc = {}; std::unique_ptr> fence; - fence.reset(whitebox_cast(Fence::create(&cmdqueue, &desc))); + fence.reset(whiteboxCast(Fence::create(&cmdqueue, &desc))); ASSERT_NE(nullptr, fence); fence->taskCount = 1; @@ -324,7 +324,7 @@ TEST_F(FenceTest, givenFenceNotEnqueuedThenStatusIsNotReady) { Mock cmdqueue(device, csr.get()); ze_fence_desc_t desc = {}; - auto fence = whitebox_cast(Fence::create(&cmdqueue, &desc)); + auto fence = whiteboxCast(Fence::create(&cmdqueue, &desc)); ASSERT_NE(fence, nullptr); EXPECT_EQ(fence->queryStatus(), ZE_RESULT_NOT_READY); @@ -336,7 +336,7 @@ TEST_F(FenceTest, givenFenceWhenResettingThenTaskCountIsReset) { Mock cmdqueue(device, csr.get()); ze_fence_desc_t desc = {}; - auto fence = whitebox_cast(Fence::create(&cmdqueue, &desc)); + auto fence = whiteboxCast(Fence::create(&cmdqueue, &desc)); ASSERT_NE(fence, nullptr); EXPECT_EQ(std::numeric_limits::max(), fence->taskCount); diff --git a/level_zero/core/test/unit_tests/sources/image/test_image.cpp b/level_zero/core/test/unit_tests/sources/image/test_image.cpp index 445e8ee0c8..ffbd7003b4 100644 --- a/level_zero/core/test/unit_tests/sources/image/test_image.cpp +++ b/level_zero/core/test/unit_tests/sources/image/test_image.cpp @@ -949,7 +949,7 @@ HWTEST2_F(ImageCreate, givenImageSizeZeroThenDummyImageIsCreated, IsAtMostXeHpgC auto result = Image::create(productFamily, device, &desc, &imagePtr); ASSERT_EQ(ZE_RESULT_SUCCESS, result); - auto image = whitebox_cast(imagePtr); + auto image = whiteboxCast(imagePtr); ASSERT_NE(nullptr, image); auto alloc = image->getAllocation(); @@ -999,7 +999,7 @@ HWTEST2_F(ImageCreate, WhenDestroyingImageThenSuccessIsReturned, IsAtMostProduct auto result = Image::create(productFamily, device, &desc, &imagePtr); ASSERT_EQ(ZE_RESULT_SUCCESS, result); - auto image = whitebox_cast(imagePtr); + auto image = whiteboxCast(imagePtr); ASSERT_NE(nullptr, image); result = zeImageDestroy(image->toHandle()); @@ -1014,7 +1014,7 @@ HWTEST2_F(ImageCreate, WhenCreatingImageThenNonNullPointerIsReturned, IsAtMostPr auto result = Image::create(productFamily, device, &desc, &imagePtr); ASSERT_EQ(ZE_RESULT_SUCCESS, result); - auto image = whitebox_cast(imagePtr); + auto image = whiteboxCast(imagePtr); ASSERT_NE(nullptr, image); image->destroy(); @@ -1028,7 +1028,7 @@ HWTEST2_F(ImageCreate, givenInvalidProductFamilyThenNullIsReturned, IsAtMostProd auto result = Image::create(IGFX_UNKNOWN, device, &desc, &imagePtr); ASSERT_NE(ZE_RESULT_SUCCESS, result); - auto image = whitebox_cast(imagePtr); + auto image = whiteboxCast(imagePtr); ASSERT_EQ(nullptr, image); } @@ -1048,7 +1048,7 @@ HWTEST2_F(ImageCreate, WhenImageIsCreatedThenDescMatchesAllocation, IsAtMostProd auto result = Image::create(productFamily, device, &desc, &imagePtr); ASSERT_EQ(ZE_RESULT_SUCCESS, result); - auto image = whitebox_cast(imagePtr); + auto image = whiteboxCast(imagePtr); ASSERT_NE(nullptr, image); auto alloc = image->getAllocation(); diff --git a/level_zero/core/test/unit_tests/sources/module/test_module.cpp b/level_zero/core/test/unit_tests/sources/module/test_module.cpp index 8f426d0e07..802186664e 100644 --- a/level_zero/core/test/unit_tests/sources/module/test_module.cpp +++ b/level_zero/core/test/unit_tests/sources/module/test_module.cpp @@ -63,7 +63,7 @@ HWTEST_F(ModuleTest, givenZeroCountWhenGettingKernelNamesThenCountIsFilled) { uint32_t count = 0; auto result = module->getKernelNames(&count, nullptr); - auto whiteboxModule = whitebox_cast(module.get()); + auto whiteboxModule = whiteboxCast(module.get()); EXPECT_EQ(whiteboxModule->kernelImmDatas.size(), count); EXPECT_EQ(ZE_RESULT_SUCCESS, result); @@ -1125,7 +1125,7 @@ TEST_F(ModulePropertyTest, givenCallToGetPropertiesWithUnresolvedSymbolsThenFlag NEO::Linker::RelocationInfo unresolvedRelocation; unresolvedRelocation.symbolName = "unresolved"; - whitebox_cast(module.get())->unresolvedExternalsInfo.push_back({unresolvedRelocation}); + whiteboxCast(module.get())->unresolvedExternalsInfo.push_back({unresolvedRelocation}); ze_module_property_flags_t expectedFlags = 0; expectedFlags |= ZE_MODULE_PROPERTY_FLAG_IMPORTS; diff --git a/level_zero/core/test/unit_tests/white_box.h b/level_zero/core/test/unit_tests/white_box.h index 6b68bf9e77..0654ab20f1 100644 --- a/level_zero/core/test/unit_tests/white_box.h +++ b/level_zero/core/test/unit_tests/white_box.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -16,17 +16,17 @@ struct WhiteBox : public Type { }; template -WhiteBox *whitebox_cast(Type *obj) { +WhiteBox *whiteboxCast(Type *obj) { return static_cast *>(obj); } template -WhiteBox &whitebox_cast(Type &obj) { +WhiteBox &whiteboxCast(Type &obj) { return static_cast &>(obj); } template -Type *blackbox_cast(WhiteBox *obj) { +Type *blackboxCast(WhiteBox *obj) { return static_cast(obj); } diff --git a/level_zero/core/test/unit_tests/xe_hp_core/test_cmdqueue_debugger_xe_hp_core.cpp b/level_zero/core/test/unit_tests/xe_hp_core/test_cmdqueue_debugger_xe_hp_core.cpp index 6063295b09..7f8c3bf74c 100644 --- a/level_zero/core/test/unit_tests/xe_hp_core/test_cmdqueue_debugger_xe_hp_core.cpp +++ b/level_zero/core/test/unit_tests/xe_hp_core/test_cmdqueue_debugger_xe_hp_core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -36,7 +36,7 @@ XEHPTEST_F(CommandQueueDebugCommandsForSldXeHP, givenSteppingA0OrBWhenGlobalSipI for (auto revision : revisions) { hwInfo.platform.usRevId = revision; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, deviceL0, device->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, deviceL0, device->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); ze_command_list_handle_t commandLists[] = { @@ -115,7 +115,7 @@ XEHPTEST_F(CommandQueueDebugCommandsDebuggerL0XeHP, givenSteppingA0OrBWhenGlobal for (auto revision : revisions) { hwInfo.platform.usRevId = revision; - auto commandQueue = whitebox_cast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); + auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); ze_command_list_handle_t commandLists[] = { diff --git a/level_zero/core/test/unit_tests/xe_hp_core/test_cmdqueue_enqueuecommandlist_xe_hp_core.cpp b/level_zero/core/test/unit_tests/xe_hp_core/test_cmdqueue_enqueuecommandlist_xe_hp_core.cpp index dfb50fc11a..51eddf782b 100644 --- a/level_zero/core/test/unit_tests/xe_hp_core/test_cmdqueue_enqueuecommandlist_xe_hp_core.cpp +++ b/level_zero/core/test/unit_tests/xe_hp_core/test_cmdqueue_enqueuecommandlist_xe_hp_core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -27,7 +27,7 @@ using CommandQueueExecuteCommandListsXE_HP_CORE = Test; XE_HP_CORE_TEST_F(CommandQueueExecuteCommandListsXE_HP_CORE, WhenExecutingCmdListsThenPipelineSelectAndCfeStateAreAddedToCmdBuffer) { const ze_command_queue_desc_t desc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create( + auto commandQueue = whiteboxCast(CommandQueue::create( productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); @@ -68,7 +68,7 @@ XE_HP_CORE_TEST_F(CommandQueueExecuteCommandListsXE_HP_CORE, WhenExecutingCmdLis XE_HP_CORE_TEST_F(CommandQueueExecuteCommandListsXE_HP_CORE, WhenExecutingCmdListsThenStateBaseAddressForGeneralStateBaseAddressIsNotAdded) { const ze_command_queue_desc_t desc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create( + auto commandQueue = whiteboxCast(CommandQueue::create( productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); diff --git a/level_zero/core/test/unit_tests/xe_hpg_core/test_cmdqueue_enqueuecommandlist_xe_hpg_core.cpp b/level_zero/core/test/unit_tests/xe_hpg_core/test_cmdqueue_enqueuecommandlist_xe_hpg_core.cpp index 7bd0e44a30..0121d4697d 100644 --- a/level_zero/core/test/unit_tests/xe_hpg_core/test_cmdqueue_enqueuecommandlist_xe_hpg_core.cpp +++ b/level_zero/core/test/unit_tests/xe_hpg_core/test_cmdqueue_enqueuecommandlist_xe_hpg_core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -27,7 +27,7 @@ using CommandQueueExecuteCommandListsXeHpgCore = Test; XE_HPG_CORETEST_F(CommandQueueExecuteCommandListsXeHpgCore, WhenExecutingCmdListsThenPipelineSelectAndCfeStateAreAddedToCmdBuffer) { const ze_command_queue_desc_t desc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create( + auto commandQueue = whiteboxCast(CommandQueue::create( productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); @@ -68,7 +68,7 @@ XE_HPG_CORETEST_F(CommandQueueExecuteCommandListsXeHpgCore, WhenExecutingCmdList XE_HPG_CORETEST_F(CommandQueueExecuteCommandListsXeHpgCore, WhenExecutingCmdListsThenStateBaseAddressForGeneralStateBaseAddressIsNotAdded) { const ze_command_queue_desc_t desc = {}; ze_result_t returnValue; - auto commandQueue = whitebox_cast(CommandQueue::create( + auto commandQueue = whiteboxCast(CommandQueue::create( productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, returnValue)); ASSERT_NE(nullptr, commandQueue->commandStream); diff --git a/level_zero/core/test/unit_tests/xe_hpg_core/test_image_xe_hpg_core.cpp b/level_zero/core/test/unit_tests/xe_hpg_core/test_image_xe_hpg_core.cpp index 9dd53bd459..d69a43e01e 100644 --- a/level_zero/core/test/unit_tests/xe_hpg_core/test_image_xe_hpg_core.cpp +++ b/level_zero/core/test/unit_tests/xe_hpg_core/test_image_xe_hpg_core.cpp @@ -53,7 +53,7 @@ HWTEST2_F(ImageCreate, WhenDestroyingImageThenSuccessIsReturned, IsXeHpgCore) { auto result = Image::create(productFamily, device, &desc, &imagePtr); ASSERT_EQ(ZE_RESULT_SUCCESS, result); - auto image = whitebox_cast(imagePtr); + auto image = whiteboxCast(imagePtr); ASSERT_NE(nullptr, image); result = zeImageDestroy(image->toHandle()); @@ -68,7 +68,7 @@ HWTEST2_F(ImageCreate, WhenCreatingImageThenSuccessIsReturned, IsXeHpgCore) { auto result = Image::create(productFamily, device, &desc, &imagePtr); ASSERT_EQ(ZE_RESULT_SUCCESS, result); - auto image = whitebox_cast(imagePtr); + auto image = whiteboxCast(imagePtr); ASSERT_NE(nullptr, image); image->destroy(); @@ -82,7 +82,7 @@ HWTEST2_F(ImageCreate, givenInvalidProductFamilyThenReturnNullPointer, IsXeHpgCo auto result = Image::create(IGFX_UNKNOWN, device, &desc, &imagePtr); ASSERT_NE(ZE_RESULT_SUCCESS, result); - auto image = whitebox_cast(imagePtr); + auto image = whiteboxCast(imagePtr); ASSERT_EQ(nullptr, image); } @@ -102,7 +102,7 @@ HWTEST2_F(ImageCreate, WhenImagesIsCreatedThenParamsSetCorrectly, IsXeHpgCore) { auto result = Image::create(productFamily, device, &desc, &imagePtr); ASSERT_EQ(ZE_RESULT_SUCCESS, result); - auto image = whitebox_cast(imagePtr); + auto image = whiteboxCast(imagePtr); ASSERT_NE(nullptr, image); auto alloc = image->getAllocation(); diff --git a/level_zero/experimental/source/tracing/tracing_barrier_imp.cpp b/level_zero/experimental/source/tracing/tracing_barrier_imp.cpp index 78321919c0..10d12572da 100644 --- a/level_zero/experimental/source/tracing/tracing_barrier_imp.cpp +++ b/level_zero/experimental/source/tracing/tracing_barrier_imp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,10 +8,10 @@ #include "level_zero/experimental/source/tracing/tracing_imp.h" ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendBarrier_Tracing(ze_command_list_handle_t hCommandList, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents) { +zeCommandListAppendBarrierTracing(ze_command_list_handle_t hCommandList, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnAppendBarrier, hCommandList, @@ -29,7 +29,7 @@ zeCommandListAppendBarrier_Tracing(ze_command_list_handle_t hCommandList, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendBarrierCb_t, CommandList, pfnAppendBarrierCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendBarrier, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendBarrier, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -41,13 +41,13 @@ zeCommandListAppendBarrier_Tracing(ze_command_list_handle_t hCommandList, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendMemoryRangesBarrier_Tracing(ze_command_list_handle_t hCommandList, - uint32_t numRanges, - const size_t *pRangeSizes, - const void **pRanges, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents) { +zeCommandListAppendMemoryRangesBarrierTracing(ze_command_list_handle_t hCommandList, + uint32_t numRanges, + const size_t *pRangeSizes, + const void **pRanges, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnAppendMemoryRangesBarrier, hCommandList, @@ -71,7 +71,7 @@ zeCommandListAppendMemoryRangesBarrier_Tracing(ze_command_list_handle_t hCommand ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendMemoryRangesBarrierCb_t, CommandList, pfnAppendMemoryRangesBarrierCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendMemoryRangesBarrier, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendMemoryRangesBarrier, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, diff --git a/level_zero/experimental/source/tracing/tracing_barrier_imp.h b/level_zero/experimental/source/tracing/tracing_barrier_imp.h index d689b12113..9de7a7262a 100644 --- a/level_zero/experimental/source/tracing/tracing_barrier_imp.h +++ b/level_zero/experimental/source/tracing/tracing_barrier_imp.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,17 +10,17 @@ extern "C" { ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendBarrier_Tracing(ze_command_list_handle_t hCommandList, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents); +zeCommandListAppendBarrierTracing(ze_command_list_handle_t hCommandList, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents); ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendMemoryRangesBarrier_Tracing(ze_command_list_handle_t hCommandList, - uint32_t numRanges, - const size_t *pRangeSizes, - const void **pRanges, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents); +zeCommandListAppendMemoryRangesBarrierTracing(ze_command_list_handle_t hCommandList, + uint32_t numRanges, + const size_t *pRangeSizes, + const void **pRanges, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents); } diff --git a/level_zero/experimental/source/tracing/tracing_cmdlist_imp.cpp b/level_zero/experimental/source/tracing/tracing_cmdlist_imp.cpp index 0c59451e0a..032bfea0eb 100644 --- a/level_zero/experimental/source/tracing/tracing_cmdlist_imp.cpp +++ b/level_zero/experimental/source/tracing/tracing_cmdlist_imp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,10 +8,10 @@ #include "level_zero/experimental/source/tracing/tracing_imp.h" ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListCreate_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - const ze_command_list_desc_t *desc, - ze_command_list_handle_t *phCommandList) { +zeCommandListCreateTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + const ze_command_list_desc_t *desc, + ze_command_list_handle_t *phCommandList) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnCreate, hContext, @@ -29,7 +29,7 @@ zeCommandListCreate_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListCreateCb_t, CommandList, pfnCreateCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnCreate, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnCreate, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -41,10 +41,10 @@ zeCommandListCreate_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListCreateImmediate_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - const ze_command_queue_desc_t *altdesc, - ze_command_list_handle_t *phCommandList) { +zeCommandListCreateImmediateTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + const ze_command_queue_desc_t *altdesc, + ze_command_list_handle_t *phCommandList) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnCreateImmediate, hContext, @@ -62,7 +62,7 @@ zeCommandListCreateImmediate_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListCreateImmediateCb_t, CommandList, pfnCreateImmediateCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnCreateImmediate, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnCreateImmediate, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -74,7 +74,7 @@ zeCommandListCreateImmediate_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListDestroy_Tracing(ze_command_list_handle_t hCommandList) { +zeCommandListDestroyTracing(ze_command_list_handle_t hCommandList) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnDestroy, hCommandList); @@ -85,7 +85,7 @@ zeCommandListDestroy_Tracing(ze_command_list_handle_t hCommandList) { ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListDestroyCb_t, CommandList, pfnDestroyCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnDestroy, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnDestroy, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -94,7 +94,7 @@ zeCommandListDestroy_Tracing(ze_command_list_handle_t hCommandList) { } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListClose_Tracing(ze_command_list_handle_t hCommandList) { +zeCommandListCloseTracing(ze_command_list_handle_t hCommandList) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnClose, hCommandList); @@ -105,7 +105,7 @@ zeCommandListClose_Tracing(ze_command_list_handle_t hCommandList) { ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListCloseCb_t, CommandList, pfnCloseCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnClose, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnClose, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -114,7 +114,7 @@ zeCommandListClose_Tracing(ze_command_list_handle_t hCommandList) { } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListReset_Tracing(ze_command_list_handle_t hCommandList) { +zeCommandListResetTracing(ze_command_list_handle_t hCommandList) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnReset, hCommandList); @@ -126,7 +126,7 @@ zeCommandListReset_Tracing(ze_command_list_handle_t hCommandList) { ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListResetCb_t, CommandList, pfnResetCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnReset, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnReset, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -135,11 +135,11 @@ zeCommandListReset_Tracing(ze_command_list_handle_t hCommandList) { } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendWriteGlobalTimestamp_Tracing(ze_command_list_handle_t hCommandList, - uint64_t *dstptr, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents) { +zeCommandListAppendWriteGlobalTimestampTracing(ze_command_list_handle_t hCommandList, + uint64_t *dstptr, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnAppendWriteGlobalTimestamp, hCommandList, @@ -159,7 +159,7 @@ zeCommandListAppendWriteGlobalTimestamp_Tracing(ze_command_list_handle_t hComman ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendWriteGlobalTimestampCb_t, CommandList, pfnAppendWriteGlobalTimestampCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendWriteGlobalTimestamp, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendWriteGlobalTimestamp, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -172,14 +172,14 @@ zeCommandListAppendWriteGlobalTimestamp_Tracing(ze_command_list_handle_t hComman } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendQueryKernelTimestamps_Tracing(ze_command_list_handle_t hCommandList, - uint32_t numEvents, - ze_event_handle_t *phEvents, - void *dstptr, - const size_t *pOffsets, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents) { +zeCommandListAppendQueryKernelTimestampsTracing(ze_command_list_handle_t hCommandList, + uint32_t numEvents, + ze_event_handle_t *phEvents, + void *dstptr, + const size_t *pOffsets, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnAppendQueryKernelTimestamps, hCommandList, @@ -205,7 +205,7 @@ zeCommandListAppendQueryKernelTimestamps_Tracing(ze_command_list_handle_t hComma ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendQueryKernelTimestampsCb_t, CommandList, pfnAppendQueryKernelTimestampsCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendQueryKernelTimestamps, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendQueryKernelTimestamps, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, diff --git a/level_zero/experimental/source/tracing/tracing_cmdlist_imp.h b/level_zero/experimental/source/tracing/tracing_cmdlist_imp.h index 6c7834b4b0..9e4d87e78e 100644 --- a/level_zero/experimental/source/tracing/tracing_cmdlist_imp.h +++ b/level_zero/experimental/source/tracing/tracing_cmdlist_imp.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,39 +10,39 @@ extern "C" { ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListCreate_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - const ze_command_list_desc_t *desc, - ze_command_list_handle_t *phCommandList); +zeCommandListCreateTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + const ze_command_list_desc_t *desc, + ze_command_list_handle_t *phCommandList); ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListCreateImmediate_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - const ze_command_queue_desc_t *altdesc, - ze_command_list_handle_t *phCommandList); +zeCommandListCreateImmediateTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + const ze_command_queue_desc_t *altdesc, + ze_command_list_handle_t *phCommandList); ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListDestroy_Tracing(ze_command_list_handle_t hCommandList); +zeCommandListDestroyTracing(ze_command_list_handle_t hCommandList); ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListClose_Tracing(ze_command_list_handle_t hCommandList); +zeCommandListCloseTracing(ze_command_list_handle_t hCommandList); ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListReset_Tracing(ze_command_list_handle_t hCommandList); +zeCommandListResetTracing(ze_command_list_handle_t hCommandList); ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendWriteGlobalTimestamp_Tracing(ze_command_list_handle_t hCommandList, - uint64_t *dstptr, +zeCommandListAppendWriteGlobalTimestampTracing(ze_command_list_handle_t hCommandList, + uint64_t *dstptr, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents); +ZE_APIEXPORT ze_result_t ZE_APICALL +zeCommandListAppendQueryKernelTimestampsTracing(ze_command_list_handle_t hCommandList, + uint32_t numEvents, + ze_event_handle_t *phEvents, + void *dstptr, + const size_t *pOffsets, ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents); -ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendQueryKernelTimestamps_Tracing(ze_command_list_handle_t hCommandList, - uint32_t numEvents, - ze_event_handle_t *phEvents, - void *dstptr, - const size_t *pOffsets, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents); } diff --git a/level_zero/experimental/source/tracing/tracing_cmdqueue_imp.cpp b/level_zero/experimental/source/tracing/tracing_cmdqueue_imp.cpp index c18e26b49f..2467af5603 100644 --- a/level_zero/experimental/source/tracing/tracing_cmdqueue_imp.cpp +++ b/level_zero/experimental/source/tracing/tracing_cmdqueue_imp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,10 +8,10 @@ #include "level_zero/experimental/source/tracing/tracing_imp.h" ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandQueueCreate_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - const ze_command_queue_desc_t *desc, - ze_command_queue_handle_t *phCommandQueue) { +zeCommandQueueCreateTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + const ze_command_queue_desc_t *desc, + ze_command_queue_handle_t *phCommandQueue) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandQueue.pfnCreate, hContext, @@ -28,7 +28,7 @@ zeCommandQueueCreate_Tracing(ze_context_handle_t hContext, L0::APITracerCallbackDataImp apiCallbackData; ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandQueueCreateCb_t, CommandQueue, pfnCreateCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandQueue.pfnCreate, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandQueue.pfnCreate, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -40,7 +40,7 @@ zeCommandQueueCreate_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandQueueDestroy_Tracing(ze_command_queue_handle_t hCommandQueue) { +zeCommandQueueDestroyTracing(ze_command_queue_handle_t hCommandQueue) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandQueue.pfnDestroy, hCommandQueue); @@ -52,7 +52,7 @@ zeCommandQueueDestroy_Tracing(ze_command_queue_handle_t hCommandQueue) { ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandQueueDestroyCb_t, CommandQueue, pfnDestroyCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandQueue.pfnDestroy, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandQueue.pfnDestroy, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -60,10 +60,10 @@ zeCommandQueueDestroy_Tracing(ze_command_queue_handle_t hCommandQueue) { *tracerParams.phCommandQueue); } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandQueueExecuteCommandLists_Tracing(ze_command_queue_handle_t hCommandQueue, - uint32_t numCommandLists, - ze_command_list_handle_t *phCommandLists, - ze_fence_handle_t hFence) { +zeCommandQueueExecuteCommandListsTracing(ze_command_queue_handle_t hCommandQueue, + uint32_t numCommandLists, + ze_command_list_handle_t *phCommandLists, + ze_fence_handle_t hFence) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandQueue.pfnExecuteCommandLists, hCommandQueue, @@ -80,7 +80,7 @@ zeCommandQueueExecuteCommandLists_Tracing(ze_command_queue_handle_t hCommandQueu ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandQueueExecuteCommandListsCb_t, CommandQueue, pfnExecuteCommandListsCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandQueue.pfnExecuteCommandLists, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandQueue.pfnExecuteCommandLists, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -92,8 +92,8 @@ zeCommandQueueExecuteCommandLists_Tracing(ze_command_queue_handle_t hCommandQueu } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandQueueSynchronize_Tracing(ze_command_queue_handle_t hCommandQueue, - uint64_t timeout) { +zeCommandQueueSynchronizeTracing(ze_command_queue_handle_t hCommandQueue, + uint64_t timeout) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandQueue.pfnSynchronize, hCommandQueue, @@ -107,7 +107,7 @@ zeCommandQueueSynchronize_Tracing(ze_command_queue_handle_t hCommandQueue, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandQueueSynchronizeCb_t, CommandQueue, pfnSynchronizeCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandQueue.pfnSynchronize, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandQueue.pfnSynchronize, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, diff --git a/level_zero/experimental/source/tracing/tracing_cmdqueue_imp.h b/level_zero/experimental/source/tracing/tracing_cmdqueue_imp.h index 0bb254eb10..6b0ad71693 100644 --- a/level_zero/experimental/source/tracing/tracing_cmdqueue_imp.h +++ b/level_zero/experimental/source/tracing/tracing_cmdqueue_imp.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,21 +10,21 @@ extern "C" { ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandQueueCreate_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - const ze_command_queue_desc_t *desc, - ze_command_queue_handle_t *phCommandQueue); +zeCommandQueueCreateTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + const ze_command_queue_desc_t *desc, + ze_command_queue_handle_t *phCommandQueue); ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandQueueDestroy_Tracing(ze_command_queue_handle_t hCommandQueue); +zeCommandQueueDestroyTracing(ze_command_queue_handle_t hCommandQueue); ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandQueueExecuteCommandLists_Tracing(ze_command_queue_handle_t hCommandQueue, - uint32_t numCommandLists, - ze_command_list_handle_t *phCommandLists, - ze_fence_handle_t hFence); +zeCommandQueueExecuteCommandListsTracing(ze_command_queue_handle_t hCommandQueue, + uint32_t numCommandLists, + ze_command_list_handle_t *phCommandLists, + ze_fence_handle_t hFence); ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandQueueSynchronize_Tracing(ze_command_queue_handle_t hCommandQueue, - uint64_t timeout); +zeCommandQueueSynchronizeTracing(ze_command_queue_handle_t hCommandQueue, + uint64_t timeout); } diff --git a/level_zero/experimental/source/tracing/tracing_copy_imp.cpp b/level_zero/experimental/source/tracing/tracing_copy_imp.cpp index cef3fca7b5..ebc29c25c2 100644 --- a/level_zero/experimental/source/tracing/tracing_copy_imp.cpp +++ b/level_zero/experimental/source/tracing/tracing_copy_imp.cpp @@ -8,13 +8,13 @@ #include "level_zero/experimental/source/tracing/tracing_imp.h" ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendMemoryCopy_Tracing(ze_command_list_handle_t hCommandList, - void *dstptr, - const void *srcptr, - size_t size, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents) { +zeCommandListAppendMemoryCopyTracing(ze_command_list_handle_t hCommandList, + void *dstptr, + const void *srcptr, + size_t size, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnAppendMemoryCopy, hCommandList, @@ -38,7 +38,7 @@ zeCommandListAppendMemoryCopy_Tracing(ze_command_list_handle_t hCommandList, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendMemoryCopyCb_t, CommandList, pfnAppendMemoryCopyCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendMemoryCopy, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendMemoryCopy, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -53,14 +53,14 @@ zeCommandListAppendMemoryCopy_Tracing(ze_command_list_handle_t hCommandList, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendMemoryFill_Tracing(ze_command_list_handle_t hCommandList, - void *ptr, - const void *pattern, - size_t patternSize, - size_t size, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents) { +zeCommandListAppendMemoryFillTracing(ze_command_list_handle_t hCommandList, + void *ptr, + const void *pattern, + size_t patternSize, + size_t size, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnAppendMemoryFill, hCommandList, @@ -86,7 +86,7 @@ zeCommandListAppendMemoryFill_Tracing(ze_command_list_handle_t hCommandList, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendMemoryFillCb_t, CommandList, pfnAppendMemoryFillCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendMemoryFill, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendMemoryFill, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -102,18 +102,18 @@ zeCommandListAppendMemoryFill_Tracing(ze_command_list_handle_t hCommandList, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendMemoryCopyRegion_Tracing(ze_command_list_handle_t hCommandList, - void *dstptr, - const ze_copy_region_t *dstRegion, - uint32_t dstPitch, - uint32_t dstSlicePitch, - const void *srcptr, - const ze_copy_region_t *srcRegion, - uint32_t srcPitch, - uint32_t srcSlicePitch, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents) { +zeCommandListAppendMemoryCopyRegionTracing(ze_command_list_handle_t hCommandList, + void *dstptr, + const ze_copy_region_t *dstRegion, + uint32_t dstPitch, + uint32_t dstSlicePitch, + const void *srcptr, + const ze_copy_region_t *srcRegion, + uint32_t srcPitch, + uint32_t srcSlicePitch, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnAppendMemoryCopyRegion, hCommandList, @@ -147,7 +147,7 @@ zeCommandListAppendMemoryCopyRegion_Tracing(ze_command_list_handle_t hCommandLis ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendMemoryCopyRegionCb_t, CommandList, pfnAppendMemoryCopyRegionCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendMemoryCopyRegion, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendMemoryCopyRegion, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -167,14 +167,14 @@ zeCommandListAppendMemoryCopyRegion_Tracing(ze_command_list_handle_t hCommandLis } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendMemoryCopyFromContext_Tracing(ze_command_list_handle_t hCommandList, - void *dstptr, - ze_context_handle_t hContextSrc, - const void *srcptr, - size_t size, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents) { +zeCommandListAppendMemoryCopyFromContextTracing(ze_command_list_handle_t hCommandList, + void *dstptr, + ze_context_handle_t hContextSrc, + const void *srcptr, + size_t size, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnAppendMemoryCopyFromContext, hCommandList, @@ -200,7 +200,7 @@ zeCommandListAppendMemoryCopyFromContext_Tracing(ze_command_list_handle_t hComma ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendMemoryCopyFromContextCb_t, CommandList, pfnAppendMemoryCopyFromContextCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendMemoryCopyFromContext, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendMemoryCopyFromContext, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -216,12 +216,12 @@ zeCommandListAppendMemoryCopyFromContext_Tracing(ze_command_list_handle_t hComma } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendImageCopy_Tracing(ze_command_list_handle_t hCommandList, - ze_image_handle_t hDstImage, - ze_image_handle_t hSrcImage, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents) { +zeCommandListAppendImageCopyTracing(ze_command_list_handle_t hCommandList, + ze_image_handle_t hDstImage, + ze_image_handle_t hSrcImage, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnAppendImageCopy, hCommandList, @@ -243,7 +243,7 @@ zeCommandListAppendImageCopy_Tracing(ze_command_list_handle_t hCommandList, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendImageCopyCb_t, CommandList, pfnAppendImageCopyCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendImageCopy, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendImageCopy, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -257,14 +257,14 @@ zeCommandListAppendImageCopy_Tracing(ze_command_list_handle_t hCommandList, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendImageCopyRegion_Tracing(ze_command_list_handle_t hCommandList, - ze_image_handle_t hDstImage, - ze_image_handle_t hSrcImage, - const ze_image_region_t *pDstRegion, - const ze_image_region_t *pSrcRegion, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents) { +zeCommandListAppendImageCopyRegionTracing(ze_command_list_handle_t hCommandList, + ze_image_handle_t hDstImage, + ze_image_handle_t hSrcImage, + const ze_image_region_t *pDstRegion, + const ze_image_region_t *pSrcRegion, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnAppendImageCopyRegion, hCommandList, @@ -290,7 +290,7 @@ zeCommandListAppendImageCopyRegion_Tracing(ze_command_list_handle_t hCommandList ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendImageCopyRegionCb_t, CommandList, pfnAppendImageCopyRegionCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendImageCopyRegion, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendImageCopyRegion, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -306,13 +306,13 @@ zeCommandListAppendImageCopyRegion_Tracing(ze_command_list_handle_t hCommandList } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendImageCopyToMemory_Tracing(ze_command_list_handle_t hCommandList, - void *dstptr, - ze_image_handle_t hSrcImage, - const ze_image_region_t *pSrcRegion, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents) { +zeCommandListAppendImageCopyToMemoryTracing(ze_command_list_handle_t hCommandList, + void *dstptr, + ze_image_handle_t hSrcImage, + const ze_image_region_t *pSrcRegion, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnAppendImageCopyToMemory, hCommandList, @@ -336,7 +336,7 @@ zeCommandListAppendImageCopyToMemory_Tracing(ze_command_list_handle_t hCommandLi ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendImageCopyToMemoryCb_t, CommandList, pfnAppendImageCopyToMemoryCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendImageCopyToMemory, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendImageCopyToMemory, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -351,13 +351,13 @@ zeCommandListAppendImageCopyToMemory_Tracing(ze_command_list_handle_t hCommandLi } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendImageCopyFromMemory_Tracing(ze_command_list_handle_t hCommandList, - ze_image_handle_t hDstImage, - const void *srcptr, - const ze_image_region_t *pDstRegion, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents) { +zeCommandListAppendImageCopyFromMemoryTracing(ze_command_list_handle_t hCommandList, + ze_image_handle_t hDstImage, + const void *srcptr, + const ze_image_region_t *pDstRegion, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnAppendImageCopyFromMemory, hCommandList, @@ -381,7 +381,7 @@ zeCommandListAppendImageCopyFromMemory_Tracing(ze_command_list_handle_t hCommand ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendImageCopyFromMemoryCb_t, CommandList, pfnAppendImageCopyFromMemoryCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendImageCopyFromMemory, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendImageCopyFromMemory, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -396,9 +396,9 @@ zeCommandListAppendImageCopyFromMemory_Tracing(ze_command_list_handle_t hCommand } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendMemoryPrefetch_Tracing(ze_command_list_handle_t hCommandList, - const void *ptr, - size_t size) { +zeCommandListAppendMemoryPrefetchTracing(ze_command_list_handle_t hCommandList, + const void *ptr, + size_t size) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnAppendMemoryPrefetch, hCommandList, @@ -414,7 +414,7 @@ zeCommandListAppendMemoryPrefetch_Tracing(ze_command_list_handle_t hCommandList, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendMemoryPrefetchCb_t, CommandList, pfnAppendMemoryPrefetchCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendMemoryPrefetch, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendMemoryPrefetch, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -425,11 +425,11 @@ zeCommandListAppendMemoryPrefetch_Tracing(ze_command_list_handle_t hCommandList, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendMemAdvise_Tracing(ze_command_list_handle_t hCommandList, - ze_device_handle_t hDevice, - const void *ptr, - size_t size, - ze_memory_advice_t advice) { +zeCommandListAppendMemAdviseTracing(ze_command_list_handle_t hCommandList, + ze_device_handle_t hDevice, + const void *ptr, + size_t size, + ze_memory_advice_t advice) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnAppendMemAdvise, hCommandList, @@ -449,7 +449,7 @@ zeCommandListAppendMemAdvise_Tracing(ze_command_list_handle_t hCommandList, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendMemAdviseCb_t, CommandList, pfnAppendMemAdviseCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendMemAdvise, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendMemAdvise, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, diff --git a/level_zero/experimental/source/tracing/tracing_copy_imp.h b/level_zero/experimental/source/tracing/tracing_copy_imp.h index ae7d675074..e7617499d0 100644 --- a/level_zero/experimental/source/tracing/tracing_copy_imp.h +++ b/level_zero/experimental/source/tracing/tracing_copy_imp.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,94 +10,94 @@ extern "C" { ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendMemoryCopy_Tracing(ze_command_list_handle_t hCommandList, - void *dstptr, - const void *srcptr, - size_t size, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents); - -ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendMemoryFill_Tracing(ze_command_list_handle_t hCommandList, - void *ptr, - const void *pattern, - size_t patternSize, - size_t size, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents); - -ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendMemoryCopyRegion_Tracing(ze_command_list_handle_t hCommandList, - void *dstptr, - const ze_copy_region_t *dstRegion, - uint32_t dstPitch, - uint32_t dstSlicePitch, - const void *srcptr, - const ze_copy_region_t *srcRegion, - uint32_t srcPitch, - uint32_t srcSlicePitch, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents); - -ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendMemoryCopyFromContext_Tracing(ze_command_list_handle_t hCommandList, - void *dstptr, - ze_context_handle_t hContextSrc, - const void *srcptr, - size_t size, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents); - -ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendImageCopy_Tracing(ze_command_list_handle_t hCommandList, - ze_image_handle_t hDstImage, - ze_image_handle_t hSrcImage, +zeCommandListAppendMemoryCopyTracing(ze_command_list_handle_t hCommandList, + void *dstptr, + const void *srcptr, + size_t size, ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents); ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendImageCopyRegion_Tracing(ze_command_list_handle_t hCommandList, - ze_image_handle_t hDstImage, - ze_image_handle_t hSrcImage, - const ze_image_region_t *pDstRegion, - const ze_image_region_t *pSrcRegion, +zeCommandListAppendMemoryFillTracing(ze_command_list_handle_t hCommandList, + void *ptr, + const void *pattern, + size_t patternSize, + size_t size, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents); + +ZE_APIEXPORT ze_result_t ZE_APICALL +zeCommandListAppendMemoryCopyRegionTracing(ze_command_list_handle_t hCommandList, + void *dstptr, + const ze_copy_region_t *dstRegion, + uint32_t dstPitch, + uint32_t dstSlicePitch, + const void *srcptr, + const ze_copy_region_t *srcRegion, + uint32_t srcPitch, + uint32_t srcSlicePitch, ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents); ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendImageCopyToMemory_Tracing(ze_command_list_handle_t hCommandList, - void *dstptr, - ze_image_handle_t hSrcImage, - const ze_image_region_t *pSrcRegion, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents); +zeCommandListAppendMemoryCopyFromContextTracing(ze_command_list_handle_t hCommandList, + void *dstptr, + ze_context_handle_t hContextSrc, + const void *srcptr, + size_t size, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents); ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendImageCopyFromMemory_Tracing(ze_command_list_handle_t hCommandList, - ze_image_handle_t hDstImage, - const void *srcptr, - const ze_image_region_t *pDstRegion, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents); +zeCommandListAppendImageCopyTracing(ze_command_list_handle_t hCommandList, + ze_image_handle_t hDstImage, + ze_image_handle_t hSrcImage, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents); ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendMemoryPrefetch_Tracing(ze_command_list_handle_t hCommandList, - const void *ptr, - size_t size); +zeCommandListAppendImageCopyRegionTracing(ze_command_list_handle_t hCommandList, + ze_image_handle_t hDstImage, + ze_image_handle_t hSrcImage, + const ze_image_region_t *pDstRegion, + const ze_image_region_t *pSrcRegion, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents); ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendMemAdvise_Tracing(ze_command_list_handle_t hCommandList, - ze_device_handle_t hDevice, - const void *ptr, - size_t size, - ze_memory_advice_t advice); +zeCommandListAppendImageCopyToMemoryTracing(ze_command_list_handle_t hCommandList, + void *dstptr, + ze_image_handle_t hSrcImage, + const ze_image_region_t *pSrcRegion, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents); + +ZE_APIEXPORT ze_result_t ZE_APICALL +zeCommandListAppendImageCopyFromMemoryTracing(ze_command_list_handle_t hCommandList, + ze_image_handle_t hDstImage, + const void *srcptr, + const ze_image_region_t *pDstRegion, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents); + +ZE_APIEXPORT ze_result_t ZE_APICALL +zeCommandListAppendMemoryPrefetchTracing(ze_command_list_handle_t hCommandList, + const void *ptr, + size_t size); + +ZE_APIEXPORT ze_result_t ZE_APICALL +zeCommandListAppendMemAdviseTracing(ze_command_list_handle_t hCommandList, + ze_device_handle_t hDevice, + const void *ptr, + size_t size, + ze_memory_advice_t advice); } // extern "C" diff --git a/level_zero/experimental/source/tracing/tracing_device_imp.cpp b/level_zero/experimental/source/tracing/tracing_device_imp.cpp index 05ae5a27df..c87aee4d47 100644 --- a/level_zero/experimental/source/tracing/tracing_device_imp.cpp +++ b/level_zero/experimental/source/tracing/tracing_device_imp.cpp @@ -8,9 +8,9 @@ #include "level_zero/experimental/source/tracing/tracing_imp.h" ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGet_Tracing(ze_driver_handle_t hDriver, - uint32_t *pCount, - ze_device_handle_t *phDevices) { +zeDeviceGetTracing(ze_driver_handle_t hDriver, + uint32_t *pCount, + ze_device_handle_t *phDevices) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Device.pfnGet, hDriver, @@ -26,7 +26,7 @@ zeDeviceGet_Tracing(ze_driver_handle_t hDriver, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnDeviceGetCb_t, Device, pfnGetCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGet, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGet, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -37,8 +37,8 @@ zeDeviceGet_Tracing(ze_driver_handle_t hDriver, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetProperties_Tracing(ze_device_handle_t hDevice, - ze_device_properties_t *pDeviceProperties) { +zeDeviceGetPropertiesTracing(ze_device_handle_t hDevice, + ze_device_properties_t *pDeviceProperties) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Device.pfnGetProperties, hDevice, @@ -52,7 +52,7 @@ zeDeviceGetProperties_Tracing(ze_device_handle_t hDevice, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnDeviceGetPropertiesCb_t, Device, pfnGetPropertiesCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetProperties, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetProperties, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -62,8 +62,8 @@ zeDeviceGetProperties_Tracing(ze_device_handle_t hDevice, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetComputeProperties_Tracing(ze_device_handle_t hDevice, - ze_device_compute_properties_t *pComputeProperties) { +zeDeviceGetComputePropertiesTracing(ze_device_handle_t hDevice, + ze_device_compute_properties_t *pComputeProperties) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Device.pfnGetComputeProperties, hDevice, @@ -77,7 +77,7 @@ zeDeviceGetComputeProperties_Tracing(ze_device_handle_t hDevice, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnDeviceGetComputePropertiesCb_t, Device, pfnGetComputePropertiesCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetComputeProperties, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetComputeProperties, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -87,9 +87,9 @@ zeDeviceGetComputeProperties_Tracing(ze_device_handle_t hDevice, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetMemoryProperties_Tracing(ze_device_handle_t hDevice, - uint32_t *pCount, - ze_device_memory_properties_t *pMemProperties) { +zeDeviceGetMemoryPropertiesTracing(ze_device_handle_t hDevice, + uint32_t *pCount, + ze_device_memory_properties_t *pMemProperties) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Device.pfnGetMemoryProperties, hDevice, @@ -105,7 +105,7 @@ zeDeviceGetMemoryProperties_Tracing(ze_device_handle_t hDevice, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnDeviceGetMemoryPropertiesCb_t, Device, pfnGetMemoryPropertiesCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetMemoryProperties, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetMemoryProperties, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -116,9 +116,9 @@ zeDeviceGetMemoryProperties_Tracing(ze_device_handle_t hDevice, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetCacheProperties_Tracing(ze_device_handle_t hDevice, - uint32_t *pCount, - ze_device_cache_properties_t *pCacheProperties) { +zeDeviceGetCachePropertiesTracing(ze_device_handle_t hDevice, + uint32_t *pCount, + ze_device_cache_properties_t *pCacheProperties) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Device.pfnGetCacheProperties, hDevice, @@ -134,7 +134,7 @@ zeDeviceGetCacheProperties_Tracing(ze_device_handle_t hDevice, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnDeviceGetCachePropertiesCb_t, Device, pfnGetCachePropertiesCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetCacheProperties, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetCacheProperties, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -145,8 +145,8 @@ zeDeviceGetCacheProperties_Tracing(ze_device_handle_t hDevice, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetImageProperties_Tracing(ze_device_handle_t hDevice, - ze_device_image_properties_t *pImageProperties) { +zeDeviceGetImagePropertiesTracing(ze_device_handle_t hDevice, + ze_device_image_properties_t *pImageProperties) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Device.pfnGetImageProperties, hDevice, @@ -160,7 +160,7 @@ zeDeviceGetImageProperties_Tracing(ze_device_handle_t hDevice, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnDeviceGetImagePropertiesCb_t, Device, pfnGetImagePropertiesCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetImageProperties, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetImageProperties, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -170,9 +170,9 @@ zeDeviceGetImageProperties_Tracing(ze_device_handle_t hDevice, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetSubDevices_Tracing(ze_device_handle_t hDevice, - uint32_t *pCount, - ze_device_handle_t *phSubdevices) { +zeDeviceGetSubDevicesTracing(ze_device_handle_t hDevice, + uint32_t *pCount, + ze_device_handle_t *phSubdevices) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Device.pfnGetSubDevices, hDevice, @@ -188,7 +188,7 @@ zeDeviceGetSubDevices_Tracing(ze_device_handle_t hDevice, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnDeviceGetSubDevicesCb_t, Device, pfnGetSubDevicesCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetSubDevices, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetSubDevices, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -199,9 +199,9 @@ zeDeviceGetSubDevices_Tracing(ze_device_handle_t hDevice, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetP2PProperties_Tracing(ze_device_handle_t hDevice, - ze_device_handle_t hPeerDevice, - ze_device_p2p_properties_t *pP2PProperties) { +zeDeviceGetP2PPropertiesTracing(ze_device_handle_t hDevice, + ze_device_handle_t hPeerDevice, + ze_device_p2p_properties_t *pP2PProperties) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Device.pfnGetP2PProperties, hDevice, @@ -217,7 +217,7 @@ zeDeviceGetP2PProperties_Tracing(ze_device_handle_t hDevice, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnDeviceGetP2PPropertiesCb_t, Device, pfnGetP2PPropertiesCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetP2PProperties, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetP2PProperties, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -228,9 +228,9 @@ zeDeviceGetP2PProperties_Tracing(ze_device_handle_t hDevice, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceCanAccessPeer_Tracing(ze_device_handle_t hDevice, - ze_device_handle_t hPeerDevice, - ze_bool_t *value) { +zeDeviceCanAccessPeerTracing(ze_device_handle_t hDevice, + ze_device_handle_t hPeerDevice, + ze_bool_t *value) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Device.pfnCanAccessPeer, hDevice, @@ -246,7 +246,7 @@ zeDeviceCanAccessPeer_Tracing(ze_device_handle_t hDevice, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnDeviceCanAccessPeerCb_t, Device, pfnCanAccessPeerCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnCanAccessPeer, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnCanAccessPeer, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -257,8 +257,8 @@ zeDeviceCanAccessPeer_Tracing(ze_device_handle_t hDevice, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelSetCacheConfig_Tracing(ze_kernel_handle_t hKernel, - ze_cache_config_flags_t flags) { +zeKernelSetCacheConfigTracing(ze_kernel_handle_t hKernel, + ze_cache_config_flags_t flags) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Kernel.pfnSetCacheConfig, hKernel, @@ -272,7 +272,7 @@ zeKernelSetCacheConfig_Tracing(ze_kernel_handle_t hKernel, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnKernelSetCacheConfigCb_t, Kernel, pfnSetCacheConfigCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnSetCacheConfig, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnSetCacheConfig, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -282,8 +282,8 @@ zeKernelSetCacheConfig_Tracing(ze_kernel_handle_t hKernel, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetMemoryAccessProperties_Tracing(ze_device_handle_t hDevice, - ze_device_memory_access_properties_t *pMemAccessProperties) { +zeDeviceGetMemoryAccessPropertiesTracing(ze_device_handle_t hDevice, + ze_device_memory_access_properties_t *pMemAccessProperties) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Device.pfnGetMemoryAccessProperties, hDevice, @@ -298,7 +298,7 @@ zeDeviceGetMemoryAccessProperties_Tracing(ze_device_handle_t hDevice, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnDeviceGetMemoryAccessPropertiesCb_t, Device, pfnGetMemoryAccessPropertiesCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetMemoryAccessProperties, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetMemoryAccessProperties, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -308,8 +308,8 @@ zeDeviceGetMemoryAccessProperties_Tracing(ze_device_handle_t hDevice, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetModuleProperties_Tracing(ze_device_handle_t hDevice, - ze_device_module_properties_t *pModuleProperties) { +zeDeviceGetModulePropertiesTracing(ze_device_handle_t hDevice, + ze_device_module_properties_t *pModuleProperties) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Device.pfnGetModuleProperties, hDevice, @@ -323,7 +323,7 @@ zeDeviceGetModuleProperties_Tracing(ze_device_handle_t hDevice, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnDeviceGetModulePropertiesCb_t, Device, pfnGetModulePropertiesCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetModuleProperties, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetModuleProperties, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -333,9 +333,9 @@ zeDeviceGetModuleProperties_Tracing(ze_device_handle_t hDevice, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetCommandQueueGroupProperties_Tracing(ze_device_handle_t hDevice, - uint32_t *pCount, - ze_command_queue_group_properties_t *pCommandQueueGroupProperties) { +zeDeviceGetCommandQueueGroupPropertiesTracing(ze_device_handle_t hDevice, + uint32_t *pCount, + ze_command_queue_group_properties_t *pCommandQueueGroupProperties) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Device.pfnGetCommandQueueGroupProperties, hDevice, @@ -351,7 +351,7 @@ zeDeviceGetCommandQueueGroupProperties_Tracing(ze_device_handle_t hDevice, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnDeviceGetCommandQueueGroupPropertiesCb_t, Device, pfnGetCommandQueueGroupPropertiesCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetCommandQueueGroupProperties, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetCommandQueueGroupProperties, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -362,8 +362,8 @@ zeDeviceGetCommandQueueGroupProperties_Tracing(ze_device_handle_t hDevice, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetExternalMemoryProperties_Tracing(ze_device_handle_t hDevice, - ze_device_external_memory_properties_t *pExternalMemoryProperties) { +zeDeviceGetExternalMemoryPropertiesTracing(ze_device_handle_t hDevice, + ze_device_external_memory_properties_t *pExternalMemoryProperties) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Device.pfnGetExternalMemoryProperties, hDevice, @@ -377,7 +377,7 @@ zeDeviceGetExternalMemoryProperties_Tracing(ze_device_handle_t hDevice, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnDeviceGetExternalMemoryPropertiesCb_t, Device, pfnGetExternalMemoryPropertiesCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetExternalMemoryProperties, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetExternalMemoryProperties, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -387,7 +387,7 @@ zeDeviceGetExternalMemoryProperties_Tracing(ze_device_handle_t hDevice, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetStatus_Tracing(ze_device_handle_t hDevice) { +zeDeviceGetStatusTracing(ze_device_handle_t hDevice) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Device.pfnGetStatus, hDevice); @@ -399,7 +399,7 @@ zeDeviceGetStatus_Tracing(ze_device_handle_t hDevice) { ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnDeviceGetStatusCb_t, Device, pfnGetStatusCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetStatus, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Device.pfnGetStatus, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, diff --git a/level_zero/experimental/source/tracing/tracing_device_imp.h b/level_zero/experimental/source/tracing/tracing_device_imp.h index f4d6f1c008..f41448b177 100644 --- a/level_zero/experimental/source/tracing/tracing_device_imp.h +++ b/level_zero/experimental/source/tracing/tracing_device_imp.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,68 +10,68 @@ extern "C" { ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGet_Tracing(ze_driver_handle_t hDriver, - uint32_t *pCount, - ze_device_handle_t *phDevices); +zeDeviceGetTracing(ze_driver_handle_t hDriver, + uint32_t *pCount, + ze_device_handle_t *phDevices); ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetProperties_Tracing(ze_device_handle_t hDevice, - ze_device_properties_t *pDeviceProperties); +zeDeviceGetPropertiesTracing(ze_device_handle_t hDevice, + ze_device_properties_t *pDeviceProperties); ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetComputeProperties_Tracing(ze_device_handle_t hDevice, - ze_device_compute_properties_t *pComputeProperties); +zeDeviceGetComputePropertiesTracing(ze_device_handle_t hDevice, + ze_device_compute_properties_t *pComputeProperties); ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetMemoryProperties_Tracing(ze_device_handle_t hDevice, - uint32_t *pCount, - ze_device_memory_properties_t *pMemProperties); - -ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetCacheProperties_Tracing(ze_device_handle_t hDevice, +zeDeviceGetMemoryPropertiesTracing(ze_device_handle_t hDevice, uint32_t *pCount, - ze_device_cache_properties_t *pCacheProperties); + ze_device_memory_properties_t *pMemProperties); ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetImageProperties_Tracing(ze_device_handle_t hDevice, - ze_device_image_properties_t *pImageProperties); +zeDeviceGetCachePropertiesTracing(ze_device_handle_t hDevice, + uint32_t *pCount, + ze_device_cache_properties_t *pCacheProperties); ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetSubDevices_Tracing(ze_device_handle_t hDevice, - uint32_t *pCount, - ze_device_handle_t *phSubdevices); +zeDeviceGetImagePropertiesTracing(ze_device_handle_t hDevice, + ze_device_image_properties_t *pImageProperties); ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetP2PProperties_Tracing(ze_device_handle_t hDevice, - ze_device_handle_t hPeerDevice, - ze_device_p2p_properties_t *pP2PProperties); +zeDeviceGetSubDevicesTracing(ze_device_handle_t hDevice, + uint32_t *pCount, + ze_device_handle_t *phSubdevices); ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceCanAccessPeer_Tracing(ze_device_handle_t hDevice, - ze_device_handle_t hPeerDevice, - ze_bool_t *value); +zeDeviceGetP2PPropertiesTracing(ze_device_handle_t hDevice, + ze_device_handle_t hPeerDevice, + ze_device_p2p_properties_t *pP2PProperties); ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelSetCacheConfig_Tracing(ze_kernel_handle_t hKernel, - ze_cache_config_flags_t flags); +zeDeviceCanAccessPeerTracing(ze_device_handle_t hDevice, + ze_device_handle_t hPeerDevice, + ze_bool_t *value); ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetMemoryAccessProperties_Tracing(ze_device_handle_t hDevice, - ze_device_memory_access_properties_t *pMemAccessProperties); +zeKernelSetCacheConfigTracing(ze_kernel_handle_t hKernel, + ze_cache_config_flags_t flags); ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetModuleProperties_Tracing(ze_device_handle_t hDevice, - ze_device_module_properties_t *pModuleProperties); +zeDeviceGetMemoryAccessPropertiesTracing(ze_device_handle_t hDevice, + ze_device_memory_access_properties_t *pMemAccessProperties); ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetCommandQueueGroupProperties_Tracing(ze_device_handle_t hDevice, - uint32_t *pCount, - ze_command_queue_group_properties_t *pCommandQueueGroupProperties); +zeDeviceGetModulePropertiesTracing(ze_device_handle_t hDevice, + ze_device_module_properties_t *pModuleProperties); ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetExternalMemoryProperties_Tracing(ze_device_handle_t hDevice, - ze_device_external_memory_properties_t *pExternalMemoryProperties); +zeDeviceGetCommandQueueGroupPropertiesTracing(ze_device_handle_t hDevice, + uint32_t *pCount, + ze_command_queue_group_properties_t *pCommandQueueGroupProperties); ZE_APIEXPORT ze_result_t ZE_APICALL -zeDeviceGetStatus_Tracing(ze_device_handle_t hDevice); +zeDeviceGetExternalMemoryPropertiesTracing(ze_device_handle_t hDevice, + ze_device_external_memory_properties_t *pExternalMemoryProperties); + +ZE_APIEXPORT ze_result_t ZE_APICALL +zeDeviceGetStatusTracing(ze_device_handle_t hDevice); } diff --git a/level_zero/experimental/source/tracing/tracing_driver_imp.cpp b/level_zero/experimental/source/tracing/tracing_driver_imp.cpp index 9e9ff76621..826822bed3 100644 --- a/level_zero/experimental/source/tracing/tracing_driver_imp.cpp +++ b/level_zero/experimental/source/tracing/tracing_driver_imp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,8 +8,8 @@ #include "level_zero/experimental/source/tracing/tracing_imp.h" ZE_APIEXPORT ze_result_t ZE_APICALL -zeDriverGet_Tracing(uint32_t *pCount, - ze_driver_handle_t *phDrivers) { +zeDriverGetTracing(uint32_t *pCount, + ze_driver_handle_t *phDrivers) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Driver.pfnGet, pCount, @@ -23,7 +23,7 @@ zeDriverGet_Tracing(uint32_t *pCount, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnDriverGetCb_t, Driver, pfnGetCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Driver.pfnGet, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Driver.pfnGet, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -33,8 +33,8 @@ zeDriverGet_Tracing(uint32_t *pCount, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeDriverGetProperties_Tracing(ze_driver_handle_t hDriver, - ze_driver_properties_t *properties) { +zeDriverGetPropertiesTracing(ze_driver_handle_t hDriver, + ze_driver_properties_t *properties) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Driver.pfnGetProperties, hDriver, @@ -47,7 +47,7 @@ zeDriverGetProperties_Tracing(ze_driver_handle_t hDriver, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnDriverGetPropertiesCb_t, Driver, pfnGetPropertiesCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Driver.pfnGetProperties, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Driver.pfnGetProperties, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -57,8 +57,8 @@ zeDriverGetProperties_Tracing(ze_driver_handle_t hDriver, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeDriverGetApiVersion_Tracing(ze_driver_handle_t hDrivers, - ze_api_version_t *version) { +zeDriverGetApiVersionTracing(ze_driver_handle_t hDrivers, + ze_api_version_t *version) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Driver.pfnGetApiVersion, hDrivers, version); @@ -70,7 +70,7 @@ zeDriverGetApiVersion_Tracing(ze_driver_handle_t hDrivers, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnDriverGetApiVersionCb_t, Driver, pfnGetApiVersionCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Driver.pfnGetApiVersion, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Driver.pfnGetApiVersion, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -80,8 +80,8 @@ zeDriverGetApiVersion_Tracing(ze_driver_handle_t hDrivers, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeDriverGetIpcProperties_Tracing(ze_driver_handle_t hDriver, - ze_driver_ipc_properties_t *pIpcProperties) { +zeDriverGetIpcPropertiesTracing(ze_driver_handle_t hDriver, + ze_driver_ipc_properties_t *pIpcProperties) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Driver.pfnGetIpcProperties, hDriver, @@ -95,7 +95,7 @@ zeDriverGetIpcProperties_Tracing(ze_driver_handle_t hDriver, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnDriverGetIpcPropertiesCb_t, Driver, pfnGetIpcPropertiesCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Driver.pfnGetIpcProperties, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Driver.pfnGetIpcProperties, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -105,9 +105,9 @@ zeDriverGetIpcProperties_Tracing(ze_driver_handle_t hDriver, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeDriverGetExtensionProperties_Tracing(ze_driver_handle_t hDriver, - uint32_t *pCount, - ze_driver_extension_properties_t *pExtensionProperties) { +zeDriverGetExtensionPropertiesTracing(ze_driver_handle_t hDriver, + uint32_t *pCount, + ze_driver_extension_properties_t *pExtensionProperties) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Driver.pfnGetExtensionProperties, hDriver, @@ -123,7 +123,7 @@ zeDriverGetExtensionProperties_Tracing(ze_driver_handle_t hDriver, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnDriverGetExtensionPropertiesCb_t, Driver, pfnGetExtensionPropertiesCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Driver.pfnGetExtensionProperties, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Driver.pfnGetExtensionProperties, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, diff --git a/level_zero/experimental/source/tracing/tracing_driver_imp.h b/level_zero/experimental/source/tracing/tracing_driver_imp.h index f0c084791c..561d9c9bcf 100644 --- a/level_zero/experimental/source/tracing/tracing_driver_imp.h +++ b/level_zero/experimental/source/tracing/tracing_driver_imp.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,23 +10,23 @@ extern "C" { ZE_APIEXPORT ze_result_t ZE_APICALL -zeDriverGet_Tracing(uint32_t *pCount, - ze_driver_handle_t *phDrivers); +zeDriverGetTracing(uint32_t *pCount, + ze_driver_handle_t *phDrivers); ZE_APIEXPORT ze_result_t ZE_APICALL -zeDriverGetProperties_Tracing(ze_driver_handle_t hDriver, - ze_driver_properties_t *properties); +zeDriverGetPropertiesTracing(ze_driver_handle_t hDriver, + ze_driver_properties_t *properties); ZE_APIEXPORT ze_result_t ZE_APICALL -zeDriverGetApiVersion_Tracing(ze_driver_handle_t hDrivers, - ze_api_version_t *version); +zeDriverGetApiVersionTracing(ze_driver_handle_t hDrivers, + ze_api_version_t *version); ZE_APIEXPORT ze_result_t ZE_APICALL -zeDriverGetIpcProperties_Tracing(ze_driver_handle_t hDriver, - ze_driver_ipc_properties_t *pIpcProperties); +zeDriverGetIpcPropertiesTracing(ze_driver_handle_t hDriver, + ze_driver_ipc_properties_t *pIpcProperties); ZE_APIEXPORT ze_result_t ZE_APICALL -zeDriverGetExtensionProperties_Tracing(ze_driver_handle_t hDriver, - uint32_t *pCount, - ze_driver_extension_properties_t *pExtensionProperties); +zeDriverGetExtensionPropertiesTracing(ze_driver_handle_t hDriver, + uint32_t *pCount, + ze_driver_extension_properties_t *pExtensionProperties); } diff --git a/level_zero/experimental/source/tracing/tracing_event_imp.cpp b/level_zero/experimental/source/tracing/tracing_event_imp.cpp index 1e30382fb7..6fe85a9a26 100644 --- a/level_zero/experimental/source/tracing/tracing_event_imp.cpp +++ b/level_zero/experimental/source/tracing/tracing_event_imp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,11 +8,11 @@ #include "level_zero/experimental/source/tracing/tracing_imp.h" ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventPoolCreate_Tracing(ze_context_handle_t hContext, - const ze_event_pool_desc_t *desc, - uint32_t numDevices, - ze_device_handle_t *phDevices, - ze_event_pool_handle_t *phEventPool) { +zeEventPoolCreateTracing(ze_context_handle_t hContext, + const ze_event_pool_desc_t *desc, + uint32_t numDevices, + ze_device_handle_t *phDevices, + ze_event_pool_handle_t *phEventPool) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.EventPool.pfnCreate, hContext, @@ -32,7 +32,7 @@ zeEventPoolCreate_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnEventPoolCreateCb_t, EventPool, pfnCreateCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.EventPool.pfnCreate, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.EventPool.pfnCreate, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -45,7 +45,7 @@ zeEventPoolCreate_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventPoolDestroy_Tracing(ze_event_pool_handle_t hEventPool) { +zeEventPoolDestroyTracing(ze_event_pool_handle_t hEventPool) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.EventPool.pfnDestroy, hEventPool); @@ -57,7 +57,7 @@ zeEventPoolDestroy_Tracing(ze_event_pool_handle_t hEventPool) { ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnEventPoolDestroyCb_t, EventPool, pfnDestroyCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.EventPool.pfnDestroy, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.EventPool.pfnDestroy, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -66,9 +66,9 @@ zeEventPoolDestroy_Tracing(ze_event_pool_handle_t hEventPool) { } ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventCreate_Tracing(ze_event_pool_handle_t hEventPool, - const ze_event_desc_t *desc, - ze_event_handle_t *phEvent) { +zeEventCreateTracing(ze_event_pool_handle_t hEventPool, + const ze_event_desc_t *desc, + ze_event_handle_t *phEvent) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Event.pfnCreate, hEventPool, @@ -84,7 +84,7 @@ zeEventCreate_Tracing(ze_event_pool_handle_t hEventPool, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnEventCreateCb_t, Event, pfnCreateCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Event.pfnCreate, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Event.pfnCreate, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -95,7 +95,7 @@ zeEventCreate_Tracing(ze_event_pool_handle_t hEventPool, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventDestroy_Tracing(ze_event_handle_t hEvent) { +zeEventDestroyTracing(ze_event_handle_t hEvent) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Event.pfnDestroy, hEvent); @@ -107,7 +107,7 @@ zeEventDestroy_Tracing(ze_event_handle_t hEvent) { ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnEventDestroyCb_t, Event, pfnDestroyCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Event.pfnDestroy, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Event.pfnDestroy, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -116,8 +116,8 @@ zeEventDestroy_Tracing(ze_event_handle_t hEvent) { } ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventPoolGetIpcHandle_Tracing(ze_event_pool_handle_t hEventPool, - ze_ipc_event_pool_handle_t *phIpc) { +zeEventPoolGetIpcHandleTracing(ze_event_pool_handle_t hEventPool, + ze_ipc_event_pool_handle_t *phIpc) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.EventPool.pfnGetIpcHandle, hEventPool, @@ -131,7 +131,7 @@ zeEventPoolGetIpcHandle_Tracing(ze_event_pool_handle_t hEventPool, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnEventPoolGetIpcHandleCb_t, EventPool, pfnGetIpcHandleCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.EventPool.pfnGetIpcHandle, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.EventPool.pfnGetIpcHandle, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -141,9 +141,9 @@ zeEventPoolGetIpcHandle_Tracing(ze_event_pool_handle_t hEventPool, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventPoolOpenIpcHandle_Tracing(ze_context_handle_t hContext, - ze_ipc_event_pool_handle_t hIpc, - ze_event_pool_handle_t *phEventPool) { +zeEventPoolOpenIpcHandleTracing(ze_context_handle_t hContext, + ze_ipc_event_pool_handle_t hIpc, + ze_event_pool_handle_t *phEventPool) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.EventPool.pfnOpenIpcHandle, hContext, @@ -159,7 +159,7 @@ zeEventPoolOpenIpcHandle_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnEventPoolOpenIpcHandleCb_t, EventPool, pfnOpenIpcHandleCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.EventPool.pfnOpenIpcHandle, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.EventPool.pfnOpenIpcHandle, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -170,7 +170,7 @@ zeEventPoolOpenIpcHandle_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventPoolCloseIpcHandle_Tracing(ze_event_pool_handle_t hEventPool) { +zeEventPoolCloseIpcHandleTracing(ze_event_pool_handle_t hEventPool) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.EventPool.pfnCloseIpcHandle, hEventPool); @@ -182,7 +182,7 @@ zeEventPoolCloseIpcHandle_Tracing(ze_event_pool_handle_t hEventPool) { ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnEventPoolCloseIpcHandleCb_t, EventPool, pfnCloseIpcHandleCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.EventPool.pfnCloseIpcHandle, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.EventPool.pfnCloseIpcHandle, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -191,8 +191,8 @@ zeEventPoolCloseIpcHandle_Tracing(ze_event_pool_handle_t hEventPool) { } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendSignalEvent_Tracing(ze_command_list_handle_t hCommandList, - ze_event_handle_t hEvent) { +zeCommandListAppendSignalEventTracing(ze_command_list_handle_t hCommandList, + ze_event_handle_t hEvent) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnAppendSignalEvent, hCommandList, @@ -206,7 +206,7 @@ zeCommandListAppendSignalEvent_Tracing(ze_command_list_handle_t hCommandList, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendSignalEventCb_t, CommandList, pfnAppendSignalEventCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendSignalEvent, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendSignalEvent, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -216,9 +216,9 @@ zeCommandListAppendSignalEvent_Tracing(ze_command_list_handle_t hCommandList, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendWaitOnEvents_Tracing(ze_command_list_handle_t hCommandList, - uint32_t numEvents, - ze_event_handle_t *phEvents) { +zeCommandListAppendWaitOnEventsTracing(ze_command_list_handle_t hCommandList, + uint32_t numEvents, + ze_event_handle_t *phEvents) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnAppendWaitOnEvents, hCommandList, @@ -234,7 +234,7 @@ zeCommandListAppendWaitOnEvents_Tracing(ze_command_list_handle_t hCommandList, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendWaitOnEventsCb_t, CommandList, pfnAppendWaitOnEventsCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendWaitOnEvents, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendWaitOnEvents, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -245,7 +245,7 @@ zeCommandListAppendWaitOnEvents_Tracing(ze_command_list_handle_t hCommandList, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventHostSignal_Tracing(ze_event_handle_t hEvent) { +zeEventHostSignalTracing(ze_event_handle_t hEvent) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Event.pfnHostSignal, hEvent); @@ -257,7 +257,7 @@ zeEventHostSignal_Tracing(ze_event_handle_t hEvent) { ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnEventHostSignalCb_t, Event, pfnHostSignalCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Event.pfnHostSignal, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Event.pfnHostSignal, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -266,8 +266,8 @@ zeEventHostSignal_Tracing(ze_event_handle_t hEvent) { } ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventHostSynchronize_Tracing(ze_event_handle_t hEvent, - uint64_t timeout) { +zeEventHostSynchronizeTracing(ze_event_handle_t hEvent, + uint64_t timeout) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Event.pfnHostSynchronize, hEvent, @@ -281,7 +281,7 @@ zeEventHostSynchronize_Tracing(ze_event_handle_t hEvent, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnEventHostSynchronizeCb_t, Event, pfnHostSynchronizeCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Event.pfnHostSynchronize, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Event.pfnHostSynchronize, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -291,7 +291,7 @@ zeEventHostSynchronize_Tracing(ze_event_handle_t hEvent, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventQueryStatus_Tracing(ze_event_handle_t hEvent) { +zeEventQueryStatusTracing(ze_event_handle_t hEvent) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Event.pfnQueryStatus, hEvent); @@ -303,7 +303,7 @@ zeEventQueryStatus_Tracing(ze_event_handle_t hEvent) { ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnEventQueryStatusCb_t, Event, pfnQueryStatusCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Event.pfnQueryStatus, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Event.pfnQueryStatus, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -312,7 +312,7 @@ zeEventQueryStatus_Tracing(ze_event_handle_t hEvent) { } ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventHostReset_Tracing(ze_event_handle_t hEvent) { +zeEventHostResetTracing(ze_event_handle_t hEvent) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Event.pfnHostReset, hEvent); @@ -324,7 +324,7 @@ zeEventHostReset_Tracing(ze_event_handle_t hEvent) { ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnEventHostResetCb_t, Event, pfnHostResetCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Event.pfnHostReset, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Event.pfnHostReset, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -333,8 +333,8 @@ zeEventHostReset_Tracing(ze_event_handle_t hEvent) { } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendEventReset_Tracing(ze_command_list_handle_t hCommandList, - ze_event_handle_t hEvent) { +zeCommandListAppendEventResetTracing(ze_command_list_handle_t hCommandList, + ze_event_handle_t hEvent) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnAppendEventReset, hCommandList, @@ -349,7 +349,7 @@ zeCommandListAppendEventReset_Tracing(ze_command_list_handle_t hCommandList, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendEventResetCb_t, CommandList, pfnAppendEventResetCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendEventReset, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendEventReset, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -359,8 +359,8 @@ zeCommandListAppendEventReset_Tracing(ze_command_list_handle_t hCommandList, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventQueryKernelTimestamp_Tracing(ze_event_handle_t hEvent, - ze_kernel_timestamp_result_t *dstptr) { +zeEventQueryKernelTimestampTracing(ze_event_handle_t hEvent, + ze_kernel_timestamp_result_t *dstptr) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Event.pfnQueryKernelTimestamp, hEvent, @@ -374,7 +374,7 @@ zeEventQueryKernelTimestamp_Tracing(ze_event_handle_t hEvent, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnEventQueryKernelTimestampCb_t, Event, pfnQueryKernelTimestampCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Event.pfnQueryKernelTimestamp, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Event.pfnQueryKernelTimestamp, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, diff --git a/level_zero/experimental/source/tracing/tracing_event_imp.h b/level_zero/experimental/source/tracing/tracing_event_imp.h index ab236e2cd3..1b580016bb 100644 --- a/level_zero/experimental/source/tracing/tracing_event_imp.h +++ b/level_zero/experimental/source/tracing/tracing_event_imp.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,62 +10,62 @@ extern "C" { ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventPoolCreate_Tracing(ze_context_handle_t hContext, - const ze_event_pool_desc_t *desc, - uint32_t numDevices, - ze_device_handle_t *phDevices, - ze_event_pool_handle_t *phEventPool); +zeEventPoolCreateTracing(ze_context_handle_t hContext, + const ze_event_pool_desc_t *desc, + uint32_t numDevices, + ze_device_handle_t *phDevices, + ze_event_pool_handle_t *phEventPool); ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventPoolDestroy_Tracing(ze_event_pool_handle_t hEventPool); +zeEventPoolDestroyTracing(ze_event_pool_handle_t hEventPool); ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventCreate_Tracing(ze_event_pool_handle_t hEventPool, - const ze_event_desc_t *desc, - ze_event_handle_t *phEvent); +zeEventCreateTracing(ze_event_pool_handle_t hEventPool, + const ze_event_desc_t *desc, + ze_event_handle_t *phEvent); ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventDestroy_Tracing(ze_event_handle_t hEvent); +zeEventDestroyTracing(ze_event_handle_t hEvent); ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventPoolGetIpcHandle_Tracing(ze_event_pool_handle_t hEventPool, - ze_ipc_event_pool_handle_t *phIpc); +zeEventPoolGetIpcHandleTracing(ze_event_pool_handle_t hEventPool, + ze_ipc_event_pool_handle_t *phIpc); ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventPoolOpenIpcHandle_Tracing(ze_context_handle_t hContext, - ze_ipc_event_pool_handle_t hIpc, - ze_event_pool_handle_t *phEventPool); +zeEventPoolOpenIpcHandleTracing(ze_context_handle_t hContext, + ze_ipc_event_pool_handle_t hIpc, + ze_event_pool_handle_t *phEventPool); ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventPoolCloseIpcHandle_Tracing(ze_event_pool_handle_t hEventPool); +zeEventPoolCloseIpcHandleTracing(ze_event_pool_handle_t hEventPool); ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendSignalEvent_Tracing(ze_command_list_handle_t hCommandList, - ze_event_handle_t hEvent); - -ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendWaitOnEvents_Tracing(ze_command_list_handle_t hCommandList, - uint32_t numEvents, - ze_event_handle_t *phEvents); - -ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventHostSignal_Tracing(ze_event_handle_t hEvent); - -ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventHostSynchronize_Tracing(ze_event_handle_t hEvent, - uint64_t timeout); - -ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventQueryStatus_Tracing(ze_event_handle_t hEvent); - -ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventHostReset_Tracing(ze_event_handle_t hEvent); - -ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendEventReset_Tracing(ze_command_list_handle_t hCommandList, +zeCommandListAppendSignalEventTracing(ze_command_list_handle_t hCommandList, ze_event_handle_t hEvent); ZE_APIEXPORT ze_result_t ZE_APICALL -zeEventQueryKernelTimestamp_Tracing(ze_event_handle_t hEvent, - ze_kernel_timestamp_result_t *dstptr); +zeCommandListAppendWaitOnEventsTracing(ze_command_list_handle_t hCommandList, + uint32_t numEvents, + ze_event_handle_t *phEvents); + +ZE_APIEXPORT ze_result_t ZE_APICALL +zeEventHostSignalTracing(ze_event_handle_t hEvent); + +ZE_APIEXPORT ze_result_t ZE_APICALL +zeEventHostSynchronizeTracing(ze_event_handle_t hEvent, + uint64_t timeout); + +ZE_APIEXPORT ze_result_t ZE_APICALL +zeEventQueryStatusTracing(ze_event_handle_t hEvent); + +ZE_APIEXPORT ze_result_t ZE_APICALL +zeEventHostResetTracing(ze_event_handle_t hEvent); + +ZE_APIEXPORT ze_result_t ZE_APICALL +zeCommandListAppendEventResetTracing(ze_command_list_handle_t hCommandList, + ze_event_handle_t hEvent); + +ZE_APIEXPORT ze_result_t ZE_APICALL +zeEventQueryKernelTimestampTracing(ze_event_handle_t hEvent, + ze_kernel_timestamp_result_t *dstptr); } diff --git a/level_zero/experimental/source/tracing/tracing_fence_imp.cpp b/level_zero/experimental/source/tracing/tracing_fence_imp.cpp index 413bd7e79d..0059ad1676 100644 --- a/level_zero/experimental/source/tracing/tracing_fence_imp.cpp +++ b/level_zero/experimental/source/tracing/tracing_fence_imp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,9 +8,9 @@ #include "level_zero/experimental/source/tracing/tracing_imp.h" ZE_APIEXPORT ze_result_t ZE_APICALL -zeFenceCreate_Tracing(ze_command_queue_handle_t hCommandQueue, - const ze_fence_desc_t *desc, - ze_fence_handle_t *phFence) { +zeFenceCreateTracing(ze_command_queue_handle_t hCommandQueue, + const ze_fence_desc_t *desc, + ze_fence_handle_t *phFence) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Fence.pfnCreate, hCommandQueue, @@ -26,7 +26,7 @@ zeFenceCreate_Tracing(ze_command_queue_handle_t hCommandQueue, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnFenceCreateCb_t, Fence, pfnCreateCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Fence.pfnCreate, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Fence.pfnCreate, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -37,7 +37,7 @@ zeFenceCreate_Tracing(ze_command_queue_handle_t hCommandQueue, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeFenceDestroy_Tracing(ze_fence_handle_t hFence) { +zeFenceDestroyTracing(ze_fence_handle_t hFence) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Fence.pfnDestroy, hFence); @@ -49,7 +49,7 @@ zeFenceDestroy_Tracing(ze_fence_handle_t hFence) { ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnFenceDestroyCb_t, Fence, pfnDestroyCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Fence.pfnDestroy, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Fence.pfnDestroy, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -58,8 +58,8 @@ zeFenceDestroy_Tracing(ze_fence_handle_t hFence) { } ZE_APIEXPORT ze_result_t ZE_APICALL -zeFenceHostSynchronize_Tracing(ze_fence_handle_t hFence, - uint64_t timeout) { +zeFenceHostSynchronizeTracing(ze_fence_handle_t hFence, + uint64_t timeout) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Fence.pfnHostSynchronize, hFence, @@ -73,7 +73,7 @@ zeFenceHostSynchronize_Tracing(ze_fence_handle_t hFence, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnFenceHostSynchronizeCb_t, Fence, pfnHostSynchronizeCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Fence.pfnHostSynchronize, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Fence.pfnHostSynchronize, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -83,7 +83,7 @@ zeFenceHostSynchronize_Tracing(ze_fence_handle_t hFence, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeFenceQueryStatus_Tracing(ze_fence_handle_t hFence) { +zeFenceQueryStatusTracing(ze_fence_handle_t hFence) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Fence.pfnQueryStatus, hFence); @@ -95,7 +95,7 @@ zeFenceQueryStatus_Tracing(ze_fence_handle_t hFence) { ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnFenceQueryStatusCb_t, Fence, pfnQueryStatusCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Fence.pfnQueryStatus, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Fence.pfnQueryStatus, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -104,7 +104,7 @@ zeFenceQueryStatus_Tracing(ze_fence_handle_t hFence) { } ZE_APIEXPORT ze_result_t ZE_APICALL -zeFenceReset_Tracing(ze_fence_handle_t hFence) { +zeFenceResetTracing(ze_fence_handle_t hFence) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Fence.pfnReset, hFence); @@ -116,7 +116,7 @@ zeFenceReset_Tracing(ze_fence_handle_t hFence) { ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnFenceResetCb_t, Fence, pfnResetCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Fence.pfnReset, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Fence.pfnReset, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, diff --git a/level_zero/experimental/source/tracing/tracing_fence_imp.h b/level_zero/experimental/source/tracing/tracing_fence_imp.h index cc36b70982..3aeb2672e4 100644 --- a/level_zero/experimental/source/tracing/tracing_fence_imp.h +++ b/level_zero/experimental/source/tracing/tracing_fence_imp.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,20 +10,20 @@ extern "C" { ZE_APIEXPORT ze_result_t ZE_APICALL -zeFenceCreate_Tracing(ze_command_queue_handle_t hCommandQueue, - const ze_fence_desc_t *desc, - ze_fence_handle_t *phFence); +zeFenceCreateTracing(ze_command_queue_handle_t hCommandQueue, + const ze_fence_desc_t *desc, + ze_fence_handle_t *phFence); ZE_APIEXPORT ze_result_t ZE_APICALL -zeFenceDestroy_Tracing(ze_fence_handle_t hFence); +zeFenceDestroyTracing(ze_fence_handle_t hFence); ZE_APIEXPORT ze_result_t ZE_APICALL -zeFenceHostSynchronize_Tracing(ze_fence_handle_t hFence, - uint64_t timeout); +zeFenceHostSynchronizeTracing(ze_fence_handle_t hFence, + uint64_t timeout); ZE_APIEXPORT ze_result_t ZE_APICALL -zeFenceQueryStatus_Tracing(ze_fence_handle_t hFence); +zeFenceQueryStatusTracing(ze_fence_handle_t hFence); ZE_APIEXPORT ze_result_t ZE_APICALL -zeFenceReset_Tracing(ze_fence_handle_t hFence); +zeFenceResetTracing(ze_fence_handle_t hFence); } diff --git a/level_zero/experimental/source/tracing/tracing_global_imp.cpp b/level_zero/experimental/source/tracing/tracing_global_imp.cpp index 91f400433f..6b6963fb8a 100644 --- a/level_zero/experimental/source/tracing/tracing_global_imp.cpp +++ b/level_zero/experimental/source/tracing/tracing_global_imp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,7 +8,7 @@ #include "level_zero/experimental/source/tracing/tracing_imp.h" ZE_APIEXPORT ze_result_t ZE_APICALL -zeInit_Tracing(ze_init_flags_t flags) { +zeInitTracing(ze_init_flags_t flags) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Global.pfnInit, flags); @@ -19,7 +19,7 @@ zeInit_Tracing(ze_init_flags_t flags) { ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnInitCb_t, Global, pfnInitCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Global.pfnInit, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Global.pfnInit, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, diff --git a/level_zero/experimental/source/tracing/tracing_global_imp.h b/level_zero/experimental/source/tracing/tracing_global_imp.h index 92c57823e7..0a1fafbb92 100644 --- a/level_zero/experimental/source/tracing/tracing_global_imp.h +++ b/level_zero/experimental/source/tracing/tracing_global_imp.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,5 +10,5 @@ extern "C" { ZE_APIEXPORT ze_result_t ZE_APICALL -zeInit_Tracing(ze_init_flags_t flags); +zeInitTracing(ze_init_flags_t flags); } diff --git a/level_zero/experimental/source/tracing/tracing_image_imp.cpp b/level_zero/experimental/source/tracing/tracing_image_imp.cpp index 786c9936bc..776731f739 100644 --- a/level_zero/experimental/source/tracing/tracing_image_imp.cpp +++ b/level_zero/experimental/source/tracing/tracing_image_imp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,9 +8,9 @@ #include "level_zero/experimental/source/tracing/tracing_imp.h" ZE_APIEXPORT ze_result_t ZE_APICALL -zeImageGetProperties_Tracing(ze_device_handle_t hDevice, - const ze_image_desc_t *desc, - ze_image_properties_t *pImageProperties) { +zeImageGetPropertiesTracing(ze_device_handle_t hDevice, + const ze_image_desc_t *desc, + ze_image_properties_t *pImageProperties) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Image.pfnGetProperties, hDevice, @@ -26,7 +26,7 @@ zeImageGetProperties_Tracing(ze_device_handle_t hDevice, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnImageGetPropertiesCb_t, Image, pfnGetPropertiesCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Image.pfnGetProperties, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Image.pfnGetProperties, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -37,10 +37,10 @@ zeImageGetProperties_Tracing(ze_device_handle_t hDevice, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeImageCreate_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - const ze_image_desc_t *desc, - ze_image_handle_t *phImage) { +zeImageCreateTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + const ze_image_desc_t *desc, + ze_image_handle_t *phImage) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Image.pfnCreate, hContext, @@ -58,7 +58,7 @@ zeImageCreate_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnImageCreateCb_t, Image, pfnCreateCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Image.pfnCreate, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Image.pfnCreate, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -70,7 +70,7 @@ zeImageCreate_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeImageDestroy_Tracing(ze_image_handle_t hImage) { +zeImageDestroyTracing(ze_image_handle_t hImage) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Image.pfnDestroy, hImage); @@ -82,7 +82,7 @@ zeImageDestroy_Tracing(ze_image_handle_t hImage) { ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnImageDestroyCb_t, Image, pfnDestroyCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Image.pfnDestroy, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Image.pfnDestroy, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, diff --git a/level_zero/experimental/source/tracing/tracing_image_imp.h b/level_zero/experimental/source/tracing/tracing_image_imp.h index 0402d53e42..5f73e50836 100644 --- a/level_zero/experimental/source/tracing/tracing_image_imp.h +++ b/level_zero/experimental/source/tracing/tracing_image_imp.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,16 +10,16 @@ extern "C" { ZE_APIEXPORT ze_result_t ZE_APICALL -zeImageGetProperties_Tracing(ze_device_handle_t hDevice, - const ze_image_desc_t *desc, - ze_image_properties_t *pImageProperties); +zeImageGetPropertiesTracing(ze_device_handle_t hDevice, + const ze_image_desc_t *desc, + ze_image_properties_t *pImageProperties); ZE_APIEXPORT ze_result_t ZE_APICALL -zeImageCreate_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - const ze_image_desc_t *desc, - ze_image_handle_t *phImage); +zeImageCreateTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + const ze_image_desc_t *desc, + ze_image_handle_t *phImage); ZE_APIEXPORT ze_result_t ZE_APICALL -zeImageDestroy_Tracing(ze_image_handle_t hImage); +zeImageDestroyTracing(ze_image_handle_t hImage); } diff --git a/level_zero/experimental/source/tracing/tracing_imp.h b/level_zero/experimental/source/tracing/tracing_imp.h index 6d2dd54192..d8e352fc16 100644 --- a/level_zero/experimental/source/tracing/tracing_imp.h +++ b/level_zero/experimental/source/tracing/tracing_imp.h @@ -186,7 +186,7 @@ class APITracerCallbackDataImp { } template -ze_result_t APITracerWrapperImp(TFunction_pointer zeApiPtr, +ze_result_t apiTracerWrapperImp(TFunction_pointer zeApiPtr, TParams paramsStruct, TTracer apiOrdinal, TTracerPrologCallbacks prologCallbacks, diff --git a/level_zero/experimental/source/tracing/tracing_memory_imp.cpp b/level_zero/experimental/source/tracing/tracing_memory_imp.cpp index ef01f284dc..f0cbca94e2 100644 --- a/level_zero/experimental/source/tracing/tracing_memory_imp.cpp +++ b/level_zero/experimental/source/tracing/tracing_memory_imp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,13 +8,13 @@ #include "level_zero/experimental/source/tracing/tracing_imp.h" ZE_APIEXPORT ze_result_t ZE_APICALL -zeMemAllocShared_Tracing(ze_context_handle_t hContext, - const ze_device_mem_alloc_desc_t *deviceDesc, - const ze_host_mem_alloc_desc_t *hostDesc, - size_t size, - size_t alignment, - ze_device_handle_t hDevice, - void **pptr) { +zeMemAllocSharedTracing(ze_context_handle_t hContext, + const ze_device_mem_alloc_desc_t *deviceDesc, + const ze_host_mem_alloc_desc_t *hostDesc, + size_t size, + size_t alignment, + ze_device_handle_t hDevice, + void **pptr) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Mem.pfnAllocShared, hContext, @@ -38,7 +38,7 @@ zeMemAllocShared_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnMemAllocSharedCb_t, Mem, pfnAllocSharedCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Mem.pfnAllocShared, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Mem.pfnAllocShared, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -53,12 +53,12 @@ zeMemAllocShared_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeMemAllocDevice_Tracing(ze_context_handle_t hContext, - const ze_device_mem_alloc_desc_t *deviceDesc, - size_t size, - size_t alignment, - ze_device_handle_t hDevice, - void **pptr) { +zeMemAllocDeviceTracing(ze_context_handle_t hContext, + const ze_device_mem_alloc_desc_t *deviceDesc, + size_t size, + size_t alignment, + ze_device_handle_t hDevice, + void **pptr) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Mem.pfnAllocDevice, hContext, @@ -80,7 +80,7 @@ zeMemAllocDevice_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnMemAllocDeviceCb_t, Mem, pfnAllocDeviceCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Mem.pfnAllocDevice, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Mem.pfnAllocDevice, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -94,11 +94,11 @@ zeMemAllocDevice_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeMemAllocHost_Tracing(ze_context_handle_t hContext, - const ze_host_mem_alloc_desc_t *hostDesc, - size_t size, - size_t alignment, - void **pptr) { +zeMemAllocHostTracing(ze_context_handle_t hContext, + const ze_host_mem_alloc_desc_t *hostDesc, + size_t size, + size_t alignment, + void **pptr) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Mem.pfnAllocHost, hContext, @@ -118,7 +118,7 @@ zeMemAllocHost_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnMemAllocHostCb_t, Mem, pfnAllocHostCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Mem.pfnAllocHost, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Mem.pfnAllocHost, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -131,8 +131,8 @@ zeMemAllocHost_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeMemFree_Tracing(ze_context_handle_t hContext, - void *ptr) { +zeMemFreeTracing(ze_context_handle_t hContext, + void *ptr) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Mem.pfnFree, hContext, @@ -146,7 +146,7 @@ zeMemFree_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnMemFreeCb_t, Mem, pfnFreeCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Mem.pfnFree, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Mem.pfnFree, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -156,10 +156,10 @@ zeMemFree_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeMemGetAllocProperties_Tracing(ze_context_handle_t hContext, - const void *ptr, - ze_memory_allocation_properties_t *pMemAllocProperties, - ze_device_handle_t *phDevice) { +zeMemGetAllocPropertiesTracing(ze_context_handle_t hContext, + const void *ptr, + ze_memory_allocation_properties_t *pMemAllocProperties, + ze_device_handle_t *phDevice) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Mem.pfnGetAllocProperties, hContext, @@ -177,7 +177,7 @@ zeMemGetAllocProperties_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnMemGetAllocPropertiesCb_t, Mem, pfnGetAllocPropertiesCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Mem.pfnGetAllocProperties, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Mem.pfnGetAllocProperties, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -189,10 +189,10 @@ zeMemGetAllocProperties_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeMemGetAddressRange_Tracing(ze_context_handle_t hContext, - const void *ptr, - void **pBase, - size_t *pSize) { +zeMemGetAddressRangeTracing(ze_context_handle_t hContext, + const void *ptr, + void **pBase, + size_t *pSize) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Mem.pfnGetAddressRange, hContext, @@ -210,7 +210,7 @@ zeMemGetAddressRange_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnMemGetAddressRangeCb_t, Mem, pfnGetAddressRangeCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Mem.pfnGetAddressRange, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Mem.pfnGetAddressRange, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -222,9 +222,9 @@ zeMemGetAddressRange_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeMemGetIpcHandle_Tracing(ze_context_handle_t hContext, - const void *ptr, - ze_ipc_mem_handle_t *pIpcHandle) { +zeMemGetIpcHandleTracing(ze_context_handle_t hContext, + const void *ptr, + ze_ipc_mem_handle_t *pIpcHandle) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Mem.pfnGetIpcHandle, hContext, @@ -240,7 +240,7 @@ zeMemGetIpcHandle_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnMemGetIpcHandleCb_t, Mem, pfnGetIpcHandleCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Mem.pfnGetIpcHandle, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Mem.pfnGetIpcHandle, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -251,11 +251,11 @@ zeMemGetIpcHandle_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeMemOpenIpcHandle_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - ze_ipc_mem_handle_t handle, - ze_ipc_memory_flags_t flags, - void **pptr) { +zeMemOpenIpcHandleTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + ze_ipc_mem_handle_t handle, + ze_ipc_memory_flags_t flags, + void **pptr) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Mem.pfnOpenIpcHandle, hContext, @@ -275,7 +275,7 @@ zeMemOpenIpcHandle_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnMemOpenIpcHandleCb_t, Mem, pfnOpenIpcHandleCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Mem.pfnOpenIpcHandle, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Mem.pfnOpenIpcHandle, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -288,8 +288,8 @@ zeMemOpenIpcHandle_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeMemCloseIpcHandle_Tracing(ze_context_handle_t hContext, - const void *ptr) { +zeMemCloseIpcHandleTracing(ze_context_handle_t hContext, + const void *ptr) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Mem.pfnCloseIpcHandle, hContext, @@ -303,7 +303,7 @@ zeMemCloseIpcHandle_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnMemCloseIpcHandleCb_t, Mem, pfnCloseIpcHandleCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Mem.pfnCloseIpcHandle, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Mem.pfnCloseIpcHandle, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -313,10 +313,10 @@ zeMemCloseIpcHandle_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeVirtualMemReserve_Tracing(ze_context_handle_t hContext, - const void *pStart, - size_t size, - void **pptr) { +zeVirtualMemReserveTracing(ze_context_handle_t hContext, + const void *pStart, + size_t size, + void **pptr) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.VirtualMem.pfnReserve, hContext, @@ -334,7 +334,7 @@ zeVirtualMemReserve_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnVirtualMemReserveCb_t, VirtualMem, pfnReserveCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.VirtualMem.pfnReserve, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.VirtualMem.pfnReserve, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -346,9 +346,9 @@ zeVirtualMemReserve_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeVirtualMemFree_Tracing(ze_context_handle_t hContext, - const void *ptr, - size_t size) { +zeVirtualMemFreeTracing(ze_context_handle_t hContext, + const void *ptr, + size_t size) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.VirtualMem.pfnFree, hContext, @@ -364,7 +364,7 @@ zeVirtualMemFree_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnVirtualMemFreeCb_t, VirtualMem, pfnFreeCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.VirtualMem.pfnFree, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.VirtualMem.pfnFree, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -375,10 +375,10 @@ zeVirtualMemFree_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeVirtualMemQueryPageSize_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - size_t size, - size_t *pagesize) { +zeVirtualMemQueryPageSizeTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + size_t size, + size_t *pagesize) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.VirtualMem.pfnQueryPageSize, hContext, @@ -396,7 +396,7 @@ zeVirtualMemQueryPageSize_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnVirtualMemQueryPageSizeCb_t, VirtualMem, pfnQueryPageSizeCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.VirtualMem.pfnQueryPageSize, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.VirtualMem.pfnQueryPageSize, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -408,12 +408,12 @@ zeVirtualMemQueryPageSize_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeVirtualMemMap_Tracing(ze_context_handle_t hContext, - const void *ptr, - size_t size, - ze_physical_mem_handle_t hPhysicalMemory, - size_t offset, - ze_memory_access_attribute_t access) { +zeVirtualMemMapTracing(ze_context_handle_t hContext, + const void *ptr, + size_t size, + ze_physical_mem_handle_t hPhysicalMemory, + size_t offset, + ze_memory_access_attribute_t access) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.VirtualMem.pfnMap, hContext, @@ -435,7 +435,7 @@ zeVirtualMemMap_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnVirtualMemMapCb_t, VirtualMem, pfnMapCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.VirtualMem.pfnMap, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.VirtualMem.pfnMap, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -449,9 +449,9 @@ zeVirtualMemMap_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeVirtualMemUnmap_Tracing(ze_context_handle_t hContext, - const void *ptr, - size_t size) { +zeVirtualMemUnmapTracing(ze_context_handle_t hContext, + const void *ptr, + size_t size) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.VirtualMem.pfnUnmap, hContext, @@ -467,7 +467,7 @@ zeVirtualMemUnmap_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnVirtualMemUnmapCb_t, VirtualMem, pfnUnmapCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.VirtualMem.pfnUnmap, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.VirtualMem.pfnUnmap, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -478,10 +478,10 @@ zeVirtualMemUnmap_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeVirtualMemSetAccessAttribute_Tracing(ze_context_handle_t hContext, - const void *ptr, - size_t size, - ze_memory_access_attribute_t access) { +zeVirtualMemSetAccessAttributeTracing(ze_context_handle_t hContext, + const void *ptr, + size_t size, + ze_memory_access_attribute_t access) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.VirtualMem.pfnSetAccessAttribute, hContext, @@ -499,7 +499,7 @@ zeVirtualMemSetAccessAttribute_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnVirtualMemSetAccessAttributeCb_t, VirtualMem, pfnSetAccessAttributeCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.VirtualMem.pfnSetAccessAttribute, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.VirtualMem.pfnSetAccessAttribute, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -511,11 +511,11 @@ zeVirtualMemSetAccessAttribute_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeVirtualMemGetAccessAttribute_Tracing(ze_context_handle_t hContext, - const void *ptr, - size_t size, - ze_memory_access_attribute_t *access, - size_t *outSize) { +zeVirtualMemGetAccessAttributeTracing(ze_context_handle_t hContext, + const void *ptr, + size_t size, + ze_memory_access_attribute_t *access, + size_t *outSize) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.VirtualMem.pfnGetAccessAttribute, hContext, @@ -535,7 +535,7 @@ zeVirtualMemGetAccessAttribute_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnVirtualMemGetAccessAttributeCb_t, VirtualMem, pfnGetAccessAttributeCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.VirtualMem.pfnGetAccessAttribute, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.VirtualMem.pfnGetAccessAttribute, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -548,10 +548,10 @@ zeVirtualMemGetAccessAttribute_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zePhysicalMemCreate_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - ze_physical_mem_desc_t *desc, - ze_physical_mem_handle_t *phPhysicalMemory) { +zePhysicalMemCreateTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + ze_physical_mem_desc_t *desc, + ze_physical_mem_handle_t *phPhysicalMemory) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.PhysicalMem.pfnCreate, hContext, @@ -569,7 +569,7 @@ zePhysicalMemCreate_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnPhysicalMemCreateCb_t, PhysicalMem, pfnCreateCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.PhysicalMem.pfnCreate, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.PhysicalMem.pfnCreate, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -581,8 +581,8 @@ zePhysicalMemCreate_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zePhysicalMemDestroy_Tracing(ze_context_handle_t hContext, - ze_physical_mem_handle_t hPhysicalMemory) { +zePhysicalMemDestroyTracing(ze_context_handle_t hContext, + ze_physical_mem_handle_t hPhysicalMemory) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.PhysicalMem.pfnDestroy, hContext, @@ -596,7 +596,7 @@ zePhysicalMemDestroy_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnPhysicalMemDestroyCb_t, PhysicalMem, pfnDestroyCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.PhysicalMem.pfnDestroy, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.PhysicalMem.pfnDestroy, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, diff --git a/level_zero/experimental/source/tracing/tracing_memory_imp.h b/level_zero/experimental/source/tracing/tracing_memory_imp.h index 94eeeb6b74..d65b0ca625 100644 --- a/level_zero/experimental/source/tracing/tracing_memory_imp.h +++ b/level_zero/experimental/source/tracing/tracing_memory_imp.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,111 +10,111 @@ extern "C" { ZE_APIEXPORT ze_result_t ZE_APICALL -zeMemAllocShared_Tracing(ze_context_handle_t hContext, - const ze_device_mem_alloc_desc_t *deviceDesc, - const ze_host_mem_alloc_desc_t *hostDesc, - size_t size, - size_t alignment, - ze_device_handle_t hDevice, - void **pptr); +zeMemAllocSharedTracing(ze_context_handle_t hContext, + const ze_device_mem_alloc_desc_t *deviceDesc, + const ze_host_mem_alloc_desc_t *hostDesc, + size_t size, + size_t alignment, + ze_device_handle_t hDevice, + void **pptr); ZE_APIEXPORT ze_result_t ZE_APICALL -zeMemAllocDevice_Tracing(ze_context_handle_t hContext, - const ze_device_mem_alloc_desc_t *deviceDesc, - size_t size, - size_t alignment, - ze_device_handle_t hDevice, - void **pptr); +zeMemAllocDeviceTracing(ze_context_handle_t hContext, + const ze_device_mem_alloc_desc_t *deviceDesc, + size_t size, + size_t alignment, + ze_device_handle_t hDevice, + void **pptr); ZE_APIEXPORT ze_result_t ZE_APICALL -zeMemAllocHost_Tracing(ze_context_handle_t hContext, - const ze_host_mem_alloc_desc_t *hostDesc, - size_t size, - size_t alignment, - void **pptr); +zeMemAllocHostTracing(ze_context_handle_t hContext, + const ze_host_mem_alloc_desc_t *hostDesc, + size_t size, + size_t alignment, + void **pptr); ZE_APIEXPORT ze_result_t ZE_APICALL -zeMemFree_Tracing(ze_context_handle_t hContext, - void *ptr); +zeMemFreeTracing(ze_context_handle_t hContext, + void *ptr); ZE_APIEXPORT ze_result_t ZE_APICALL -zeMemGetAllocProperties_Tracing(ze_context_handle_t hContext, - const void *ptr, - ze_memory_allocation_properties_t *pMemAllocProperties, - ze_device_handle_t *phDevice); +zeMemGetAllocPropertiesTracing(ze_context_handle_t hContext, + const void *ptr, + ze_memory_allocation_properties_t *pMemAllocProperties, + ze_device_handle_t *phDevice); ZE_APIEXPORT ze_result_t ZE_APICALL -zeMemGetAddressRange_Tracing(ze_context_handle_t hContext, - const void *ptr, - void **pBase, - size_t *pSize); +zeMemGetAddressRangeTracing(ze_context_handle_t hContext, + const void *ptr, + void **pBase, + size_t *pSize); ZE_APIEXPORT ze_result_t ZE_APICALL -zeMemGetIpcHandle_Tracing(ze_context_handle_t hContext, - const void *ptr, - ze_ipc_mem_handle_t *pIpcHandle); +zeMemGetIpcHandleTracing(ze_context_handle_t hContext, + const void *ptr, + ze_ipc_mem_handle_t *pIpcHandle); ZE_APIEXPORT ze_result_t ZE_APICALL -zeMemOpenIpcHandle_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - ze_ipc_mem_handle_t handle, - ze_ipc_memory_flags_t flags, +zeMemOpenIpcHandleTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + ze_ipc_mem_handle_t handle, + ze_ipc_memory_flags_t flags, + void **pptr); + +ZE_APIEXPORT ze_result_t ZE_APICALL +zeMemCloseIpcHandleTracing(ze_context_handle_t hContext, + const void *ptr); + +ZE_APIEXPORT ze_result_t ZE_APICALL +zeVirtualMemReserveTracing(ze_context_handle_t hContext, + const void *pStart, + size_t size, void **pptr); ZE_APIEXPORT ze_result_t ZE_APICALL -zeMemCloseIpcHandle_Tracing(ze_context_handle_t hContext, - const void *ptr); +zeVirtualMemFreeTracing(ze_context_handle_t hContext, + const void *ptr, + size_t size); ZE_APIEXPORT ze_result_t ZE_APICALL -zeVirtualMemReserve_Tracing(ze_context_handle_t hContext, - const void *pStart, - size_t size, - void **pptr); +zeVirtualMemQueryPageSizeTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + size_t size, + size_t *pagesize); ZE_APIEXPORT ze_result_t ZE_APICALL -zeVirtualMemFree_Tracing(ze_context_handle_t hContext, +zeVirtualMemMapTracing(ze_context_handle_t hContext, + const void *ptr, + size_t size, + ze_physical_mem_handle_t hPhysicalMemory, + size_t offset, + ze_memory_access_attribute_t access); + +ZE_APIEXPORT ze_result_t ZE_APICALL +zeVirtualMemUnmapTracing(ze_context_handle_t hContext, const void *ptr, size_t size); ZE_APIEXPORT ze_result_t ZE_APICALL -zeVirtualMemQueryPageSize_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - size_t size, - size_t *pagesize); +zeVirtualMemSetAccessAttributeTracing(ze_context_handle_t hContext, + const void *ptr, + size_t size, + ze_memory_access_attribute_t access); ZE_APIEXPORT ze_result_t ZE_APICALL -zeVirtualMemMap_Tracing(ze_context_handle_t hContext, - const void *ptr, - size_t size, - ze_physical_mem_handle_t hPhysicalMemory, - size_t offset, - ze_memory_access_attribute_t access); +zeVirtualMemGetAccessAttributeTracing(ze_context_handle_t hContext, + const void *ptr, + size_t size, + ze_memory_access_attribute_t *access, + size_t *outSize); ZE_APIEXPORT ze_result_t ZE_APICALL -zeVirtualMemUnmap_Tracing(ze_context_handle_t hContext, - const void *ptr, - size_t size); +zePhysicalMemCreateTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + ze_physical_mem_desc_t *desc, + ze_physical_mem_handle_t *phPhysicalMemory); ZE_APIEXPORT ze_result_t ZE_APICALL -zeVirtualMemSetAccessAttribute_Tracing(ze_context_handle_t hContext, - const void *ptr, - size_t size, - ze_memory_access_attribute_t access); - -ZE_APIEXPORT ze_result_t ZE_APICALL -zeVirtualMemGetAccessAttribute_Tracing(ze_context_handle_t hContext, - const void *ptr, - size_t size, - ze_memory_access_attribute_t *access, - size_t *outSize); - -ZE_APIEXPORT ze_result_t ZE_APICALL -zePhysicalMemCreate_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - ze_physical_mem_desc_t *desc, - ze_physical_mem_handle_t *phPhysicalMemory); - -ZE_APIEXPORT ze_result_t ZE_APICALL -zePhysicalMemDestroy_Tracing(ze_context_handle_t hContext, - ze_physical_mem_handle_t hPhysicalMemory); +zePhysicalMemDestroyTracing(ze_context_handle_t hContext, + ze_physical_mem_handle_t hPhysicalMemory); } diff --git a/level_zero/experimental/source/tracing/tracing_module_imp.cpp b/level_zero/experimental/source/tracing/tracing_module_imp.cpp index c9693ce9aa..c4572b426c 100644 --- a/level_zero/experimental/source/tracing/tracing_module_imp.cpp +++ b/level_zero/experimental/source/tracing/tracing_module_imp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,11 +8,11 @@ #include "level_zero/experimental/source/tracing/tracing_imp.h" ZE_APIEXPORT ze_result_t ZE_APICALL -zeModuleCreate_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - const ze_module_desc_t *desc, - ze_module_handle_t *phModule, - ze_module_build_log_handle_t *phBuildLog) { +zeModuleCreateTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + const ze_module_desc_t *desc, + ze_module_handle_t *phModule, + ze_module_build_log_handle_t *phBuildLog) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Module.pfnCreate, hContext, @@ -32,7 +32,7 @@ zeModuleCreate_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnModuleCreateCb_t, Module, pfnCreateCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Module.pfnCreate, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Module.pfnCreate, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -45,7 +45,7 @@ zeModuleCreate_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeModuleDestroy_Tracing(ze_module_handle_t hModule) { +zeModuleDestroyTracing(ze_module_handle_t hModule) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Module.pfnDestroy, hModule); @@ -57,7 +57,7 @@ zeModuleDestroy_Tracing(ze_module_handle_t hModule) { ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnModuleDestroyCb_t, Module, pfnDestroyCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Module.pfnDestroy, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Module.pfnDestroy, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -66,7 +66,7 @@ zeModuleDestroy_Tracing(ze_module_handle_t hModule) { } ZE_APIEXPORT ze_result_t ZE_APICALL -zeModuleBuildLogDestroy_Tracing(ze_module_build_log_handle_t hModuleBuildLog) { +zeModuleBuildLogDestroyTracing(ze_module_build_log_handle_t hModuleBuildLog) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.ModuleBuildLog.pfnDestroy, hModuleBuildLog); @@ -78,7 +78,7 @@ zeModuleBuildLogDestroy_Tracing(ze_module_build_log_handle_t hModuleBuildLog) { ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnModuleBuildLogDestroyCb_t, ModuleBuildLog, pfnDestroyCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.ModuleBuildLog.pfnDestroy, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.ModuleBuildLog.pfnDestroy, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -87,9 +87,9 @@ zeModuleBuildLogDestroy_Tracing(ze_module_build_log_handle_t hModuleBuildLog) { } ZE_APIEXPORT ze_result_t ZE_APICALL -zeModuleBuildLogGetString_Tracing(ze_module_build_log_handle_t hModuleBuildLog, - size_t *pSize, - char *pBuildLog) { +zeModuleBuildLogGetStringTracing(ze_module_build_log_handle_t hModuleBuildLog, + size_t *pSize, + char *pBuildLog) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.ModuleBuildLog.pfnGetString, hModuleBuildLog, @@ -105,7 +105,7 @@ zeModuleBuildLogGetString_Tracing(ze_module_build_log_handle_t hModuleBuildLog, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnModuleBuildLogGetStringCb_t, ModuleBuildLog, pfnGetStringCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.ModuleBuildLog.pfnGetString, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.ModuleBuildLog.pfnGetString, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -116,9 +116,9 @@ zeModuleBuildLogGetString_Tracing(ze_module_build_log_handle_t hModuleBuildLog, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeModuleGetNativeBinary_Tracing(ze_module_handle_t hModule, - size_t *pSize, - uint8_t *pModuleNativeBinary) { +zeModuleGetNativeBinaryTracing(ze_module_handle_t hModule, + size_t *pSize, + uint8_t *pModuleNativeBinary) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Module.pfnGetNativeBinary, hModule, @@ -134,7 +134,7 @@ zeModuleGetNativeBinary_Tracing(ze_module_handle_t hModule, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnModuleGetNativeBinaryCb_t, Module, pfnGetNativeBinaryCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Module.pfnGetNativeBinary, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Module.pfnGetNativeBinary, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -145,10 +145,10 @@ zeModuleGetNativeBinary_Tracing(ze_module_handle_t hModule, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeModuleGetGlobalPointer_Tracing(ze_module_handle_t hModule, - const char *pGlobalName, - size_t *pSize, - void **pptr) { +zeModuleGetGlobalPointerTracing(ze_module_handle_t hModule, + const char *pGlobalName, + size_t *pSize, + void **pptr) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Module.pfnGetGlobalPointer, hModule, @@ -166,7 +166,7 @@ zeModuleGetGlobalPointer_Tracing(ze_module_handle_t hModule, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnModuleGetGlobalPointerCb_t, Module, pfnGetGlobalPointerCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Module.pfnGetGlobalPointer, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Module.pfnGetGlobalPointer, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -178,9 +178,9 @@ zeModuleGetGlobalPointer_Tracing(ze_module_handle_t hModule, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeModuleDynamicLink_Tracing(uint32_t numModules, - ze_module_handle_t *phModules, - ze_module_build_log_handle_t *phLinkLog) { +zeModuleDynamicLinkTracing(uint32_t numModules, + ze_module_handle_t *phModules, + ze_module_build_log_handle_t *phLinkLog) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Module.pfnDynamicLink, numModules, @@ -196,7 +196,7 @@ zeModuleDynamicLink_Tracing(uint32_t numModules, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnModuleDynamicLinkCb_t, Module, pfnDynamicLinkCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Module.pfnDynamicLink, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Module.pfnDynamicLink, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -207,8 +207,8 @@ zeModuleDynamicLink_Tracing(uint32_t numModules, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeModuleGetProperties_Tracing(ze_module_handle_t hModule, - ze_module_properties_t *pModuleProperties) { +zeModuleGetPropertiesTracing(ze_module_handle_t hModule, + ze_module_properties_t *pModuleProperties) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Module.pfnGetProperties, hModule, @@ -222,7 +222,7 @@ zeModuleGetProperties_Tracing(ze_module_handle_t hModule, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnModuleGetPropertiesCb_t, Module, pfnGetPropertiesCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Module.pfnGetProperties, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Module.pfnGetProperties, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -232,9 +232,9 @@ zeModuleGetProperties_Tracing(ze_module_handle_t hModule, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelCreate_Tracing(ze_module_handle_t hModule, - const ze_kernel_desc_t *desc, - ze_kernel_handle_t *phKernel) { +zeKernelCreateTracing(ze_module_handle_t hModule, + const ze_kernel_desc_t *desc, + ze_kernel_handle_t *phKernel) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Kernel.pfnCreate, hModule, @@ -250,7 +250,7 @@ zeKernelCreate_Tracing(ze_module_handle_t hModule, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnKernelCreateCb_t, Kernel, pfnCreateCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnCreate, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnCreate, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -261,7 +261,7 @@ zeKernelCreate_Tracing(ze_module_handle_t hModule, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelDestroy_Tracing(ze_kernel_handle_t hKernel) { +zeKernelDestroyTracing(ze_kernel_handle_t hKernel) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Kernel.pfnDestroy, hKernel); @@ -273,7 +273,7 @@ zeKernelDestroy_Tracing(ze_kernel_handle_t hKernel) { ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnKernelDestroyCb_t, Kernel, pfnDestroyCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnDestroy, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnDestroy, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -282,9 +282,9 @@ zeKernelDestroy_Tracing(ze_kernel_handle_t hKernel) { } ZE_APIEXPORT ze_result_t ZE_APICALL -zeModuleGetFunctionPointer_Tracing(ze_module_handle_t hModule, - const char *pKernelName, - void **pfnFunction) { +zeModuleGetFunctionPointerTracing(ze_module_handle_t hModule, + const char *pKernelName, + void **pfnFunction) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Module.pfnGetFunctionPointer, hModule, @@ -300,7 +300,7 @@ zeModuleGetFunctionPointer_Tracing(ze_module_handle_t hModule, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnModuleGetFunctionPointerCb_t, Module, pfnGetFunctionPointerCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Module.pfnGetFunctionPointer, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Module.pfnGetFunctionPointer, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -311,10 +311,10 @@ zeModuleGetFunctionPointer_Tracing(ze_module_handle_t hModule, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelSetGroupSize_Tracing(ze_kernel_handle_t hKernel, - uint32_t groupSizeX, - uint32_t groupSizeY, - uint32_t groupSizeZ) { +zeKernelSetGroupSizeTracing(ze_kernel_handle_t hKernel, + uint32_t groupSizeX, + uint32_t groupSizeY, + uint32_t groupSizeZ) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Kernel.pfnSetGroupSize, hKernel, @@ -332,7 +332,7 @@ zeKernelSetGroupSize_Tracing(ze_kernel_handle_t hKernel, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnKernelSetGroupSizeCb_t, Kernel, pfnSetGroupSizeCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnSetGroupSize, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnSetGroupSize, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -344,13 +344,13 @@ zeKernelSetGroupSize_Tracing(ze_kernel_handle_t hKernel, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelSuggestGroupSize_Tracing(ze_kernel_handle_t hKernel, - uint32_t globalSizeX, - uint32_t globalSizeY, - uint32_t globalSizeZ, - uint32_t *groupSizeX, - uint32_t *groupSizeY, - uint32_t *groupSizeZ) { +zeKernelSuggestGroupSizeTracing(ze_kernel_handle_t hKernel, + uint32_t globalSizeX, + uint32_t globalSizeY, + uint32_t globalSizeZ, + uint32_t *groupSizeX, + uint32_t *groupSizeY, + uint32_t *groupSizeZ) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Kernel.pfnSuggestGroupSize, hKernel, @@ -374,7 +374,7 @@ zeKernelSuggestGroupSize_Tracing(ze_kernel_handle_t hKernel, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnKernelSuggestGroupSizeCb_t, Kernel, pfnSuggestGroupSizeCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnSuggestGroupSize, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnSuggestGroupSize, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -389,10 +389,10 @@ zeKernelSuggestGroupSize_Tracing(ze_kernel_handle_t hKernel, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelSetArgumentValue_Tracing(ze_kernel_handle_t hKernel, - uint32_t argIndex, - size_t argSize, - const void *pArgValue) { +zeKernelSetArgumentValueTracing(ze_kernel_handle_t hKernel, + uint32_t argIndex, + size_t argSize, + const void *pArgValue) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Kernel.pfnSetArgumentValue, hKernel, @@ -410,7 +410,7 @@ zeKernelSetArgumentValue_Tracing(ze_kernel_handle_t hKernel, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnKernelSetArgumentValueCb_t, Kernel, pfnSetArgumentValueCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnSetArgumentValue, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnSetArgumentValue, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -422,8 +422,8 @@ zeKernelSetArgumentValue_Tracing(ze_kernel_handle_t hKernel, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelGetProperties_Tracing(ze_kernel_handle_t hKernel, - ze_kernel_properties_t *pKernelProperties) { +zeKernelGetPropertiesTracing(ze_kernel_handle_t hKernel, + ze_kernel_properties_t *pKernelProperties) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Kernel.pfnGetProperties, hKernel, @@ -437,7 +437,7 @@ zeKernelGetProperties_Tracing(ze_kernel_handle_t hKernel, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnKernelGetPropertiesCb_t, Kernel, pfnGetPropertiesCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnGetProperties, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnGetProperties, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -447,12 +447,12 @@ zeKernelGetProperties_Tracing(ze_kernel_handle_t hKernel, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendLaunchKernel_Tracing(ze_command_list_handle_t hCommandList, - ze_kernel_handle_t hKernel, - const ze_group_count_t *pLaunchFuncArgs, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents) { +zeCommandListAppendLaunchKernelTracing(ze_command_list_handle_t hCommandList, + ze_kernel_handle_t hKernel, + const ze_group_count_t *pLaunchFuncArgs, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnAppendLaunchKernel, hCommandList, @@ -476,7 +476,7 @@ zeCommandListAppendLaunchKernel_Tracing(ze_command_list_handle_t hCommandList, CommandList, pfnAppendLaunchKernelCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendLaunchKernel, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendLaunchKernel, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -490,12 +490,12 @@ zeCommandListAppendLaunchKernel_Tracing(ze_command_list_handle_t hCommandList, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendLaunchKernelIndirect_Tracing(ze_command_list_handle_t hCommandList, - ze_kernel_handle_t hKernel, - const ze_group_count_t *pLaunchArgumentsBuffer, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents) { +zeCommandListAppendLaunchKernelIndirectTracing(ze_command_list_handle_t hCommandList, + ze_kernel_handle_t hKernel, + const ze_group_count_t *pLaunchArgumentsBuffer, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnAppendLaunchKernelIndirect, hCommandList, @@ -519,7 +519,7 @@ zeCommandListAppendLaunchKernelIndirect_Tracing(ze_command_list_handle_t hComman CommandList, pfnAppendLaunchKernelIndirectCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendLaunchKernelIndirect, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendLaunchKernelIndirect, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -533,14 +533,14 @@ zeCommandListAppendLaunchKernelIndirect_Tracing(ze_command_list_handle_t hComman } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendLaunchMultipleKernelsIndirect_Tracing(ze_command_list_handle_t hCommandList, - uint32_t numKernels, - ze_kernel_handle_t *phKernels, - const uint32_t *pCountBuffer, - const ze_group_count_t *pLaunchArgumentsBuffer, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents) { +zeCommandListAppendLaunchMultipleKernelsIndirectTracing(ze_command_list_handle_t hCommandList, + uint32_t numKernels, + ze_kernel_handle_t *phKernels, + const uint32_t *pCountBuffer, + const ze_group_count_t *pLaunchArgumentsBuffer, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnAppendLaunchMultipleKernelsIndirect, hCommandList, @@ -568,7 +568,7 @@ zeCommandListAppendLaunchMultipleKernelsIndirect_Tracing(ze_command_list_handle_ CommandList, pfnAppendLaunchMultipleKernelsIndirectCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendLaunchMultipleKernelsIndirect, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendLaunchMultipleKernelsIndirect, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -584,12 +584,12 @@ zeCommandListAppendLaunchMultipleKernelsIndirect_Tracing(ze_command_list_handle_ } ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendLaunchCooperativeKernel_Tracing(ze_command_list_handle_t hCommandList, - ze_kernel_handle_t hKernel, - const ze_group_count_t *pLaunchFuncArgs, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents) { +zeCommandListAppendLaunchCooperativeKernelTracing(ze_command_list_handle_t hCommandList, + ze_kernel_handle_t hKernel, + const ze_group_count_t *pLaunchFuncArgs, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.CommandList.pfnAppendLaunchCooperativeKernel, hCommandList, @@ -612,7 +612,7 @@ zeCommandListAppendLaunchCooperativeKernel_Tracing(ze_command_list_handle_t hCom ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnCommandListAppendLaunchCooperativeKernelCb_t, CommandList, pfnAppendLaunchCooperativeKernelCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendLaunchCooperativeKernel, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.CommandList.pfnAppendLaunchCooperativeKernel, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -626,9 +626,9 @@ zeCommandListAppendLaunchCooperativeKernel_Tracing(ze_command_list_handle_t hCom } ZE_APIEXPORT ze_result_t ZE_APICALL -zeModuleGetKernelNames_Tracing(ze_module_handle_t hModule, - uint32_t *pCount, - const char **pNames) { +zeModuleGetKernelNamesTracing(ze_module_handle_t hModule, + uint32_t *pCount, + const char **pNames) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Module.pfnGetKernelNames, hModule, @@ -644,7 +644,7 @@ zeModuleGetKernelNames_Tracing(ze_module_handle_t hModule, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnModuleGetKernelNamesCb_t, Module, pfnGetKernelNamesCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Module.pfnGetKernelNames, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Module.pfnGetKernelNames, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -655,8 +655,8 @@ zeModuleGetKernelNames_Tracing(ze_module_handle_t hModule, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelSuggestMaxCooperativeGroupCount_Tracing(ze_kernel_handle_t hKernel, - uint32_t *totalGroupCount) { +zeKernelSuggestMaxCooperativeGroupCountTracing(ze_kernel_handle_t hKernel, + uint32_t *totalGroupCount) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Kernel.pfnSuggestMaxCooperativeGroupCount, hKernel, @@ -671,7 +671,7 @@ zeKernelSuggestMaxCooperativeGroupCount_Tracing(ze_kernel_handle_t hKernel, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnKernelSuggestMaxCooperativeGroupCountCb_t, Kernel, pfnSuggestMaxCooperativeGroupCountCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnSuggestMaxCooperativeGroupCount, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnSuggestMaxCooperativeGroupCount, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -681,8 +681,8 @@ zeKernelSuggestMaxCooperativeGroupCount_Tracing(ze_kernel_handle_t hKernel, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelGetIndirectAccess_Tracing(ze_kernel_handle_t hKernel, - ze_kernel_indirect_access_flags_t *pFlags) { +zeKernelGetIndirectAccessTracing(ze_kernel_handle_t hKernel, + ze_kernel_indirect_access_flags_t *pFlags) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Kernel.pfnGetIndirectAccess, hKernel, @@ -697,7 +697,7 @@ zeKernelGetIndirectAccess_Tracing(ze_kernel_handle_t hKernel, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnKernelGetIndirectAccessCb_t, Kernel, pfnGetIndirectAccessCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnGetIndirectAccess, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnGetIndirectAccess, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -707,9 +707,9 @@ zeKernelGetIndirectAccess_Tracing(ze_kernel_handle_t hKernel, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelGetName_Tracing(ze_kernel_handle_t hKernel, - size_t *pSize, - char *pName) { +zeKernelGetNameTracing(ze_kernel_handle_t hKernel, + size_t *pSize, + char *pName) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Kernel.pfnGetName, hKernel, @@ -726,7 +726,7 @@ zeKernelGetName_Tracing(ze_kernel_handle_t hKernel, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnKernelGetNameCb_t, Kernel, pfnGetNameCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnGetName, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnGetName, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -737,9 +737,9 @@ zeKernelGetName_Tracing(ze_kernel_handle_t hKernel, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelGetSourceAttributes_Tracing(ze_kernel_handle_t hKernel, - uint32_t *pSize, - char **pString) { +zeKernelGetSourceAttributesTracing(ze_kernel_handle_t hKernel, + uint32_t *pSize, + char **pString) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Kernel.pfnGetSourceAttributes, hKernel, @@ -756,7 +756,7 @@ zeKernelGetSourceAttributes_Tracing(ze_kernel_handle_t hKernel, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnKernelGetSourceAttributesCb_t, Kernel, pfnGetSourceAttributesCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnGetSourceAttributes, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnGetSourceAttributes, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -767,8 +767,8 @@ zeKernelGetSourceAttributes_Tracing(ze_kernel_handle_t hKernel, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelSetIndirectAccess_Tracing(ze_kernel_handle_t hKernel, - ze_kernel_indirect_access_flags_t flags) { +zeKernelSetIndirectAccessTracing(ze_kernel_handle_t hKernel, + ze_kernel_indirect_access_flags_t flags) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Kernel.pfnSetIndirectAccess, hKernel, @@ -783,7 +783,7 @@ zeKernelSetIndirectAccess_Tracing(ze_kernel_handle_t hKernel, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnKernelSetIndirectAccessCb_t, Kernel, pfnSetIndirectAccessCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnSetIndirectAccess, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Kernel.pfnSetIndirectAccess, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, diff --git a/level_zero/experimental/source/tracing/tracing_module_imp.h b/level_zero/experimental/source/tracing/tracing_module_imp.h index ecca285e03..a6cae10c88 100644 --- a/level_zero/experimental/source/tracing/tracing_module_imp.h +++ b/level_zero/experimental/source/tracing/tracing_module_imp.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,139 +10,139 @@ extern "C" { ZE_APIEXPORT ze_result_t ZE_APICALL -zeModuleCreate_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - const ze_module_desc_t *desc, - ze_module_handle_t *phModule, - ze_module_build_log_handle_t *phBuildLog); +zeModuleCreateTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + const ze_module_desc_t *desc, + ze_module_handle_t *phModule, + ze_module_build_log_handle_t *phBuildLog); ZE_APIEXPORT ze_result_t ZE_APICALL -zeModuleDestroy_Tracing(ze_module_handle_t hModule); +zeModuleDestroyTracing(ze_module_handle_t hModule); ZE_APIEXPORT ze_result_t ZE_APICALL -zeModuleBuildLogDestroy_Tracing(ze_module_build_log_handle_t hModuleBuildLog); +zeModuleBuildLogDestroyTracing(ze_module_build_log_handle_t hModuleBuildLog); ZE_APIEXPORT ze_result_t ZE_APICALL -zeModuleBuildLogGetString_Tracing(ze_module_build_log_handle_t hModuleBuildLog, - size_t *pSize, - char *pBuildLog); - -ZE_APIEXPORT ze_result_t ZE_APICALL -zeModuleGetNativeBinary_Tracing(ze_module_handle_t hModule, - size_t *pSize, - uint8_t *pModuleNativeBinary); - -ZE_APIEXPORT ze_result_t ZE_APICALL -zeModuleGetGlobalPointer_Tracing(ze_module_handle_t hModule, - const char *pGlobalName, +zeModuleBuildLogGetStringTracing(ze_module_build_log_handle_t hModuleBuildLog, size_t *pSize, - void **pptr); + char *pBuildLog); ZE_APIEXPORT ze_result_t ZE_APICALL -zeModuleDynamicLink_Tracing(uint32_t numModules, - ze_module_handle_t *phModules, - ze_module_build_log_handle_t *phLinkLog); +zeModuleGetNativeBinaryTracing(ze_module_handle_t hModule, + size_t *pSize, + uint8_t *pModuleNativeBinary); ZE_APIEXPORT ze_result_t ZE_APICALL -zeModuleGetProperties_Tracing(ze_module_handle_t hModule, - ze_module_properties_t *pModuleProperties); +zeModuleGetGlobalPointerTracing(ze_module_handle_t hModule, + const char *pGlobalName, + size_t *pSize, + void **pptr); ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelCreate_Tracing(ze_module_handle_t hModule, - const ze_kernel_desc_t *desc, - ze_kernel_handle_t *phFunction); +zeModuleDynamicLinkTracing(uint32_t numModules, + ze_module_handle_t *phModules, + ze_module_build_log_handle_t *phLinkLog); ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelDestroy_Tracing(ze_kernel_handle_t hKernel); +zeModuleGetPropertiesTracing(ze_module_handle_t hModule, + ze_module_properties_t *pModuleProperties); ZE_APIEXPORT ze_result_t ZE_APICALL -zeModuleGetFunctionPointer_Tracing(ze_module_handle_t hModule, - const char *pKernelName, - void **pfnFunction); +zeKernelCreateTracing(ze_module_handle_t hModule, + const ze_kernel_desc_t *desc, + ze_kernel_handle_t *phFunction); ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelSetGroupSize_Tracing(ze_kernel_handle_t hKernel, - uint32_t groupSizeX, - uint32_t groupSizeY, - uint32_t groupSizeZ); +zeKernelDestroyTracing(ze_kernel_handle_t hKernel); ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelSuggestGroupSize_Tracing(ze_kernel_handle_t hKernel, - uint32_t globalSizeX, - uint32_t globalSizeY, - uint32_t globalSizeZ, - uint32_t *groupSizeX, - uint32_t *groupSizeY, - uint32_t *groupSizeZ); +zeModuleGetFunctionPointerTracing(ze_module_handle_t hModule, + const char *pKernelName, + void **pfnFunction); ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelSetArgumentValue_Tracing(ze_kernel_handle_t hKernel, - uint32_t argIndex, - size_t argSize, - const void *pArgValue); +zeKernelSetGroupSizeTracing(ze_kernel_handle_t hKernel, + uint32_t groupSizeX, + uint32_t groupSizeY, + uint32_t groupSizeZ); ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelGetProperties_Tracing(ze_kernel_handle_t hKernel, - ze_kernel_properties_t *pKernelProperties); +zeKernelSuggestGroupSizeTracing(ze_kernel_handle_t hKernel, + uint32_t globalSizeX, + uint32_t globalSizeY, + uint32_t globalSizeZ, + uint32_t *groupSizeX, + uint32_t *groupSizeY, + uint32_t *groupSizeZ); ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendLaunchKernel_Tracing(ze_command_list_handle_t hCommandList, - ze_kernel_handle_t hKernel, - const ze_group_count_t *pLaunchFuncArgs, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents); +zeKernelSetArgumentValueTracing(ze_kernel_handle_t hKernel, + uint32_t argIndex, + size_t argSize, + const void *pArgValue); ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendLaunchKernelIndirect_Tracing(ze_command_list_handle_t hCommandList, - ze_kernel_handle_t hKernel, - const ze_group_count_t *pLaunchArgumentsBuffer, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents); +zeKernelGetPropertiesTracing(ze_kernel_handle_t hKernel, + ze_kernel_properties_t *pKernelProperties); ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendLaunchMultipleKernelsIndirect_Tracing(ze_command_list_handle_t hCommandList, - uint32_t numKernels, - ze_kernel_handle_t *phKernels, - const uint32_t *pCountBuffer, - const ze_group_count_t *pLaunchArgumentsBuffer, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents); +zeCommandListAppendLaunchKernelTracing(ze_command_list_handle_t hCommandList, + ze_kernel_handle_t hKernel, + const ze_group_count_t *pLaunchFuncArgs, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents); ZE_APIEXPORT ze_result_t ZE_APICALL -zeCommandListAppendLaunchCooperativeKernel_Tracing(ze_command_list_handle_t hCommandList, - ze_kernel_handle_t hKernel, - const ze_group_count_t *pLaunchFuncArgs, - ze_event_handle_t hSignalEvent, - uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents); +zeCommandListAppendLaunchKernelIndirectTracing(ze_command_list_handle_t hCommandList, + ze_kernel_handle_t hKernel, + const ze_group_count_t *pLaunchArgumentsBuffer, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents); ZE_APIEXPORT ze_result_t ZE_APICALL -zeModuleGetKernelNames_Tracing(ze_module_handle_t hModule, - uint32_t *pCount, - const char **pNames); +zeCommandListAppendLaunchMultipleKernelsIndirectTracing(ze_command_list_handle_t hCommandList, + uint32_t numKernels, + ze_kernel_handle_t *phKernels, + const uint32_t *pCountBuffer, + const ze_group_count_t *pLaunchArgumentsBuffer, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents); ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelSuggestMaxCooperativeGroupCount_Tracing(ze_kernel_handle_t hKernel, - uint32_t *totalGroupCount); +zeCommandListAppendLaunchCooperativeKernelTracing(ze_command_list_handle_t hCommandList, + ze_kernel_handle_t hKernel, + const ze_group_count_t *pLaunchFuncArgs, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents); ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelGetIndirectAccess_Tracing(ze_kernel_handle_t hKernel, - ze_kernel_indirect_access_flags_t *pFlags); +zeModuleGetKernelNamesTracing(ze_module_handle_t hModule, + uint32_t *pCount, + const char **pNames); ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelGetName_Tracing(ze_kernel_handle_t hKernel, - size_t *pSize, - char *pName); +zeKernelSuggestMaxCooperativeGroupCountTracing(ze_kernel_handle_t hKernel, + uint32_t *totalGroupCount); ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelGetSourceAttributes_Tracing(ze_kernel_handle_t hKernel, - uint32_t *pSize, - char **pString); +zeKernelGetIndirectAccessTracing(ze_kernel_handle_t hKernel, + ze_kernel_indirect_access_flags_t *pFlags); ZE_APIEXPORT ze_result_t ZE_APICALL -zeKernelSetIndirectAccess_Tracing(ze_kernel_handle_t hKernel, - ze_kernel_indirect_access_flags_t flags); +zeKernelGetNameTracing(ze_kernel_handle_t hKernel, + size_t *pSize, + char *pName); + +ZE_APIEXPORT ze_result_t ZE_APICALL +zeKernelGetSourceAttributesTracing(ze_kernel_handle_t hKernel, + uint32_t *pSize, + char **pString); + +ZE_APIEXPORT ze_result_t ZE_APICALL +zeKernelSetIndirectAccessTracing(ze_kernel_handle_t hKernel, + ze_kernel_indirect_access_flags_t flags); } diff --git a/level_zero/experimental/source/tracing/tracing_residency_imp.cpp b/level_zero/experimental/source/tracing/tracing_residency_imp.cpp index 24fd6ef83c..c4122f6c62 100644 --- a/level_zero/experimental/source/tracing/tracing_residency_imp.cpp +++ b/level_zero/experimental/source/tracing/tracing_residency_imp.cpp @@ -8,9 +8,9 @@ #include "level_zero/experimental/source/tracing/tracing_imp.h" ZE_APIEXPORT ze_result_t ZE_APICALL -zeContextCreate_Tracing(ze_driver_handle_t hDriver, - const ze_context_desc_t *desc, - ze_context_handle_t *phContext) { +zeContextCreateTracing(ze_driver_handle_t hDriver, + const ze_context_desc_t *desc, + ze_context_handle_t *phContext) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Context.pfnCreate, hDriver, @@ -26,7 +26,7 @@ zeContextCreate_Tracing(ze_driver_handle_t hDriver, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnContextCreateCb_t, Context, pfnCreateCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Context.pfnCreate, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Context.pfnCreate, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -37,7 +37,7 @@ zeContextCreate_Tracing(ze_driver_handle_t hDriver, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeContextDestroy_Tracing(ze_context_handle_t hContext) { +zeContextDestroyTracing(ze_context_handle_t hContext) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Context.pfnDestroy, hContext); @@ -49,7 +49,7 @@ zeContextDestroy_Tracing(ze_context_handle_t hContext) { ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnContextDestroyCb_t, Context, pfnDestroyCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Context.pfnDestroy, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Context.pfnDestroy, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -58,7 +58,7 @@ zeContextDestroy_Tracing(ze_context_handle_t hContext) { } ZE_APIEXPORT ze_result_t ZE_APICALL -zeContextGetStatus_Tracing(ze_context_handle_t hContext) { +zeContextGetStatusTracing(ze_context_handle_t hContext) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Context.pfnGetStatus, hContext); @@ -70,7 +70,7 @@ zeContextGetStatus_Tracing(ze_context_handle_t hContext) { ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnContextGetStatusCb_t, Context, pfnGetStatusCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Context.pfnGetStatus, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Context.pfnGetStatus, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -79,8 +79,8 @@ zeContextGetStatus_Tracing(ze_context_handle_t hContext) { } ZE_APIEXPORT ze_result_t ZE_APICALL -zeContextSystemBarrier_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice) { +zeContextSystemBarrierTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Context.pfnSystemBarrier, hContext, @@ -94,7 +94,7 @@ zeContextSystemBarrier_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnContextSystemBarrierCb_t, Context, pfnSystemBarrierCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Context.pfnSystemBarrier, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Context.pfnSystemBarrier, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -104,10 +104,10 @@ zeContextSystemBarrier_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeContextMakeMemoryResident_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - void *ptr, - size_t size) { +zeContextMakeMemoryResidentTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + void *ptr, + size_t size) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Context.pfnMakeMemoryResident, hContext, @@ -125,7 +125,7 @@ zeContextMakeMemoryResident_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnContextMakeMemoryResidentCb_t, Context, pfnMakeMemoryResidentCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Context.pfnMakeMemoryResident, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Context.pfnMakeMemoryResident, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -137,10 +137,10 @@ zeContextMakeMemoryResident_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeContextEvictMemory_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - void *ptr, - size_t size) { +zeContextEvictMemoryTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + void *ptr, + size_t size) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Context.pfnEvictMemory, hContext, @@ -158,7 +158,7 @@ zeContextEvictMemory_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnContextEvictMemoryCb_t, Context, pfnEvictMemoryCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Context.pfnEvictMemory, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Context.pfnEvictMemory, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -170,9 +170,9 @@ zeContextEvictMemory_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeContextMakeImageResident_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - ze_image_handle_t hImage) { +zeContextMakeImageResidentTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + ze_image_handle_t hImage) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Context.pfnMakeImageResident, hContext, @@ -188,7 +188,7 @@ zeContextMakeImageResident_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnContextMakeImageResidentCb_t, Context, pfnMakeImageResidentCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Context.pfnMakeImageResident, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Context.pfnMakeImageResident, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -199,9 +199,9 @@ zeContextMakeImageResident_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeContextEvictImage_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - ze_image_handle_t hImage) { +zeContextEvictImageTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + ze_image_handle_t hImage) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Context.pfnEvictImage, hContext, @@ -217,7 +217,7 @@ zeContextEvictImage_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnContextEvictImageCb_t, Context, pfnEvictImageCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Context.pfnEvictImage, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Context.pfnEvictImage, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, diff --git a/level_zero/experimental/source/tracing/tracing_residency_imp.h b/level_zero/experimental/source/tracing/tracing_residency_imp.h index 2763bcde31..2e7a31c746 100644 --- a/level_zero/experimental/source/tracing/tracing_residency_imp.h +++ b/level_zero/experimental/source/tracing/tracing_residency_imp.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,40 +10,40 @@ extern "C" { ZE_APIEXPORT ze_result_t ZE_APICALL -zeContextCreate_Tracing(ze_driver_handle_t hDriver, - const ze_context_desc_t *desc, - ze_context_handle_t *phContext); +zeContextCreateTracing(ze_driver_handle_t hDriver, + const ze_context_desc_t *desc, + ze_context_handle_t *phContext); ZE_APIEXPORT ze_result_t ZE_APICALL -zeContextDestroy_Tracing(ze_context_handle_t hContext); +zeContextDestroyTracing(ze_context_handle_t hContext); ZE_APIEXPORT ze_result_t ZE_APICALL -zeContextGetStatus_Tracing(ze_context_handle_t hContext); +zeContextGetStatusTracing(ze_context_handle_t hContext); ZE_APIEXPORT ze_result_t ZE_APICALL -zeContextSystemBarrier_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice); +zeContextSystemBarrierTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice); ZE_APIEXPORT ze_result_t ZE_APICALL -zeContextMakeMemoryResident_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - void *ptr, - size_t size); - -ZE_APIEXPORT ze_result_t ZE_APICALL -zeContextEvictMemory_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - void *ptr, - size_t size); - -ZE_APIEXPORT ze_result_t ZE_APICALL -zeContextMakeImageResident_Tracing(ze_context_handle_t hContext, +zeContextMakeMemoryResidentTracing(ze_context_handle_t hContext, ze_device_handle_t hDevice, - ze_image_handle_t hImage); + void *ptr, + size_t size); ZE_APIEXPORT ze_result_t ZE_APICALL -zeContextEvictImage_Tracing(ze_context_handle_t hContext, +zeContextEvictMemoryTracing(ze_context_handle_t hContext, ze_device_handle_t hDevice, - ze_image_handle_t hImage); + void *ptr, + size_t size); + +ZE_APIEXPORT ze_result_t ZE_APICALL +zeContextMakeImageResidentTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + ze_image_handle_t hImage); + +ZE_APIEXPORT ze_result_t ZE_APICALL +zeContextEvictImageTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + ze_image_handle_t hImage); } // extern "C" diff --git a/level_zero/experimental/source/tracing/tracing_sampler_imp.cpp b/level_zero/experimental/source/tracing/tracing_sampler_imp.cpp index b586ee7333..4bab327a09 100644 --- a/level_zero/experimental/source/tracing/tracing_sampler_imp.cpp +++ b/level_zero/experimental/source/tracing/tracing_sampler_imp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,10 +8,10 @@ #include "level_zero/experimental/source/tracing/tracing_imp.h" ZE_APIEXPORT ze_result_t ZE_APICALL -zeSamplerCreate_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - const ze_sampler_desc_t *pDesc, - ze_sampler_handle_t *phSampler) { +zeSamplerCreateTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + const ze_sampler_desc_t *pDesc, + ze_sampler_handle_t *phSampler) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Sampler.pfnCreate, hContext, @@ -29,7 +29,7 @@ zeSamplerCreate_Tracing(ze_context_handle_t hContext, ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnSamplerCreateCb_t, Sampler, pfnCreateCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Sampler.pfnCreate, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Sampler.pfnCreate, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, @@ -41,7 +41,7 @@ zeSamplerCreate_Tracing(ze_context_handle_t hContext, } ZE_APIEXPORT ze_result_t ZE_APICALL -zeSamplerDestroy_Tracing(ze_sampler_handle_t hSampler) { +zeSamplerDestroyTracing(ze_sampler_handle_t hSampler) { ZE_HANDLE_TRACER_RECURSION(driver_ddiTable.core_ddiTable.Sampler.pfnDestroy, hSampler); @@ -53,7 +53,7 @@ zeSamplerDestroy_Tracing(ze_sampler_handle_t hSampler) { ZE_GEN_PER_API_CALLBACK_STATE(apiCallbackData, ze_pfnSamplerDestroyCb_t, Sampler, pfnDestroyCb); - return L0::APITracerWrapperImp(driver_ddiTable.core_ddiTable.Sampler.pfnDestroy, + return L0::apiTracerWrapperImp(driver_ddiTable.core_ddiTable.Sampler.pfnDestroy, &tracerParams, apiCallbackData.apiOrdinal, apiCallbackData.prologCallbacks, diff --git a/level_zero/experimental/source/tracing/tracing_sampler_imp.h b/level_zero/experimental/source/tracing/tracing_sampler_imp.h index 655806aba3..21f2161300 100644 --- a/level_zero/experimental/source/tracing/tracing_sampler_imp.h +++ b/level_zero/experimental/source/tracing/tracing_sampler_imp.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,11 +10,11 @@ extern "C" { ZE_APIEXPORT ze_result_t ZE_APICALL -zeSamplerCreate_Tracing(ze_context_handle_t hContext, - ze_device_handle_t hDevice, - const ze_sampler_desc_t *desc, - ze_sampler_handle_t *phSampler); +zeSamplerCreateTracing(ze_context_handle_t hContext, + ze_device_handle_t hDevice, + const ze_sampler_desc_t *desc, + ze_sampler_handle_t *phSampler); ZE_APIEXPORT ze_result_t ZE_APICALL -zeSamplerDestroy_Tracing(ze_sampler_handle_t hSampler); +zeSamplerDestroyTracing(ze_sampler_handle_t hSampler); } diff --git a/level_zero/experimental/test/unit_tests/sources/test_cmdlist.cpp b/level_zero/experimental/test/unit_tests/sources/test_cmdlist.cpp index 11e4f52327..86b8640cad 100644 --- a/level_zero/experimental/test/unit_tests/sources/test_cmdlist.cpp +++ b/level_zero/experimental/test/unit_tests/sources/test_cmdlist.cpp @@ -27,7 +27,7 @@ class CommandListMemoryExtensionFixture : public DeviceFixture { void SetUp() { DeviceFixture::SetUp(); ze_result_t returnValue; - commandList.reset(whitebox_cast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); + commandList.reset(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue))); ze_event_pool_desc_t eventPoolDesc = {}; eventPoolDesc.flags = ZE_EVENT_POOL_FLAG_HOST_VISIBLE; diff --git a/level_zero/experimental/test/unit_tests/sources/tracing/test_barrier_api_tracing.cpp b/level_zero/experimental/test/unit_tests/sources/tracing/test_barrier_api_tracing.cpp index ea0adabc46..9e68ff2df8 100644 --- a/level_zero/experimental/test/unit_tests/sources/tracing/test_barrier_api_tracing.cpp +++ b/level_zero/experimental/test/unit_tests/sources/tracing/test_barrier_api_tracing.cpp @@ -23,7 +23,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListAppendBarrierTracingWrapp setTracerCallbacksAndEnableTracer(); - result = zeCommandListAppendBarrier_Tracing(nullptr, hSignalEvent, numWaitEvents, nullptr); + result = zeCommandListAppendBarrierTracing(nullptr, hSignalEvent, numWaitEvents, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -44,7 +44,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListAppendMemoryRangesBarrier setTracerCallbacksAndEnableTracer(); - result = zeCommandListAppendMemoryRangesBarrier_Tracing(nullptr, numRanges, pRangeSizes, pRanges, nullptr, 0, nullptr); + result = zeCommandListAppendMemoryRangesBarrierTracing(nullptr, numRanges, pRangeSizes, pRanges, nullptr, 0, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); diff --git a/level_zero/experimental/test/unit_tests/sources/tracing/test_cmdlist_api_tracing.cpp b/level_zero/experimental/test/unit_tests/sources/tracing/test_cmdlist_api_tracing.cpp index e0363786b7..690e375b9a 100644 --- a/level_zero/experimental/test/unit_tests/sources/tracing/test_cmdlist_api_tracing.cpp +++ b/level_zero/experimental/test/unit_tests/sources/tracing/test_cmdlist_api_tracing.cpp @@ -25,7 +25,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListCreateTracingWrapperWithO setTracerCallbacksAndEnableTracer(); - result = zeCommandListCreate_Tracing(nullptr, nullptr, &desc, &commandList); + result = zeCommandListCreateTracing(nullptr, nullptr, &desc, &commandList); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -45,7 +45,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListCreateImmediateTracingWra setTracerCallbacksAndEnableTracer(); - result = zeCommandListCreateImmediate_Tracing(nullptr, nullptr, &desc, &commandList); + result = zeCommandListCreateImmediateTracing(nullptr, nullptr, &desc, &commandList); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -59,7 +59,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListDestroyTracingWrapperWith setTracerCallbacksAndEnableTracer(); - result = zeCommandListDestroy_Tracing(nullptr); + result = zeCommandListDestroyTracing(nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -73,7 +73,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListResetTracingWrapperWithOn setTracerCallbacksAndEnableTracer(); - result = zeCommandListReset_Tracing(nullptr); + result = zeCommandListResetTracing(nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -87,7 +87,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListAppendMemoryPrefetchTraci setTracerCallbacksAndEnableTracer(); - result = zeCommandListAppendMemoryPrefetch_Tracing(nullptr, nullptr, 0); + result = zeCommandListAppendMemoryPrefetchTracing(nullptr, nullptr, 0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -101,7 +101,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListCloseTracingWrapperWithOn setTracerCallbacksAndEnableTracer(); - result = zeCommandListClose_Tracing(nullptr); + result = zeCommandListCloseTracing(nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -124,7 +124,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListAppendQueryKernelTimestam setTracerCallbacksAndEnableTracer(); - result = zeCommandListAppendQueryKernelTimestamps_Tracing(nullptr, 1U, nullptr, nullptr, nullptr, nullptr, 1U, nullptr); + result = zeCommandListAppendQueryKernelTimestampsTracing(nullptr, 1U, nullptr, nullptr, nullptr, nullptr, 1U, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -143,7 +143,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListAppendWriteGlobalTimestam setTracerCallbacksAndEnableTracer(); - result = zeCommandListAppendWriteGlobalTimestamp_Tracing(nullptr, nullptr, nullptr, 1U, nullptr); + result = zeCommandListAppendWriteGlobalTimestampTracing(nullptr, nullptr, nullptr, 1U, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } diff --git a/level_zero/experimental/test/unit_tests/sources/tracing/test_cmdqueue_api_tracing.cpp b/level_zero/experimental/test/unit_tests/sources/tracing/test_cmdqueue_api_tracing.cpp index ed8d329242..b89b4742d1 100644 --- a/level_zero/experimental/test/unit_tests/sources/tracing/test_cmdqueue_api_tracing.cpp +++ b/level_zero/experimental/test/unit_tests/sources/tracing/test_cmdqueue_api_tracing.cpp @@ -25,7 +25,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandQueueCreateTracingWrapperWith setTracerCallbacksAndEnableTracer(); - result = zeCommandQueueCreate_Tracing(nullptr, nullptr, &desc, &commandQueue); + result = zeCommandQueueCreateTracing(nullptr, nullptr, &desc, &commandQueue); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -39,7 +39,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandQueueDestroyTracingWrapperWit setTracerCallbacksAndEnableTracer(); - result = zeCommandQueueDestroy_Tracing(nullptr); + result = zeCommandQueueDestroyTracing(nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -60,7 +60,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandQueueExecuteCommandListsTraci setTracerCallbacksAndEnableTracer(); - result = zeCommandQueueExecuteCommandLists_Tracing(nullptr, numCommandList, &phCommandLists, hFence); + result = zeCommandQueueExecuteCommandListsTracing(nullptr, numCommandList, &phCommandLists, hFence); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -76,7 +76,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandQueueSynchronizeTracingWrappe setTracerCallbacksAndEnableTracer(); - result = zeCommandQueueSynchronize_Tracing(nullptr, timeout); + result = zeCommandQueueSynchronizeTracing(nullptr, timeout); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } diff --git a/level_zero/experimental/test/unit_tests/sources/tracing/test_copy_api_tracing.cpp b/level_zero/experimental/test/unit_tests/sources/tracing/test_copy_api_tracing.cpp index 0235ddb746..61a3c80bd4 100644 --- a/level_zero/experimental/test/unit_tests/sources/tracing/test_copy_api_tracing.cpp +++ b/level_zero/experimental/test/unit_tests/sources/tracing/test_copy_api_tracing.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -31,7 +31,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListAppendMemoryCopyTracingWr setTracerCallbacksAndEnableTracer(); - result = zeCommandListAppendMemoryCopy_Tracing(nullptr, dst, static_cast(src), bufferSize, nullptr, 0U, nullptr); + result = zeCommandListAppendMemoryCopyTracing(nullptr, dst, static_cast(src), bufferSize, nullptr, 0U, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); @@ -60,7 +60,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListAppendMemoryFillTracingWr setTracerCallbacksAndEnableTracer(); - result = zeCommandListAppendMemoryFill_Tracing(nullptr, dst, &pattern, sizeof(pattern), bufferSize, nullptr, 0, nullptr); + result = zeCommandListAppendMemoryFillTracing(nullptr, dst, &pattern, sizeof(pattern), bufferSize, nullptr, 0, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); @@ -98,15 +98,15 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListAppendMemoryCopyRegionTra setTracerCallbacksAndEnableTracer(); - result = zeCommandListAppendMemoryCopyRegion_Tracing(nullptr, dst, - &dstRegion, dstPitch, - dstSlicePitch, - static_cast(src), - &srcRegion, srcPitch, - srcSlicePitch, - nullptr, - 0, - nullptr); + result = zeCommandListAppendMemoryCopyRegionTracing(nullptr, dst, + &dstRegion, dstPitch, + dstSlicePitch, + static_cast(src), + &srcRegion, srcPitch, + srcSlicePitch, + nullptr, + 0, + nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); @@ -132,7 +132,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListAppendImageCopyTracingWra setTracerCallbacksAndEnableTracer(); - result = zeCommandListAppendImageCopy_Tracing(nullptr, hDstImage, hSrcImage, nullptr, 0U, nullptr); + result = zeCommandListAppendImageCopyTracing(nullptr, hDstImage, hSrcImage, nullptr, 0U, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); @@ -160,7 +160,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListAppendImageCopyRegionTrac setTracerCallbacksAndEnableTracer(); - result = zeCommandListAppendImageCopyRegion_Tracing(nullptr, hDstImage, hSrcImage, nullptr, nullptr, nullptr, 0U, nullptr); + result = zeCommandListAppendImageCopyRegionTracing(nullptr, hDstImage, hSrcImage, nullptr, nullptr, nullptr, 0U, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); @@ -187,7 +187,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListAppendImageCopyToMemoryTr setTracerCallbacksAndEnableTracer(); - result = zeCommandListAppendImageCopyToMemory_Tracing(nullptr, dstptr, hSrcImage, nullptr, nullptr, 0U, nullptr); + result = zeCommandListAppendImageCopyToMemoryTracing(nullptr, dstptr, hSrcImage, nullptr, nullptr, 0U, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); @@ -214,7 +214,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListAppendImageCopyFromMemory setTracerCallbacksAndEnableTracer(); - result = zeCommandListAppendImageCopyFromMemory_Tracing(nullptr, hDstImage, srcptr, nullptr, nullptr, 0U, nullptr); + result = zeCommandListAppendImageCopyFromMemoryTracing(nullptr, hDstImage, srcptr, nullptr, nullptr, 0U, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); @@ -240,7 +240,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListAppendMemAdviseTracingWra setTracerCallbacksAndEnableTracer(); - result = zeCommandListAppendMemAdvise_Tracing(nullptr, nullptr, ptr, bufferSize, advice); + result = zeCommandListAppendMemAdviseTracing(nullptr, nullptr, ptr, bufferSize, advice); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); @@ -264,7 +264,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListAppendMemoryCopyFromConte setTracerCallbacksAndEnableTracer(); - result = zeCommandListAppendMemoryCopyFromContext_Tracing(nullptr, nullptr, nullptr, nullptr, 0U, nullptr, 1u, nullptr); + result = zeCommandListAppendMemoryCopyFromContextTracing(nullptr, nullptr, nullptr, nullptr, 0U, nullptr, 1u, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } diff --git a/level_zero/experimental/test/unit_tests/sources/tracing/test_core_api_tracing.cpp b/level_zero/experimental/test/unit_tests/sources/tracing/test_core_api_tracing.cpp index 468b9c8daa..65ee1de33d 100644 --- a/level_zero/experimental/test/unit_tests/sources/tracing/test_core_api_tracing.cpp +++ b/level_zero/experimental/test/unit_tests/sources/tracing/test_core_api_tracing.cpp @@ -10,7 +10,7 @@ namespace L0 { namespace ult { -void OnEnterCommandListAppendLaunchFunction( +void onEnterCommandListAppendLaunchFunction( ze_command_list_append_launch_kernel_params_t *params, ze_result_t result, void *pTracerUserData, @@ -18,7 +18,7 @@ void OnEnterCommandListAppendLaunchFunction( int a = 0; a++; } -void OnExitCommandListAppendLaunchFunction( +void onExitCommandListAppendLaunchFunction( ze_command_list_append_launch_kernel_params_t *params, ze_result_t result, void *pTracerUserData, @@ -27,7 +27,7 @@ void OnExitCommandListAppendLaunchFunction( a++; } -void OnEnterCommandListCreateWithUserData( +void onEnterCommandListCreateWithUserData( ze_command_list_create_params_t *params, ze_result_t result, void *pTracerUserData, @@ -36,7 +36,7 @@ void OnEnterCommandListCreateWithUserData( int *val = static_cast(pTracerUserData); EXPECT_EQ(5, *val); } -void OnExitCommandListCreateWithUserData( +void onExitCommandListCreateWithUserData( ze_command_list_create_params_t *params, ze_result_t result, void *pTracerUserData, @@ -46,7 +46,7 @@ void OnExitCommandListCreateWithUserData( EXPECT_EQ(5, *val); } -void OnEnterCommandListCloseWithUserData( +void onEnterCommandListCloseWithUserData( ze_command_list_close_params_t *params, ze_result_t result, void *pTracerUserData, @@ -55,7 +55,7 @@ void OnEnterCommandListCloseWithUserData( int *val = static_cast(pTracerUserData); EXPECT_EQ(5, *val); } -void OnExitCommandListCloseWithUserData( +void onExitCommandListCloseWithUserData( ze_command_list_close_params_t *params, ze_result_t result, void *pTracerUserData, @@ -65,7 +65,7 @@ void OnExitCommandListCloseWithUserData( EXPECT_EQ(5, *val); } -void OnEnterCommandListCloseWithUserDataRecursion( +void onEnterCommandListCloseWithUserDataRecursion( ze_command_list_close_params_t *params, ze_result_t result, void *pTracerUserData, @@ -75,7 +75,7 @@ void OnEnterCommandListCloseWithUserDataRecursion( EXPECT_EQ(5, *val); *val += 5; } -void OnExitCommandListCloseWithUserDataRecursion( +void onExitCommandListCloseWithUserDataRecursion( ze_command_list_close_params_t *params, ze_result_t result, void *pTracerUserData, @@ -86,7 +86,7 @@ void OnExitCommandListCloseWithUserDataRecursion( *val += 5; } -void OnEnterCommandListCloseWithUserDataAndAllocateInstanceData( +void onEnterCommandListCloseWithUserDataAndAllocateInstanceData( ze_command_list_close_params_t *params, ze_result_t result, void *pTracerUserData, @@ -98,7 +98,7 @@ void OnEnterCommandListCloseWithUserDataAndAllocateInstanceData( ppTracerInstanceUserData[0] = instanceData; *instanceData = 0x1234; } -void OnExitCommandListCloseWithUserDataAndReadInstanceData( +void onExitCommandListCloseWithUserDataAndReadInstanceData( ze_command_list_close_params_t *params, ze_result_t result, void *pTracerUserData, @@ -117,7 +117,7 @@ void OnExitCommandListCloseWithUserDataAndReadInstanceData( delete instanceData; } -void OnEnterCommandListCloseWithoutUserDataAndAllocateInstanceData( +void onEnterCommandListCloseWithoutUserDataAndAllocateInstanceData( ze_command_list_close_params_t *params, ze_result_t result, void *pTracerUserData, @@ -127,7 +127,7 @@ void OnEnterCommandListCloseWithoutUserDataAndAllocateInstanceData( ppTracerInstanceUserData[0] = instanceData; *instanceData = 0x1234; } -void OnExitCommandListCloseWithoutUserDataAndReadInstanceData( +void onExitCommandListCloseWithoutUserDataAndReadInstanceData( ze_command_list_close_params_t *params, ze_result_t result, void *pTracerUserData, @@ -168,8 +168,8 @@ TEST_F(zeAPITracingCoreTests, WhenCreateTracerAndsetCallbacksAndEnableTracingAnd zet_core_callbacks_t prologCbs = {}; zet_core_callbacks_t epilogCbs = {}; - prologCbs.CommandList.pfnAppendLaunchKernelCb = OnEnterCommandListAppendLaunchFunction; - epilogCbs.CommandList.pfnAppendLaunchKernelCb = OnExitCommandListAppendLaunchFunction; + prologCbs.CommandList.pfnAppendLaunchKernelCb = onEnterCommandListAppendLaunchFunction; + epilogCbs.CommandList.pfnAppendLaunchKernelCb = onExitCommandListAppendLaunchFunction; result = zetTracerExpSetPrologues(apiTracerHandle, &prologCbs); EXPECT_EQ(ZE_RESULT_SUCCESS, result); @@ -194,7 +194,7 @@ TEST_F(zeAPITracingCoreTests, WhenCallingTracerWrapperWithOnePrologAndNoEpilogWi ze_command_list_close_params_t tracerParams; zet_core_callbacks_t prologCbs = {}; - prologCbs.CommandList.pfnCloseCb = OnEnterCommandListCloseWithUserData; + prologCbs.CommandList.pfnCloseCb = onEnterCommandListCloseWithUserData; ze_command_list_handle_t commandListHandle = commandList.toHandle(); tracerParams.phCommandList = &commandListHandle; @@ -207,7 +207,7 @@ TEST_F(zeAPITracingCoreTests, WhenCallingTracerWrapperWithOnePrologAndNoEpilogWi prologCallbacks.push_back(prologCallback); ze_pfnCommandListCloseCb_t apiOrdinal = {}; - result = APITracerWrapperImp(zeCommandListClose, &tracerParams, apiOrdinal, prologCallbacks, epilogCallbacks, *tracerParams.phCommandList); + result = apiTracerWrapperImp(zeCommandListClose, &tracerParams, apiOrdinal, prologCallbacks, epilogCallbacks, *tracerParams.phCommandList); EXPECT_EQ(ZE_RESULT_SUCCESS, result); } @@ -219,8 +219,8 @@ TEST_F(zeAPITracingCoreTests, WhenCallingTracerWrapperWithOneSetOfPrologEpilogsW zet_core_callbacks_t prologCbs = {}; zet_core_callbacks_t epilogCbs = {}; - prologCbs.CommandList.pfnCloseCb = OnEnterCommandListCloseWithUserData; - epilogCbs.CommandList.pfnCloseCb = OnExitCommandListCloseWithUserData; + prologCbs.CommandList.pfnCloseCb = onEnterCommandListCloseWithUserData; + epilogCbs.CommandList.pfnCloseCb = onExitCommandListCloseWithUserData; ze_command_list_handle_t commandListHandle = commandList.toHandle(); tracerParams.phCommandList = &commandListHandle; @@ -237,7 +237,7 @@ TEST_F(zeAPITracingCoreTests, WhenCallingTracerWrapperWithOneSetOfPrologEpilogsW epilogCallbacks.push_back(epilogCallback); ze_pfnCommandListCloseCb_t apiOrdinal = {}; - result = APITracerWrapperImp(zeCommandListClose, &tracerParams, apiOrdinal, prologCallbacks, epilogCallbacks, *tracerParams.phCommandList); + result = apiTracerWrapperImp(zeCommandListClose, &tracerParams, apiOrdinal, prologCallbacks, epilogCallbacks, *tracerParams.phCommandList); EXPECT_EQ(ZE_RESULT_SUCCESS, result); } @@ -249,8 +249,8 @@ TEST_F(zeAPITracingCoreTests, WhenCallingTracerWrapperWithOneSetOfPrologEpilogsW zet_core_callbacks_t prologCbs = {}; zet_core_callbacks_t epilogCbs = {}; - prologCbs.CommandList.pfnCloseCb = OnEnterCommandListCloseWithUserDataAndAllocateInstanceData; - epilogCbs.CommandList.pfnCloseCb = OnExitCommandListCloseWithUserDataAndReadInstanceData; + prologCbs.CommandList.pfnCloseCb = onEnterCommandListCloseWithUserDataAndAllocateInstanceData; + epilogCbs.CommandList.pfnCloseCb = onExitCommandListCloseWithUserDataAndReadInstanceData; ze_command_list_handle_t commandListHandle = commandList.toHandle(); tracerParams.phCommandList = &commandListHandle; @@ -267,7 +267,7 @@ TEST_F(zeAPITracingCoreTests, WhenCallingTracerWrapperWithOneSetOfPrologEpilogsW epilogCallbacks.push_back(epilogCallback); ze_pfnCommandListCloseCb_t apiOrdinal = {}; - result = APITracerWrapperImp(zeCommandListClose, &tracerParams, apiOrdinal, prologCallbacks, epilogCallbacks, *tracerParams.phCommandList); + result = apiTracerWrapperImp(zeCommandListClose, &tracerParams, apiOrdinal, prologCallbacks, epilogCallbacks, *tracerParams.phCommandList); EXPECT_EQ(ZE_RESULT_SUCCESS, result); } @@ -278,8 +278,8 @@ TEST_F(zeAPITracingCoreTests, WhenCallingTracerWrapperWithOneSetOfPrologEpilogsW zet_core_callbacks_t prologCbs = {}; zet_core_callbacks_t epilogCbs = {}; - prologCbs.CommandList.pfnCloseCb = OnEnterCommandListCloseWithoutUserDataAndAllocateInstanceData; - epilogCbs.CommandList.pfnCloseCb = OnExitCommandListCloseWithoutUserDataAndReadInstanceData; + prologCbs.CommandList.pfnCloseCb = onEnterCommandListCloseWithoutUserDataAndAllocateInstanceData; + epilogCbs.CommandList.pfnCloseCb = onExitCommandListCloseWithoutUserDataAndReadInstanceData; ze_command_list_handle_t commandListHandle = commandList.toHandle(); tracerParams.phCommandList = &commandListHandle; @@ -296,7 +296,7 @@ TEST_F(zeAPITracingCoreTests, WhenCallingTracerWrapperWithOneSetOfPrologEpilogsW epilogCallbacks.push_back(epilogCallback); ze_pfnCommandListCloseCb_t apiOrdinal = {}; - result = APITracerWrapperImp(zeCommandListClose, &tracerParams, apiOrdinal, prologCallbacks, epilogCallbacks, *tracerParams.phCommandList); + result = apiTracerWrapperImp(zeCommandListClose, &tracerParams, apiOrdinal, prologCallbacks, epilogCallbacks, *tracerParams.phCommandList); EXPECT_EQ(ZE_RESULT_SUCCESS, result); } @@ -308,8 +308,8 @@ TEST_F(zeAPITracingCoreTests, WhenCallingTracerWrapperWithOneSetOfPrologEpilogsW zet_core_callbacks_t prologCbs = {}; zet_core_callbacks_t epilogCbs = {}; - prologCbs.CommandList.pfnCloseCb = OnEnterCommandListCloseWithUserDataRecursion; - epilogCbs.CommandList.pfnCloseCb = OnExitCommandListCloseWithUserDataRecursion; + prologCbs.CommandList.pfnCloseCb = onEnterCommandListCloseWithUserDataRecursion; + epilogCbs.CommandList.pfnCloseCb = onExitCommandListCloseWithUserDataRecursion; ze_command_list_handle_t commandListHandle = commandList.toHandle(); tracerParams.phCommandList = &commandListHandle; @@ -329,7 +329,7 @@ TEST_F(zeAPITracingCoreTests, WhenCallingTracerWrapperWithOneSetOfPrologEpilogsW result = callHandleTracerRecursion(zeCommandListClose, commandListHandle); EXPECT_EQ(ZE_RESULT_ERROR_UNKNOWN, result); - result = APITracerWrapperImp(zeCommandListClose, &tracerParams, apiOrdinal, prologCallbacks, epilogCallbacks, *tracerParams.phCommandList); + result = apiTracerWrapperImp(zeCommandListClose, &tracerParams, apiOrdinal, prologCallbacks, epilogCallbacks, *tracerParams.phCommandList); EXPECT_EQ(ZE_RESULT_SUCCESS, result); result = callHandleTracerRecursion(zeCommandListClose, commandListHandle); diff --git a/level_zero/experimental/test/unit_tests/sources/tracing/test_device_api_tracing.cpp b/level_zero/experimental/test/unit_tests/sources/tracing/test_device_api_tracing.cpp index 372e91d778..6cea4ca9de 100644 --- a/level_zero/experimental/test/unit_tests/sources/tracing/test_device_api_tracing.cpp +++ b/level_zero/experimental/test/unit_tests/sources/tracing/test_device_api_tracing.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -20,7 +20,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingDeviceGetTracingWrapperWithOneSetOfP setTracerCallbacksAndEnableTracer(); - result = zeDeviceGet_Tracing(nullptr, nullptr, nullptr); + result = zeDeviceGetTracing(nullptr, nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -35,7 +35,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingDeviceGetPropertiesTracingWrapperWit setTracerCallbacksAndEnableTracer(); - result = zeDeviceGetProperties_Tracing(nullptr, nullptr); + result = zeDeviceGetPropertiesTracing(nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -50,7 +50,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingDeviceGetComputePropertiesTracingWra setTracerCallbacksAndEnableTracer(); - result = zeDeviceGetComputeProperties_Tracing(nullptr, nullptr); + result = zeDeviceGetComputePropertiesTracing(nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -65,7 +65,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingDeviceGetMemoryPropertiesTracingWrap setTracerCallbacksAndEnableTracer(); - result = zeDeviceGetMemoryProperties_Tracing(nullptr, nullptr, nullptr); + result = zeDeviceGetMemoryPropertiesTracing(nullptr, nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -82,7 +82,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingDeviceGetCachePropertiesTracingWrapp setTracerCallbacksAndEnableTracer(); - result = zeDeviceGetCacheProperties_Tracing(nullptr, nullptr, nullptr); + result = zeDeviceGetCachePropertiesTracing(nullptr, nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -98,7 +98,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingDeviceGetImagePropertiesTracingWrapp setTracerCallbacksAndEnableTracer(); - result = zeDeviceGetImageProperties_Tracing(nullptr, nullptr); + result = zeDeviceGetImagePropertiesTracing(nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -117,7 +117,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingDeviceGetSubDevicesTracingWrapperWit setTracerCallbacksAndEnableTracer(); - result = zeDeviceGetSubDevices_Tracing(nullptr, &pcount, nullptr); + result = zeDeviceGetSubDevicesTracing(nullptr, &pcount, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -136,7 +136,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingDeviceGetP2PPropertiesTracingWrapper setTracerCallbacksAndEnableTracer(); - result = zeDeviceGetP2PProperties_Tracing(nullptr, nullptr, &pP2PProperties); + result = zeDeviceGetP2PPropertiesTracing(nullptr, nullptr, &pP2PProperties); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -155,7 +155,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingDeviceCanAccessPeerTracingWrapperWit setTracerCallbacksAndEnableTracer(); - result = zeDeviceCanAccessPeer_Tracing(nullptr, nullptr, &value); + result = zeDeviceCanAccessPeerTracing(nullptr, nullptr, &value); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -173,7 +173,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingKernelSetCacheConfigTracingWrapperWi setTracerCallbacksAndEnableTracer(); - result = zeKernelSetCacheConfig_Tracing(nullptr, flags); + result = zeKernelSetCacheConfigTracing(nullptr, flags); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -189,7 +189,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingDeviceGetModulePropertiesTracingWrap setTracerCallbacksAndEnableTracer(); - result = zeDeviceGetModuleProperties_Tracing(nullptr, nullptr); + result = zeDeviceGetModulePropertiesTracing(nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -205,7 +205,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingDeviceGetMemoryAccessPropertiesTraci setTracerCallbacksAndEnableTracer(); - result = zeDeviceGetMemoryAccessProperties_Tracing(nullptr, nullptr); + result = zeDeviceGetMemoryAccessPropertiesTracing(nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -220,7 +220,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingDeviceGetCommandQueueGroupProperties setTracerCallbacksAndEnableTracer(); - result = zeDeviceGetCommandQueueGroupProperties_Tracing(nullptr, nullptr, nullptr); + result = zeDeviceGetCommandQueueGroupPropertiesTracing(nullptr, nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -235,7 +235,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingDeviceGetExternalMemoryPropertiesTra setTracerCallbacksAndEnableTracer(); - result = zeDeviceGetExternalMemoryProperties_Tracing(nullptr, nullptr); + result = zeDeviceGetExternalMemoryPropertiesTracing(nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -250,7 +250,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingDeviceGetStatusTracingWrapperWithOne setTracerCallbacksAndEnableTracer(); - result = zeDeviceGetStatus_Tracing(nullptr); + result = zeDeviceGetStatusTracing(nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } diff --git a/level_zero/experimental/test/unit_tests/sources/tracing/test_driver_api_tracing.cpp b/level_zero/experimental/test/unit_tests/sources/tracing/test_driver_api_tracing.cpp index 84e5cc29be..3e493256ee 100644 --- a/level_zero/experimental/test/unit_tests/sources/tracing/test_driver_api_tracing.cpp +++ b/level_zero/experimental/test/unit_tests/sources/tracing/test_driver_api_tracing.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -20,7 +20,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingzeDriverGetTracingWrapperWithOneSetO setTracerCallbacksAndEnableTracer(); - result = zeDriverGet_Tracing(nullptr, nullptr); + result = zeDriverGetTracing(nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -35,7 +35,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingzeDriverGetPropertiesTracingWrapperW setTracerCallbacksAndEnableTracer(); - result = zeDriverGetProperties_Tracing(nullptr, nullptr); + result = zeDriverGetPropertiesTracing(nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); } @@ -49,7 +49,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingzeDriverGetApiVersionTracingWrapperW setTracerCallbacksAndEnableTracer(); - result = zeDriverGetApiVersion_Tracing(nullptr, nullptr); + result = zeDriverGetApiVersionTracing(nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -65,7 +65,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingzeDriverGetIpcPropertiesTracingWrapp setTracerCallbacksAndEnableTracer(); - result = zeDriverGetIpcProperties_Tracing(nullptr, nullptr); + result = zeDriverGetIpcPropertiesTracing(nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -82,7 +82,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingzeDriverGetExtensionPropertiesTracin setTracerCallbacksAndEnableTracer(); - result = zeDriverGetExtensionProperties_Tracing(nullptr, nullptr, nullptr); + result = zeDriverGetExtensionPropertiesTracing(nullptr, nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } diff --git a/level_zero/experimental/test/unit_tests/sources/tracing/test_event_api_multi_tracing.cpp b/level_zero/experimental/test/unit_tests/sources/tracing/test_event_api_multi_tracing.cpp index 6761c17590..bb904002e3 100644 --- a/level_zero/experimental/test/unit_tests/sources/tracing/test_event_api_multi_tracing.cpp +++ b/level_zero/experimental/test/unit_tests/sources/tracing/test_event_api_multi_tracing.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -246,7 +246,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventCreateTracingW setTracerCallbacksAndEnableTracer(); - result = zeEventCreate_Tracing(event_create_args.hEventPool0, &event_create_args.desc0, &event_create_args.hEvent0); + result = zeEventCreateTracing(event_create_args.hEventPool0, &event_create_args.desc0, &event_create_args.hEvent0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } @@ -375,7 +375,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventDestroyTracing setTracerCallbacksAndEnableTracer(); - result = zeEventDestroy_Tracing(event_destroy_args.hEvent0); + result = zeEventDestroyTracing(event_destroy_args.hEvent0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } @@ -504,7 +504,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventHostSignalTrac setTracerCallbacksAndEnableTracer(); - result = zeEventHostSignal_Tracing(event_host_signal_args.hEvent0); + result = zeEventHostSignalTracing(event_host_signal_args.hEvent0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } @@ -645,7 +645,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventHostSynchroniz setTracerCallbacksAndEnableTracer(); - result = zeEventHostSynchronize_Tracing(event_host_synchronize_args.hEvent0, event_host_synchronize_args.timeout0); + result = zeEventHostSynchronizeTracing(event_host_synchronize_args.hEvent0, event_host_synchronize_args.timeout0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } @@ -774,7 +774,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventQueryStatusTra setTracerCallbacksAndEnableTracer(); - result = zeEventQueryStatus_Tracing(event_query_status_args.hEvent0); + result = zeEventQueryStatusTracing(event_query_status_args.hEvent0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } @@ -903,7 +903,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventHostResetTraci setTracerCallbacksAndEnableTracer(); - result = zeEventHostReset_Tracing(event_reset_args.hEvent0); + result = zeEventHostResetTracing(event_reset_args.hEvent0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } @@ -1200,11 +1200,11 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventPoolCreateTrac setTracerCallbacksAndEnableTracer(); - result = zeEventPoolCreate_Tracing(event_pool_create_args.hContext0, - &event_pool_create_args.desc0, - event_pool_create_args.numDevices0, - event_pool_create_args.hDevices0, - &event_pool_create_args.hEventPool0); + result = zeEventPoolCreateTracing(event_pool_create_args.hContext0, + &event_pool_create_args.desc0, + event_pool_create_args.numDevices0, + event_pool_create_args.hDevices0, + &event_pool_create_args.hEventPool0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } @@ -1333,7 +1333,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventPoolDestroyTra setTracerCallbacksAndEnableTracer(); - result = zeEventPoolDestroy_Tracing(event_pool_destroy_args.hEventPool0); + result = zeEventPoolDestroyTracing(event_pool_destroy_args.hEventPool0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } @@ -1348,14 +1348,14 @@ struct { void *instanceData3; } event_pool_get_ipc_handle_args; -static void event_pool_get_ipc_handle_init_random(ze_ipc_event_pool_handle_t *phIpc) { +static void eventPoolGetIpcHandleInitRandom(ze_ipc_event_pool_handle_t *phIpc) { uint8_t *ptr = (uint8_t *)phIpc; for (size_t i = 0; i < sizeof(*phIpc); i++, ptr++) { *ptr = generateRandomSize(); } } -static bool event_pool_get_ipc_handles_compare(ze_ipc_event_pool_handle_t *phIpc0, ze_ipc_event_pool_handle_t *phIpc1) { +static bool eventPoolGetIpcHandlesCompare(ze_ipc_event_pool_handle_t *phIpc0, ze_ipc_event_pool_handle_t *phIpc1) { if (nullptr == phIpc0) { return false; } @@ -1370,11 +1370,11 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventPoolGetIpcHand // initialize initial argument set event_pool_get_ipc_handle_args.hEventPool0 = generateRandomHandle(); - event_pool_get_ipc_handle_init_random(&event_pool_get_ipc_handle_args.hIpc0); + eventPoolGetIpcHandleInitRandom(&event_pool_get_ipc_handle_args.hIpc0); // initialize replacement argument set event_pool_get_ipc_handle_args.hEventPool1 = generateRandomHandle(); - event_pool_get_ipc_handle_init_random(&event_pool_get_ipc_handle_args.hIpc1); + eventPoolGetIpcHandleInitRandom(&event_pool_get_ipc_handle_args.hIpc1); // initialize user instance data event_pool_get_ipc_handle_args.instanceData0 = generateRandomHandle(); @@ -1384,8 +1384,8 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventPoolGetIpcHand [](ze_event_pool_handle_t hEventPool, ze_ipc_event_pool_handle_t *phIpc) { EXPECT_EQ(event_pool_get_ipc_handle_args.hEventPool1, hEventPool); EXPECT_EQ(&event_pool_get_ipc_handle_args.hIpc1, phIpc); - EXPECT_TRUE(event_pool_get_ipc_handles_compare(&event_pool_get_ipc_handle_args.hIpc1, phIpc)); - event_pool_get_ipc_handle_init_random(&event_pool_get_ipc_handle_args.hIpcAPI); + EXPECT_TRUE(eventPoolGetIpcHandlesCompare(&event_pool_get_ipc_handle_args.hIpc1, phIpc)); + eventPoolGetIpcHandleInitRandom(&event_pool_get_ipc_handle_args.hIpcAPI); *phIpc = event_pool_get_ipc_handle_args.hIpcAPI; return ZE_RESULT_SUCCESS; }; @@ -1398,7 +1398,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventPoolGetIpcHand [](ze_event_pool_get_ipc_handle_params_t *params, ze_result_t result, void *pTracerUserData, void **ppTracerInstanceUserData) { EXPECT_EQ(event_pool_get_ipc_handle_args.hEventPool0, *params->phEventPool); EXPECT_EQ(&event_pool_get_ipc_handle_args.hIpc0, *params->pphIpc); - EXPECT_TRUE(event_pool_get_ipc_handles_compare(&event_pool_get_ipc_handle_args.hIpc0, *params->pphIpc)); + EXPECT_TRUE(eventPoolGetIpcHandlesCompare(&event_pool_get_ipc_handle_args.hIpc0, *params->pphIpc)); *params->phEventPool = event_pool_get_ipc_handle_args.hEventPool1; *params->pphIpc = &event_pool_get_ipc_handle_args.hIpc1; ASSERT_NE(nullptr, pTracerUserData); @@ -1420,7 +1420,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventPoolGetIpcHand EXPECT_EQ(result, ZE_RESULT_SUCCESS); EXPECT_EQ(event_pool_get_ipc_handle_args.hEventPool1, *params->phEventPool); EXPECT_EQ(&event_pool_get_ipc_handle_args.hIpc1, *params->pphIpc); - EXPECT_TRUE(event_pool_get_ipc_handles_compare(&event_pool_get_ipc_handle_args.hIpc1, *params->pphIpc)); + EXPECT_TRUE(eventPoolGetIpcHandlesCompare(&event_pool_get_ipc_handle_args.hIpc1, *params->pphIpc)); ASSERT_NE(nullptr, pTracerUserData); int *val = static_cast(pTracerUserData); EXPECT_EQ(*val, 2); @@ -1438,7 +1438,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventPoolGetIpcHand [](ze_event_pool_get_ipc_handle_params_t *params, ze_result_t result, void *pTracerUserData, void **ppTracerInstanceUserData) { EXPECT_EQ(event_pool_get_ipc_handle_args.hEventPool1, *params->phEventPool); EXPECT_EQ(&event_pool_get_ipc_handle_args.hIpc1, *params->pphIpc); - EXPECT_TRUE(event_pool_get_ipc_handles_compare(&event_pool_get_ipc_handle_args.hIpc1, *params->pphIpc)); + EXPECT_TRUE(eventPoolGetIpcHandlesCompare(&event_pool_get_ipc_handle_args.hIpc1, *params->pphIpc)); ASSERT_NE(nullptr, pTracerUserData); int *val = static_cast(pTracerUserData); EXPECT_EQ(*val, 11); @@ -1454,7 +1454,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventPoolGetIpcHand EXPECT_EQ(result, ZE_RESULT_SUCCESS); EXPECT_EQ(event_pool_get_ipc_handle_args.hEventPool1, *params->phEventPool); EXPECT_EQ(&event_pool_get_ipc_handle_args.hIpc1, *params->pphIpc); - EXPECT_TRUE(event_pool_get_ipc_handles_compare(&event_pool_get_ipc_handle_args.hIpc1, *params->pphIpc)); + EXPECT_TRUE(eventPoolGetIpcHandlesCompare(&event_pool_get_ipc_handle_args.hIpc1, *params->pphIpc)); ASSERT_NE(nullptr, pTracerUserData); int *val = static_cast(pTracerUserData); EXPECT_EQ(*val, 21); @@ -1469,7 +1469,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventPoolGetIpcHand [](ze_event_pool_get_ipc_handle_params_t *params, ze_result_t result, void *pTracerUserData, void **ppTracerInstanceUserData) { EXPECT_EQ(event_pool_get_ipc_handle_args.hEventPool1, *params->phEventPool); EXPECT_EQ(&event_pool_get_ipc_handle_args.hIpc1, *params->pphIpc); - EXPECT_TRUE(event_pool_get_ipc_handles_compare(&event_pool_get_ipc_handle_args.hIpc1, *params->pphIpc)); + EXPECT_TRUE(eventPoolGetIpcHandlesCompare(&event_pool_get_ipc_handle_args.hIpc1, *params->pphIpc)); ASSERT_NE(nullptr, pTracerUserData); int *val = static_cast(pTracerUserData); EXPECT_EQ(*val, 31); @@ -1489,7 +1489,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventPoolGetIpcHand EXPECT_EQ(result, ZE_RESULT_SUCCESS); EXPECT_EQ(event_pool_get_ipc_handle_args.hEventPool1, *params->phEventPool); EXPECT_EQ(&event_pool_get_ipc_handle_args.hIpc1, *params->pphIpc); - EXPECT_TRUE(event_pool_get_ipc_handles_compare(&event_pool_get_ipc_handle_args.hIpc1, *params->pphIpc)); + EXPECT_TRUE(eventPoolGetIpcHandlesCompare(&event_pool_get_ipc_handle_args.hIpc1, *params->pphIpc)); ASSERT_NE(nullptr, pTracerUserData); int *val = static_cast(pTracerUserData); EXPECT_EQ(*val, 62); @@ -1501,7 +1501,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventPoolGetIpcHand setTracerCallbacksAndEnableTracer(); - result = zeEventPoolGetIpcHandle_Tracing(event_pool_get_ipc_handle_args.hEventPool0, &event_pool_get_ipc_handle_args.hIpc0); + result = zeEventPoolGetIpcHandleTracing(event_pool_get_ipc_handle_args.hEventPool0, &event_pool_get_ipc_handle_args.hIpc0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } @@ -1518,14 +1518,14 @@ struct { void *instanceData3; } event_pool_open_ipc_handle_args; -static void event_pool_open_ipc_handle_init_random(ze_ipc_event_pool_handle_t *phIpc) { +static void eventPoolOpenIpcHandleInitRandom(ze_ipc_event_pool_handle_t *phIpc) { uint8_t *ptr = (uint8_t *)phIpc; for (size_t i = 0; i < sizeof(*phIpc); i++, ptr++) { *ptr = generateRandomSize(); } } -static bool event_pool_open_ipc_handles_compare(ze_ipc_event_pool_handle_t *phIpc0, ze_ipc_event_pool_handle_t *phIpc1) { +static bool eventPoolOpenIpcHandlesCompare(ze_ipc_event_pool_handle_t *phIpc0, ze_ipc_event_pool_handle_t *phIpc1) { return (memcmp((void *)phIpc0, (void *)phIpc1, sizeof(ze_ipc_event_pool_handle_t)) == 0); } @@ -1534,12 +1534,12 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventPoolOpenIpcHan // initialize initial argument set event_pool_open_ipc_handle_args.hContext0 = generateRandomHandle(); - event_pool_open_ipc_handle_init_random(&event_pool_open_ipc_handle_args.hIpc0); + eventPoolOpenIpcHandleInitRandom(&event_pool_open_ipc_handle_args.hIpc0); event_pool_open_ipc_handle_args.hEventPool0 = generateRandomHandle(); // initialize replacement argument set event_pool_open_ipc_handle_args.hContext1 = generateRandomHandle(); - event_pool_open_ipc_handle_init_random(&event_pool_open_ipc_handle_args.hIpc1); + eventPoolOpenIpcHandleInitRandom(&event_pool_open_ipc_handle_args.hIpc1); event_pool_open_ipc_handle_args.hEventPool1 = generateRandomHandle(); // initialize user instance data @@ -1549,7 +1549,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventPoolOpenIpcHan driver_ddiTable.core_ddiTable.EventPool.pfnOpenIpcHandle = [](ze_context_handle_t hContext, ze_ipc_event_pool_handle_t hIpc, ze_event_pool_handle_t *phEventPool) { EXPECT_EQ(event_pool_open_ipc_handle_args.hContext1, hContext); - EXPECT_TRUE(event_pool_open_ipc_handles_compare(&event_pool_open_ipc_handle_args.hIpc1, &hIpc)); + EXPECT_TRUE(eventPoolOpenIpcHandlesCompare(&event_pool_open_ipc_handle_args.hIpc1, &hIpc)); EXPECT_EQ(event_pool_open_ipc_handle_args.hEventPool1, *phEventPool); EXPECT_EQ(&event_pool_open_ipc_handle_args.hEventPool1, phEventPool); event_pool_open_ipc_handle_args.hEventPoolAPI = generateRandomHandle(); @@ -1564,7 +1564,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventPoolOpenIpcHan prologCbs0.EventPool.pfnOpenIpcHandleCb = [](ze_event_pool_open_ipc_handle_params_t *params, ze_result_t result, void *pTracerUserData, void **ppTracerInstanceUserData) { EXPECT_EQ(event_pool_open_ipc_handle_args.hContext0, *params->phContext); - EXPECT_TRUE(event_pool_open_ipc_handles_compare(&event_pool_open_ipc_handle_args.hIpc0, params->phIpc)); + EXPECT_TRUE(eventPoolOpenIpcHandlesCompare(&event_pool_open_ipc_handle_args.hIpc0, params->phIpc)); ze_event_pool_handle_t **ppHandle; ASSERT_NE(nullptr, params); @@ -1602,7 +1602,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventPoolOpenIpcHan struct instanceDataStruct *instanceData; EXPECT_EQ(result, ZE_RESULT_SUCCESS); EXPECT_EQ(event_pool_open_ipc_handle_args.hContext1, *params->phContext); - EXPECT_TRUE(event_pool_open_ipc_handles_compare(&event_pool_open_ipc_handle_args.hIpc1, params->phIpc)); + EXPECT_TRUE(eventPoolOpenIpcHandlesCompare(&event_pool_open_ipc_handle_args.hIpc1, params->phIpc)); ze_event_pool_handle_t **ppHandle; ASSERT_NE(nullptr, params); @@ -1634,7 +1634,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventPoolOpenIpcHan prologCbs1.EventPool.pfnOpenIpcHandleCb = [](ze_event_pool_open_ipc_handle_params_t *params, ze_result_t result, void *pTracerUserData, void **ppTracerInstanceUserData) { EXPECT_EQ(event_pool_open_ipc_handle_args.hContext1, *params->phContext); - EXPECT_TRUE(event_pool_open_ipc_handles_compare(&event_pool_open_ipc_handle_args.hIpc1, params->phIpc)); + EXPECT_TRUE(eventPoolOpenIpcHandlesCompare(&event_pool_open_ipc_handle_args.hIpc1, params->phIpc)); ze_event_pool_handle_t **ppHandle; ASSERT_NE(nullptr, params); @@ -1664,7 +1664,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventPoolOpenIpcHan [](ze_event_pool_open_ipc_handle_params_t *params, ze_result_t result, void *pTracerUserData, void **ppTracerInstanceUserData) { EXPECT_EQ(result, ZE_RESULT_SUCCESS); EXPECT_EQ(event_pool_open_ipc_handle_args.hContext1, *params->phContext); - EXPECT_TRUE(event_pool_open_ipc_handles_compare(&event_pool_open_ipc_handle_args.hIpc1, params->phIpc)); + EXPECT_TRUE(eventPoolOpenIpcHandlesCompare(&event_pool_open_ipc_handle_args.hIpc1, params->phIpc)); ze_event_pool_handle_t **ppHandle; ASSERT_NE(nullptr, params); @@ -1693,7 +1693,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventPoolOpenIpcHan prologCbs3.EventPool.pfnOpenIpcHandleCb = [](ze_event_pool_open_ipc_handle_params_t *params, ze_result_t result, void *pTracerUserData, void **ppTracerInstanceUserData) { EXPECT_EQ(event_pool_open_ipc_handle_args.hContext1, *params->phContext); - EXPECT_TRUE(event_pool_open_ipc_handles_compare(&event_pool_open_ipc_handle_args.hIpc1, params->phIpc)); + EXPECT_TRUE(eventPoolOpenIpcHandlesCompare(&event_pool_open_ipc_handle_args.hIpc1, params->phIpc)); ze_event_pool_handle_t **ppHandle; ASSERT_NE(nullptr, params); @@ -1727,7 +1727,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventPoolOpenIpcHan struct instanceDataStruct *instanceData; EXPECT_EQ(result, ZE_RESULT_SUCCESS); EXPECT_EQ(event_pool_open_ipc_handle_args.hContext1, *params->phContext); - EXPECT_TRUE(event_pool_open_ipc_handles_compare(&event_pool_open_ipc_handle_args.hIpc1, params->phIpc)); + EXPECT_TRUE(eventPoolOpenIpcHandlesCompare(&event_pool_open_ipc_handle_args.hIpc1, params->phIpc)); ze_event_pool_handle_t **ppHandle; ASSERT_NE(nullptr, params); @@ -1754,9 +1754,9 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventPoolOpenIpcHan setTracerCallbacksAndEnableTracer(); - result = zeEventPoolOpenIpcHandle_Tracing(event_pool_open_ipc_handle_args.hContext0, - event_pool_open_ipc_handle_args.hIpc0, - &event_pool_open_ipc_handle_args.hEventPool0); + result = zeEventPoolOpenIpcHandleTracing(event_pool_open_ipc_handle_args.hContext0, + event_pool_open_ipc_handle_args.hIpc0, + &event_pool_open_ipc_handle_args.hEventPool0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } @@ -1885,7 +1885,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingEventPoolCloseIpcHa setTracerCallbacksAndEnableTracer(); - result = zeEventPoolCloseIpcHandle_Tracing(event_pool_close_ipc_handle_args.hEventPool0); + result = zeEventPoolCloseIpcHandleTracing(event_pool_close_ipc_handle_args.hEventPool0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } @@ -2022,7 +2022,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingCommandListAppendSi setTracerCallbacksAndEnableTracer(); - result = zeCommandListAppendSignalEvent_Tracing(command_list_append_signal_event_args.hCommandList0, command_list_append_signal_event_args.hEvent0); + result = zeCommandListAppendSignalEventTracing(command_list_append_signal_event_args.hCommandList0, command_list_append_signal_event_args.hEvent0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); @@ -2191,9 +2191,9 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingCommandListAppendWa setTracerCallbacksAndEnableTracer(); - result = zeCommandListAppendWaitOnEvents_Tracing(command_list_append_wait_on_events_args.hCommandList0, - NUM_COMMAND_LIST_APPEND_WAIT_ON_EVENTS_0, - command_list_append_wait_on_events_args.hEvents0); + result = zeCommandListAppendWaitOnEventsTracing(command_list_append_wait_on_events_args.hCommandList0, + NUM_COMMAND_LIST_APPEND_WAIT_ON_EVENTS_0, + command_list_append_wait_on_events_args.hEvents0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } diff --git a/level_zero/experimental/test/unit_tests/sources/tracing/test_event_api_tracing.cpp b/level_zero/experimental/test/unit_tests/sources/tracing/test_event_api_tracing.cpp index d59f2b5601..4a5d9b2c9b 100644 --- a/level_zero/experimental/test/unit_tests/sources/tracing/test_event_api_tracing.cpp +++ b/level_zero/experimental/test/unit_tests/sources/tracing/test_event_api_tracing.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -22,7 +22,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingEventCreateTracingWrapperWithOneSetO setTracerCallbacksAndEnableTracer(); - result = zeEventCreate_Tracing(nullptr, &desc, &event); + result = zeEventCreateTracing(nullptr, &desc, &event); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -37,7 +37,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingEventDestroyTracingWrapperWithOneSet setTracerCallbacksAndEnableTracer(); - result = zeEventDestroy_Tracing(nullptr); + result = zeEventDestroyTracing(nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -51,7 +51,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingEventHostSignalTracingWrapperWithOne setTracerCallbacksAndEnableTracer(); - result = zeEventHostSignal_Tracing(nullptr); + result = zeEventHostSignalTracing(nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -65,7 +65,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingEventHostSynchronizeTracingWrapperWi setTracerCallbacksAndEnableTracer(); - result = zeEventHostSynchronize_Tracing(nullptr, 1U); + result = zeEventHostSynchronizeTracing(nullptr, 1U); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -79,7 +79,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingEventQueryStatusTracingWrapperWithOn setTracerCallbacksAndEnableTracer(); - result = zeEventQueryStatus_Tracing(nullptr); + result = zeEventQueryStatusTracing(nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -93,7 +93,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingEventHostResetTracingWrapperWithOneS setTracerCallbacksAndEnableTracer(); - result = zeEventHostReset_Tracing(nullptr); + result = zeEventHostResetTracing(nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -111,7 +111,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingEventPoolCreateTracingWrapperWithOne setTracerCallbacksAndEnableTracer(); - result = zeEventPoolCreate_Tracing(nullptr, nullptr, 1U, nullptr, nullptr); + result = zeEventPoolCreateTracing(nullptr, nullptr, 1U, nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -125,7 +125,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingEventPoolDestroyTracingWrapperWithOn setTracerCallbacksAndEnableTracer(); - result = zeEventPoolDestroy_Tracing(nullptr); + result = zeEventPoolDestroyTracing(nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -141,7 +141,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingEventPoolGetIpcHandleTracingWrapperW setTracerCallbacksAndEnableTracer(); - result = zeEventPoolGetIpcHandle_Tracing(nullptr, &phIpc); + result = zeEventPoolGetIpcHandleTracing(nullptr, &phIpc); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -160,7 +160,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingEventPoolOpenIpcHandleTracingWrapper setTracerCallbacksAndEnableTracer(); - result = zeEventPoolOpenIpcHandle_Tracing(nullptr, hIpc, &phEventPool); + result = zeEventPoolOpenIpcHandleTracing(nullptr, hIpc, &phEventPool); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -174,7 +174,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingEventPoolCloseIpcHandleTracingWrappe setTracerCallbacksAndEnableTracer(); - result = zeEventPoolCloseIpcHandle_Tracing(nullptr); + result = zeEventPoolCloseIpcHandleTracing(nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -190,7 +190,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListAppendSignalEventTracingW setTracerCallbacksAndEnableTracer(); - result = zeCommandListAppendSignalEvent_Tracing(nullptr, nullptr); + result = zeCommandListAppendSignalEventTracing(nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -207,7 +207,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListAppendWaitOnEventsTracing setTracerCallbacksAndEnableTracer(); - result = zeCommandListAppendWaitOnEvents_Tracing(nullptr, 1, &phEvents); + result = zeCommandListAppendWaitOnEventsTracing(nullptr, 1, &phEvents); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -222,7 +222,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListAppendEventResetTracingWr setTracerCallbacksAndEnableTracer(); - result = zeCommandListAppendEventReset_Tracing(nullptr, nullptr); + result = zeCommandListAppendEventResetTracing(nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -237,7 +237,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingEventQueryKernelTimestampTracingWrap setTracerCallbacksAndEnableTracer(); - result = zeEventQueryKernelTimestamp_Tracing(nullptr, nullptr); + result = zeEventQueryKernelTimestampTracing(nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } diff --git a/level_zero/experimental/test/unit_tests/sources/tracing/test_fence_api_tracing.cpp b/level_zero/experimental/test/unit_tests/sources/tracing/test_fence_api_tracing.cpp index 6b610d97b6..cf4edbf550 100644 --- a/level_zero/experimental/test/unit_tests/sources/tracing/test_fence_api_tracing.cpp +++ b/level_zero/experimental/test/unit_tests/sources/tracing/test_fence_api_tracing.cpp @@ -22,7 +22,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingFenceCreateTracingWrapperWithOneSetO setTracerCallbacksAndEnableTracer(); - result = zeFenceCreate_Tracing(nullptr, &desc, &fence); + result = zeFenceCreateTracing(nullptr, &desc, &fence); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -37,7 +37,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingFenceDestroyTracingWrapperWithOneSet setTracerCallbacksAndEnableTracer(); - result = zeFenceDestroy_Tracing(nullptr); + result = zeFenceDestroyTracing(nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -51,7 +51,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingFenceHostSynchronizeTracingWrapperWi setTracerCallbacksAndEnableTracer(); - result = zeFenceHostSynchronize_Tracing(nullptr, 1U); + result = zeFenceHostSynchronizeTracing(nullptr, 1U); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -65,7 +65,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingFenceQueryStatusTracingWrapperWithOn setTracerCallbacksAndEnableTracer(); - result = zeFenceQueryStatus_Tracing(nullptr); + result = zeFenceQueryStatusTracing(nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -79,7 +79,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingFenceResetTracingWrapperWithOneSetOf setTracerCallbacksAndEnableTracer(); - result = zeFenceReset_Tracing(nullptr); + result = zeFenceResetTracing(nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -319,7 +319,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingFenceCreateTracingW setTracerCallbacksAndEnableTracer(); - result = zeFenceCreate_Tracing(fence_create_args.hCommandQueue0, &fence_create_args.desc0, &fence_create_args.hFence0); + result = zeFenceCreateTracing(fence_create_args.hCommandQueue0, &fence_create_args.desc0, &fence_create_args.hFence0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(fence_create_args.hFence1, fence_create_args.hFenceAPI); validateDefaultUserDataFinal(); @@ -449,7 +449,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingFenceDestroyTracing setTracerCallbacksAndEnableTracer(); - result = zeFenceDestroy_Tracing(fence_destroy_args.hFence0); + result = zeFenceDestroyTracing(fence_destroy_args.hFence0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } @@ -590,7 +590,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingFenceHostSynchroniz setTracerCallbacksAndEnableTracer(); - result = zeFenceHostSynchronize_Tracing(fence_host_synchronize_args.hFence0, fence_host_synchronize_args.timeout0); + result = zeFenceHostSynchronizeTracing(fence_host_synchronize_args.hFence0, fence_host_synchronize_args.timeout0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } @@ -719,7 +719,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingFenceQueryStatusTra setTracerCallbacksAndEnableTracer(); - result = zeFenceQueryStatus_Tracing(fence_query_status_args.hFence0); + result = zeFenceQueryStatusTracing(fence_query_status_args.hFence0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } @@ -848,7 +848,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingFenceResetTracingWr setTracerCallbacksAndEnableTracer(); - result = zeFenceReset_Tracing(fence_reset_args.hFence0); + result = zeFenceResetTracing(fence_reset_args.hFence0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } diff --git a/level_zero/experimental/test/unit_tests/sources/tracing/test_global_api_tracing.cpp b/level_zero/experimental/test/unit_tests/sources/tracing/test_global_api_tracing.cpp index adfd970ffa..7141a890fc 100644 --- a/level_zero/experimental/test/unit_tests/sources/tracing/test_global_api_tracing.cpp +++ b/level_zero/experimental/test/unit_tests/sources/tracing/test_global_api_tracing.cpp @@ -19,7 +19,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingInitTracingWrapperWithOneSetOfProlog setTracerCallbacksAndEnableTracer(); - result = zeInit_Tracing(ZE_INIT_FLAG_GPU_ONLY); + result = zeInitTracing(ZE_INIT_FLAG_GPU_ONLY); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } diff --git a/level_zero/experimental/test/unit_tests/sources/tracing/test_image_api_tracing.cpp b/level_zero/experimental/test/unit_tests/sources/tracing/test_image_api_tracing.cpp index 6e230e09a2..f7bdc6bf71 100644 --- a/level_zero/experimental/test/unit_tests/sources/tracing/test_image_api_tracing.cpp +++ b/level_zero/experimental/test/unit_tests/sources/tracing/test_image_api_tracing.cpp @@ -22,7 +22,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingImageGetPropertiesTracingWrapperWith setTracerCallbacksAndEnableTracer(); - result = zeImageGetProperties_Tracing(nullptr, &desc, &pImageProperties); + result = zeImageGetPropertiesTracing(nullptr, &desc, &pImageProperties); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -39,7 +39,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingImageCreateTracingWrapperWithOneSetO setTracerCallbacksAndEnableTracer(); - result = zeImageCreate_Tracing(nullptr, nullptr, &desc, &phImage); + result = zeImageCreateTracing(nullptr, nullptr, &desc, &phImage); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -53,7 +53,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingImageDestroyTracingWrapperWithOneSet setTracerCallbacksAndEnableTracer(); - result = zeImageDestroy_Tracing(nullptr); + result = zeImageDestroyTracing(nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -204,7 +204,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingImageGetPropertiesT setTracerCallbacksAndEnableTracer(); - result = zeImageGetProperties_Tracing(ImageGetProperties_args.hDevice0, &ImageGetProperties_args.desc0, &ImageGetProperties_args.ImageProperties0); + result = zeImageGetPropertiesTracing(ImageGetProperties_args.hDevice0, &ImageGetProperties_args.desc0, &ImageGetProperties_args.ImageProperties0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } @@ -465,7 +465,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingImageCreateTracingW setTracerCallbacksAndEnableTracer(); - result = zeImageCreate_Tracing(ImageCreate_args.hContext0, ImageCreate_args.hDevice0, &ImageCreate_args.desc0, &ImageCreate_args.hImage0); + result = zeImageCreateTracing(ImageCreate_args.hContext0, ImageCreate_args.hDevice0, &ImageCreate_args.desc0, &ImageCreate_args.hImage0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } @@ -594,7 +594,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingImageDestroyTracing setTracerCallbacksAndEnableTracer(); - result = zeImageDestroy_Tracing(ImageDestroy_args.hImage0); + result = zeImageDestroyTracing(ImageDestroy_args.hImage0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } diff --git a/level_zero/experimental/test/unit_tests/sources/tracing/test_memory_api_tracing.cpp b/level_zero/experimental/test/unit_tests/sources/tracing/test_memory_api_tracing.cpp index 66276474ec..53cc1937a7 100644 --- a/level_zero/experimental/test/unit_tests/sources/tracing/test_memory_api_tracing.cpp +++ b/level_zero/experimental/test/unit_tests/sources/tracing/test_memory_api_tracing.cpp @@ -26,7 +26,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingMemAllocSharedTracingWrapperWithOneS setTracerCallbacksAndEnableTracer(); - result = zeMemAllocShared_Tracing(nullptr, &deviceDesc, &hostDesc, size, alignment, nullptr, &pptr); + result = zeMemAllocSharedTracing(nullptr, &deviceDesc, &hostDesc, size, alignment, nullptr, &pptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -46,7 +46,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingMemAllocDeviceTracingWrapperWithOneS setTracerCallbacksAndEnableTracer(); - result = zeMemAllocDevice_Tracing(nullptr, &deviceDesc, size, alignment, nullptr, &pptr); + result = zeMemAllocDeviceTracing(nullptr, &deviceDesc, size, alignment, nullptr, &pptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -65,7 +65,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingMemAllocHostTracingWrapperWithOneSet setTracerCallbacksAndEnableTracer(); - result = zeMemAllocHost_Tracing(nullptr, &hostDesc, size, alignment, &pptr); + result = zeMemAllocHostTracing(nullptr, &hostDesc, size, alignment, &pptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -80,7 +80,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingMemFreeTracingWrapperWithOneSetOfPro setTracerCallbacksAndEnableTracer(); - result = zeMemFree_Tracing(nullptr, nullptr); + result = zeMemFreeTracing(nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -95,7 +95,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingMemGetAllocPropertiesTracingWrapperW setTracerCallbacksAndEnableTracer(); - result = zeMemGetAllocProperties_Tracing(nullptr, nullptr, nullptr, nullptr); + result = zeMemGetAllocPropertiesTracing(nullptr, nullptr, nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -110,7 +110,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingMemGetAddressRangeTracingWrapperWith setTracerCallbacksAndEnableTracer(); - result = zeMemGetAddressRange_Tracing(nullptr, nullptr, nullptr, nullptr); + result = zeMemGetAddressRangeTracing(nullptr, nullptr, nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -125,7 +125,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingMemGetIpcHandleTracingWrapperWithOne setTracerCallbacksAndEnableTracer(); - result = zeMemGetIpcHandle_Tracing(nullptr, nullptr, nullptr); + result = zeMemGetIpcHandleTracing(nullptr, nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -142,7 +142,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingMemOpenIpcHandleTracingWrapperWithOn setTracerCallbacksAndEnableTracer(); - result = zeMemOpenIpcHandle_Tracing(nullptr, nullptr, ipchandle, 0, nullptr); + result = zeMemOpenIpcHandleTracing(nullptr, nullptr, ipchandle, 0, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -157,7 +157,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingMemCloseIpcHandleTracingWrapperWithO setTracerCallbacksAndEnableTracer(); - result = zeMemCloseIpcHandle_Tracing(nullptr, nullptr); + result = zeMemCloseIpcHandleTracing(nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -172,7 +172,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingPhysicalMemCreateTracingWrapperWithO setTracerCallbacksAndEnableTracer(); - result = zePhysicalMemCreate_Tracing(nullptr, nullptr, nullptr, nullptr); + result = zePhysicalMemCreateTracing(nullptr, nullptr, nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); @@ -188,7 +188,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingPhysicalMemDestroyTracingWrapperWith setTracerCallbacksAndEnableTracer(); - result = zePhysicalMemDestroy_Tracing(nullptr, nullptr); + result = zePhysicalMemDestroyTracing(nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); @@ -204,7 +204,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingVirtualMemFreeTracingWrapperWithOneS setTracerCallbacksAndEnableTracer(); - result = zeVirtualMemFree_Tracing(nullptr, nullptr, 1U); + result = zeVirtualMemFreeTracing(nullptr, nullptr, 1U); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); @@ -220,7 +220,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingVirtualMemGetAccessAttributeTracingW setTracerCallbacksAndEnableTracer(); - result = zeVirtualMemGetAccessAttribute_Tracing(nullptr, nullptr, 1U, nullptr, nullptr); + result = zeVirtualMemGetAccessAttributeTracing(nullptr, nullptr, 1U, nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); @@ -236,7 +236,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingVirtualMemMapTracingWrapperWithOneSe setTracerCallbacksAndEnableTracer(); - result = zeVirtualMemMap_Tracing(nullptr, nullptr, 1U, nullptr, 1U, ZE_MEMORY_ACCESS_ATTRIBUTE_NONE); + result = zeVirtualMemMapTracing(nullptr, nullptr, 1U, nullptr, 1U, ZE_MEMORY_ACCESS_ATTRIBUTE_NONE); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); @@ -252,7 +252,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingVirtualMemQueryPageSizeTracingWrappe setTracerCallbacksAndEnableTracer(); - result = zeVirtualMemQueryPageSize_Tracing(nullptr, nullptr, 1U, nullptr); + result = zeVirtualMemQueryPageSizeTracing(nullptr, nullptr, 1U, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); @@ -268,7 +268,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingVirtualMemReserveTracingWrapperWithO setTracerCallbacksAndEnableTracer(); - result = zeVirtualMemReserve_Tracing(nullptr, nullptr, 1U, nullptr); + result = zeVirtualMemReserveTracing(nullptr, nullptr, 1U, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); @@ -284,7 +284,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingVirtualMemSetAccessAttributeTracingW setTracerCallbacksAndEnableTracer(); - result = zeVirtualMemSetAccessAttribute_Tracing(nullptr, nullptr, 1U, ZE_MEMORY_ACCESS_ATTRIBUTE_NONE); + result = zeVirtualMemSetAccessAttributeTracing(nullptr, nullptr, 1U, ZE_MEMORY_ACCESS_ATTRIBUTE_NONE); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); @@ -300,7 +300,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingVirtualMemUnmapTracingWrapperWithOne setTracerCallbacksAndEnableTracer(); - result = zeVirtualMemUnmap_Tracing(nullptr, nullptr, 1U); + result = zeVirtualMemUnmapTracing(nullptr, nullptr, 1U); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); diff --git a/level_zero/experimental/test/unit_tests/sources/tracing/test_module_api_multi_tracing.cpp b/level_zero/experimental/test/unit_tests/sources/tracing/test_module_api_multi_tracing.cpp index 11b5eee3fc..aeba47662d 100644 --- a/level_zero/experimental/test/unit_tests/sources/tracing/test_module_api_multi_tracing.cpp +++ b/level_zero/experimental/test/unit_tests/sources/tracing/test_module_api_multi_tracing.cpp @@ -373,7 +373,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingModuleCreateTracing setTracerCallbacksAndEnableTracer(); - result = zeModuleCreate_Tracing(module_create_args.hContext0, module_create_args.hDevice0, &module_create_args.desc0, &module_create_args.hModule0, &module_create_args.hBuildLog0); + result = zeModuleCreateTracing(module_create_args.hContext0, module_create_args.hDevice0, &module_create_args.desc0, &module_create_args.hModule0, &module_create_args.hBuildLog0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } @@ -502,7 +502,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingModuleDestroyTracin setTracerCallbacksAndEnableTracer(); - result = zeModuleDestroy_Tracing(module_destroy_args.hModule0); + result = zeModuleDestroyTracing(module_destroy_args.hModule0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } @@ -521,14 +521,14 @@ struct { void *instanceData3; } module_get_native_binary_args; -static void module_get_native_binary_native_binary_init_random(uint8_t *binary, size_t size) { +static void moduleGetNativeBinaryNativeBinaryInitRandom(uint8_t *binary, size_t size) { uint8_t *ptr = binary; for (size_t i = 0; i < size; i++) { *ptr = generateRandomSize(); } } -static bool module_get_native_binary_native_binary_compare(uint8_t *binary0, uint8_t *binary1, size_t size) { +static bool moduleGetNativeBinaryNativeBinaryCompare(uint8_t *binary0, uint8_t *binary1, size_t size) { if (binary0 == nullptr) { return false; } @@ -543,11 +543,11 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingModuleGetNativeBina // initialize initial argument set module_get_native_binary_args.hModule0 = generateRandomHandle(); - module_get_native_binary_native_binary_init_random(module_get_native_binary_args.moduleNativeBinary0, moduleGetNativeBinarySize0); + moduleGetNativeBinaryNativeBinaryInitRandom(module_get_native_binary_args.moduleNativeBinary0, moduleGetNativeBinarySize0); // initialize replacement argument set module_get_native_binary_args.hModule1 = generateRandomHandle(); - module_get_native_binary_native_binary_init_random(module_get_native_binary_args.moduleNativeBinary1, moduleGetNativeBinarySize1); + moduleGetNativeBinaryNativeBinaryInitRandom(module_get_native_binary_args.moduleNativeBinary1, moduleGetNativeBinarySize1); // initialize user instance data module_get_native_binary_args.instanceData0 = generateRandomHandle(); @@ -559,8 +559,8 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingModuleGetNativeBina EXPECT_EQ(&module_get_native_binary_args.size1, pSize); EXPECT_EQ(*pSize, moduleGetNativeBinarySize1); EXPECT_EQ(module_get_native_binary_args.moduleNativeBinary1, pModuleNativeBinary); - EXPECT_TRUE(module_get_native_binary_native_binary_compare(module_get_native_binary_args.moduleNativeBinary1, - pModuleNativeBinary, moduleGetNativeBinarySize0)); + EXPECT_TRUE(moduleGetNativeBinaryNativeBinaryCompare(module_get_native_binary_args.moduleNativeBinary1, + pModuleNativeBinary, moduleGetNativeBinarySize0)); return ZE_RESULT_SUCCESS; }; @@ -587,8 +587,8 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingModuleGetNativeBina EXPECT_EQ(size, moduleGetNativeBinarySize0); EXPECT_EQ(module_get_native_binary_args.moduleNativeBinary0, *params->ppModuleNativeBinary); - EXPECT_TRUE(module_get_native_binary_native_binary_compare(module_get_native_binary_args.moduleNativeBinary0, - *params->ppModuleNativeBinary, moduleGetNativeBinarySize0)); + EXPECT_TRUE(moduleGetNativeBinaryNativeBinaryCompare(module_get_native_binary_args.moduleNativeBinary0, + *params->ppModuleNativeBinary, moduleGetNativeBinarySize0)); *params->phModule = module_get_native_binary_args.hModule1; *params->ppSize = &module_get_native_binary_args.size1; *params->ppModuleNativeBinary = module_get_native_binary_args.moduleNativeBinary1; @@ -627,8 +627,8 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingModuleGetNativeBina EXPECT_EQ(size, moduleGetNativeBinarySize1); EXPECT_EQ(module_get_native_binary_args.moduleNativeBinary1, *params->ppModuleNativeBinary); - EXPECT_TRUE(module_get_native_binary_native_binary_compare(module_get_native_binary_args.moduleNativeBinary1, - *params->ppModuleNativeBinary, moduleGetNativeBinarySize1)); + EXPECT_TRUE(moduleGetNativeBinaryNativeBinaryCompare(module_get_native_binary_args.moduleNativeBinary1, + *params->ppModuleNativeBinary, moduleGetNativeBinarySize1)); ASSERT_NE(nullptr, pTracerUserData); int *val = static_cast(pTracerUserData); EXPECT_EQ(*val, 2); @@ -661,8 +661,8 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingModuleGetNativeBina EXPECT_EQ(size, moduleGetNativeBinarySize1); EXPECT_EQ(module_get_native_binary_args.moduleNativeBinary1, *params->ppModuleNativeBinary); - EXPECT_TRUE(module_get_native_binary_native_binary_compare(module_get_native_binary_args.moduleNativeBinary1, - *params->ppModuleNativeBinary, moduleGetNativeBinarySize1)); + EXPECT_TRUE(moduleGetNativeBinaryNativeBinaryCompare(module_get_native_binary_args.moduleNativeBinary1, + *params->ppModuleNativeBinary, moduleGetNativeBinarySize1)); ASSERT_NE(nullptr, pTracerUserData); int *val = static_cast(pTracerUserData); EXPECT_EQ(*val, 11); @@ -693,8 +693,8 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingModuleGetNativeBina EXPECT_EQ(size, moduleGetNativeBinarySize1); EXPECT_EQ(module_get_native_binary_args.moduleNativeBinary1, *params->ppModuleNativeBinary); - EXPECT_TRUE(module_get_native_binary_native_binary_compare(module_get_native_binary_args.moduleNativeBinary1, - *params->ppModuleNativeBinary, moduleGetNativeBinarySize1)); + EXPECT_TRUE(moduleGetNativeBinaryNativeBinaryCompare(module_get_native_binary_args.moduleNativeBinary1, + *params->ppModuleNativeBinary, moduleGetNativeBinarySize1)); ASSERT_NE(nullptr, pTracerUserData); int *val = static_cast(pTracerUserData); EXPECT_EQ(*val, 21); @@ -725,8 +725,8 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingModuleGetNativeBina EXPECT_EQ(size, moduleGetNativeBinarySize1); EXPECT_EQ(module_get_native_binary_args.moduleNativeBinary1, *params->ppModuleNativeBinary); - EXPECT_TRUE(module_get_native_binary_native_binary_compare(module_get_native_binary_args.moduleNativeBinary1, - *params->ppModuleNativeBinary, moduleGetNativeBinarySize1)); + EXPECT_TRUE(moduleGetNativeBinaryNativeBinaryCompare(module_get_native_binary_args.moduleNativeBinary1, + *params->ppModuleNativeBinary, moduleGetNativeBinarySize1)); ASSERT_NE(nullptr, pTracerUserData); int *val = static_cast(pTracerUserData); EXPECT_EQ(*val, 31); @@ -761,8 +761,8 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingModuleGetNativeBina EXPECT_EQ(size, moduleGetNativeBinarySize1); EXPECT_EQ(module_get_native_binary_args.moduleNativeBinary1, *params->ppModuleNativeBinary); - EXPECT_TRUE(module_get_native_binary_native_binary_compare(module_get_native_binary_args.moduleNativeBinary1, - *params->ppModuleNativeBinary, moduleGetNativeBinarySize1)); + EXPECT_TRUE(moduleGetNativeBinaryNativeBinaryCompare(module_get_native_binary_args.moduleNativeBinary1, + *params->ppModuleNativeBinary, moduleGetNativeBinarySize1)); ASSERT_NE(nullptr, pTracerUserData); int *val = static_cast(pTracerUserData); EXPECT_EQ(*val, 62); @@ -774,7 +774,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingModuleGetNativeBina setTracerCallbacksAndEnableTracer(); - result = zeModuleGetNativeBinary_Tracing(module_get_native_binary_args.hModule0, &module_get_native_binary_args.size0, module_get_native_binary_args.moduleNativeBinary0); + result = zeModuleGetNativeBinaryTracing(module_get_native_binary_args.hModule0, &module_get_native_binary_args.size0, module_get_native_binary_args.moduleNativeBinary0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } diff --git a/level_zero/experimental/test/unit_tests/sources/tracing/test_module_api_tracing.cpp b/level_zero/experimental/test/unit_tests/sources/tracing/test_module_api_tracing.cpp index ba13ca9077..811db3c81a 100644 --- a/level_zero/experimental/test/unit_tests/sources/tracing/test_module_api_tracing.cpp +++ b/level_zero/experimental/test/unit_tests/sources/tracing/test_module_api_tracing.cpp @@ -23,7 +23,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingModuleCreateTracingWrapperWithOneSet setTracerCallbacksAndEnableTracer(); - result = zeModuleCreate_Tracing(nullptr, nullptr, &desc, &phModule, &phBuildLog); + result = zeModuleCreateTracing(nullptr, nullptr, &desc, &phModule, &phBuildLog); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -38,7 +38,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingModuleDestroyTracingWrapperWithOneSe setTracerCallbacksAndEnableTracer(); - result = zeModuleDestroy_Tracing(nullptr); + result = zeModuleDestroyTracing(nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -53,7 +53,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingModuleBuildLogDestroyTracingWrapperW setTracerCallbacksAndEnableTracer(); - result = zeModuleBuildLogDestroy_Tracing(nullptr); + result = zeModuleBuildLogDestroyTracing(nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -71,7 +71,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingModuleBuildLogGetStringTracingWrappe setTracerCallbacksAndEnableTracer(); - result = zeModuleBuildLogGetString_Tracing(nullptr, &pSize, &pBuildLog); + result = zeModuleBuildLogGetStringTracing(nullptr, &pSize, &pBuildLog); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -88,7 +88,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingModuleGetNativeBinaryTracingWrapperW setTracerCallbacksAndEnableTracer(); - result = zeModuleGetNativeBinary_Tracing(nullptr, &pSize, &pModuleNativeBinary); + result = zeModuleGetNativeBinaryTracing(nullptr, &pSize, &pModuleNativeBinary); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -106,7 +106,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingModuleGetGlobalPointerTracingWrapper setTracerCallbacksAndEnableTracer(); - result = zeModuleGetGlobalPointer_Tracing(nullptr, &pGlobalName, &size, &pptr); + result = zeModuleGetGlobalPointerTracing(nullptr, &pGlobalName, &size, &pptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -123,7 +123,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingKernelCreateTracingWrapperWithOneSet setTracerCallbacksAndEnableTracer(); - result = zeKernelCreate_Tracing(nullptr, &desc, &phKernel); + result = zeKernelCreateTracing(nullptr, &desc, &phKernel); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -138,7 +138,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingKernelDestroyTracingWrapperWithOneSe setTracerCallbacksAndEnableTracer(); - result = zeKernelDestroy_Tracing(nullptr); + result = zeKernelDestroyTracing(nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -155,7 +155,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingModuleGetFunctionPointerTracingWrapp setTracerCallbacksAndEnableTracer(); - result = zeModuleGetFunctionPointer_Tracing(nullptr, &pKernelName, &pfnFunction); + result = zeModuleGetFunctionPointerTracing(nullptr, &pKernelName, &pfnFunction); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -173,7 +173,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingKernelSetGroupSizeTracingWrapperWith setTracerCallbacksAndEnableTracer(); - result = zeKernelSetGroupSize_Tracing(nullptr, groupSizeX, groupSizeY, groupSizeZ); + result = zeKernelSetGroupSizeTracing(nullptr, groupSizeX, groupSizeY, groupSizeZ); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -194,7 +194,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingKernelSuggestGroupSizeTracingWrapper setTracerCallbacksAndEnableTracer(); - result = zeKernelSuggestGroupSize_Tracing(nullptr, globalSizeX, globalSizeY, globalSizeZ, &groupSizeX, &groupSizeY, &groupSizeZ); + result = zeKernelSuggestGroupSizeTracing(nullptr, globalSizeX, globalSizeY, globalSizeZ, &groupSizeX, &groupSizeY, &groupSizeZ); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -212,7 +212,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingKernelSetArgumentValueTracingWrapper setTracerCallbacksAndEnableTracer(); - result = zeKernelSetArgumentValue_Tracing(nullptr, argIndex, argSize, &pArgValue); + result = zeKernelSetArgumentValueTracing(nullptr, argIndex, argSize, &pArgValue); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -227,7 +227,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingKernelGetPropertiesTracingWrapperWit setTracerCallbacksAndEnableTracer(); - result = zeKernelGetProperties_Tracing(nullptr, nullptr); + result = zeKernelGetPropertiesTracing(nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -247,7 +247,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListAppendLaunchKernelTracing setTracerCallbacksAndEnableTracer(); - result = zeCommandListAppendLaunchKernel_Tracing(nullptr, nullptr, &pLaunchFuncArgs, hSignalEvent, numWaitEvents, &phWaitEvents); + result = zeCommandListAppendLaunchKernelTracing(nullptr, nullptr, &pLaunchFuncArgs, hSignalEvent, numWaitEvents, &phWaitEvents); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -267,7 +267,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListAppendLaunchKernelIndirec setTracerCallbacksAndEnableTracer(); - result = zeCommandListAppendLaunchKernelIndirect_Tracing(nullptr, nullptr, &pLaunchArgumentsBuffer, hSignalEvent, numWaitEvents, &phWaitEvents); + result = zeCommandListAppendLaunchKernelIndirectTracing(nullptr, nullptr, &pLaunchArgumentsBuffer, hSignalEvent, numWaitEvents, &phWaitEvents); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -291,7 +291,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListAppendLaunchMultipleKerne setTracerCallbacksAndEnableTracer(); - result = zeCommandListAppendLaunchMultipleKernelsIndirect_Tracing(nullptr, numKernels, &phKernels, &pNumLaunchArguments, &pLaunchArgumentsBuffer, hSignalEvent, numWaitEvents, &phWaitEvents); + result = zeCommandListAppendLaunchMultipleKernelsIndirectTracing(nullptr, numKernels, &phKernels, &pNumLaunchArguments, &pLaunchArgumentsBuffer, hSignalEvent, numWaitEvents, &phWaitEvents); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -306,7 +306,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingCommandListAppendLaunchCooperativeKe setTracerCallbacksAndEnableTracer(); - result = zeCommandListAppendLaunchCooperativeKernel_Tracing(nullptr, nullptr, nullptr, nullptr, 1, nullptr); + result = zeCommandListAppendLaunchCooperativeKernelTracing(nullptr, nullptr, nullptr, nullptr, 1, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -321,7 +321,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingModuleGetKernelNamesTracingWrapperWi setTracerCallbacksAndEnableTracer(); - result = zeModuleGetKernelNames_Tracing(nullptr, nullptr, nullptr); + result = zeModuleGetKernelNamesTracing(nullptr, nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -336,7 +336,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingKernelSuggestMaxCooperativeGroupCoun setTracerCallbacksAndEnableTracer(); - result = zeKernelSuggestMaxCooperativeGroupCount_Tracing(nullptr, nullptr); + result = zeKernelSuggestMaxCooperativeGroupCountTracing(nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -351,7 +351,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingKernelGetIndirectAccessTracingWrappe setTracerCallbacksAndEnableTracer(); - result = zeKernelGetIndirectAccess_Tracing(nullptr, nullptr); + result = zeKernelGetIndirectAccessTracing(nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -366,7 +366,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingKernelGetNameTracingWrapperWithOneSe setTracerCallbacksAndEnableTracer(); - result = zeKernelGetName_Tracing(nullptr, nullptr, nullptr); + result = zeKernelGetNameTracing(nullptr, nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -381,7 +381,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingKernelGetSourceAttributesTracingWrap setTracerCallbacksAndEnableTracer(); - result = zeKernelGetSourceAttributes_Tracing(nullptr, nullptr, nullptr); + result = zeKernelGetSourceAttributesTracing(nullptr, nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -396,7 +396,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingKernelSetIndirectAccessTracingWrappe setTracerCallbacksAndEnableTracer(); - result = zeKernelSetIndirectAccess_Tracing(nullptr, ZE_KERNEL_INDIRECT_ACCESS_FLAG_HOST); + result = zeKernelSetIndirectAccessTracing(nullptr, ZE_KERNEL_INDIRECT_ACCESS_FLAG_HOST); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -411,7 +411,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingModuleDynamicLinkTracingWrapperWithO setTracerCallbacksAndEnableTracer(); - result = zeModuleDynamicLink_Tracing(1U, nullptr, nullptr); + result = zeModuleDynamicLinkTracing(1U, nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -426,7 +426,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingModuleGetPropertiesTracingWrapperWit setTracerCallbacksAndEnableTracer(); - result = zeModuleGetProperties_Tracing(nullptr, nullptr); + result = zeModuleGetPropertiesTracing(nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } diff --git a/level_zero/experimental/test/unit_tests/sources/tracing/test_residency_api_tracing.cpp b/level_zero/experimental/test/unit_tests/sources/tracing/test_residency_api_tracing.cpp index 34ae0f18f1..394fa8d732 100644 --- a/level_zero/experimental/test/unit_tests/sources/tracing/test_residency_api_tracing.cpp +++ b/level_zero/experimental/test/unit_tests/sources/tracing/test_residency_api_tracing.cpp @@ -19,7 +19,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingContextCreateTracingWrapperWithOneSe setTracerCallbacksAndEnableTracer(); - result = zeContextCreate_Tracing(nullptr, nullptr, nullptr); + result = zeContextCreateTracing(nullptr, nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -33,7 +33,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingContextDestroyTracingWrapperWithOneS setTracerCallbacksAndEnableTracer(); - result = zeContextDestroy_Tracing(nullptr); + result = zeContextDestroyTracing(nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -47,7 +47,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingContextGetStatusTracingWrapperWithOn setTracerCallbacksAndEnableTracer(); - result = zeContextGetStatus_Tracing(nullptr); + result = zeContextGetStatusTracing(nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -61,7 +61,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingContextSystemBarrierTracingWrapperWi setTracerCallbacksAndEnableTracer(); - result = zeContextSystemBarrier_Tracing(nullptr, nullptr); + result = zeContextSystemBarrierTracing(nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -75,7 +75,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingContextMakeMemoryResidentTracingWrap setTracerCallbacksAndEnableTracer(); - result = zeContextMakeMemoryResident_Tracing(nullptr, nullptr, nullptr, 1024); + result = zeContextMakeMemoryResidentTracing(nullptr, nullptr, nullptr, 1024); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -89,7 +89,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingContextEvictMemoryTracingWrapperWith setTracerCallbacksAndEnableTracer(); - result = zeContextEvictMemory_Tracing(nullptr, nullptr, nullptr, 1024); + result = zeContextEvictMemoryTracing(nullptr, nullptr, nullptr, 1024); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -103,7 +103,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingContextMakeImageResidentTracingWrapp setTracerCallbacksAndEnableTracer(); - result = zeContextMakeImageResident_Tracing(nullptr, nullptr, nullptr); + result = zeContextMakeImageResidentTracing(nullptr, nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -117,7 +117,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingContextEvictImageTracingWrapperWithO setTracerCallbacksAndEnableTracer(); - result = zeContextEvictImage_Tracing(nullptr, nullptr, nullptr); + result = zeContextEvictImageTracing(nullptr, nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -284,7 +284,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, setTracerCallbacksAndEnableTracer(); - result = zeContextMakeMemoryResident_Tracing(MakeMemoryResident_args.hContext0, MakeMemoryResident_args.hDevice0, MakeMemoryResident_args.ptr0, MakeMemoryResident_args.size0); + result = zeContextMakeMemoryResidentTracing(MakeMemoryResident_args.hContext0, MakeMemoryResident_args.hDevice0, MakeMemoryResident_args.ptr0, MakeMemoryResident_args.size0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } @@ -447,7 +447,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, WhenCallingContextEvictMemoryT setTracerCallbacksAndEnableTracer(); - result = zeContextEvictMemory_Tracing(EvictMemory_args.hContext0, EvictMemory_args.hDevice0, EvictMemory_args.ptr0, EvictMemory_args.size0); + result = zeContextEvictMemoryTracing(EvictMemory_args.hContext0, EvictMemory_args.hDevice0, EvictMemory_args.ptr0, EvictMemory_args.size0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } @@ -602,7 +602,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, setTracerCallbacksAndEnableTracer(); - result = zeContextMakeImageResident_Tracing(MakeImageResident_args.hContext0, MakeImageResident_args.hDevice0, MakeImageResident_args.hImage0); + result = zeContextMakeImageResidentTracing(MakeImageResident_args.hContext0, MakeImageResident_args.hDevice0, MakeImageResident_args.hImage0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } @@ -757,7 +757,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, setTracerCallbacksAndEnableTracer(); - result = zeContextMakeImageResident_Tracing(EvictImage_args.hContext0, EvictImage_args.hDevice0, EvictImage_args.hImage0); + result = zeContextMakeImageResidentTracing(EvictImage_args.hContext0, EvictImage_args.hDevice0, EvictImage_args.hImage0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } diff --git a/level_zero/experimental/test/unit_tests/sources/tracing/test_sampler_api_tracing.cpp b/level_zero/experimental/test/unit_tests/sources/tracing/test_sampler_api_tracing.cpp index e1665c94b2..182ae7e941 100644 --- a/level_zero/experimental/test/unit_tests/sources/tracing/test_sampler_api_tracing.cpp +++ b/level_zero/experimental/test/unit_tests/sources/tracing/test_sampler_api_tracing.cpp @@ -19,7 +19,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingSamplerCreateTracingWrapperWithOneSe setTracerCallbacksAndEnableTracer(); - result = zeSamplerCreate_Tracing(nullptr, nullptr, nullptr, nullptr); + result = zeSamplerCreateTracing(nullptr, nullptr, nullptr, nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -33,7 +33,7 @@ TEST_F(zeAPITracingRuntimeTests, WhenCallingSamplerDestroyTracingWrapperWithOneS setTracerCallbacksAndEnableTracer(); - result = zeSamplerDestroy_Tracing(nullptr); + result = zeSamplerDestroyTracing(nullptr); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(defaultUserData, 1); } @@ -286,7 +286,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, setTracerCallbacksAndEnableTracer(); - result = zeSamplerCreate_Tracing(sampler_create_args.hContext0, sampler_create_args.hDevice0, &sampler_create_args.Desc0, &sampler_create_args.hSampler0); + result = zeSamplerCreateTracing(sampler_create_args.hContext0, sampler_create_args.hDevice0, &sampler_create_args.Desc0, &sampler_create_args.hSampler0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); EXPECT_EQ(sampler_create_args.hSampler1, sampler_create_args.hSamplerAPI); validateDefaultUserDataFinal(); @@ -418,7 +418,7 @@ TEST_F(zeAPITracingRuntimeMultipleArgumentsTests, setTracerCallbacksAndEnableTracer(); - result = zeSamplerDestroy_Tracing(sampler_destroy_args.hSampler0); + result = zeSamplerDestroyTracing(sampler_destroy_args.hSampler0); EXPECT_EQ(ZE_RESULT_SUCCESS, result); validateDefaultUserDataFinal(); } diff --git a/level_zero/source/inc/ze_intel_gpu.h b/level_zero/source/inc/ze_intel_gpu.h index 63ab4ca631..9e4a0d6481 100644 --- a/level_zero/source/inc/ze_intel_gpu.h +++ b/level_zero/source/inc/ze_intel_gpu.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,7 +11,7 @@ #include #include -inline bool getenv_tobool(const char *name) { +inline bool getEnvToBool(const char *name) { const char *env = getenv(name); if ((nullptr == env) || (0 == strcmp("0", env))) return false; diff --git a/level_zero/tools/test/black_box_tests/zello_metrics/zello_metrics.cpp b/level_zero/tools/test/black_box_tests/zello_metrics/zello_metrics.cpp index f8ff0d85d3..35582e6cf7 100644 --- a/level_zero/tools/test/black_box_tests/zello_metrics/zello_metrics.cpp +++ b/level_zero/tools/test/black_box_tests/zello_metrics/zello_metrics.cpp @@ -101,7 +101,7 @@ bool SingleDeviceTestRunner::run() { ////////////// /// query_test ////////////// -bool query_test() { +bool queryTest() { // This test verifies Query mode for a metric group for all devices OR specific device bool status = true; @@ -153,7 +153,7 @@ bool query_test() { /////////////// /// stream_test /////////////// -bool stream_test() { +bool streamTest() { // This test verifies Streamer mode for a metric group for all devices OR specific device @@ -205,7 +205,7 @@ bool stream_test() { //////////////////////////////////// /// stream_multi_metric_domain_test //////////////////////////////////// -bool stream_multi_metric_domain_test() { +bool streamMultiMetricDomainTest() { // This test validates that metric groups of different domains can be captured concurrently @@ -266,7 +266,7 @@ bool stream_multi_metric_domain_test() { ////////////////////////////////////////////// /// stream_mt_collection_workload_same_thread ////////////////////////////////////////////// -bool stream_mt_collection_workload_same_thread() { +bool streamMtCollectionWorkloadSameThread() { // This test collects Metrics on sub-devices from different threads // Each thread runs the workload and collects for a single sub-device @@ -329,7 +329,7 @@ bool stream_mt_collection_workload_same_thread() { //////////////////////////////////////////////////// /// stream_mt_collection_workload_different_threads //////////////////////////////////////////////////// -bool stream_mt_collection_workload_different_threads() { +bool streamMtCollectionWorkloadDifferentThreads() { // This test collects Metrics on one device from different threads // One thread collects metrics and other runs the workload @@ -417,7 +417,7 @@ bool stream_mt_collection_workload_different_threads() { ////////////////////////////////////////////// /// stream_mp_collection_workload_same_process ////////////////////////////////////////////// -bool stream_mp_collection_workload_same_process() { +bool streamMpCollectionWorkloadSameProcess() { // This test collects Metric on devices from different processes // Each process runs the workload and collects for a single device @@ -482,7 +482,7 @@ bool stream_mp_collection_workload_same_process() { //////////////////////////////////////////////////// /// stream_mp_collection_workload_different_process //////////////////////////////////////////////////// -bool stream_mp_collection_workload_different_process() { +bool streamMpCollectionWorkloadDifferentProcess() { // This test collects EuStallSampling Metric on one process and runs the workload on another process @@ -583,13 +583,13 @@ int main(int argc, char *argv[]) { std::map> tests; - tests["query_test"] = query_test; - tests["stream_test"] = stream_test; - tests["stream_multi_metric_domain_test"] = stream_multi_metric_domain_test; - tests["stream_mt_collection_workload_same_thread"] = stream_mt_collection_workload_same_thread; - tests["stream_mt_collection_workload_different_threads"] = stream_mt_collection_workload_different_threads; - tests["stream_mp_collection_workload_same_process"] = stream_mp_collection_workload_same_process; - tests["stream_mp_collection_workload_different_process"] = stream_mp_collection_workload_different_process; + tests["query_test"] = queryTest; + tests["stream_test"] = streamTest; + tests["stream_multi_metric_domain_test"] = streamMultiMetricDomainTest; + tests["stream_mt_collection_workload_same_thread"] = streamMtCollectionWorkloadSameThread; + tests["stream_mt_collection_workload_different_threads"] = streamMtCollectionWorkloadDifferentThreads; + tests["stream_mp_collection_workload_same_process"] = streamMpCollectionWorkloadSameProcess; + tests["stream_mp_collection_workload_different_process"] = streamMpCollectionWorkloadDifferentProcess; auto testSettings = zmu::TestSettings::get(); testSettings->parseArguments(argc, argv); diff --git a/opencl/source/api/api.cpp b/opencl/source/api/api.cpp index 67bdbf6685..056c05ca20 100644 --- a/opencl/source/api/api.cpp +++ b/opencl/source/api/api.cpp @@ -149,7 +149,7 @@ cl_int CL_API_CALL clGetPlatformInfo(cl_platform_id platform, DBG_LOG_INPUTS("platform", platform, "paramName", paramName, "paramValueSize", paramValueSize, - "paramValue", NEO::FileLoggerInstance().infoPointerToString(paramValue, paramValueSize), + "paramValue", NEO::fileLoggerInstance().infoPointerToString(paramValue, paramValueSize), "paramValueSizeRet", paramValueSizeRet); auto pPlatform = castToObject(platform); if (pPlatform) { @@ -296,7 +296,7 @@ cl_int CL_API_CALL clGetDeviceInfo(cl_device_id device, TRACING_ENTER(clGetDeviceInfo, &device, ¶mName, ¶mValueSize, ¶mValue, ¶mValueSizeRet); cl_int retVal = CL_INVALID_DEVICE; API_ENTER(&retVal); - DBG_LOG_INPUTS("clDevice", device, "paramName", paramName, "paramValueSize", paramValueSize, "paramValue", NEO::FileLoggerInstance().infoPointerToString(paramValue, paramValueSize), "paramValueSizeRet", paramValueSizeRet); + DBG_LOG_INPUTS("clDevice", device, "paramName", paramName, "paramValueSize", paramValueSize, "paramValue", NEO::fileLoggerInstance().infoPointerToString(paramValue, paramValueSize), "paramValueSizeRet", paramValueSizeRet); ClDevice *pDevice = castToObject(device); if (pDevice != nullptr) { @@ -525,7 +525,7 @@ cl_int CL_API_CALL clGetContextInfo(cl_context context, DBG_LOG_INPUTS("context", context, "paramName", paramName, "paramValueSize", paramValueSize, - "paramValue", NEO::FileLoggerInstance().infoPointerToString(paramValue, paramValueSize), + "paramValue", NEO::fileLoggerInstance().infoPointerToString(paramValue, paramValueSize), "paramValueSizeRet", paramValueSizeRet); auto pContext = castToObject(context); @@ -562,8 +562,8 @@ cl_command_queue CL_API_CALL clCreateCommandQueue(cl_context context, ClDevice *pDevice = nullptr; retVal = validateObjects( - WithCastToInternal(context, &pContext), - WithCastToInternal(device, &pDevice)); + withCastToInternal(context, &pContext), + withCastToInternal(device, &pDevice)); if (retVal != CL_SUCCESS) { break; @@ -642,7 +642,7 @@ cl_int CL_API_CALL clGetCommandQueueInfo(cl_command_queue commandQueue, DBG_LOG_INPUTS("commandQueue", commandQueue, "paramName", paramName, "paramValueSize", paramValueSize, - "paramValue", NEO::FileLoggerInstance().infoPointerToString(paramValue, paramValueSize), + "paramValue", NEO::fileLoggerInstance().infoPointerToString(paramValue, paramValueSize), "paramValueSizeRet", paramValueSizeRet); getQueueInfo(commandQueue, paramName, paramValueSize, paramValue, paramValueSizeRet, retVal); @@ -685,7 +685,7 @@ cl_mem CL_API_CALL clCreateBuffer(cl_context context, DBG_LOG_INPUTS("cl_context", context, "cl_mem_flags", flags, "size", size, - "hostPtr", NEO::FileLoggerInstance().infoPointerToString(hostPtr, size)); + "hostPtr", NEO::fileLoggerInstance().infoPointerToString(hostPtr, size)); cl_int retVal = CL_SUCCESS; API_ENTER(&retVal); @@ -714,7 +714,7 @@ cl_mem CL_API_CALL clCreateBufferWithProperties(cl_context context, "cl_mem_properties", properties, "cl_mem_flags", flags, "size", size, - "hostPtr", NEO::FileLoggerInstance().infoPointerToString(hostPtr, size)); + "hostPtr", NEO::fileLoggerInstance().infoPointerToString(hostPtr, size)); cl_int retVal = CL_SUCCESS; API_ENTER(&retVal); @@ -741,7 +741,7 @@ cl_mem CL_API_CALL clCreateBufferWithPropertiesINTEL(cl_context context, "cl_mem_properties_intel", properties, "cl_mem_flags", flags, "size", size, - "hostPtr", NEO::FileLoggerInstance().infoPointerToString(hostPtr, size)); + "hostPtr", NEO::fileLoggerInstance().infoPointerToString(hostPtr, size)); cl_int retVal = CL_SUCCESS; API_ENTER(&retVal); @@ -1147,10 +1147,10 @@ cl_int CL_API_CALL clGetMemObjectInfo(cl_mem memobj, DBG_LOG_INPUTS("memobj", memobj, "paramName", paramName, "paramValueSize", paramValueSize, - "paramValue", NEO::FileLoggerInstance().infoPointerToString(paramValue, paramValueSize), + "paramValue", NEO::fileLoggerInstance().infoPointerToString(paramValue, paramValueSize), "paramValueSizeRet", paramValueSizeRet); MemObj *pMemObj = nullptr; - retVal = validateObjects(WithCastToInternal(memobj, &pMemObj)); + retVal = validateObjects(withCastToInternal(memobj, &pMemObj)); if (CL_SUCCESS != retVal) { TRACING_EXIT(clGetMemObjectInfo, &retVal); return retVal; @@ -1173,7 +1173,7 @@ cl_int CL_API_CALL clGetImageInfo(cl_mem image, DBG_LOG_INPUTS("image", image, "paramName", paramName, "paramValueSize", paramValueSize, - "paramValue", NEO::FileLoggerInstance().infoPointerToString(paramValue, paramValueSize), + "paramValue", NEO::fileLoggerInstance().infoPointerToString(paramValue, paramValueSize), "paramValueSizeRet", paramValueSizeRet); retVal = validateObjects(image); if (CL_SUCCESS != retVal) { @@ -1330,7 +1330,7 @@ cl_int CL_API_CALL clGetSamplerInfo(cl_sampler sampler, DBG_LOG_INPUTS("sampler", sampler, "paramName", paramName, "paramValueSize", paramValueSize, - "paramValue", NEO::FileLoggerInstance().infoPointerToString(paramValue, paramValueSize), + "paramValue", NEO::fileLoggerInstance().infoPointerToString(paramValue, paramValueSize), "paramValueSizeRet", paramValueSizeRet); auto pSampler = castToObject(sampler); @@ -1357,7 +1357,7 @@ cl_program CL_API_CALL clCreateProgramWithSource(cl_context context, "strings", strings, "lengths", lengths); Context *pContext = nullptr; - retVal = validateObjects(WithCastToInternal(context, &pContext), count, strings); + retVal = validateObjects(withCastToInternal(context, &pContext), count, strings); cl_program program = nullptr; if (CL_SUCCESS == retVal) { @@ -1394,7 +1394,7 @@ cl_program CL_API_CALL clCreateProgramWithBinary(cl_context context, "binaries", binaries, "binaryStatus", binaryStatus); Context *pContext = nullptr; - retVal = validateObjects(WithCastToInternal(context, &pContext), deviceList, numDevices, binaries, lengths); + retVal = validateObjects(withCastToInternal(context, &pContext), deviceList, numDevices, binaries, lengths); cl_program program = nullptr; ClDeviceVector deviceVector; @@ -1413,7 +1413,7 @@ cl_program CL_API_CALL clCreateProgramWithBinary(cl_context context, } } - NEO::FileLoggerInstance().dumpBinaryProgram(numDevices, lengths, binaries); + NEO::fileLoggerInstance().dumpBinaryProgram(numDevices, lengths, binaries); if (CL_SUCCESS == retVal) { program = Program::create( @@ -1446,7 +1446,7 @@ cl_program CL_API_CALL clCreateProgramWithIL(cl_context context, cl_program program = nullptr; Context *pContext = nullptr; - retVal = validateObjects(WithCastToInternal(context, &pContext), il); + retVal = validateObjects(withCastToInternal(context, &pContext), il); if (retVal == CL_SUCCESS) { program = ProgramFunctions::createFromIL( pContext, @@ -1478,7 +1478,7 @@ cl_program CL_API_CALL clCreateProgramWithBuiltInKernels(cl_context context, cl_program program = nullptr; Context *pContext = nullptr; - retVal = validateObjects(WithCastToInternal(context, &pContext), numDevices, + retVal = validateObjects(withCastToInternal(context, &pContext), numDevices, deviceList, kernelNames, errcodeRet); if (retVal == CL_SUCCESS) { @@ -1553,7 +1553,7 @@ cl_int CL_API_CALL clBuildProgram(cl_program program, DBG_LOG_INPUTS("clProgram", program, "numDevices", numDevices, "cl_device_id", deviceList, "options", (options != nullptr) ? options : "", "funcNotify", funcNotify, "userData", userData); Program *pProgram = nullptr; - retVal = validateObjects(WithCastToInternal(program, &pProgram), Program::isValidCallback(funcNotify, userData)); + retVal = validateObjects(withCastToInternal(program, &pProgram), Program::isValidCallback(funcNotify, userData)); if (CL_SUCCESS == retVal) { if (pProgram->isLocked()) { @@ -1592,7 +1592,7 @@ cl_int CL_API_CALL clCompileProgram(cl_program program, Program *pProgram = nullptr; - retVal = validateObjects(WithCastToInternal(program, &pProgram), Program::isValidCallback(funcNotify, userData)); + retVal = validateObjects(withCastToInternal(program, &pProgram), Program::isValidCallback(funcNotify, userData)); if (CL_SUCCESS == retVal) { if (pProgram->isLocked()) { @@ -1634,7 +1634,7 @@ cl_program CL_API_CALL clLinkProgram(cl_context context, Context *pContext = nullptr; Program *pProgram = nullptr; - retVal = validateObjects(WithCastToInternal(context, &pContext), Program::isValidCallback(funcNotify, userData)); + retVal = validateObjects(withCastToInternal(context, &pContext), Program::isValidCallback(funcNotify, userData)); ClDeviceVector deviceVector; ClDeviceVector *deviceVectorPtr = &deviceVector; @@ -1678,7 +1678,7 @@ cl_int CL_API_CALL clGetProgramInfo(cl_program program, API_ENTER(&retVal); DBG_LOG_INPUTS("clProgram", program, "paramName", paramName, "paramValueSize", paramValueSize, - "paramValue", NEO::FileLoggerInstance().infoPointerToString(paramValue, paramValueSize), + "paramValue", NEO::fileLoggerInstance().infoPointerToString(paramValue, paramValueSize), "paramValueSizeRet", paramValueSizeRet); retVal = validateObjects(program); @@ -1705,13 +1705,13 @@ cl_int CL_API_CALL clGetProgramBuildInfo(cl_program program, cl_int retVal = CL_SUCCESS; API_ENTER(&retVal); DBG_LOG_INPUTS("clProgram", program, "cl_device_id", device, - "paramName", NEO::FileLoggerInstance().infoPointerToString(paramValue, paramValueSize), + "paramName", NEO::fileLoggerInstance().infoPointerToString(paramValue, paramValueSize), "paramValueSize", paramValueSize, "paramValue", paramValue, "paramValueSizeRet", paramValueSizeRet); Program *pProgram = nullptr; ClDevice *pClDevice = nullptr; - retVal = validateObjects(WithCastToInternal(program, &pProgram), WithCastToInternal(device, &pClDevice)); + retVal = validateObjects(withCastToInternal(program, &pProgram), withCastToInternal(device, &pClDevice)); if (CL_SUCCESS == retVal) { if (!pProgram->isDeviceAssociated(*pClDevice)) { @@ -1881,9 +1881,9 @@ cl_int CL_API_CALL clSetKernelArg(cl_kernel kernel, cl_int retVal = CL_SUCCESS; API_ENTER(&retVal); MultiDeviceKernel *pMultiDeviceKernel = nullptr; - retVal = validateObject(WithCastToInternal(kernel, &pMultiDeviceKernel)); + retVal = validateObject(withCastToInternal(kernel, &pMultiDeviceKernel)); DBG_LOG_INPUTS("kernel", kernel, "argIndex", argIndex, - "argSize", argSize, "argValue", NEO::FileLoggerInstance().infoPointerToString(argValue, argSize)); + "argSize", argSize, "argValue", NEO::fileLoggerInstance().infoPointerToString(argValue, argSize)); do { if (retVal != CL_SUCCESS) { break; @@ -1918,10 +1918,10 @@ cl_int CL_API_CALL clGetKernelInfo(cl_kernel kernel, API_ENTER(&retVal); DBG_LOG_INPUTS("kernel", kernel, "paramName", paramName, "paramValueSize", paramValueSize, - "paramValue", NEO::FileLoggerInstance().infoPointerToString(paramValue, paramValueSize), + "paramValue", NEO::fileLoggerInstance().infoPointerToString(paramValue, paramValueSize), "paramValueSizeRet", paramValueSizeRet); MultiDeviceKernel *pMultiDeviceKernel = nullptr; - retVal = validateObject(WithCastToInternal(kernel, &pMultiDeviceKernel)); + retVal = validateObject(withCastToInternal(kernel, &pMultiDeviceKernel)); if (retVal == CL_SUCCESS) { retVal = pMultiDeviceKernel->getInfo( paramName, @@ -1947,7 +1947,7 @@ cl_int CL_API_CALL clGetKernelArgInfo(cl_kernel kernel, "argIndx", argIndx, "paramName", paramName, "paramValueSize", paramValueSize, - "paramValue", NEO::FileLoggerInstance().infoPointerToString(paramValue, paramValueSize), + "paramValue", NEO::fileLoggerInstance().infoPointerToString(paramValue, paramValueSize), "paramValueSizeRet", paramValueSizeRet); auto pMultiDeviceKernel = castToObject(kernel); @@ -1977,18 +1977,18 @@ cl_int CL_API_CALL clGetKernelWorkGroupInfo(cl_kernel kernel, "device", device, "paramName", paramName, "paramValueSize", paramValueSize, - "paramValue", NEO::FileLoggerInstance().infoPointerToString(paramValue, paramValueSize), + "paramValue", NEO::fileLoggerInstance().infoPointerToString(paramValue, paramValueSize), "paramValueSizeRet", paramValueSizeRet); MultiDeviceKernel *pMultiDeviceKernel = nullptr; - retVal = validateObjects(WithCastToInternal(kernel, &pMultiDeviceKernel)); + retVal = validateObjects(withCastToInternal(kernel, &pMultiDeviceKernel)); ClDevice *pClDevice = nullptr; if (CL_SUCCESS == retVal) { if (pMultiDeviceKernel->getDevices().size() == 1u && !device) { pClDevice = pMultiDeviceKernel->getDevices()[0]; } else { - retVal = validateObjects(WithCastToInternal(device, &pClDevice)); + retVal = validateObjects(withCastToInternal(device, &pClDevice)); } } if (CL_SUCCESS == retVal) { @@ -2036,7 +2036,7 @@ cl_int CL_API_CALL clGetEventInfo(cl_event event, DBG_LOG_INPUTS("event", event, "paramName", paramName, "paramValueSize", paramValueSize, - "paramValue", NEO::FileLoggerInstance().infoPointerToString(paramValue, paramValueSize), + "paramValue", NEO::fileLoggerInstance().infoPointerToString(paramValue, paramValueSize), "paramValueSizeRet", paramValueSizeRet); Event *neoEvent = castToObject(event); @@ -2248,7 +2248,7 @@ cl_int CL_API_CALL clGetEventProfilingInfo(cl_event event, DBG_LOG_INPUTS("event", event, "paramName", paramName, "paramValueSize", paramValueSize, - "paramValue", NEO::FileLoggerInstance().infoPointerToString(paramValue, paramValueSize), + "paramValue", NEO::fileLoggerInstance().infoPointerToString(paramValue, paramValueSize), "paramValueSizeRet", paramValueSizeRet); auto eventObject = castToObject(event); @@ -2308,8 +2308,8 @@ cl_int CL_API_CALL clEnqueueReadBuffer(cl_command_queue commandQueue, Buffer *pBuffer = nullptr; auto retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), - WithCastToInternal(buffer, &pBuffer), + withCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(buffer, &pBuffer), ptr); API_ENTER(&retVal); @@ -2371,15 +2371,15 @@ cl_int CL_API_CALL clEnqueueReadBufferRect(cl_command_queue commandQueue, DBG_LOG_INPUTS("commandQueue", commandQueue, "buffer", buffer, "blockingRead", blockingRead, - "bufferOrigin[0]", NEO::FileLoggerInstance().getInput(bufferOrigin, 0), - "bufferOrigin[1]", NEO::FileLoggerInstance().getInput(bufferOrigin, 1), - "bufferOrigin[2]", NEO::FileLoggerInstance().getInput(bufferOrigin, 2), - "hostOrigin[0]", NEO::FileLoggerInstance().getInput(hostOrigin, 0), - "hostOrigin[1]", NEO::FileLoggerInstance().getInput(hostOrigin, 1), - "hostOrigin[2]", NEO::FileLoggerInstance().getInput(hostOrigin, 2), - "region[0]", NEO::FileLoggerInstance().getInput(region, 0), - "region[1]", NEO::FileLoggerInstance().getInput(region, 1), - "region[2]", NEO::FileLoggerInstance().getInput(region, 2), + "bufferOrigin[0]", NEO::fileLoggerInstance().getInput(bufferOrigin, 0), + "bufferOrigin[1]", NEO::fileLoggerInstance().getInput(bufferOrigin, 1), + "bufferOrigin[2]", NEO::fileLoggerInstance().getInput(bufferOrigin, 2), + "hostOrigin[0]", NEO::fileLoggerInstance().getInput(hostOrigin, 0), + "hostOrigin[1]", NEO::fileLoggerInstance().getInput(hostOrigin, 1), + "hostOrigin[2]", NEO::fileLoggerInstance().getInput(hostOrigin, 2), + "region[0]", NEO::fileLoggerInstance().getInput(region, 0), + "region[1]", NEO::fileLoggerInstance().getInput(region, 1), + "region[2]", NEO::fileLoggerInstance().getInput(region, 2), "bufferRowPitch", bufferRowPitch, "bufferSlicePitch", bufferSlicePitch, "hostRowPitch", hostRowPitch, @@ -2393,8 +2393,8 @@ cl_int CL_API_CALL clEnqueueReadBufferRect(cl_command_queue commandQueue, Buffer *pBuffer = nullptr; retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), - WithCastToInternal(buffer, &pBuffer), + withCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(buffer, &pBuffer), ptr); if (CL_SUCCESS != retVal) { @@ -2467,8 +2467,8 @@ cl_int CL_API_CALL clEnqueueWriteBuffer(cl_command_queue commandQueue, Buffer *pBuffer = nullptr; retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), - WithCastToInternal(buffer, &pBuffer), + withCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(buffer, &pBuffer), ptr); if (CL_SUCCESS == retVal) { @@ -2521,9 +2521,9 @@ cl_int CL_API_CALL clEnqueueWriteBufferRect(cl_command_queue commandQueue, API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, "buffer", buffer, "blockingWrite", blockingWrite, - "bufferOrigin[0]", NEO::FileLoggerInstance().getInput(bufferOrigin, 0), "bufferOrigin[1]", NEO::FileLoggerInstance().getInput(bufferOrigin, 1), "bufferOrigin[2]", NEO::FileLoggerInstance().getInput(bufferOrigin, 2), - "hostOrigin[0]", NEO::FileLoggerInstance().getInput(hostOrigin, 0), "hostOrigin[1]", NEO::FileLoggerInstance().getInput(hostOrigin, 1), "hostOrigin[2]", NEO::FileLoggerInstance().getInput(hostOrigin, 2), - "region[0]", NEO::FileLoggerInstance().getInput(region, 0), "region[1]", NEO::FileLoggerInstance().getInput(region, 1), "region[2]", NEO::FileLoggerInstance().getInput(region, 2), + "bufferOrigin[0]", NEO::fileLoggerInstance().getInput(bufferOrigin, 0), "bufferOrigin[1]", NEO::fileLoggerInstance().getInput(bufferOrigin, 1), "bufferOrigin[2]", NEO::fileLoggerInstance().getInput(bufferOrigin, 2), + "hostOrigin[0]", NEO::fileLoggerInstance().getInput(hostOrigin, 0), "hostOrigin[1]", NEO::fileLoggerInstance().getInput(hostOrigin, 1), "hostOrigin[2]", NEO::fileLoggerInstance().getInput(hostOrigin, 2), + "region[0]", NEO::fileLoggerInstance().getInput(region, 0), "region[1]", NEO::fileLoggerInstance().getInput(region, 1), "region[2]", NEO::fileLoggerInstance().getInput(region, 2), "bufferRowPitch", bufferRowPitch, "bufferSlicePitch", bufferSlicePitch, "hostRowPitch", hostRowPitch, "hostSlicePitch", hostSlicePitch, "ptr", ptr, "numEventsInWaitList", numEventsInWaitList, @@ -2534,8 +2534,8 @@ cl_int CL_API_CALL clEnqueueWriteBufferRect(cl_command_queue commandQueue, Buffer *pBuffer = nullptr; retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), - WithCastToInternal(buffer, &pBuffer), + withCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(buffer, &pBuffer), ptr); if (CL_SUCCESS != retVal) { @@ -2600,7 +2600,7 @@ cl_int CL_API_CALL clEnqueueFillBuffer(cl_command_queue commandQueue, API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, "buffer", buffer, - "pattern", NEO::FileLoggerInstance().infoPointerToString(pattern, patternSize), "patternSize", patternSize, + "pattern", NEO::fileLoggerInstance().infoPointerToString(pattern, patternSize), "patternSize", patternSize, "offset", offset, "size", size, "numEventsInWaitList", numEventsInWaitList, "eventWaitList", getClFileLogger().getEvents(reinterpret_cast(eventWaitList), numEventsInWaitList), @@ -2610,8 +2610,8 @@ cl_int CL_API_CALL clEnqueueFillBuffer(cl_command_queue commandQueue, Buffer *pBuffer = nullptr; retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), - WithCastToInternal(buffer, &pBuffer), + withCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(buffer, &pBuffer), pattern, (PatternSize)patternSize, EventWaitList(numEventsInWaitList, eventWaitList)); @@ -2661,9 +2661,9 @@ cl_int CL_API_CALL clEnqueueCopyBuffer(cl_command_queue commandQueue, Buffer *pDstBuffer = nullptr; retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), - WithCastToInternal(srcBuffer, &pSrcBuffer), - WithCastToInternal(dstBuffer, &pDstBuffer)); + withCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(srcBuffer, &pSrcBuffer), + withCastToInternal(dstBuffer, &pDstBuffer)); if (CL_SUCCESS == retVal) { size_t srcSize = pSrcBuffer->getSize(); @@ -2713,9 +2713,9 @@ cl_int CL_API_CALL clEnqueueCopyBufferRect(cl_command_queue commandQueue, API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, "srcBuffer", srcBuffer, "dstBuffer", dstBuffer, - "srcOrigin[0]", NEO::FileLoggerInstance().getInput(srcOrigin, 0), "srcOrigin[1]", NEO::FileLoggerInstance().getInput(srcOrigin, 1), "srcOrigin[2]", NEO::FileLoggerInstance().getInput(srcOrigin, 2), - "dstOrigin[0]", NEO::FileLoggerInstance().getInput(dstOrigin, 0), "dstOrigin[1]", NEO::FileLoggerInstance().getInput(dstOrigin, 1), "dstOrigin[2]", NEO::FileLoggerInstance().getInput(dstOrigin, 2), - "region[0]", NEO::FileLoggerInstance().getInput(region, 0), "region[1]", NEO::FileLoggerInstance().getInput(region, 1), "region[2]", NEO::FileLoggerInstance().getInput(region, 2), + "srcOrigin[0]", NEO::fileLoggerInstance().getInput(srcOrigin, 0), "srcOrigin[1]", NEO::fileLoggerInstance().getInput(srcOrigin, 1), "srcOrigin[2]", NEO::fileLoggerInstance().getInput(srcOrigin, 2), + "dstOrigin[0]", NEO::fileLoggerInstance().getInput(dstOrigin, 0), "dstOrigin[1]", NEO::fileLoggerInstance().getInput(dstOrigin, 1), "dstOrigin[2]", NEO::fileLoggerInstance().getInput(dstOrigin, 2), + "region[0]", NEO::fileLoggerInstance().getInput(region, 0), "region[1]", NEO::fileLoggerInstance().getInput(region, 1), "region[2]", NEO::fileLoggerInstance().getInput(region, 2), "srcRowPitch", srcRowPitch, "srcSlicePitch", srcSlicePitch, "dstRowPitch", dstRowPitch, "dstSlicePitch", dstSlicePitch, "numEventsInWaitList", numEventsInWaitList, @@ -2727,9 +2727,9 @@ cl_int CL_API_CALL clEnqueueCopyBufferRect(cl_command_queue commandQueue, Buffer *pDstBuffer = nullptr; retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), - WithCastToInternal(srcBuffer, &pSrcBuffer), - WithCastToInternal(dstBuffer, &pDstBuffer)); + withCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(srcBuffer, &pSrcBuffer), + withCastToInternal(dstBuffer, &pDstBuffer)); if (CL_SUCCESS == retVal) { @@ -2793,14 +2793,14 @@ cl_int CL_API_CALL clEnqueueReadImage(cl_command_queue commandQueue, Image *pImage = nullptr; auto retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), - WithCastToInternal(image, &pImage)); + withCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(image, &pImage)); API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, "image", image, "blockingRead", blockingRead, - "origin[0]", NEO::FileLoggerInstance().getInput(origin, 0), "origin[1]", NEO::FileLoggerInstance().getInput(origin, 1), "origin[2]", NEO::FileLoggerInstance().getInput(origin, 2), - "region[0]", NEO::FileLoggerInstance().getInput(region, 0), "region[1]", NEO::FileLoggerInstance().getInput(region, 1), "region[2]", NEO::FileLoggerInstance().getInput(region, 2), + "origin[0]", NEO::fileLoggerInstance().getInput(origin, 0), "origin[1]", NEO::fileLoggerInstance().getInput(origin, 1), "origin[2]", NEO::fileLoggerInstance().getInput(origin, 2), + "region[0]", NEO::fileLoggerInstance().getInput(region, 0), "region[1]", NEO::fileLoggerInstance().getInput(region, 1), "region[2]", NEO::fileLoggerInstance().getInput(region, 2), "rowPitch", rowPitch, "slicePitch", slicePitch, "ptr", ptr, "numEventsInWaitList", numEventsInWaitList, "eventWaitList", getClFileLogger().getEvents(reinterpret_cast(eventWaitList), numEventsInWaitList), @@ -2867,14 +2867,14 @@ cl_int CL_API_CALL clEnqueueWriteImage(cl_command_queue commandQueue, Image *pImage = nullptr; auto retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), - WithCastToInternal(image, &pImage)); + withCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(image, &pImage)); API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, "image", image, "blockingWrite", blockingWrite, - "origin[0]", NEO::FileLoggerInstance().getInput(origin, 0), "origin[1]", NEO::FileLoggerInstance().getInput(origin, 1), "origin[2]", NEO::FileLoggerInstance().getInput(origin, 2), - "region[0]", NEO::FileLoggerInstance().getInput(region, 0), "region[1]", NEO::FileLoggerInstance().getInput(region, 1), "region[2]", NEO::FileLoggerInstance().getInput(region, 2), + "origin[0]", NEO::fileLoggerInstance().getInput(origin, 0), "origin[1]", NEO::fileLoggerInstance().getInput(origin, 1), "origin[2]", NEO::fileLoggerInstance().getInput(origin, 2), + "region[0]", NEO::fileLoggerInstance().getInput(region, 0), "region[1]", NEO::fileLoggerInstance().getInput(region, 1), "region[2]", NEO::fileLoggerInstance().getInput(region, 2), "inputRowPitch", inputRowPitch, "inputSlicePitch", inputSlicePitch, "ptr", ptr, "numEventsInWaitList", numEventsInWaitList, "eventWaitList", getClFileLogger().getEvents(reinterpret_cast(eventWaitList), numEventsInWaitList), @@ -2937,16 +2937,16 @@ cl_int CL_API_CALL clEnqueueFillImage(cl_command_queue commandQueue, Image *dstImage = nullptr; auto retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), - WithCastToInternal(image, &dstImage), + withCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(image, &dstImage), fillColor, EventWaitList(numEventsInWaitList, eventWaitList)); API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, "image", image, "fillColor", fillColor, - "origin[0]", NEO::FileLoggerInstance().getInput(origin, 0), "origin[1]", NEO::FileLoggerInstance().getInput(origin, 1), "origin[2]", NEO::FileLoggerInstance().getInput(origin, 2), - "region[0]", NEO::FileLoggerInstance().getInput(region, 0), "region[1]", NEO::FileLoggerInstance().getInput(region, 1), "region[2]", NEO::FileLoggerInstance().getInput(region, 2), + "origin[0]", NEO::fileLoggerInstance().getInput(origin, 0), "origin[1]", NEO::fileLoggerInstance().getInput(origin, 1), "origin[2]", NEO::fileLoggerInstance().getInput(origin, 2), + "region[0]", NEO::fileLoggerInstance().getInput(region, 0), "region[1]", NEO::fileLoggerInstance().getInput(region, 1), "region[2]", NEO::fileLoggerInstance().getInput(region, 2), "numEventsInWaitList", numEventsInWaitList, "eventWaitList", getClFileLogger().getEvents(reinterpret_cast(eventWaitList), numEventsInWaitList), "event", getClFileLogger().getEvents(reinterpret_cast(event), 1)); @@ -2993,15 +2993,15 @@ cl_int CL_API_CALL clEnqueueCopyImage(cl_command_queue commandQueue, Image *pSrcImage = nullptr; Image *pDstImage = nullptr; - auto retVal = validateObjects(WithCastToInternal(commandQueue, &pCommandQueue), - WithCastToInternal(srcImage, &pSrcImage), - WithCastToInternal(dstImage, &pDstImage)); + auto retVal = validateObjects(withCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(srcImage, &pSrcImage), + withCastToInternal(dstImage, &pDstImage)); API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, "srcImage", srcImage, "dstImage", dstImage, - "srcOrigin[0]", NEO::FileLoggerInstance().getInput(srcOrigin, 0), "srcOrigin[1]", NEO::FileLoggerInstance().getInput(srcOrigin, 1), "srcOrigin[2]", NEO::FileLoggerInstance().getInput(srcOrigin, 2), - "dstOrigin[0]", NEO::FileLoggerInstance().getInput(dstOrigin, 0), "dstOrigin[1]", NEO::FileLoggerInstance().getInput(dstOrigin, 1), "dstOrigin[2]", NEO::FileLoggerInstance().getInput(dstOrigin, 2), + "srcOrigin[0]", NEO::fileLoggerInstance().getInput(srcOrigin, 0), "srcOrigin[1]", NEO::fileLoggerInstance().getInput(srcOrigin, 1), "srcOrigin[2]", NEO::fileLoggerInstance().getInput(srcOrigin, 2), + "dstOrigin[0]", NEO::fileLoggerInstance().getInput(dstOrigin, 0), "dstOrigin[1]", NEO::fileLoggerInstance().getInput(dstOrigin, 1), "dstOrigin[2]", NEO::fileLoggerInstance().getInput(dstOrigin, 2), "region[0]", region ? region[0] : 0, "region[1]", region ? region[1] : 0, "region[2]", region ? region[2] : 0, "numEventsInWaitList", numEventsInWaitList, "eventWaitList", getClFileLogger().getEvents(reinterpret_cast(eventWaitList), numEventsInWaitList), @@ -3079,8 +3079,8 @@ cl_int CL_API_CALL clEnqueueCopyImageToBuffer(cl_command_queue commandQueue, API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, "srcImage", srcImage, "dstBuffer", dstBuffer, - "srcOrigin[0]", NEO::FileLoggerInstance().getInput(srcOrigin, 0), "srcOrigin[1]", NEO::FileLoggerInstance().getInput(srcOrigin, 1), "srcOrigin[2]", NEO::FileLoggerInstance().getInput(srcOrigin, 2), - "region[0]", NEO::FileLoggerInstance().getInput(region, 0), "region[1]", NEO::FileLoggerInstance().getInput(region, 1), "region[2]", NEO::FileLoggerInstance().getInput(region, 2), + "srcOrigin[0]", NEO::fileLoggerInstance().getInput(srcOrigin, 0), "srcOrigin[1]", NEO::fileLoggerInstance().getInput(srcOrigin, 1), "srcOrigin[2]", NEO::fileLoggerInstance().getInput(srcOrigin, 2), + "region[0]", NEO::fileLoggerInstance().getInput(region, 0), "region[1]", NEO::fileLoggerInstance().getInput(region, 1), "region[2]", NEO::fileLoggerInstance().getInput(region, 2), "dstOffset", dstOffset, "numEventsInWaitList", numEventsInWaitList, "eventWaitList", getClFileLogger().getEvents(reinterpret_cast(eventWaitList), numEventsInWaitList), @@ -3091,9 +3091,9 @@ cl_int CL_API_CALL clEnqueueCopyImageToBuffer(cl_command_queue commandQueue, Buffer *pDstBuffer = nullptr; retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), - WithCastToInternal(srcImage, &pSrcImage), - WithCastToInternal(dstBuffer, &pDstBuffer)); + withCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(srcImage, &pSrcImage), + withCastToInternal(dstBuffer, &pDstBuffer)); if (CL_SUCCESS == retVal) { if (isPackedYuvImage(&pSrcImage->getImageFormat())) { @@ -3145,8 +3145,8 @@ cl_int CL_API_CALL clEnqueueCopyBufferToImage(cl_command_queue commandQueue, API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, "srcBuffer", srcBuffer, "dstImage", dstImage, "srcOffset", srcOffset, - "dstOrigin[0]", NEO::FileLoggerInstance().getInput(dstOrigin, 0), "dstOrigin[1]", NEO::FileLoggerInstance().getInput(dstOrigin, 1), "dstOrigin[2]", NEO::FileLoggerInstance().getInput(dstOrigin, 2), - "region[0]", NEO::FileLoggerInstance().getInput(region, 0), "region[1]", NEO::FileLoggerInstance().getInput(region, 1), "region[2]", NEO::FileLoggerInstance().getInput(region, 2), + "dstOrigin[0]", NEO::fileLoggerInstance().getInput(dstOrigin, 0), "dstOrigin[1]", NEO::fileLoggerInstance().getInput(dstOrigin, 1), "dstOrigin[2]", NEO::fileLoggerInstance().getInput(dstOrigin, 2), + "region[0]", NEO::fileLoggerInstance().getInput(region, 0), "region[1]", NEO::fileLoggerInstance().getInput(region, 1), "region[2]", NEO::fileLoggerInstance().getInput(region, 2), "numEventsInWaitList", numEventsInWaitList, "eventWaitList", getClFileLogger().getEvents(reinterpret_cast(eventWaitList), numEventsInWaitList), "event", getClFileLogger().getEvents(reinterpret_cast(event), 1)); @@ -3156,9 +3156,9 @@ cl_int CL_API_CALL clEnqueueCopyBufferToImage(cl_command_queue commandQueue, Image *pDstImage = nullptr; retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), - WithCastToInternal(srcBuffer, &pSrcBuffer), - WithCastToInternal(dstImage, &pDstImage)); + withCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(srcBuffer, &pSrcBuffer), + withCastToInternal(dstImage, &pDstImage)); if (CL_SUCCESS == retVal) { if (isPackedYuvImage(&pDstImage->getImageFormat())) { @@ -3282,11 +3282,11 @@ void *CL_API_CALL clEnqueueMapImage(cl_command_queue commandQueue, DBG_LOG_INPUTS("commandQueue", commandQueue, "image", image, "blockingMap", blockingMap, "mapFlags", mapFlags, - "origin[0]", NEO::FileLoggerInstance().getInput(origin, 0), "origin[1]", NEO::FileLoggerInstance().getInput(origin, 1), - "origin[2]", NEO::FileLoggerInstance().getInput(origin, 2), "region[0]", NEO::FileLoggerInstance().getInput(region, 0), - "region[1]", NEO::FileLoggerInstance().getInput(region, 1), "region[2]", NEO::FileLoggerInstance().getInput(region, 2), - "imageRowPitch", NEO::FileLoggerInstance().getInput(imageRowPitch, 0), - "imageSlicePitch", NEO::FileLoggerInstance().getInput(imageSlicePitch, 0), + "origin[0]", NEO::fileLoggerInstance().getInput(origin, 0), "origin[1]", NEO::fileLoggerInstance().getInput(origin, 1), + "origin[2]", NEO::fileLoggerInstance().getInput(origin, 2), "region[0]", NEO::fileLoggerInstance().getInput(region, 0), + "region[1]", NEO::fileLoggerInstance().getInput(region, 1), "region[2]", NEO::fileLoggerInstance().getInput(region, 2), + "imageRowPitch", NEO::fileLoggerInstance().getInput(imageRowPitch, 0), + "imageSlicePitch", NEO::fileLoggerInstance().getInput(imageSlicePitch, 0), "numEventsInWaitList", numEventsInWaitList, "eventWaitList", getClFileLogger().getEvents(reinterpret_cast(eventWaitList), numEventsInWaitList), "event", getClFileLogger().getEvents(reinterpret_cast(event), 1)); @@ -3295,8 +3295,8 @@ void *CL_API_CALL clEnqueueMapImage(cl_command_queue commandQueue, Image *pImage = nullptr; CommandQueue *pCommandQueue = nullptr; retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), - WithCastToInternal(image, &pImage)); + withCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(image, &pImage)); if (retVal != CL_SUCCESS) { break; @@ -3357,8 +3357,8 @@ cl_int CL_API_CALL clEnqueueUnmapMemObject(cl_command_queue commandQueue, MemObj *pMemObj = nullptr; cl_int retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), - WithCastToInternal(memObj, &pMemObj)); + withCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(memObj, &pMemObj)); API_ENTER(&retVal); @@ -3424,7 +3424,7 @@ cl_int CL_API_CALL clEnqueueMigrateMemObjects(cl_command_queue commandQueue, CommandQueue *pCommandQueue = nullptr; retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(commandQueue, &pCommandQueue), EventWaitList(numEventsInWaitList, eventWaitList)); if (CL_SUCCESS != retVal) { @@ -3479,11 +3479,11 @@ cl_int CL_API_CALL clEnqueueNDRangeKernel(cl_command_queue commandQueue, cl_int retVal = CL_SUCCESS; API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, "cl_kernel", kernel, - "globalWorkOffset[0]", NEO::FileLoggerInstance().getInput(globalWorkOffset, 0), - "globalWorkOffset[1]", NEO::FileLoggerInstance().getInput(globalWorkOffset, 1), - "globalWorkOffset[2]", NEO::FileLoggerInstance().getInput(globalWorkOffset, 2), - "globalWorkSize", NEO::FileLoggerInstance().getSizes(globalWorkSize, workDim, false), - "localWorkSize", NEO::FileLoggerInstance().getSizes(localWorkSize, workDim, true), + "globalWorkOffset[0]", NEO::fileLoggerInstance().getInput(globalWorkOffset, 0), + "globalWorkOffset[1]", NEO::fileLoggerInstance().getInput(globalWorkOffset, 1), + "globalWorkOffset[2]", NEO::fileLoggerInstance().getInput(globalWorkOffset, 2), + "globalWorkSize", NEO::fileLoggerInstance().getSizes(globalWorkSize, workDim, false), + "localWorkSize", NEO::fileLoggerInstance().getSizes(localWorkSize, workDim, true), "numEventsInWaitList", numEventsInWaitList, "eventWaitList", getClFileLogger().getEvents(reinterpret_cast(eventWaitList), numEventsInWaitList), "event", getClFileLogger().getEvents(reinterpret_cast(event), 1)); @@ -3492,8 +3492,8 @@ cl_int CL_API_CALL clEnqueueNDRangeKernel(cl_command_queue commandQueue, MultiDeviceKernel *pMultiDeviceKernel = nullptr; retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), - WithCastToInternal(kernel, &pMultiDeviceKernel), + withCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(kernel, &pMultiDeviceKernel), EventWaitList(numEventsInWaitList, eventWaitList)); if (CL_SUCCESS != retVal) { @@ -3692,7 +3692,7 @@ cl_int CL_API_CALL clEnqueueMarkerWithWaitList(cl_command_queue commandQueue, CommandQueue *pCommandQueue = nullptr; retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(commandQueue, &pCommandQueue), EventWaitList(numEventsInWaitList, eventWaitList)); if (CL_SUCCESS != retVal) { @@ -3729,7 +3729,7 @@ cl_int CL_API_CALL clEnqueueBarrierWithWaitList(cl_command_queue commandQueue, CommandQueue *pCommandQueue = nullptr; retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(commandQueue, &pCommandQueue), EventWaitList(numEventsInWaitList, eventWaitList)); if (CL_SUCCESS != retVal) { @@ -3769,7 +3769,7 @@ clCreatePerfCountersCommandQueueINTEL( ErrorCodeHelper err(errcodeRet, CL_SUCCESS); ClDevice *pDevice = nullptr; - WithCastToInternal(device, &pDevice); + withCastToInternal(device, &pDevice); if (pDevice == nullptr) { err.set(CL_INVALID_DEVICE); return commandQueue; @@ -3834,7 +3834,7 @@ void *clHostMemAllocINTEL( Context *neoContext = nullptr; ErrorCodeHelper err(errcodeRet, CL_SUCCESS); - auto retVal = validateObjects(WithCastToInternal(context, &neoContext)); + auto retVal = validateObjects(withCastToInternal(context, &neoContext)); if (retVal != CL_SUCCESS) { err.set(retVal); @@ -3876,7 +3876,7 @@ void *clDeviceMemAllocINTEL( ClDevice *neoDevice = nullptr; ErrorCodeHelper err(errcodeRet, CL_SUCCESS); - auto retVal = validateObjects(WithCastToInternal(context, &neoContext), WithCastToInternal(device, &neoDevice)); + auto retVal = validateObjects(withCastToInternal(context, &neoContext), withCastToInternal(device, &neoDevice)); if (retVal != CL_SUCCESS) { err.set(retVal); @@ -3923,7 +3923,7 @@ void *clSharedMemAllocINTEL( Context *neoContext = nullptr; ErrorCodeHelper err(errcodeRet, CL_SUCCESS); - auto retVal = validateObjects(WithCastToInternal(context, &neoContext)); + auto retVal = validateObjects(withCastToInternal(context, &neoContext)); if (retVal != CL_SUCCESS) { err.set(retVal); @@ -3971,7 +3971,7 @@ cl_int clMemFreeCommon(cl_context context, const void *ptr, bool blocking) { Context *neoContext = nullptr; - auto retVal = validateObjects(WithCastToInternal(context, &neoContext)); + auto retVal = validateObjects(withCastToInternal(context, &neoContext)); if (retVal != CL_SUCCESS) { return retVal; @@ -4009,7 +4009,7 @@ cl_int clGetMemAllocInfoINTEL( size_t *paramValueSizeRet) { Context *pContext = nullptr; cl_int retVal = CL_SUCCESS; - retVal = validateObject(WithCastToInternal(context, &pContext)); + retVal = validateObject(withCastToInternal(context, &pContext)); if (!pContext) { return retVal; @@ -4166,7 +4166,7 @@ cl_int clEnqueueMigrateMemINTEL( cl_int retVal = CL_SUCCESS; CommandQueue *pCommandQueue = nullptr; - retVal = validateObjects(WithCastToInternal(commandQueue, &pCommandQueue), ptr, EventWaitList(numEventsInWaitList, eventWaitList)); + retVal = validateObjects(withCastToInternal(commandQueue, &pCommandQueue), ptr, EventWaitList(numEventsInWaitList, eventWaitList)); if (retVal == CL_SUCCESS) { pCommandQueue->enqueueMarkerWithWaitList(numEventsInWaitList, eventWaitList, event); @@ -4191,7 +4191,7 @@ cl_int clEnqueueMemAdviseINTEL( cl_int retVal = CL_SUCCESS; CommandQueue *pCommandQueue = nullptr; - retVal = validateObjects(WithCastToInternal(commandQueue, &pCommandQueue), ptr, EventWaitList(numEventsInWaitList, eventWaitList)); + retVal = validateObjects(withCastToInternal(commandQueue, &pCommandQueue), ptr, EventWaitList(numEventsInWaitList, eventWaitList)); if (retVal == CL_SUCCESS) { pCommandQueue->enqueueMarkerWithWaitList(numEventsInWaitList, eventWaitList, event); @@ -4229,7 +4229,7 @@ cl_accelerator_intel CL_API_CALL clCreateAcceleratorINTEL( DBG_LOG_INPUTS("context", context, "acceleratorType", acceleratorType, "descriptorSize", descriptorSize, - "descriptor", NEO::FileLoggerInstance().infoPointerToString(descriptor, descriptorSize)); + "descriptor", NEO::fileLoggerInstance().infoPointerToString(descriptor, descriptorSize)); cl_accelerator_intel accelerator = nullptr; do { @@ -4299,7 +4299,7 @@ cl_int CL_API_CALL clGetAcceleratorInfoINTEL( DBG_LOG_INPUTS("accelerator", accelerator, "paramName", paramName, "paramValueSize", paramValueSize, - "paramValue", NEO::FileLoggerInstance().infoPointerToString(paramValue, paramValueSize), + "paramValue", NEO::fileLoggerInstance().infoPointerToString(paramValue, paramValueSize), "paramValueSizeRet", paramValueSizeRet); IntelAccelerator *pAccelerator = nullptr; @@ -4348,12 +4348,12 @@ cl_program CL_API_CALL clCreateProgramWithILKHR(cl_context context, cl_int retVal = CL_SUCCESS; API_ENTER(&retVal); DBG_LOG_INPUTS("context", context, - "il", NEO::FileLoggerInstance().infoPointerToString(il, length), + "il", NEO::fileLoggerInstance().infoPointerToString(il, length), "length", length); cl_program program = nullptr; Context *pContext = nullptr; - retVal = validateObjects(WithCastToInternal(context, &pContext), il); + retVal = validateObjects(withCastToInternal(context, &pContext), il); if (retVal == CL_SUCCESS) { program = ProgramFunctions::createFromIL( pContext, @@ -4485,7 +4485,7 @@ void *CL_API_CALL clSVMAlloc(cl_context context, void *pAlloc = nullptr; Context *pContext = nullptr; - if (validateObjects(WithCastToInternal(context, &pContext)) != CL_SUCCESS) { + if (validateObjects(withCastToInternal(context, &pContext)) != CL_SUCCESS) { TRACING_EXIT(clSVMAlloc, &pAlloc); return pAlloc; } @@ -4563,7 +4563,7 @@ void CL_API_CALL clSVMFree(cl_context context, Context *pContext = nullptr; cl_int retVal = validateObjects( - WithCastToInternal(context, &pContext)); + withCastToInternal(context, &pContext)); if (retVal != CL_SUCCESS) { TRACING_EXIT(clSVMFree, nullptr); @@ -4596,7 +4596,7 @@ cl_int CL_API_CALL clEnqueueSVMFree(cl_command_queue commandQueue, CommandQueue *pCommandQueue = nullptr; cl_int retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(commandQueue, &pCommandQueue), EventWaitList(numEventsInWaitList, eventWaitList)); API_ENTER(&retVal); @@ -4655,7 +4655,7 @@ cl_int CL_API_CALL clEnqueueSVMMemcpy(cl_command_queue commandQueue, CommandQueue *pCommandQueue = nullptr; cl_int retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(commandQueue, &pCommandQueue), EventWaitList(numEventsInWaitList, eventWaitList)); API_ENTER(&retVal); @@ -4719,14 +4719,14 @@ cl_int CL_API_CALL clEnqueueSVMMemFill(cl_command_queue commandQueue, CommandQueue *pCommandQueue = nullptr; cl_int retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(commandQueue, &pCommandQueue), EventWaitList(numEventsInWaitList, eventWaitList)); API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, - "svmPtr", NEO::FileLoggerInstance().infoPointerToString(svmPtr, size), - "pattern", NEO::FileLoggerInstance().infoPointerToString(pattern, patternSize), + "svmPtr", NEO::fileLoggerInstance().infoPointerToString(svmPtr, size), + "pattern", NEO::fileLoggerInstance().infoPointerToString(pattern, patternSize), "patternSize", patternSize, "size", size, "numEventsInWaitList", numEventsInWaitList, @@ -4783,13 +4783,13 @@ cl_int CL_API_CALL clEnqueueSVMMap(cl_command_queue commandQueue, CommandQueue *pCommandQueue = nullptr; cl_int retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(commandQueue, &pCommandQueue), EventWaitList(numEventsInWaitList, eventWaitList)); API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, "blockingMap", blockingMap, "mapFlags", mapFlags, - "svmPtr", NEO::FileLoggerInstance().infoPointerToString(svmPtr, size), + "svmPtr", NEO::fileLoggerInstance().infoPointerToString(svmPtr, size), "size", size, "numEventsInWaitList", numEventsInWaitList, "eventWaitList", getClFileLogger().getEvents(reinterpret_cast(eventWaitList), numEventsInWaitList), @@ -4843,7 +4843,7 @@ cl_int CL_API_CALL clEnqueueSVMUnmap(cl_command_queue commandQueue, CommandQueue *pCommandQueue = nullptr; cl_int retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(commandQueue, &pCommandQueue), EventWaitList(numEventsInWaitList, eventWaitList), svmPtr); @@ -4891,7 +4891,7 @@ cl_int CL_API_CALL clSetKernelArgSVMPointer(cl_kernel kernel, MultiDeviceKernel *pMultiDeviceKernel = nullptr; - auto retVal = validateObjects(WithCastToInternal(kernel, &pMultiDeviceKernel)); + auto retVal = validateObjects(withCastToInternal(kernel, &pMultiDeviceKernel)); API_ENTER(&retVal); if (CL_SUCCESS != retVal) { @@ -4990,11 +4990,11 @@ cl_int CL_API_CALL clSetKernelExecInfo(cl_kernel kernel, TRACING_ENTER(clSetKernelExecInfo, &kernel, ¶mName, ¶mValueSize, ¶mValue); MultiDeviceKernel *pMultiDeviceKernel = nullptr; - auto retVal = validateObjects(WithCastToInternal(kernel, &pMultiDeviceKernel)); + auto retVal = validateObjects(withCastToInternal(kernel, &pMultiDeviceKernel)); API_ENTER(&retVal); DBG_LOG_INPUTS("kernel", kernel, "paramName", paramName, - "paramValueSize", paramValueSize, "paramValue", NEO::FileLoggerInstance().infoPointerToString(paramValue, paramValueSize)); + "paramValueSize", paramValueSize, "paramValue", NEO::fileLoggerInstance().infoPointerToString(paramValue, paramValueSize)); if (CL_SUCCESS != retVal) { TRACING_EXIT(clSetKernelExecInfo, &retVal); @@ -5132,7 +5132,7 @@ cl_mem CL_API_CALL clCreatePipe(cl_context context, break; } - retVal = validateObjects(WithCastToInternal(context, &pContext)); + retVal = validateObjects(withCastToInternal(context, &pContext)); if (retVal != CL_SUCCESS) { break; } @@ -5173,7 +5173,7 @@ cl_int CL_API_CALL clGetPipeInfo(cl_mem pipe, DBG_LOG_INPUTS("cl_mem", pipe, "cl_pipe_info", paramName, "size_t", paramValueSize, - "void *", NEO::FileLoggerInstance().infoPointerToString(paramValue, paramValueSize), + "void *", NEO::fileLoggerInstance().infoPointerToString(paramValue, paramValueSize), "size_t*", paramValueSizeRet); retVal = validateObjects(pipe); @@ -5213,8 +5213,8 @@ cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties(cl_context conte ClDevice *pDevice = nullptr; retVal = validateObjects( - WithCastToInternal(context, &pContext), - WithCastToInternal(device, &pDevice)); + withCastToInternal(context, &pContext), + withCastToInternal(device, &pDevice)); if (CL_SUCCESS != retVal) { err.set(retVal); @@ -5420,20 +5420,20 @@ cl_int CL_API_CALL clGetKernelSubGroupInfoKHR(cl_kernel kernel, "device", device, "paramName", paramName, "inputValueSize", inputValueSize, - "inputValue", NEO::FileLoggerInstance().infoPointerToString(inputValue, inputValueSize), + "inputValue", NEO::fileLoggerInstance().infoPointerToString(inputValue, inputValueSize), "paramValueSize", paramValueSize, - "paramValue", NEO::FileLoggerInstance().infoPointerToString(paramValue, paramValueSize), + "paramValue", NEO::fileLoggerInstance().infoPointerToString(paramValue, paramValueSize), "paramValueSizeRet", paramValueSizeRet); MultiDeviceKernel *pMultiDeviceKernel = nullptr; - retVal = validateObjects(WithCastToInternal(kernel, &pMultiDeviceKernel)); + retVal = validateObjects(withCastToInternal(kernel, &pMultiDeviceKernel)); ClDevice *pClDevice = nullptr; if (CL_SUCCESS == retVal) { if (pMultiDeviceKernel->getDevices().size() == 1u && !device) { pClDevice = pMultiDeviceKernel->getDevices()[0]; } else { - retVal = validateObjects(WithCastToInternal(device, &pClDevice)); + retVal = validateObjects(withCastToInternal(device, &pClDevice)); } } @@ -5529,20 +5529,20 @@ cl_int CL_API_CALL clGetKernelSubGroupInfo(cl_kernel kernel, "device", device, "paramName", paramName, "inputValueSize", inputValueSize, - "inputValue", NEO::FileLoggerInstance().infoPointerToString(inputValue, inputValueSize), + "inputValue", NEO::fileLoggerInstance().infoPointerToString(inputValue, inputValueSize), "paramValueSize", paramValueSize, - "paramValue", NEO::FileLoggerInstance().infoPointerToString(paramValue, paramValueSize), + "paramValue", NEO::fileLoggerInstance().infoPointerToString(paramValue, paramValueSize), "paramValueSizeRet", paramValueSizeRet); MultiDeviceKernel *pMultiDeviceKernel = nullptr; - retVal = validateObjects(WithCastToInternal(kernel, &pMultiDeviceKernel)); + retVal = validateObjects(withCastToInternal(kernel, &pMultiDeviceKernel)); ClDevice *pClDevice = nullptr; if (CL_SUCCESS == retVal) { if (pMultiDeviceKernel->getDevices().size() == 1u && !device) { pClDevice = pMultiDeviceKernel->getDevices()[0]; } else { - retVal = validateObjects(WithCastToInternal(device, &pClDevice)); + retVal = validateObjects(withCastToInternal(device, &pClDevice)); } } @@ -5574,8 +5574,8 @@ cl_int CL_API_CALL clSetDefaultDeviceCommandQueue(cl_context context, Context *pContext = nullptr; ClDevice *pClDevice = nullptr; - retVal = validateObjects(WithCastToInternal(context, &pContext), - WithCastToInternal(device, &pClDevice)); + retVal = validateObjects(withCastToInternal(context, &pContext), + withCastToInternal(device, &pClDevice)); if (CL_SUCCESS != retVal) { TRACING_EXIT(clSetDefaultDeviceCommandQueue, &retVal); @@ -5600,8 +5600,8 @@ cl_int CL_API_CALL clEnqueueSVMMigrateMem(cl_command_queue commandQueue, API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, "numSvmPointers", numSvmPointers, - "svmPointers", NEO::FileLoggerInstance().infoPointerToString(svmPointers ? svmPointers[0] : 0, NEO::FileLoggerInstance().getInput(sizes, 0)), - "sizes", NEO::FileLoggerInstance().getInput(sizes, 0), + "svmPointers", NEO::fileLoggerInstance().infoPointerToString(svmPointers ? svmPointers[0] : 0, NEO::fileLoggerInstance().getInput(sizes, 0)), + "sizes", NEO::fileLoggerInstance().getInput(sizes, 0), "flags", flags, "numEventsInWaitList", numEventsInWaitList, "eventWaitList", getClFileLogger().getEvents(reinterpret_cast(eventWaitList), numEventsInWaitList), @@ -5609,7 +5609,7 @@ cl_int CL_API_CALL clEnqueueSVMMigrateMem(cl_command_queue commandQueue, CommandQueue *pCommandQueue = nullptr; retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(commandQueue, &pCommandQueue), EventWaitList(numEventsInWaitList, eventWaitList)); if (CL_SUCCESS != retVal) { @@ -5684,7 +5684,7 @@ cl_kernel CL_API_CALL clCloneKernel(cl_kernel sourceKernel, MultiDeviceKernel *pSourceMultiDeviceKernel = nullptr; MultiDeviceKernel *pClonedMultiDeviceKernel = nullptr; - auto retVal = validateObjects(WithCastToInternal(sourceKernel, &pSourceMultiDeviceKernel)); + auto retVal = validateObjects(withCastToInternal(sourceKernel, &pSourceMultiDeviceKernel)); API_ENTER(&retVal); DBG_LOG_INPUTS("sourceKernel", sourceKernel); @@ -5727,7 +5727,7 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueVerifyMemoryINTEL(cl_command_queue comm } CommandQueue *pCommandQueue = nullptr; - retVal = validateObjects(WithCastToInternal(commandQueue, &pCommandQueue)); + retVal = validateObjects(withCastToInternal(commandQueue, &pCommandQueue)); if (retVal != CL_SUCCESS) { return retVal; } @@ -5743,7 +5743,7 @@ cl_int CL_API_CALL clAddCommentINTEL(cl_device_id device, const char *comment) { DBG_LOG_INPUTS("device", device, "comment", comment); ClDevice *pDevice = nullptr; - retVal = validateObjects(WithCastToInternal(device, &pDevice)); + retVal = validateObjects(withCastToInternal(device, &pDevice)); if (retVal != CL_SUCCESS) { return retVal; } @@ -5773,7 +5773,7 @@ cl_int CL_API_CALL clGetDeviceGlobalVariablePointerINTEL( "globalVariablePointerRet", globalVariablePointerRet); Program *pProgram = nullptr; ClDevice *pDevice = nullptr; - retVal = validateObjects(WithCastToInternal(program, &pProgram), WithCastToInternal(device, &pDevice)); + retVal = validateObjects(withCastToInternal(program, &pProgram), withCastToInternal(device, &pDevice)); if (globalVariablePointerRet == nullptr) { retVal = CL_INVALID_ARG_VALUE; } @@ -5807,7 +5807,7 @@ cl_int CL_API_CALL clGetDeviceFunctionPointerINTEL( Program *pProgram = nullptr; ClDevice *pDevice = nullptr; - retVal = validateObjects(WithCastToInternal(program, &pProgram), WithCastToInternal(device, &pDevice)); + retVal = validateObjects(withCastToInternal(program, &pProgram), withCastToInternal(device, &pDevice)); if ((CL_SUCCESS == retVal) && (functionPointerRet == nullptr)) { retVal = CL_INVALID_ARG_VALUE; } @@ -5836,7 +5836,7 @@ cl_int CL_API_CALL clSetProgramReleaseCallback(cl_program program, API_ENTER(&retVal); Program *pProgram = nullptr; - retVal = validateObjects(WithCastToInternal(program, &pProgram), + retVal = validateObjects(withCastToInternal(program, &pProgram), reinterpret_cast(pfnNotify)); if (retVal == CL_SUCCESS) { @@ -5855,7 +5855,7 @@ cl_int CL_API_CALL clSetProgramSpecializationConstant(cl_program program, cl_uin "specValue", specValue); Program *pProgram = nullptr; - retVal = validateObjects(WithCastToInternal(program, &pProgram), specValue); + retVal = validateObjects(withCastToInternal(program, &pProgram), specValue); if (retVal == CL_SUCCESS) { retVal = pProgram->setProgramSpecializationConstant(specId, specSize, specValue); @@ -5873,15 +5873,15 @@ cl_int CL_API_CALL clGetKernelSuggestedLocalWorkSizeINTEL(cl_command_queue comma cl_int retVal = CL_SUCCESS; API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, "cl_kernel", kernel, - "globalWorkOffset[0]", NEO::FileLoggerInstance().getInput(globalWorkOffset, 0), - "globalWorkOffset[1]", NEO::FileLoggerInstance().getInput(globalWorkOffset, 1), - "globalWorkOffset[2]", NEO::FileLoggerInstance().getInput(globalWorkOffset, 2), - "globalWorkSize", NEO::FileLoggerInstance().getSizes(globalWorkSize, workDim, true), + "globalWorkOffset[0]", NEO::fileLoggerInstance().getInput(globalWorkOffset, 0), + "globalWorkOffset[1]", NEO::fileLoggerInstance().getInput(globalWorkOffset, 1), + "globalWorkOffset[2]", NEO::fileLoggerInstance().getInput(globalWorkOffset, 2), + "globalWorkSize", NEO::fileLoggerInstance().getSizes(globalWorkSize, workDim, true), "suggestedLocalWorkSize", suggestedLocalWorkSize); MultiDeviceKernel *pMultiDeviceKernel = nullptr; CommandQueue *pCommandQueue = nullptr; - retVal = validateObjects(WithCastToInternal(commandQueue, &pCommandQueue), WithCastToInternal(kernel, &pMultiDeviceKernel)); + retVal = validateObjects(withCastToInternal(commandQueue, &pCommandQueue), withCastToInternal(kernel, &pMultiDeviceKernel)); if (CL_SUCCESS != retVal) { return retVal; @@ -5926,16 +5926,16 @@ cl_int CL_API_CALL clGetKernelMaxConcurrentWorkGroupCountINTEL(cl_command_queue cl_int retVal = CL_SUCCESS; API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, "cl_kernel", kernel, - "globalWorkOffset[0]", NEO::FileLoggerInstance().getInput(globalWorkOffset, 0), - "globalWorkOffset[1]", NEO::FileLoggerInstance().getInput(globalWorkOffset, 1), - "globalWorkOffset[2]", NEO::FileLoggerInstance().getInput(globalWorkOffset, 2), - "localWorkSize", NEO::FileLoggerInstance().getSizes(localWorkSize, workDim, true), + "globalWorkOffset[0]", NEO::fileLoggerInstance().getInput(globalWorkOffset, 0), + "globalWorkOffset[1]", NEO::fileLoggerInstance().getInput(globalWorkOffset, 1), + "globalWorkOffset[2]", NEO::fileLoggerInstance().getInput(globalWorkOffset, 2), + "localWorkSize", NEO::fileLoggerInstance().getSizes(localWorkSize, workDim, true), "suggestedWorkGroupCount", suggestedWorkGroupCount); CommandQueue *pCommandQueue = nullptr; MultiDeviceKernel *pMultiDeviceKernel = nullptr; - retVal = validateObjects(WithCastToInternal(commandQueue, &pCommandQueue), WithCastToInternal(kernel, &pMultiDeviceKernel)); + retVal = validateObjects(withCastToInternal(commandQueue, &pCommandQueue), withCastToInternal(kernel, &pMultiDeviceKernel)); if (CL_SUCCESS != retVal) { return retVal; @@ -5967,7 +5967,7 @@ cl_int CL_API_CALL clGetKernelMaxConcurrentWorkGroupCountINTEL(cl_command_queue return retVal; } - WithCastToInternal(commandQueue, &pCommandQueue); + withCastToInternal(commandQueue, &pCommandQueue); *suggestedWorkGroupCount = pKernel->getMaxWorkGroupCount(workDim, localWorkSize, pCommandQueue); return retVal; @@ -5985,11 +5985,11 @@ cl_int CL_API_CALL clEnqueueNDCountKernelINTEL(cl_command_queue commandQueue, cl_int retVal = CL_SUCCESS; API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, "cl_kernel", kernel, - "globalWorkOffset[0]", NEO::FileLoggerInstance().getInput(globalWorkOffset, 0), - "globalWorkOffset[1]", NEO::FileLoggerInstance().getInput(globalWorkOffset, 1), - "globalWorkOffset[2]", NEO::FileLoggerInstance().getInput(globalWorkOffset, 2), - "workgroupCount", NEO::FileLoggerInstance().getSizes(workgroupCount, workDim, false), - "localWorkSize", NEO::FileLoggerInstance().getSizes(localWorkSize, workDim, true), + "globalWorkOffset[0]", NEO::fileLoggerInstance().getInput(globalWorkOffset, 0), + "globalWorkOffset[1]", NEO::fileLoggerInstance().getInput(globalWorkOffset, 1), + "globalWorkOffset[2]", NEO::fileLoggerInstance().getInput(globalWorkOffset, 2), + "workgroupCount", NEO::fileLoggerInstance().getSizes(workgroupCount, workDim, false), + "localWorkSize", NEO::fileLoggerInstance().getSizes(localWorkSize, workDim, true), "numEventsInWaitList", numEventsInWaitList, "eventWaitList", getClFileLogger().getEvents(reinterpret_cast(eventWaitList), numEventsInWaitList), "event", getClFileLogger().getEvents(reinterpret_cast(event), 1)); @@ -5999,8 +5999,8 @@ cl_int CL_API_CALL clEnqueueNDCountKernelINTEL(cl_command_queue commandQueue, MultiDeviceKernel *pMultiDeviceKernel = nullptr; retVal = validateObjects( - WithCastToInternal(commandQueue, &pCommandQueue), - WithCastToInternal(kernel, &pMultiDeviceKernel), + withCastToInternal(commandQueue, &pCommandQueue), + withCastToInternal(kernel, &pMultiDeviceKernel), EventWaitList(numEventsInWaitList, eventWaitList)); if (CL_SUCCESS != retVal) { @@ -6083,7 +6083,7 @@ cl_int CL_API_CALL clSetContextDestructorCallback(cl_context context, API_ENTER(&retVal); Context *pContext = nullptr; - retVal = validateObjects(WithCastToInternal(context, &pContext), + retVal = validateObjects(withCastToInternal(context, &pContext), reinterpret_cast(pfnNotify)); if (retVal == CL_SUCCESS) { diff --git a/opencl/source/command_queue/command_queue.cpp b/opencl/source/command_queue/command_queue.cpp index 7798103d3f..891f260cae 100644 --- a/opencl/source/command_queue/command_queue.cpp +++ b/opencl/source/command_queue/command_queue.cpp @@ -394,7 +394,7 @@ bool CommandQueue::isQueueBlocked() { taskLevel = getGpgpuCommandStreamReceiver().peekTaskLevel(); } - FileLoggerInstance().log(DebugManager.flags.EventsDebugEnable.get(), "isQueueBlocked taskLevel change from", taskLevel, "to new from virtualEvent", this->virtualEvent, "new tasklevel", this->virtualEvent->taskLevel.load()); + fileLoggerInstance().log(DebugManager.flags.EventsDebugEnable.get(), "isQueueBlocked taskLevel change from", taskLevel, "to new from virtualEvent", this->virtualEvent, "new tasklevel", this->virtualEvent->taskLevel.load()); // close the access to virtual event, driver added only 1 ref count. this->virtualEvent->decRefInternal(); @@ -503,7 +503,7 @@ void CommandQueue::updateFromCompletionStamp(const CompletionStamp &completionSt if (outEvent) { outEvent->updateCompletionStamp(completionStamp.taskCount, outEvent->peekBcsTaskCountFromCommandQueue(), completionStamp.taskLevel, completionStamp.flushStamp); - FileLoggerInstance().log(DebugManager.flags.EventsDebugEnable.get(), "updateCompletionStamp Event", outEvent, "taskLevel", outEvent->taskLevel.load()); + fileLoggerInstance().log(DebugManager.flags.EventsDebugEnable.get(), "updateCompletionStamp Event", outEvent, "taskLevel", outEvent->taskLevel.load()); } } diff --git a/opencl/source/command_queue/command_queue_hw_xehp_and_later.inl b/opencl/source/command_queue/command_queue_hw_xehp_and_later.inl index e82409dbda..33b2cadafa 100644 --- a/opencl/source/command_queue/command_queue_hw_xehp_and_later.inl +++ b/opencl/source/command_queue/command_queue_hw_xehp_and_later.inl @@ -20,7 +20,7 @@ void CommandQueueHw::submitCacheFlush(Surface **surfaces, uint64_t postSyncAddress) { if constexpr (Family::isUsingL3Control) { StackVec subranges; - for (auto surface : CreateRange(surfaces, numSurfaces)) { + for (auto surface : createRange(surfaces, numSurfaces)) { auto resource = reinterpret_cast(surface); auto alloc = resource->getGraphicsAllocation(); coverRangeExact(alloc->getGpuAddress(), alloc->getUnderlyingBufferSize(), subranges, resource->resourceType); @@ -28,7 +28,7 @@ void CommandQueueHw::submitCacheFlush(Surface **surfaces, for (size_t subrangeNumber = 0; subrangeNumber < subranges.size(); subrangeNumber += maxFlushSubrangeCount) { size_t rangeCount = subranges.size() <= subrangeNumber + maxFlushSubrangeCount ? subranges.size() - subrangeNumber : maxFlushSubrangeCount; - Range range = CreateRange(subranges.begin() + subrangeNumber, rangeCount); + Range range = createRange(subranges.begin() + subrangeNumber, rangeCount); uint64_t postSyncAddressToFlush = 0; if (rangeCount < maxFlushSubrangeCount || subranges.size() - subrangeNumber - maxFlushSubrangeCount == 0) { postSyncAddressToFlush = postSyncAddress; @@ -55,7 +55,7 @@ LinearStream &getCommandStream(CommandQueue if constexpr (Family::isUsingL3Control) { StackVec subranges; - for (auto surface : CreateRange(surfaces, numSurfaces)) { + for (auto surface : createRange(surfaces, numSurfaces)) { ResourceSurface *resource = reinterpret_cast(surface); auto alloc = resource->getGraphicsAllocation(); coverRangeExact(alloc->getGpuAddress(), alloc->getUnderlyingBufferSize(), subranges, resource->resourceType); diff --git a/opencl/source/command_queue/enqueue_common.h b/opencl/source/command_queue/enqueue_common.h index 7090bbd08d..cbded252ed 100644 --- a/opencl/source/command_queue/enqueue_common.h +++ b/opencl/source/command_queue/enqueue_common.h @@ -689,7 +689,7 @@ CompletionStamp CommandQueueHw::enqueueNonBlocked( bool anyUncacheableArgs = false; auto requiresCoherency = false; - for (auto surface : CreateRange(surfaces, surfaceCount)) { + for (auto surface : createRange(surfaces, surfaceCount)) { surface->makeResident(getGpgpuCommandStreamReceiver()); requiresCoherency |= surface->IsCoherent; if (!surface->allowsL3Caching()) { @@ -925,7 +925,7 @@ void CommandQueueHw::enqueueBlocked( } allSurfaces.reserve(allSurfaces.size() + surfaceCount); - for (auto &surface : CreateRange(surfaces, surfaceCount)) { + for (auto &surface : createRange(surfaces, surfaceCount)) { allSurfaces.push_back(surface->duplicate()); } @@ -998,7 +998,7 @@ CompletionStamp CommandQueueHw::enqueueCommandWithoutKernel( timestampPacketDependencies.cacheFlushNodes.makeResident(getGpgpuCommandStreamReceiver()); } - for (auto surface : CreateRange(surfaces, surfaceCount)) { + for (auto surface : createRange(surfaces, surfaceCount)) { surface->makeResident(getGpgpuCommandStreamReceiver()); } diff --git a/opencl/source/command_queue/hardware_interface_base.inl b/opencl/source/command_queue/hardware_interface_base.inl index 37049a70bf..6e644d6104 100644 --- a/opencl/source/command_queue/hardware_interface_base.inl +++ b/opencl/source/command_queue/hardware_interface_base.inl @@ -171,7 +171,7 @@ void HardwareInterface::dispatchWalker( HardwareCommandsHelper::programCacheFlushAfterWalkerCommand(commandStream, commandQueue, mainKernel, postSyncAddress); } - if (PauseOnGpuProperties::GpuScratchRegWriteAllowed(DebugManager.flags.GpuScratchRegWriteAfterWalker.get(), commandQueue.getGpgpuCommandStreamReceiver().peekTaskCount())) { + if (PauseOnGpuProperties::gpuScratchRegWriteAllowed(DebugManager.flags.GpuScratchRegWriteAfterWalker.get(), commandQueue.getGpgpuCommandStreamReceiver().peekTaskCount())) { uint32_t registerOffset = DebugManager.flags.GpuScratchRegWriteRegisterOffset.get(); uint32_t registerData = DebugManager.flags.GpuScratchRegWriteRegisterData.get(); LriHelper::program(commandStream, registerOffset, registerData, EncodeSetMMIO::isRemapApplicable(registerOffset)); diff --git a/opencl/source/command_queue/resource_barrier.cpp b/opencl/source/command_queue/resource_barrier.cpp index b52d492131..5ba9a33298 100644 --- a/opencl/source/command_queue/resource_barrier.cpp +++ b/opencl/source/command_queue/resource_barrier.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -16,11 +16,11 @@ namespace NEO { BarrierCommand::BarrierCommand(CommandQueue *commandQueue, const cl_resource_barrier_descriptor_intel *descriptors, uint32_t numDescriptors) : numSurfaces(numDescriptors) { - for (auto description : CreateRange(descriptors, numDescriptors)) { + for (auto description : createRange(descriptors, numDescriptors)) { GraphicsAllocation *allocation; if (description.mem_object) { MemObj *memObj = nullptr; - WithCastToInternal(description.mem_object, &memObj); + withCastToInternal(description.mem_object, &memObj); allocation = memObj->getGraphicsAllocation(commandQueue->getDevice().getRootDeviceIndex()); } else { auto svmData = commandQueue->getContext().getSVMAllocsManager()->getSVMAlloc(description.svm_allocation_pointer); diff --git a/opencl/source/context/context.cpp b/opencl/source/context/context.cpp index 76d132d96b..e4190b50b5 100644 --- a/opencl/source/context/context.cpp +++ b/opencl/source/context/context.cpp @@ -458,7 +458,7 @@ Platform *Context::getPlatformFromProperties(const cl_context_properties *proper propertiesCurrent += 2; if (CL_CONTEXT_PLATFORM == propertyType) { Platform *pPlatform = nullptr; - errcode = validateObject(WithCastToInternal(reinterpret_cast(propertyValue), &pPlatform)); + errcode = validateObject(withCastToInternal(reinterpret_cast(propertyValue), &pPlatform)); return pPlatform; } } diff --git a/opencl/source/gtpin/gtpin_init.h b/opencl/source/gtpin/gtpin_init.h index 205cb23f17..338598412b 100644 --- a/opencl/source/gtpin/gtpin_init.h +++ b/opencl/source/gtpin/gtpin_init.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -13,7 +13,7 @@ extern "C" { #endif -gtpin::GTPIN_DI_STATUS GTPin_Init(gtpin::ocl::gtpin_events_t *pGtpinEvents, gtpin::driver_services_t *pDriverServices, gtpin::interface_version_t *pDriverVersion); +gtpin::GTPIN_DI_STATUS GTPin_Init(gtpin::ocl::gtpin_events_t *pGtpinEvents, gtpin::driver_services_t *pDriverServices, gtpin::interface_version_t *pDriverVersion); // NOLINT(readability-identifier-naming) #ifdef __cplusplus } diff --git a/opencl/source/helpers/cl_validators.h b/opencl/source/helpers/cl_validators.h index 77a43363e6..abc267507d 100644 --- a/opencl/source/helpers/cl_validators.h +++ b/opencl/source/helpers/cl_validators.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -24,7 +24,7 @@ enum NonZeroBufferSize : size_t; enum PatternSize : size_t; template -CLType WithCastToInternal(CLType clObject, InternalType **internalObject) { +CLType withCastToInternal(CLType clObject, InternalType **internalObject) { *internalObject = NEO::castToObject(clObject); return (*internalObject) ? clObject : nullptr; } diff --git a/opencl/source/helpers/hardware_commands_helper_xehp_and_later.inl b/opencl/source/helpers/hardware_commands_helper_xehp_and_later.inl index 5b0103e345..4f553633ba 100644 --- a/opencl/source/helpers/hardware_commands_helper_xehp_and_later.inl +++ b/opencl/source/helpers/hardware_commands_helper_xehp_and_later.inl @@ -184,7 +184,7 @@ void HardwareCommandsHelper::programCacheFlushAfterWalkerCommand(Line } for (size_t subrangeNumber = 0; subrangeNumber < subranges.size(); subrangeNumber += maxFlushSubrangeCount) { size_t rangeCount = subranges.size() <= subrangeNumber + maxFlushSubrangeCount ? subranges.size() - subrangeNumber : maxFlushSubrangeCount; - Range range = CreateRange(subranges.begin() + subrangeNumber, rangeCount); + Range range = createRange(subranges.begin() + subrangeNumber, rangeCount); uint64_t postSyncAddressToFlush = 0; if (rangeCount < maxFlushSubrangeCount || subranges.size() - subrangeNumber - maxFlushSubrangeCount == 0) { postSyncAddressToFlush = postSyncAddress; diff --git a/opencl/source/helpers/sampler_helpers.h b/opencl/source/helpers/sampler_helpers.h index 7092c34a91..88511de862 100644 --- a/opencl/source/helpers/sampler_helpers.h +++ b/opencl/source/helpers/sampler_helpers.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -28,7 +28,7 @@ enum SAMPLER_PATCH_ENUM { CLK_FILTER_LINEAR = 0x00, }; -inline SAMPLER_PATCH_ENUM GetAddrModeEnum(cl_addressing_mode addressingMode) { +inline SAMPLER_PATCH_ENUM getAddrModeEnum(cl_addressing_mode addressingMode) { switch (addressingMode) { case CL_ADDRESS_REPEAT: return CLK_ADDRESS_REPEAT; @@ -44,7 +44,7 @@ inline SAMPLER_PATCH_ENUM GetAddrModeEnum(cl_addressing_mode addressingMode) { return CLK_ADDRESS_NONE; } -inline SAMPLER_PATCH_ENUM GetNormCoordsEnum(cl_bool normalizedCoords) { +inline SAMPLER_PATCH_ENUM getNormCoordsEnum(cl_bool normalizedCoords) { if (normalizedCoords == CL_TRUE) { return CLK_NORMALIZED_COORDS_TRUE; } else { diff --git a/opencl/source/kernel/kernel.cpp b/opencl/source/kernel/kernel.cpp index b14b19b554..2622bf4739 100644 --- a/opencl/source/kernel/kernel.cpp +++ b/opencl/source/kernel/kernel.cpp @@ -1662,8 +1662,8 @@ cl_int Kernel::setArgSampler(uint32_t argIndex, pSampler->setArg(const_cast(samplerState), clDevice.getHardwareInfo()); patch(pSampler->getSnapWaValue(), crossThreadData, argAsSmp.metadataPayload.samplerSnapWa); - patch(GetAddrModeEnum(pSampler->addressingMode), crossThreadData, argAsSmp.metadataPayload.samplerAddressingMode); - patch(GetNormCoordsEnum(pSampler->normalizedCoordinates), crossThreadData, argAsSmp.metadataPayload.samplerNormalizedCoords); + patch(getAddrModeEnum(pSampler->addressingMode), crossThreadData, argAsSmp.metadataPayload.samplerAddressingMode); + patch(getNormCoordsEnum(pSampler->normalizedCoordinates), crossThreadData, argAsSmp.metadataPayload.samplerNormalizedCoords); if (arg.getExtendedTypeInfo().hasDeviceSideEnqueueExtendedDescriptor) { const auto &explicitArgsExtendedDescriptors = kernelInfo.kernelDescriptor.payloadMappings.explicitArgsExtendedDescriptors; UNRECOVERABLE_IF(argIndex >= explicitArgsExtendedDescriptors.size()); @@ -1816,7 +1816,7 @@ cl_int Kernel::checkCorrectImageAccessQualifier(cl_uint argIndex, if (arg.is()) { cl_mem mem = *(static_cast(argValue)); MemObj *pMemObj = nullptr; - WithCastToInternal(mem, &pMemObj); + withCastToInternal(mem, &pMemObj); if (pMemObj) { auto accessQualifier = arg.getTraits().accessQualifier; cl_mem_flags flags = pMemObj->getFlags(); diff --git a/opencl/source/kernel/kernel.h b/opencl/source/kernel/kernel.h index f2b51133bd..3e2f9477bb 100644 --- a/opencl/source/kernel/kernel.h +++ b/opencl/source/kernel/kernel.h @@ -105,10 +105,10 @@ class Kernel : public ReferenceTrackedObject { *errcodeRet = retVal; } - if (FileLoggerInstance().enabled()) { + if (fileLoggerInstance().enabled()) { std::string source; program->getSource(source); - FileLoggerInstance().dumpKernel(kernelInfo.kernelDescriptor.kernelMetadata.kernelName, source); + fileLoggerInstance().dumpKernel(kernelInfo.kernelDescriptor.kernelMetadata.kernelName, source); } return pKernel; diff --git a/opencl/source/mem_obj/buffer.cpp b/opencl/source/mem_obj/buffer.cpp index 8bb422723a..ac287440a4 100644 --- a/opencl/source/mem_obj/buffer.cpp +++ b/opencl/source/mem_obj/buffer.cpp @@ -101,7 +101,7 @@ cl_mem Buffer::validateInputAndCreateBuffer(cl_context context, void *hostPtr, cl_int &retVal) { Context *pContext = nullptr; - retVal = validateObjects(WithCastToInternal(context, &pContext)); + retVal = validateObjects(withCastToInternal(context, &pContext)); if (retVal != CL_SUCCESS) { return nullptr; } diff --git a/opencl/source/mem_obj/image.cpp b/opencl/source/mem_obj/image.cpp index c15d26e55f..c0f7b0f99f 100644 --- a/opencl/source/mem_obj/image.cpp +++ b/opencl/source/mem_obj/image.cpp @@ -1171,7 +1171,7 @@ cl_mem Image::validateAndCreateImage(cl_context context, cl_int &errcodeRet) { Context *pContext = nullptr; - errcodeRet = validateObjects(WithCastToInternal(context, &pContext)); + errcodeRet = validateObjects(withCastToInternal(context, &pContext)); if (errcodeRet != CL_SUCCESS) { return nullptr; } diff --git a/opencl/source/os_interface/windows/api_win.cpp b/opencl/source/os_interface/windows/api_win.cpp index 696e2ea0a0..b8d65f5632 100644 --- a/opencl/source/os_interface/windows/api_win.cpp +++ b/opencl/source/os_interface/windows/api_win.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -99,7 +99,7 @@ void *NEO::Context::getOsContextInfo(cl_context_info ¶mName, size_t *srcPara cl_int CL_API_CALL clGetDeviceIDsFromDX9INTEL(cl_platform_id platform, cl_dx9_device_source_intel dx9DeviceSource, void *dx9Object, cl_dx9_device_set_intel dx9DeviceSet, cl_uint numEntries, cl_device_id *devices, cl_uint *numDevices) { Platform *platformInternal = nullptr; - auto retVal = validateObjects(WithCastToInternal(platform, &platformInternal)); + auto retVal = validateObjects(withCastToInternal(platform, &platformInternal)); API_ENTER(&retVal); DBG_LOG_INPUTS("platform", platform, "dx9DeviceSource", dx9DeviceSource, @@ -153,7 +153,7 @@ cl_int CL_API_CALL clEnqueueAcquireDX9ObjectsINTEL(cl_command_queue commandQueue cl_uint numEventsInWaitList, const cl_event *eventWaitList, cl_event *event) { CommandQueue *cmdQ = nullptr; - auto retVal = validateObjects(WithCastToInternal(commandQueue, &cmdQ)); + auto retVal = validateObjects(withCastToInternal(commandQueue, &cmdQ)); API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, "numObjects", numObjects, @@ -172,7 +172,7 @@ cl_int CL_API_CALL clEnqueueAcquireDX9ObjectsINTEL(cl_command_queue commandQueue cl_int CL_API_CALL clEnqueueReleaseDX9ObjectsINTEL(cl_command_queue commandQueue, cl_uint numObjects, cl_mem *memObjects, cl_uint numEventsInWaitList, const cl_event *eventWaitList, cl_event *event) { CommandQueue *cmdQ = nullptr; - auto retVal = validateObjects(WithCastToInternal(commandQueue, &cmdQ)); + auto retVal = validateObjects(withCastToInternal(commandQueue, &cmdQ)); API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, "numObjects", numObjects, @@ -205,7 +205,7 @@ cl_int CL_API_CALL clGetDeviceIDsFromDX9MediaAdapterKHR(cl_platform_id platform, cl_dx9_media_adapter_set_khr mediaAdapterSet, cl_uint numEntries, cl_device_id *devices, cl_uint *numDevices) { Platform *platformInternal = nullptr; - auto retVal = validateObjects(WithCastToInternal(platform, &platformInternal)); + auto retVal = validateObjects(withCastToInternal(platform, &platformInternal)); API_ENTER(&retVal); DBG_LOG_INPUTS("platform", platform, "numMediaAdapters", numMediaAdapters, @@ -245,7 +245,7 @@ cl_mem CL_API_CALL clCreateFromDX9MediaSurfaceKHR(cl_context context, cl_mem_fla cl_int CL_API_CALL clEnqueueAcquireDX9MediaSurfacesKHR(cl_command_queue commandQueue, cl_uint numObjects, const cl_mem *memObjects, cl_uint numEventsInWaitList, const cl_event *eventWaitList, cl_event *event) { CommandQueue *cmdQ = nullptr; - auto retVal = validateObjects(WithCastToInternal(commandQueue, &cmdQ)); + auto retVal = validateObjects(withCastToInternal(commandQueue, &cmdQ)); API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, "numObjects", numObjects, @@ -265,7 +265,7 @@ cl_int CL_API_CALL clEnqueueReleaseDX9MediaSurfacesKHR(cl_command_queue commandQ cl_uint numEventsInWaitList, const cl_event *eventWaitList, cl_event *event) { CommandQueue *cmdQ = nullptr; - auto retVal = validateObjects(WithCastToInternal(commandQueue, &cmdQ)); + auto retVal = validateObjects(withCastToInternal(commandQueue, &cmdQ)); API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, "numObjects", numObjects, @@ -311,7 +311,7 @@ cl_int CL_API_CALL clGetDeviceIDsFromD3D10KHR(cl_platform_id platform, cl_d3d10_ Platform *platformInternal = nullptr; ClDevice *device = nullptr; - auto retVal = validateObjects(WithCastToInternal(platform, &platformInternal)); + auto retVal = validateObjects(withCastToInternal(platform, &platformInternal)); API_ENTER(&retVal); DBG_LOG_INPUTS("platform", platform, "d3dDeviceSource", d3dDeviceSource, @@ -378,7 +378,7 @@ cl_mem CL_API_CALL clCreateFromD3D10BufferKHR(cl_context context, cl_mem_flags f ErrorCodeHelper err(errcodeRet, CL_SUCCESS); Context *ctx = nullptr; - err.set(validateObjects(WithCastToInternal(context, &ctx))); + err.set(validateObjects(withCastToInternal(context, &ctx))); if (err.localErrcode != CL_SUCCESS) { return nullptr; @@ -401,7 +401,7 @@ cl_mem CL_API_CALL clCreateFromD3D10Texture2DKHR(cl_context context, cl_mem_flag ErrorCodeHelper err(errcodeRet, CL_SUCCESS); Context *ctx = nullptr; - err.set(validateObjects(WithCastToInternal(context, &ctx))); + err.set(validateObjects(withCastToInternal(context, &ctx))); if (err.localErrcode != CL_SUCCESS) { return nullptr; @@ -424,7 +424,7 @@ cl_mem CL_API_CALL clCreateFromD3D10Texture3DKHR(cl_context context, cl_mem_flag ErrorCodeHelper err(errcodeRet, CL_SUCCESS); Context *ctx = nullptr; - err.set(validateObjects(WithCastToInternal(context, &ctx))); + err.set(validateObjects(withCastToInternal(context, &ctx))); if (err.localErrcode != CL_SUCCESS) { return nullptr; @@ -441,7 +441,7 @@ cl_int CL_API_CALL clEnqueueAcquireD3D10ObjectsKHR(cl_command_queue commandQueue cl_uint numEventsInWaitList, const cl_event *eventWaitList, cl_event *event) { CommandQueue *cmdQ = nullptr; - auto retVal = validateObjects(WithCastToInternal(commandQueue, &cmdQ)); + auto retVal = validateObjects(withCastToInternal(commandQueue, &cmdQ)); API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, "numObjects", numObjects, @@ -474,7 +474,7 @@ cl_int CL_API_CALL clEnqueueReleaseD3D10ObjectsKHR(cl_command_queue commandQueue cl_uint numEventsInWaitList, const cl_event *eventWaitList, cl_event *event) { CommandQueue *cmdQ = nullptr; - auto retVal = validateObjects(WithCastToInternal(commandQueue, &cmdQ)); + auto retVal = validateObjects(withCastToInternal(commandQueue, &cmdQ)); API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, "numObjects", numObjects, @@ -522,7 +522,7 @@ cl_int CL_API_CALL clGetDeviceIDsFromD3D11KHR(cl_platform_id platform, cl_d3d11_ Platform *platformInternal = nullptr; ClDevice *device = nullptr; - auto retVal = validateObjects(WithCastToInternal(platform, &platformInternal)); + auto retVal = validateObjects(withCastToInternal(platform, &platformInternal)); API_ENTER(&retVal); DBG_LOG_INPUTS("platform", platform, "d3dDeviceSource", d3dDeviceSource, @@ -589,7 +589,7 @@ cl_mem CL_API_CALL clCreateFromD3D11BufferKHR(cl_context context, cl_mem_flags f ErrorCodeHelper err(errcodeRet, CL_SUCCESS); Context *ctx = nullptr; - err.set(validateObjects(WithCastToInternal(context, &ctx))); + err.set(validateObjects(withCastToInternal(context, &ctx))); if (err.localErrcode != CL_SUCCESS) { return nullptr; } @@ -611,7 +611,7 @@ cl_mem CL_API_CALL clCreateFromD3D11Texture2DKHR(cl_context context, cl_mem_flag ErrorCodeHelper err(errcodeRet, CL_SUCCESS); Context *ctx = nullptr; - err.set(validateObjects(WithCastToInternal(context, &ctx))); + err.set(validateObjects(withCastToInternal(context, &ctx))); if (err.localErrcode != CL_SUCCESS) { return nullptr; } @@ -633,7 +633,7 @@ cl_mem CL_API_CALL clCreateFromD3D11Texture3DKHR(cl_context context, cl_mem_flag ErrorCodeHelper err(errcodeRet, CL_SUCCESS); Context *ctx = nullptr; - err.set(validateObjects(WithCastToInternal(context, &ctx))); + err.set(validateObjects(withCastToInternal(context, &ctx))); if (err.localErrcode != CL_SUCCESS) { return nullptr; @@ -650,7 +650,7 @@ cl_int CL_API_CALL clEnqueueAcquireD3D11ObjectsKHR(cl_command_queue commandQueue cl_uint numEventsInWaitList, const cl_event *eventWaitList, cl_event *event) { CommandQueue *cmdQ = nullptr; - auto retVal = validateObjects(WithCastToInternal(commandQueue, &cmdQ)); + auto retVal = validateObjects(withCastToInternal(commandQueue, &cmdQ)); API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, "numObjects", numObjects, @@ -683,7 +683,7 @@ cl_int CL_API_CALL clEnqueueReleaseD3D11ObjectsKHR(cl_command_queue commandQueue cl_uint numEventsInWaitList, const cl_event *eventWaitList, cl_event *event) { CommandQueue *cmdQ = nullptr; - auto retVal = validateObjects(WithCastToInternal(commandQueue, &cmdQ)); + auto retVal = validateObjects(withCastToInternal(commandQueue, &cmdQ)); API_ENTER(&retVal); DBG_LOG_INPUTS("commandQueue", commandQueue, "numObjects", numObjects, diff --git a/opencl/source/sharings/gl/windows/cl_gl_api.cpp b/opencl/source/sharings/gl/windows/cl_gl_api.cpp index cb8b9f64f7..5f15dc73d6 100644 --- a/opencl/source/sharings/gl/windows/cl_gl_api.cpp +++ b/opencl/source/sharings/gl/windows/cl_gl_api.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -42,7 +42,7 @@ cl_mem CL_API_CALL clCreateFromGLBuffer(cl_context context, cl_mem_flags flags, Context *pContext = nullptr; - auto returnCode = validateObjects(WithCastToInternal(context, &pContext)); + auto returnCode = validateObjects(withCastToInternal(context, &pContext)); ErrorCodeHelper err(errcodeRet, returnCode); @@ -72,7 +72,7 @@ cl_mem CL_API_CALL clCreateFromGLTexture(cl_context context, cl_mem_flags flags, DBG_LOG_INPUTS("context", context, "flags", flags, "target", target, "miplevel", miplevel, "texture", texture); Context *pContext = nullptr; - auto returnCode = validateObjects(WithCastToInternal(context, &pContext)); + auto returnCode = validateObjects(withCastToInternal(context, &pContext)); ErrorCodeHelper err(errcodeRet, returnCode); cl_mem image = nullptr; @@ -101,7 +101,7 @@ cl_mem CL_API_CALL clCreateFromGLTexture2D(cl_context context, cl_mem_flags flag API_ENTER(errcodeRet); DBG_LOG_INPUTS("context", context, "flags", flags, "target", target, "miplevel", miplevel, "texture", texture); Context *pContext = nullptr; - auto returnCode = validateObjects(WithCastToInternal(context, &pContext)); + auto returnCode = validateObjects(withCastToInternal(context, &pContext)); ErrorCodeHelper err(errcodeRet, returnCode); cl_mem image = nullptr; @@ -131,7 +131,7 @@ cl_mem CL_API_CALL clCreateFromGLTexture3D(cl_context context, cl_mem_flags flag API_ENTER(errcodeRet); DBG_LOG_INPUTS("context", context, "flags", flags, "target", target, "miplevel", miplevel, "texture", texture); Context *pContext = nullptr; - auto returnCode = validateObjects(WithCastToInternal(context, &pContext)); + auto returnCode = validateObjects(withCastToInternal(context, &pContext)); ErrorCodeHelper err(errcodeRet, returnCode); cl_mem image = nullptr; @@ -159,7 +159,7 @@ cl_mem CL_API_CALL clCreateFromGLRenderbuffer(cl_context context, cl_mem_flags f API_ENTER(errcodeRet); DBG_LOG_INPUTS("context", context, "flags", flags, "renderbuffer", renderbuffer); Context *pContext = nullptr; - auto returnCode = validateObjects(WithCastToInternal(context, &pContext)); + auto returnCode = validateObjects(withCastToInternal(context, &pContext)); ErrorCodeHelper err(errcodeRet, returnCode); @@ -208,8 +208,8 @@ cl_int CL_API_CALL clGetGLTextureInfo(cl_mem memobj, cl_gl_texture_info paramNam cl_int retValue = CL_SUCCESS; API_ENTER(&retValue); DBG_LOG_INPUTS("memobj", memobj, "paramName", paramName, "paramValueSize", paramValueSize, "paramValueSize", - FileLoggerInstance().infoPointerToString(paramValue, paramValueSize), "paramValueSizeRet", - FileLoggerInstance().getInput(paramValueSizeRet, 0)); + fileLoggerInstance().infoPointerToString(paramValue, paramValueSize), "paramValueSizeRet", + fileLoggerInstance().getInput(paramValueSizeRet, 0)); retValue = validateObjects(memobj); if (retValue == CL_SUCCESS) { auto pMemObj = castToObject(memobj); @@ -231,7 +231,7 @@ cl_int CL_API_CALL clEnqueueAcquireGLObjects(cl_command_queue commandQueue, cl_u getClFileLogger().getEvents(reinterpret_cast(eventWaitList), numEventsInWaitList), "event", getClFileLogger().getEvents(reinterpret_cast(event), 1)); CommandQueue *pCommandQueue = nullptr; - retVal = validateObjects(WithCastToInternal(commandQueue, &pCommandQueue), EventWaitList(numEventsInWaitList, eventWaitList)); + retVal = validateObjects(withCastToInternal(commandQueue, &pCommandQueue), EventWaitList(numEventsInWaitList, eventWaitList)); if (retVal == CL_SUCCESS) { if (pCommandQueue->getContext().getSharing() == nullptr) { @@ -268,7 +268,7 @@ cl_int CL_API_CALL clEnqueueReleaseGLObjects(cl_command_queue commandQueue, cl_u getClFileLogger().getEvents(reinterpret_cast(eventWaitList), numEventsInWaitList), "event", getClFileLogger().getEvents(reinterpret_cast(event), 1)); CommandQueue *pCommandQueue = nullptr; - retVal = validateObjects(WithCastToInternal(commandQueue, &pCommandQueue), EventWaitList(numEventsInWaitList, eventWaitList)); + retVal = validateObjects(withCastToInternal(commandQueue, &pCommandQueue), EventWaitList(numEventsInWaitList, eventWaitList)); if (retVal == CL_SUCCESS) { if (pCommandQueue->getContext().getSharing() == nullptr) { @@ -290,7 +290,7 @@ cl_event CL_API_CALL clCreateEventFromGLsyncKHR(cl_context context, cl_GLsync sy API_ENTER(errcodeRet); DBG_LOG_INPUTS("context", context, "sync", sync); Context *pContext = nullptr; - auto returnCode = validateObjects(WithCastToInternal(context, &pContext)); + auto returnCode = validateObjects(withCastToInternal(context, &pContext)); ErrorCodeHelper err(errcodeRet, returnCode); @@ -311,8 +311,8 @@ cl_int CL_API_CALL clGetGLContextInfoKHR(const cl_context_properties *properties cl_int retVal = CL_SUCCESS; API_ENTER(&retVal); DBG_LOG_INPUTS("properties", properties, "paramName", paramName, "paramValueSize", paramValueSize, "paramValue", - FileLoggerInstance().infoPointerToString(paramValue, paramValueSize), "paramValueSizeRet", - FileLoggerInstance().getInput(paramValueSizeRet, 0)); + fileLoggerInstance().infoPointerToString(paramValue, paramValueSize), "paramValueSizeRet", + fileLoggerInstance().getInput(paramValueSizeRet, 0)); GetInfoHelper info(paramValue, paramValueSize, paramValueSizeRet); uint32_t GLHGLRCHandle = 0; diff --git a/opencl/source/sharings/va/cl_va_api.cpp b/opencl/source/sharings/va/cl_va_api.cpp index 3509ae9242..37e706d50d 100644 --- a/opencl/source/sharings/va/cl_va_api.cpp +++ b/opencl/source/sharings/va/cl_va_api.cpp @@ -1,10 +1,12 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#include "opencl/source/sharings/va/cl_va_api.h" + #include "shared/source/helpers/get_info.h" #include "shared/source/utilities/api_intercept.h" @@ -38,7 +40,7 @@ clCreateFromVA_APIMediaSurfaceINTEL(cl_context context, cl_mem_flags flags, VASu Context *pContext = nullptr; cl_mem image = nullptr; - returnCode = validateObject(WithCastToInternal(context, &pContext)); + returnCode = validateObject(withCastToInternal(context, &pContext)); ErrorCodeHelper err(errcodeRet, returnCode); if (returnCode != CL_SUCCESS) { @@ -69,7 +71,7 @@ clGetDeviceIDsFromVA_APIMediaAdapterINTEL(cl_platform_id platform, cl_va_api_dev "numEntries", numEntries); Platform *pPlatform = nullptr; - status = validateObjects(WithCastToInternal(platform, &pPlatform)); + status = validateObjects(withCastToInternal(platform, &pPlatform)); if (status != CL_SUCCESS) { status = CL_INVALID_PLATFORM; } else { @@ -104,7 +106,7 @@ clEnqueueAcquireVA_APIMediaSurfacesINTEL(cl_command_queue commandQueue, CommandQueue *pCommandQueue = nullptr; - status = validateObjects(WithCastToInternal(commandQueue, &pCommandQueue)); + status = validateObjects(withCastToInternal(commandQueue, &pCommandQueue)); if (status == CL_SUCCESS) { status = pCommandQueue->enqueueAcquireSharedObjects(numObjects, memObjects, numEventsInWaitList, @@ -131,7 +133,7 @@ clEnqueueReleaseVA_APIMediaSurfacesINTEL(cl_command_queue commandQueue, CommandQueue *pCommandQueue = nullptr; - status = validateObjects(WithCastToInternal(commandQueue, &pCommandQueue)); + status = validateObjects(withCastToInternal(commandQueue, &pCommandQueue)); if (status == CL_SUCCESS) { status = pCommandQueue->enqueueReleaseSharedObjects(numObjects, memObjects, numEventsInWaitList, diff --git a/opencl/source/sharings/va/cl_va_api.h b/opencl/source/sharings/va/cl_va_api.h index 594c54a31d..a89908e56e 100644 --- a/opencl/source/sharings/va/cl_va_api.h +++ b/opencl/source/sharings/va/cl_va_api.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,7 +8,7 @@ #include "CL/cl.h" #include "CL/cl_va_api_media_sharing_intel.h" -cl_int CL_API_CALL clGetSupportedVA_APIMediaSurfaceFormatsINTEL( +cl_int CL_API_CALL clGetSupportedVA_APIMediaSurfaceFormatsINTEL( // NOLINT(readability-identifier-naming) cl_context context, cl_mem_flags flags, cl_mem_object_type imageType, diff --git a/opencl/source/tracing/tracing_api.cpp b/opencl/source/tracing/tracing_api.cpp index 90b8464ea4..922cded5d6 100644 --- a/opencl/source/tracing/tracing_api.cpp +++ b/opencl/source/tracing/tracing_api.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -44,7 +44,7 @@ void removeTracingClient() { tracingState.fetch_sub(1, std::memory_order_acq_rel); } -static void LockTracingState() { +static void lockTracingState() { uint32_t state = tracingState.load(std::memory_order_acquire); state = TRACING_ZERO_CLIENT_COUNTER(state); state = TRACING_UNSET_LOCKED_BIT(state); @@ -59,7 +59,7 @@ static void LockTracingState() { DEBUG_BREAK_IF(TRACING_GET_CLIENT_COUNTER(tracingState.load(std::memory_order_acquire)) > 0); } -static void UnlockTracingState() { +static void unlockTracingState() { DEBUG_BREAK_IF(!TRACING_GET_LOCKED_BIT(tracingState.load(std::memory_order_acquire))); DEBUG_BREAK_IF(TRACING_GET_CLIENT_COUNTER(tracingState.load(std::memory_order_acquire)) > 0); tracingState.fetch_and(~TRACING_STATE_LOCKED_BIT, std::memory_order_acq_rel); @@ -121,20 +121,20 @@ cl_int CL_API_CALL clEnableTracingINTEL(cl_tracing_handle handle) { return CL_INVALID_VALUE; } - LockTracingState(); + lockTracingState(); size_t i = 0; DEBUG_BREAK_IF(handle->handle == nullptr); while (i < TRACING_MAX_HANDLE_COUNT && tracingHandle[i] != nullptr) { if (tracingHandle[i] == handle->handle) { - UnlockTracingState(); + unlockTracingState(); return CL_INVALID_VALUE; } ++i; } if (i == TRACING_MAX_HANDLE_COUNT) { - UnlockTracingState(); + unlockTracingState(); return CL_OUT_OF_RESOURCES; } @@ -144,7 +144,7 @@ cl_int CL_API_CALL clEnableTracingINTEL(cl_tracing_handle handle) { tracingState.fetch_or(TRACING_STATE_ENABLED_BIT, std::memory_order_acq_rel); } - UnlockTracingState(); + unlockTracingState(); return CL_SUCCESS; } @@ -153,7 +153,7 @@ cl_int CL_API_CALL clDisableTracingINTEL(cl_tracing_handle handle) { return CL_INVALID_VALUE; } - LockTracingState(); + lockTracingState(); size_t size = 0; while (size < TRACING_MAX_HANDLE_COUNT && tracingHandle[size] != nullptr) { @@ -172,13 +172,13 @@ cl_int CL_API_CALL clDisableTracingINTEL(cl_tracing_handle handle) { tracingHandle[i] = tracingHandle[size - 1]; tracingHandle[size - 1] = nullptr; } - UnlockTracingState(); + unlockTracingState(); return CL_SUCCESS; } ++i; } - UnlockTracingState(); + unlockTracingState(); return CL_INVALID_VALUE; } @@ -187,7 +187,7 @@ cl_int CL_API_CALL clGetTracingStateINTEL(cl_tracing_handle handle, cl_bool *ena return CL_INVALID_VALUE; } - LockTracingState(); + lockTracingState(); *enable = CL_FALSE; @@ -201,6 +201,6 @@ cl_int CL_API_CALL clGetTracingStateINTEL(cl_tracing_handle handle, cl_bool *ena ++i; } - UnlockTracingState(); + unlockTracingState(); return CL_SUCCESS; } diff --git a/opencl/source/utilities/cl_logger.cpp b/opencl/source/utilities/cl_logger.cpp index 260a10f7db..4e83b3d1cc 100644 --- a/opencl/source/utilities/cl_logger.cpp +++ b/opencl/source/utilities/cl_logger.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -22,7 +22,7 @@ ClFileLogger::ClFileLogger(FileLogger &baseLoggerIn, con } ClFileLogger &getClFileLogger() { - static ClFileLogger clFileLoggerInstance(FileLoggerInstance(), DebugManager.flags); + static ClFileLogger clFileLoggerInstance(fileLoggerInstance(), DebugManager.flags); return clFileLoggerInstance; } diff --git a/opencl/test/unit_test/api/cl_mem_locally_uncached_resource_tests.cpp b/opencl/test/unit_test/api/cl_mem_locally_uncached_resource_tests.cpp index b81fa4fc2f..c660098a9a 100644 --- a/opencl/test/unit_test/api/cl_mem_locally_uncached_resource_tests.cpp +++ b/opencl/test/unit_test/api/cl_mem_locally_uncached_resource_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -42,7 +42,7 @@ uint32_t cmdQueueMocs(CommandQueue *pCmdQ) { auto &csr = pCmdQHw->getGpgpuCommandStreamReceiver(); HardwareParse hwParse; hwParse.parseCommands(csr.getCS(0), 0); - auto itorCmd = reverse_find(hwParse.cmdList.rbegin(), hwParse.cmdList.rend()); + auto itorCmd = reverseFind(hwParse.cmdList.rbegin(), hwParse.cmdList.rend()); EXPECT_NE(hwParse.cmdList.rend(), itorCmd); auto sba = genCmdCast(*itorCmd); EXPECT_NE(nullptr, sba); diff --git a/opencl/test/unit_test/aub_tests/command_queue/enqueue_read_buffer_aub_tests.cpp b/opencl/test/unit_test/aub_tests/command_queue/enqueue_read_buffer_aub_tests.cpp index c4e37feaa9..f87805238e 100644 --- a/opencl/test/unit_test/aub_tests/command_queue/enqueue_read_buffer_aub_tests.cpp +++ b/opencl/test/unit_test/aub_tests/command_queue/enqueue_read_buffer_aub_tests.cpp @@ -108,7 +108,7 @@ INSTANTIATE_TEST_CASE_P(AUBReadBuffer_simple, 3 * sizeof(cl_float))); HWTEST_F(AUBReadBuffer, GivenReserveCanonicalGpuAddressWhenReadingBufferThenExpectationsAreMet) { - if (!GetAubTestsConfig().testCanonicalAddress) { + if (!getAubTestsConfig().testCanonicalAddress) { return; } diff --git a/opencl/test/unit_test/command_queue/blit_enqueue_1_tests.cpp b/opencl/test/unit_test/command_queue/blit_enqueue_1_tests.cpp index 62c4adf69d..06acd3a208 100644 --- a/opencl/test/unit_test/command_queue/blit_enqueue_1_tests.cpp +++ b/opencl/test/unit_test/command_queue/blit_enqueue_1_tests.cpp @@ -366,7 +366,7 @@ HWTEST_TEMPLATED_F(BlitAuxTranslationTests, givenBlitTranslationWhenConstructing auto buffer = createBuffer(1, true); setMockKernelArgs(std::array{{buffer.get()}}); - auto event = make_releaseable(commandQueue.get(), CL_COMMAND_READ_BUFFER, 0, 0); + auto event = makeReleaseable(commandQueue.get(), CL_COMMAND_READ_BUFFER, 0, 0); MockTimestampPacketContainer eventDependencyContainer(*bcsCsr->getTimestampPacketAllocator(), 1); auto eventDependency = eventDependencyContainer.getNode(0); event->addTimestampPacketNodes(eventDependencyContainer); @@ -534,7 +534,7 @@ HWTEST_TEMPLATED_F(BlitAuxTranslationTests, givenBlitTranslationWhenConstructing auto buffer = createBuffer(1, true); setMockKernelArgs(std::array{{buffer.get()}}); - auto event = make_releaseable(commandQueue.get(), CL_COMMAND_READ_BUFFER, 0, 0); + auto event = makeReleaseable(commandQueue.get(), CL_COMMAND_READ_BUFFER, 0, 0); MockTimestampPacketContainer eventDependencyContainer(*bcsCsr->getTimestampPacketAllocator(), 1); auto eventDependency = eventDependencyContainer.getNode(0); event->addTimestampPacketNodes(eventDependencyContainer); diff --git a/opencl/test/unit_test/command_queue/command_queue_hw_1_tests.cpp b/opencl/test/unit_test/command_queue/command_queue_hw_1_tests.cpp index eef870af4d..537176c892 100644 --- a/opencl/test/unit_test/command_queue/command_queue_hw_1_tests.cpp +++ b/opencl/test/unit_test/command_queue/command_queue_hw_1_tests.cpp @@ -464,7 +464,7 @@ HWTEST_F(CommandQueueHwTest, GivenNotCompleteUserEventPassedToEnqueueWhenEventIs auto mockCSR = new MockCsr(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()); pDevice->resetCommandStreamReceiver(mockCSR); - auto userEvent = make_releaseable(context); + auto userEvent = makeReleaseable(context); KernelInfo kernelInfo; MockKernelWithInternals mockKernelWithInternals(*pClDevice); auto mockKernel = mockKernelWithInternals.mockKernel; diff --git a/opencl/test/unit_test/command_queue/command_queue_hw_2_tests.cpp b/opencl/test/unit_test/command_queue/command_queue_hw_2_tests.cpp index 02dd38dd80..41181c9251 100644 --- a/opencl/test/unit_test/command_queue/command_queue_hw_2_tests.cpp +++ b/opencl/test/unit_test/command_queue/command_queue_hw_2_tests.cpp @@ -21,7 +21,7 @@ using namespace NEO; -void CloneMdi(MultiDispatchInfo &dst, const MultiDispatchInfo &src) { +void cloneMdi(MultiDispatchInfo &dst, const MultiDispatchInfo &src) { for (auto &srcDi : src) { dst.push(srcDi); } @@ -48,7 +48,7 @@ struct MockBuilder : BuiltinDispatchInfoBuilder { dispatchInfoBuilder.setDispatchGeometry(dim, paramsToUse.gws, paramsToUse.elws, paramsToUse.offset); dispatchInfoBuilder.bake(d); - CloneMdi(paramsReceived.multiDispatchInfo, d); + cloneMdi(paramsReceived.multiDispatchInfo, d); return true; } diff --git a/opencl/test/unit_test/command_queue/enqueue_kernel_2_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_kernel_2_tests.cpp index de77380f16..0ad14ca7d6 100644 --- a/opencl/test/unit_test/command_queue/enqueue_kernel_2_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_kernel_2_tests.cpp @@ -625,7 +625,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, EnqueueKernelPrintfTest, GivenKernelWithPrintfBlocke } HWTEST_P(EnqueueKernelPrintfTest, GivenKernelWithPrintfBlockedByEventWhenEventUnblockedThenOutputPrinted) { - auto userEvent = make_releaseable(context); + auto userEvent = makeReleaseable(context); MockKernelWithInternals mockKernel(*pClDevice); std::string testString = "test"; @@ -672,7 +672,7 @@ HWTEST_P(EnqueueKernelPrintfTest, GivenKernelWithPrintfBlockedByEventWhenEventUn } HWTEST_P(EnqueueKernelPrintfTest, GivenKernelWithPrintfWithStringMapDisbaledAndImplicitArgsBlockedByEventWhenEventUnblockedThenOutputPrinted) { - auto userEvent = make_releaseable(context); + auto userEvent = makeReleaseable(context); MockKernelWithInternals mockKernel(*pClDevice); std::string testString = "test"; diff --git a/opencl/test/unit_test/command_queue/enqueue_marker_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_marker_tests.cpp index df051c2a9f..b03959b686 100644 --- a/opencl/test/unit_test/command_queue/enqueue_marker_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_marker_tests.cpp @@ -47,7 +47,7 @@ HWTEST_F(MarkerTest, GivenCsrAndCmdqWithSameTaskLevelWhenEnqueingMarkerThenPipeC parseCommands(*pCmdQ); // If CSR == CQ then a PC is required. - auto itorCmd = reverse_find(cmdList.rbegin(), cmdList.rend()); + auto itorCmd = reverseFind(cmdList.rbegin(), cmdList.rend()); EXPECT_EQ(cmdList.rend(), itorCmd); } diff --git a/opencl/test/unit_test/command_queue/enqueue_svm_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_svm_tests.cpp index 72fc7f1185..d7e8e58fd9 100644 --- a/opencl/test/unit_test/command_queue/enqueue_svm_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_svm_tests.cpp @@ -668,7 +668,7 @@ TEST_F(EnqueueSvmTest, givenSvmToSvmCopyTypeWhenEnqueueBlockingSVMMemcpyThenSucc TEST_F(EnqueueSvmTest, GivenValidParamsWhenCopyingMemoryWithBlockingThenSuccessisReturned) { void *pDstSVM = ptrSVM; void *pSrcSVM = context->getSVMAllocsManager()->createSVMAlloc(256, {}, context->getRootDeviceIndices(), context->getDeviceBitfields()); - auto uEvent = make_releaseable(); + auto uEvent = makeReleaseable(); cl_event eventWaitList[] = {uEvent.get()}; retVal = this->pCmdQ->enqueueSVMMemcpy( false, // cl_bool blocking_copy @@ -707,7 +707,7 @@ TEST_F(EnqueueSvmTest, GivenCoherencyWhenCopyingMemoryWithBlockingThenSuccessIsR SVMAllocsManager::SvmAllocationProperties svmProperties; svmProperties.coherent = true; void *pSrcSVM = context->getSVMAllocsManager()->createSVMAlloc(256, svmProperties, context->getRootDeviceIndices(), context->getDeviceBitfields()); - auto uEvent = make_releaseable(); + auto uEvent = makeReleaseable(); cl_event eventWaitList[] = {uEvent.get()}; retVal = this->pCmdQ->enqueueSVMMemcpy( false, // cl_bool blocking_copy @@ -788,7 +788,7 @@ HWTEST_F(EnqueueSvmTest, givenSvmAllocWhenEnqueueSvmFillThenSuccesIsReturnedAndA TEST_F(EnqueueSvmTest, GivenValidParamsWhenFillingMemoryWithBlockingThenSuccessIsReturned) { const float pattern[1] = {1.2345f}; const size_t patternSize = sizeof(pattern); - auto uEvent = make_releaseable(); + auto uEvent = makeReleaseable(); cl_event eventWaitList[] = {uEvent.get()}; retVal = this->pCmdQ->enqueueSVMMemFill( ptrSVM, // void *svm_ptr @@ -816,7 +816,7 @@ HWTEST_F(EnqueueSvmTest, GivenGpuHangAndBlockingCallAndValidParamsWhenFillingMem const float pattern[1] = {1.2345f}; const size_t patternSize = sizeof(pattern); - auto uEvent = make_releaseable(); + auto uEvent = makeReleaseable(); const cl_uint numOfEvents = 1; cl_event eventWaitList[numOfEvents] = {uEvent.get()}; @@ -929,7 +929,7 @@ TEST_F(EnqueueSvmTest, givenEnqueueTaskBlockedOnUserEventWhenItIsEnqueuedThenSur kernel->setSvmKernelExecInfo(pSvmAlloc); - auto uEvent = make_releaseable(); + auto uEvent = makeReleaseable(); cl_event eventWaitList[] = {uEvent.get()}; size_t offset = 0; size_t size = 1; diff --git a/opencl/test/unit_test/command_queue/finish_tests.cpp b/opencl/test/unit_test/command_queue/finish_tests.cpp index 551eddb049..50f4d4115a 100644 --- a/opencl/test/unit_test/command_queue/finish_tests.cpp +++ b/opencl/test/unit_test/command_queue/finish_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -83,7 +83,7 @@ HWTEST_F(FinishTest, WhenFinishIsCalledThenPipeControlIsNotAddedToCqCommandStrea // Check for PIPE_CONTROL parseCommands(pCmdQ->getCS(1024)); - auto itorCmd = reverse_find(cmdList.rbegin(), cmdList.rend()); + auto itorCmd = reverseFind(cmdList.rbegin(), cmdList.rend()); EXPECT_EQ(cmdList.rend(), itorCmd); } HWTEST_F(FinishTest, givenFreshQueueWhenFinishIsCalledThenCommandStreamIsNotAllocated) { diff --git a/opencl/test/unit_test/event/async_events_handler_tests.cpp b/opencl/test/unit_test/event/async_events_handler_tests.cpp index 72e2a5b077..a343d7738a 100644 --- a/opencl/test/unit_test/event/async_events_handler_tests.cpp +++ b/opencl/test/unit_test/event/async_events_handler_tests.cpp @@ -58,15 +58,15 @@ class AsyncEventsHandlerTests : public ::testing::Test { dbgRestore.reset(new DebugManagerStateRestore()); DebugManager.flags.EnableAsyncEventsHandler.set(false); handler.reset(new MockHandler()); - context = make_releaseable(); + context = makeReleaseable(); - commandQueue = make_releaseable(context.get(), context->getDevice(0), nullptr, false); + commandQueue = makeReleaseable(context.get(), context->getDevice(0), nullptr, false); *(commandQueue->getGpgpuCommandStreamReceiver().getTagAddress()) = 0; - event1 = make_releaseable(context.get(), commandQueue.get(), CL_COMMAND_BARRIER, CompletionStamp::notReady, CompletionStamp::notReady); - event2 = make_releaseable(context.get(), commandQueue.get(), CL_COMMAND_BARRIER, CompletionStamp::notReady, CompletionStamp::notReady); - event3 = make_releaseable(context.get(), commandQueue.get(), CL_COMMAND_BARRIER, CompletionStamp::notReady, CompletionStamp::notReady); + event1 = makeReleaseable(context.get(), commandQueue.get(), CL_COMMAND_BARRIER, CompletionStamp::notReady, CompletionStamp::notReady); + event2 = makeReleaseable(context.get(), commandQueue.get(), CL_COMMAND_BARRIER, CompletionStamp::notReady, CompletionStamp::notReady); + event3 = makeReleaseable(context.get(), commandQueue.get(), CL_COMMAND_BARRIER, CompletionStamp::notReady, CompletionStamp::notReady); } std::unique_ptr dbgRestore; diff --git a/opencl/test/unit_test/event/event_tests.cpp b/opencl/test/unit_test/event/event_tests.cpp index 1c25167777..b9ea634ce4 100644 --- a/opencl/test/unit_test/event/event_tests.cpp +++ b/opencl/test/unit_test/event/event_tests.cpp @@ -688,7 +688,7 @@ TEST_F(InternalsEventTest, givenGpuHangOnPrintingEnqueueOutputAndBlockedKernelWi } TEST_F(InternalsEventTest, GivenMapOperationWhenSubmittingCommandsThenTaskLevelIsIncremented) { - auto pCmdQ = make_releaseable(mockContext, pClDevice, nullptr, false); + auto pCmdQ = makeReleaseable(mockContext, pClDevice, nullptr, false); MockEvent event(pCmdQ.get(), CL_COMMAND_NDRANGE_KERNEL, 0, 0); auto &csr = pCmdQ->getGpgpuCommandStreamReceiver(); @@ -709,7 +709,7 @@ TEST_F(InternalsEventTest, GivenMapOperationWhenSubmittingCommandsThenTaskLevelI } TEST_F(InternalsEventTest, GivenMapOperationNonZeroCopyBufferWhenSubmittingCommandsThenTaskLevelIsIncremented) { - auto pCmdQ = make_releaseable(mockContext, pClDevice, nullptr, false); + auto pCmdQ = makeReleaseable(mockContext, pClDevice, nullptr, false); MockEvent event(pCmdQ.get(), CL_COMMAND_NDRANGE_KERNEL, 0, 0); auto &csr = pCmdQ->getGpgpuCommandStreamReceiver(); @@ -937,7 +937,7 @@ TEST_F(InternalsEventTest, GivenProfilingWHENMapOperationTHENTimesSet) { TEST_F(InternalsEventTest, GivenUnMapOperationWhenSubmittingCommandsThenTaskLevelIsIncremented) { const cl_queue_properties props[3] = {CL_QUEUE_PROPERTIES, 0, 0}; - auto pCmdQ = make_releaseable(mockContext, pClDevice, props, false); + auto pCmdQ = makeReleaseable(mockContext, pClDevice, props, false); MockEvent event(pCmdQ.get(), CL_COMMAND_NDRANGE_KERNEL, 0, 0); auto &csr = pCmdQ->getGpgpuCommandStreamReceiver(); @@ -1163,7 +1163,7 @@ HWTEST_F(EventTest, givenVirtualEventWhenCommandSubmittedThenLockCsrOccurs) { std::unique_ptr command = std::make_unique(*pCmdQ, kernelOperation, surfaces, kernel); - auto virtualEvent = make_releaseable(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, CompletionStamp::notReady, CompletionStamp::notReady); + auto virtualEvent = makeReleaseable(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, CompletionStamp::notReady, CompletionStamp::notReady); virtualEvent->setCommand(std::move(command)); @@ -1183,7 +1183,7 @@ HWTEST_F(EventTest, givenVirtualEventWhenSubmitCommandEventNotReadyAndEventWitho taskLevel, taskCount) {} }; - auto virtualEvent = make_releaseable(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, CompletionStamp::notReady, CompletionStamp::notReady); + auto virtualEvent = makeReleaseable(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, CompletionStamp::notReady, CompletionStamp::notReady); virtualEvent->submitCommand(false); @@ -1216,7 +1216,7 @@ HWTEST_F(InternalsEventTest, GivenBufferWithoutZeroCopyWhenMappingOrUnmappingThe pDevice->resetCommandStreamReceiver(csr); const cl_queue_properties props[3] = {CL_QUEUE_PROPERTIES, 0, 0}; - auto pCmdQ = make_releaseable(mockContext, pClDevice, props, false); + auto pCmdQ = makeReleaseable(mockContext, pClDevice, props, false); MockNonZeroCopyBuff buffer(executionStamp); diff --git a/opencl/test/unit_test/event/user_events_tests.cpp b/opencl/test/unit_test/event/user_events_tests.cpp index 602eaf4ecb..b747200bfa 100644 --- a/opencl/test/unit_test/event/user_events_tests.cpp +++ b/opencl/test/unit_test/event/user_events_tests.cpp @@ -160,7 +160,7 @@ TEST(UserEvent, givenUserEventWhenStatusIsCompletedThenReturnZeroTaskLevel) { typedef HelloWorldTest EventTests; TEST_F(MockEventTests, GivenBlockedUserEventWhenEnqueueingNdRangeWithoutReturnEventThenDoNotSubmitToCsr) { - uEvent = make_releaseable(); + uEvent = makeReleaseable(); cl_event userEvent = uEvent.get(); cl_event *eventWaitList = &userEvent; @@ -192,7 +192,7 @@ TEST_F(MockEventTests, GivenBlockedUserEventWhenEnqueueingNdRangeWithoutReturnEv } TEST_F(MockEventTests, GivenBlockedUserEventWhenEnqueueingNdRangeWithReturnEventThenDoNotSubmitToCsr) { - uEvent = make_releaseable(); + uEvent = makeReleaseable(); cl_event userEvent = uEvent.get(); cl_event retEvent = nullptr; @@ -235,7 +235,7 @@ TEST_F(MockEventTests, GivenBlockedUserEventWhenEnqueueingNdRangeWithReturnEvent } TEST_F(MockEventTests, WhenAddingChildEventThenConnectionIsCreatedAndCountOnReturnEventIsInjected) { - uEvent = make_releaseable(); + uEvent = makeReleaseable(); cl_event userEvent = uEvent.get(); cl_event retEvent = nullptr; @@ -274,8 +274,8 @@ TEST_F(EventTests, givenNormalEventThatHasParentUserEventWhenUserEventIsUnblocke } TEST_F(MockEventTests, WhenAddingTwoChildEventsThenConnectionIsCreatedAndCountOnReturnEventIsInjected) { - uEvent = make_releaseable(); - auto uEvent2 = make_releaseable(); + uEvent = makeReleaseable(); + auto uEvent2 = makeReleaseable(); cl_event retEvent = nullptr; cl_event eventWaitList[] = {uEvent.get(), uEvent2.get()}; @@ -317,8 +317,8 @@ TEST_F(MockEventTests, WhenAddingTwoChildEventsThenConnectionIsCreatedAndCountOn } TEST_F(MockEventTests, GivenTwoUserEvenstWhenCountOnNdr1IsInjectedThenItIsPropagatedToNdr2viaVirtualEvent) { - uEvent = make_releaseable(context); - auto uEvent2 = make_releaseable(context); + uEvent = makeReleaseable(context); + auto uEvent2 = makeReleaseable(context); cl_event eventWaitList[] = {uEvent.get(), uEvent2.get()}; int sizeOfWaitList = sizeof(eventWaitList) / sizeof(cl_event); @@ -387,8 +387,8 @@ TEST_F(EventTests, givenQueueThatIsBlockedByUserEventWhenIsQueueBlockedIsCalledT } TEST_F(MockEventTests, GivenUserEventSignalingWhenFinishThenExecutionIsNotBlocked) { - uEvent = make_releaseable(context); - auto uEvent2 = make_releaseable(context); + uEvent = makeReleaseable(context); + auto uEvent2 = makeReleaseable(context); cl_event eventWaitList[] = {uEvent.get(), uEvent2.get()}; int sizeOfWaitList = sizeof(eventWaitList) / sizeof(cl_event); @@ -405,7 +405,7 @@ TEST_F(MockEventTests, GivenUserEventSignalingWhenFinishThenExecutionIsNotBlocke } TEST_F(MockEventTests, WhenCompletingUserEventThenStatusPropagatedToNormalEvent) { - uEvent = make_releaseable(); + uEvent = makeReleaseable(); cl_event retEvent = nullptr; cl_event eventWaitList[] = {uEvent.get()}; int sizeOfWaitList = sizeof(eventWaitList) / sizeof(cl_event); @@ -442,7 +442,7 @@ HWTEST_F(EventTests, WhenSignalingThenUserEventObtainsProperTaskLevel) { } TEST_F(MockEventTests, GivenUserEventWhenSettingStatusCompleteThenTaskLevelIsUpdatedCorrectly) { - uEvent = make_releaseable(context); + uEvent = makeReleaseable(context); auto &csr = pCmdQ->getGpgpuCommandStreamReceiver(); auto taskLevel = csr.peekTaskLevel(); @@ -471,7 +471,7 @@ TEST_F(MockEventTests, GivenUserEventWhenSettingStatusCompleteThenTaskLevelIsUpd } TEST_F(MockEventTests, GivenCompleteParentWhenWaitingForEventsThenChildrenAreComplete) { - uEvent = make_releaseable(context); + uEvent = makeReleaseable(context); cl_event retEvent = nullptr; cl_event eventWaitList[] = {uEvent.get()}; @@ -508,7 +508,7 @@ TEST_F(EventTests, WhenStatusIsAbortedWhenWaitingForEventsThenErrorIsReturned) { } TEST_F(MockEventTests, GivenAbortedUserEventWhenEnqueingNdrThenDoNotFlushToCsr) { - uEvent = make_releaseable(context); + uEvent = makeReleaseable(context); cl_event eventWaitList[] = {uEvent.get()}; int sizeOfWaitList = sizeof(eventWaitList) / sizeof(cl_event); @@ -567,7 +567,7 @@ TEST_F(MockEventTests, givenDebugVariableWhenStatusIsQueriedThenNoFlushHappens) } TEST_F(MockEventTests, GivenAbortedParentWhenDestroyingChildEventThenDoNotProcessBlockedCommands) { - uEvent = make_releaseable(context); + uEvent = makeReleaseable(context); cl_event eventWaitList[] = {uEvent.get()}; int sizeOfWaitList = sizeof(eventWaitList) / sizeof(cl_event); @@ -607,7 +607,7 @@ TEST_F(MockEventTests, GivenAbortedParentWhenDestroyingChildEventThenDoNotProces } TEST_F(MockEventTests, GivenAbortedUserEventWhenWaitingForEventThenErrorIsReturned) { - uEvent = make_releaseable(context); + uEvent = makeReleaseable(context); cl_event eventWaitList[] = {uEvent.get()}; int sizeOfWaitList = sizeof(eventWaitList) / sizeof(cl_event); @@ -630,8 +630,8 @@ TEST_F(MockEventTests, GivenAbortedUserEventWhenWaitingForEventThenErrorIsReturn } TEST_F(MockEventTests, GivenAbortedUserEventAndTwoInputsWhenWaitingForEventThenErrorIsReturned) { - uEvent = make_releaseable(context); - auto uEvent2 = make_releaseable(context); + uEvent = makeReleaseable(context); + auto uEvent2 = makeReleaseable(context); cl_event eventWaitList[] = {uEvent.get(), uEvent2.get()}; int sizeOfWaitList = sizeof(eventWaitList) / sizeof(cl_event); cl_event retEvent = nullptr; @@ -654,7 +654,7 @@ TEST_F(MockEventTests, GivenAbortedUserEventAndTwoInputsWhenWaitingForEventThenE } TEST_F(MockEventTests, GivenAbortedQueueWhenFinishingThenSuccessIsReturned) { - uEvent = make_releaseable(context); + uEvent = makeReleaseable(context); auto &csr = pCmdQ->getGpgpuCommandStreamReceiver(); auto taskLevel = csr.peekTaskLevel(); @@ -677,7 +677,7 @@ TEST_F(MockEventTests, GivenAbortedQueueWhenFinishingThenSuccessIsReturned) { } TEST_F(MockEventTests, GivenUserEventWhenEnqueingThenDependantPacketIsRegistered) { - uEvent = make_releaseable(context); + uEvent = makeReleaseable(context); cl_event eventWaitList[] = {uEvent.get()}; int sizeOfWaitList = sizeof(eventWaitList) / sizeof(cl_event); @@ -691,7 +691,7 @@ TEST_F(MockEventTests, GivenUserEventWhenEnqueingThenDependantPacketIsRegistered } TEST_F(MockEventTests, GivenUserEventWhenEnqueingThenCommandPacketContainsValidCommandStream) { - uEvent = make_releaseable(context); + uEvent = makeReleaseable(context); cl_event eventWaitList[] = {uEvent.get()}; int sizeOfWaitList = sizeof(eventWaitList) / sizeof(cl_event); @@ -705,7 +705,7 @@ TEST_F(MockEventTests, GivenUserEventWhenEnqueingThenCommandPacketContainsValidC } TEST_F(MockEventTests, WhenStatusIsSetThenBlockedPacketsAreSent) { - uEvent = make_releaseable(context); + uEvent = makeReleaseable(context); cl_event eventWaitList[] = {uEvent.get()}; auto &csr = pCmdQ->getGpgpuCommandStreamReceiver(); @@ -734,7 +734,7 @@ TEST_F(MockEventTests, WhenStatusIsSetThenBlockedPacketsAreSent) { } TEST_F(MockEventTests, WhenFinishingThenVirtualEventIsNullAndReleaseEventReturnsSuccess) { - uEvent = make_releaseable(context); + uEvent = makeReleaseable(context); cl_event eventWaitList[] = {uEvent.get()}; int sizeOfWaitList = sizeof(eventWaitList) / sizeof(cl_event); cl_event retEvent; @@ -758,7 +758,7 @@ TEST_F(MockEventTests, WhenFinishingThenVirtualEventIsNullAndReleaseEventReturns } TEST_F(MockEventTests, givenBlockedQueueThenCommandStreamDoesNotChangeWhileEnqueueAndAfterSignaling) { - uEvent = make_releaseable(context); + uEvent = makeReleaseable(context); cl_event eventWaitList[] = {uEvent.get()}; int sizeOfWaitList = sizeof(eventWaitList) / sizeof(cl_event); cl_event retEvent; @@ -898,7 +898,7 @@ TEST_F(EventTests, GivenEventCallbackWithoutWaitWhenWaitingForEventsThenSuccessI TEST_F(MockEventTests, GivenEnqueueReadImageWhenWaitingforEventThenSuccessIsReturned) { REQUIRE_IMAGES_OR_SKIP(defaultHwInfo); cl_event retEvent; - uEvent = make_releaseable(context); + uEvent = makeReleaseable(context); cl_event eventWaitList[] = {uEvent.get()}; auto image = clUniquePtr(Image2dHelper<>::create(this->context)); diff --git a/opencl/test/unit_test/fixtures/simple_arg_kernel_fixture.h b/opencl/test/unit_test/fixtures/simple_arg_kernel_fixture.h index 30cb03b2ff..098da89cb0 100644 --- a/opencl/test/unit_test/fixtures/simple_arg_kernel_fixture.h +++ b/opencl/test/unit_test/fixtures/simple_arg_kernel_fixture.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -31,42 +31,42 @@ class Kernel; class Program; template -inline const char *type_name(T &) { +inline const char *typeName(T &) { return "unknown"; } template <> -inline const char *type_name(char &) { +inline const char *typeName(char &) { return "char"; } template <> -inline const char *type_name(int &) { +inline const char *typeName(int &) { return "int"; } template <> -inline const char *type_name(float &) { +inline const char *typeName(float &) { return "float"; } template <> -inline const char *type_name(short &) { +inline const char *typeName(short &) { return "short"; } template <> -inline const char *type_name(unsigned char &) { +inline const char *typeName(unsigned char &) { return "unsigned char"; } template <> -inline const char *type_name(unsigned int &) { +inline const char *typeName(unsigned int &) { return "unsigned int"; } template <> -inline const char *type_name(unsigned short &) { +inline const char *typeName(unsigned short &) { return "unsigned short"; } @@ -83,7 +83,7 @@ class SimpleArgKernelFixture : public ProgramFixture { int forTheName = 0; testFile.append("simple_arg_"); - testFile.append(type_name(forTheName)); + testFile.append(typeName(forTheName)); auto pos = testFile.find(" "); if (pos != (size_t)-1) { diff --git a/opencl/test/unit_test/gtpin/gtpin_tests.cpp b/opencl/test/unit_test/gtpin/gtpin_tests.cpp index 9765dbd891..325951960d 100644 --- a/opencl/test/unit_test/gtpin/gtpin_tests.cpp +++ b/opencl/test/unit_test/gtpin/gtpin_tests.cpp @@ -74,7 +74,7 @@ context_handle_t currContext = nullptr; std::deque kernelResources; platform_info_t platformInfo; -void OnContextCreate(context_handle_t context, platform_info_t *platformInfo, igc_init_t **igcInit) { +void onContextCreate(context_handle_t context, platform_info_t *platformInfo, igc_init_t **igcInit) { ULT::platformInfo.gen_version = platformInfo->gen_version; currContext = context; kernelResources.clear(); @@ -82,21 +82,21 @@ void OnContextCreate(context_handle_t context, platform_info_t *platformInfo, ig *igcInit = reinterpret_cast(0x1234); } -void OnContextDestroy(context_handle_t context) { +void onContextDestroy(context_handle_t context) { currContext = nullptr; EXPECT_EQ(0u, kernelResources.size()); kernelResources.clear(); ContextDestroyCallbackCount++; } -void OnKernelCreate(context_handle_t context, const instrument_params_in_t *paramsIn, instrument_params_out_t *paramsOut) { +void onKernelCreate(context_handle_t context, const instrument_params_in_t *paramsIn, instrument_params_out_t *paramsOut) { paramsOut->inst_kernel_binary = const_cast(paramsIn->orig_kernel_binary); paramsOut->inst_kernel_size = paramsIn->orig_kernel_size; paramsOut->kernel_id = paramsIn->igc_hash_id; KernelCreateCallbackCount++; } -void OnKernelSubmit(command_buffer_handle_t cb, uint64_t kernelId, uint32_t *entryOffset, resource_handle_t *resource) { +void onKernelSubmit(command_buffer_handle_t cb, uint64_t kernelId, uint32_t *entryOffset, resource_handle_t *resource) { resource_handle_t currResource = nullptr; ASSERT_NE(nullptr, currContext); if (!returnNullResource) { @@ -116,11 +116,11 @@ void OnKernelSubmit(command_buffer_handle_t cb, uint64_t kernelId, uint32_t *ent KernelSubmitCallbackCount++; } -void OnCommandBufferCreate(context_handle_t context, command_buffer_handle_t cb) { +void onCommandBufferCreate(context_handle_t context, command_buffer_handle_t cb) { CommandBufferCreateCallbackCount++; } -void OnCommandBufferComplete(command_buffer_handle_t cb) { +void onCommandBufferComplete(command_buffer_handle_t cb) { ASSERT_NE(nullptr, currContext); resource_handle_t currResource = kernelResources[0]; EXPECT_NE(nullptr, currResource); @@ -246,23 +246,23 @@ TEST_F(GTPinTests, givenIncompleteArgumentsThenGTPinInitFails) { retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, &ver); EXPECT_EQ(GTPIN_DI_ERROR_INVALID_ARGUMENT, retFromGtPin); - gtpinCallbacks.onContextCreate = OnContextCreate; + gtpinCallbacks.onContextCreate = onContextCreate; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_ERROR_INVALID_ARGUMENT, retFromGtPin); - gtpinCallbacks.onContextDestroy = OnContextDestroy; + gtpinCallbacks.onContextDestroy = onContextDestroy; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_ERROR_INVALID_ARGUMENT, retFromGtPin); - gtpinCallbacks.onKernelCreate = OnKernelCreate; + gtpinCallbacks.onKernelCreate = onKernelCreate; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_ERROR_INVALID_ARGUMENT, retFromGtPin); - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_ERROR_INVALID_ARGUMENT, retFromGtPin); - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_ERROR_INVALID_ARGUMENT, retFromGtPin); } @@ -291,12 +291,12 @@ TEST_F(GTPinTests, givenInvalidArgumentsWhenVersionArgumentIsProvidedThenGTPinIn TEST_F(GTPinTests, givenValidAndCompleteArgumentsThenGTPinInitSucceeds) { bool isInitialized = false; - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); EXPECT_EQ(&NEO::gtpinCreateBuffer, driverServices.bufferAllocate); @@ -308,12 +308,12 @@ TEST_F(GTPinTests, givenValidAndCompleteArgumentsThenGTPinInitSucceeds) { } TEST_F(GTPinTests, givenValidAndCompleteArgumentsWhenGTPinIsAlreadyInitializedThenGTPinInitFails) { - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); EXPECT_EQ(&NEO::gtpinCreateBuffer, driverServices.bufferAllocate); @@ -329,12 +329,12 @@ TEST_F(GTPinTests, givenInvalidArgumentsThenBufferAllocateFails) { resource_handle_t res; uint32_t buffSize = 400u; - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); ASSERT_EQ(&NEO::gtpinCreateBuffer, driverServices.bufferAllocate); @@ -351,12 +351,12 @@ TEST_F(GTPinTests, givenInvalidArgumentsThenBufferAllocateFails) { } TEST_F(GTPinTests, givenInvalidArgumentsThenBufferDeallocateFails) { - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); EXPECT_EQ(&NEO::gtpinCreateBuffer, driverServices.bufferAllocate); @@ -376,12 +376,12 @@ TEST_F(GTPinTests, givenInvalidArgumentsThenBufferDeallocateFails) { } TEST_F(GTPinTests, givenInvalidArgumentsThenBufferMapFails) { - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); EXPECT_EQ(&NEO::gtpinCreateBuffer, driverServices.bufferAllocate); @@ -402,12 +402,12 @@ TEST_F(GTPinTests, givenInvalidArgumentsThenBufferMapFails) { } TEST_F(GTPinTests, givenInvalidArgumentsThenBufferUnMapFails) { - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); EXPECT_EQ(&NEO::gtpinCreateBuffer, driverServices.bufferAllocate); @@ -443,12 +443,12 @@ TEST_F(GTPinTests, givenValidRequestForHugeMemoryAllocationThenBufferAllocateFai } }; - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); ASSERT_EQ(&NEO::gtpinCreateBuffer, driverServices.bufferAllocate); @@ -463,12 +463,12 @@ TEST_F(GTPinTests, givenValidRequestForMemoryAllocationThenBufferAllocateAndDeal resource_handle_t res; uint32_t buffSize = 400u; - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); ASSERT_EQ(&NEO::gtpinCreateBuffer, driverServices.bufferAllocate); @@ -489,12 +489,12 @@ TEST_F(GTPinTests, givenValidArgumentsForBufferMapWhenCallSequenceIsCorrectThenB resource_handle_t res; uint32_t buffSize = 400u; - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); ASSERT_EQ(&NEO::gtpinCreateBuffer, driverServices.bufferAllocate); @@ -520,12 +520,12 @@ TEST_F(GTPinTests, givenMissingReturnArgumentForBufferMapWhenCallSequenceIsCorre resource_handle_t res; uint32_t buffSize = 400u; - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); ASSERT_EQ(&NEO::gtpinCreateBuffer, driverServices.bufferAllocate); @@ -549,12 +549,12 @@ TEST_F(GTPinTests, givenValidArgumentsForBufferUnMapWhenCallSequenceIsCorrectThe resource_handle_t res; uint32_t buffSize = 400u; - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); ASSERT_EQ(&NEO::gtpinCreateBuffer, driverServices.bufferAllocate); @@ -594,12 +594,12 @@ TEST_F(GTPinTests, givenUninitializedGTPinInterfaceThenGTPinContextCallbackIsNot } TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenContextCreationArgumentsAreInvalidThenGTPinContextCallbackIsNotCalled) { - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); @@ -618,12 +618,12 @@ TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenContextCreationArgumentsAre } TEST_F(GTPinTests, givenInitializedGTPinInterfaceThenGTPinContextCallbackIsCalled) { - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); @@ -698,12 +698,12 @@ TEST_F(GTPinTests, givenUninitializedGTPinInterfaceThenGTPinKernelCreateCallback } TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenContextIsCreatedThenCorrectVersionIsSet) { - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); @@ -722,12 +722,12 @@ TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenContextIsCreatedThenCorrect } TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenKernelIsExecutedThenGTPinCallbacksAreCalled) { - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); @@ -872,12 +872,12 @@ TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenKernelIsExecutedThenGTPinCa } TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenKernelINTELIsExecutedThenGTPinCallbacksAreCalled) { - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); @@ -940,7 +940,7 @@ TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenKernelINTELIsExecutedThenGT cl_uint workDim = 1; size_t localWorkSize[3] = {1, 1, 1}; CommandQueue *commandQueue = nullptr; - WithCastToInternal(cmdQ, &commandQueue); + withCastToInternal(cmdQ, &commandQueue); size_t n = 100; auto buff10 = clCreateBuffer(context, 0, n * sizeof(unsigned int), nullptr, nullptr); auto buff11 = clCreateBuffer(context, 0, n * sizeof(unsigned int), nullptr, nullptr); @@ -1024,12 +1024,12 @@ TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenKernelINTELIsExecutedThenGT } TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenKernelWithoutSSHIsUsedThenKernelCreateCallbacksIsNotCalled) { - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); @@ -1070,12 +1070,12 @@ TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenKernelWithoutSSHIsUsedThenK } TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenKernelWithoutSSHIsUsedThenGTPinSubmitKernelCallbackIsNotCalled) { - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); @@ -1184,12 +1184,12 @@ TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenKernelWithoutSSHIsUsedThenG } TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenBlockedKernelWithoutSSHIsUsedThenGTPinSubmitKernelCallbackIsNotCalled) { - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); @@ -1307,12 +1307,12 @@ TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenBlockedKernelWithoutSSHIsUs } TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenTheSameKerneIsExecutedTwiceThenGTPinCreateKernelCallbackIsCalledOnce) { - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); @@ -1470,12 +1470,12 @@ TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenTheSameKerneIsExecutedTwice } TEST_F(GTPinTests, givenMultipleKernelSubmissionsWhenOneOfGtpinSurfacesIsNullThenOnlyNonNullSurfacesAreMadeResident) { - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); @@ -1591,12 +1591,12 @@ TEST_F(GTPinTests, givenMultipleKernelSubmissionsWhenOneOfGtpinSurfacesIsNullThe } TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenKernelIsCreatedThenAllKernelSubmitRelatedNotificationsAreCalled) { - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); @@ -1786,12 +1786,12 @@ TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenKernelIsCreatedThenAllKerne } TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenOneKernelIsSubmittedSeveralTimesThenCorrectBuffersAreMadeResident) { - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); @@ -2017,12 +2017,12 @@ TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenLowMemoryConditionOccursThe clReleaseContext(context); }; - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); ASSERT_EQ(&NEO::gtpinCreateBuffer, driverServices.bufferAllocate); @@ -2228,12 +2228,12 @@ TEST(GTPinOfflineTests, givenGtPinInDisabledStateWhenCallbacksFromEnqueuePathAre EXPECT_FALSE(gtpinIsGTPinInitialized()); } TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenOnKernelSubitIsCalledThenCorrectOffsetisSetInKernel) { - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); VariableBackup returnNullResourceBckp(&returnNullResource); VariableBackup kernelOffsetBckp(&kernelOffset); @@ -2267,12 +2267,12 @@ TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenOnKernelSubitIsCalledThenCo kernelResources.clear(); } TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenOnContextCreateIsCalledThenGtpinInitIsSet) { - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); auto context = std::make_unique(); gtpinNotifyContextCreate(context.get()); @@ -2280,12 +2280,12 @@ TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenOnContextCreateIsCalledThen } TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenOnKernelCreateIsCalledWithNullptrThenCallIsIgnored) { - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); auto prevCreateCount = KernelCreateCallbackCount; gtpinNotifyKernelCreate(nullptr); @@ -2295,8 +2295,8 @@ TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenOnKernelCreateIsCalledWithN TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenKernelDoesNotHaveDebugDataThenPassNullPtrToOnKernelCreate) { static void *debugDataPtr = nullptr; static size_t debugDataSize = 0; - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; gtpinCallbacks.onKernelCreate = [](context_handle_t context, const instrument_params_in_t *paramsIn, instrument_params_out_t *paramsOut) { paramsOut->inst_kernel_binary = const_cast(paramsIn->orig_kernel_binary); paramsOut->inst_kernel_size = paramsIn->orig_kernel_size; @@ -2305,8 +2305,8 @@ TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenKernelDoesNotHaveDebugDataT debugDataSize = paramsIn->debug_data_size; }; gtpinCallbacks.onKernelSubmit = [](command_buffer_handle_t cb, uint64_t kernelId, uint32_t *entryOffset, resource_handle_t *resource) {}; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); MockKernelWithInternals mockKernel(*pDevice); mockKernel.kernelInfo.kernelDescriptor.external.debugData.reset(); @@ -2322,8 +2322,8 @@ TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenKernelHasDebugDataThenCorre static size_t debugDataSize = 0; void *dummyDebugData = reinterpret_cast(0x123456); size_t dummyDebugDataSize = 0x2245; - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; gtpinCallbacks.onKernelCreate = [](context_handle_t context, const instrument_params_in_t *paramsIn, instrument_params_out_t *paramsOut) { paramsOut->inst_kernel_binary = const_cast(paramsIn->orig_kernel_binary); paramsOut->inst_kernel_size = paramsIn->orig_kernel_size; @@ -2332,8 +2332,8 @@ TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenKernelHasDebugDataThenCorre debugDataSize = paramsIn->debug_data_size; }; gtpinCallbacks.onKernelSubmit = [](command_buffer_handle_t cb, uint64_t kernelId, uint32_t *entryOffset, resource_handle_t *resource) {}; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); MockKernelWithInternals mockKernel(*pDevice); mockKernel.kernelInfo.kernelDescriptor.external.debugData.reset(new DebugData()); @@ -2351,12 +2351,12 @@ HWTEST_F(GTPinTests, givenGtPinInitializedWhenSubmittingKernelCommandThenFlushed auto onKernelSubmitFnc = [](command_buffer_handle_t cb, uint64_t kernelId, uint32_t *entryOffset, resource_handle_t *resource) { return; }; - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; gtpinCallbacks.onKernelSubmit = onKernelSubmitFnc; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); @@ -2494,12 +2494,12 @@ HWTEST_F(GTPinTestsWithLocalMemory, givenGtPinCanUseSharedAllocationWhenGtPinBuf GTEST_SKIP(); } - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; GTPIN_DI_STATUS status = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, status); @@ -2627,9 +2627,9 @@ HWTEST_F(GTPinTestsWithLocalMemory, givenGtPinCanUseSharedAllocationWhenGtpinNot const auto family = pDevice->getHardwareInfo().platform.eRenderCoreFamily; MockGTPinHwHelperHw mockGTPinHwHelperHw; VariableBackup gtpinHwHelperBackup{>pinHwHelperFactory[family], &mockGTPinHwHelperHw}; - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; gtpinCallbacks.onKernelSubmit = [](command_buffer_handle_t cb, uint64_t kernelId, uint32_t *entryOffset, resource_handle_t *resource) { auto allocData = std::make_unique(0); auto mockGA = std::make_unique(); @@ -2638,8 +2638,8 @@ HWTEST_F(GTPinTestsWithLocalMemory, givenGtPinCanUseSharedAllocationWhenGtpinNot allocDataHandle = std::move(allocData); mockGAHandle = std::move(mockGA); }; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; GTPIN_DI_STATUS status = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, status); @@ -2659,12 +2659,12 @@ HWTEST_F(GTPinTestsWithLocalMemory, givenGtPinCanUseSharedAllocationWhenGtpinNot } TEST_F(GTPinTests, givenInitializedGTPinInterfaceWhenGtpinRemoveCommandQueueIsCalledThenAllKernelsFromCmdQueueAreRemoved) { - gtpinCallbacks.onContextCreate = OnContextCreate; - gtpinCallbacks.onContextDestroy = OnContextDestroy; - gtpinCallbacks.onKernelCreate = OnKernelCreate; - gtpinCallbacks.onKernelSubmit = OnKernelSubmit; - gtpinCallbacks.onCommandBufferCreate = OnCommandBufferCreate; - gtpinCallbacks.onCommandBufferComplete = OnCommandBufferComplete; + gtpinCallbacks.onContextCreate = onContextCreate; + gtpinCallbacks.onContextDestroy = onContextDestroy; + gtpinCallbacks.onKernelCreate = onKernelCreate; + gtpinCallbacks.onKernelSubmit = onKernelSubmit; + gtpinCallbacks.onCommandBufferCreate = onCommandBufferCreate; + gtpinCallbacks.onCommandBufferComplete = onCommandBufferComplete; retFromGtPin = GTPin_Init(>pinCallbacks, &driverServices, nullptr); EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin); diff --git a/opencl/test/unit_test/helpers/sampler_helpers_tests.cpp b/opencl/test/unit_test/helpers/sampler_helpers_tests.cpp index d47a1986fa..5e542049cb 100644 --- a/opencl/test/unit_test/helpers/sampler_helpers_tests.cpp +++ b/opencl/test/unit_test/helpers/sampler_helpers_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,14 +10,14 @@ #include "gtest/gtest.h" TEST(SamplerHelpers, WhenGettingAddrModeEnumsThenCorrectValuesAreReturned) { - EXPECT_EQ(CLK_ADDRESS_REPEAT, GetAddrModeEnum(CL_ADDRESS_REPEAT)); - EXPECT_EQ(CLK_ADDRESS_CLAMP_TO_EDGE, GetAddrModeEnum(CL_ADDRESS_CLAMP_TO_EDGE)); - EXPECT_EQ(CLK_ADDRESS_CLAMP, GetAddrModeEnum(CL_ADDRESS_CLAMP)); - EXPECT_EQ(CLK_ADDRESS_NONE, GetAddrModeEnum(CL_ADDRESS_NONE)); - EXPECT_EQ(CLK_ADDRESS_MIRRORED_REPEAT, GetAddrModeEnum(CL_ADDRESS_MIRRORED_REPEAT)); + EXPECT_EQ(CLK_ADDRESS_REPEAT, getAddrModeEnum(CL_ADDRESS_REPEAT)); + EXPECT_EQ(CLK_ADDRESS_CLAMP_TO_EDGE, getAddrModeEnum(CL_ADDRESS_CLAMP_TO_EDGE)); + EXPECT_EQ(CLK_ADDRESS_CLAMP, getAddrModeEnum(CL_ADDRESS_CLAMP)); + EXPECT_EQ(CLK_ADDRESS_NONE, getAddrModeEnum(CL_ADDRESS_NONE)); + EXPECT_EQ(CLK_ADDRESS_MIRRORED_REPEAT, getAddrModeEnum(CL_ADDRESS_MIRRORED_REPEAT)); } TEST(SamplerHelpers, WhenGettingNormCoordsEnumsThenCorrectValuesAreReturned) { - EXPECT_EQ(CLK_NORMALIZED_COORDS_TRUE, GetNormCoordsEnum(true)); - EXPECT_EQ(CLK_NORMALIZED_COORDS_FALSE, GetNormCoordsEnum(false)); + EXPECT_EQ(CLK_NORMALIZED_COORDS_TRUE, getNormCoordsEnum(true)); + EXPECT_EQ(CLK_NORMALIZED_COORDS_FALSE, getNormCoordsEnum(false)); } diff --git a/opencl/test/unit_test/helpers/timestamp_packet_2_tests.cpp b/opencl/test/unit_test/helpers/timestamp_packet_2_tests.cpp index bc8d7a8a9e..d5e7bfe9e8 100644 --- a/opencl/test/unit_test/helpers/timestamp_packet_2_tests.cpp +++ b/opencl/test/unit_test/helpers/timestamp_packet_2_tests.cpp @@ -129,7 +129,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, TimestampPacketTests, givenEmptyWaitlistAndEventWhe auto storeRegMemIt = find(hwParser.cmdList.begin(), hwParser.cmdList.end()); EXPECT_NE(storeRegMemIt, hwParser.cmdList.end()); GenCmdList::reverse_iterator rItorStoreRegMemIt(storeRegMemIt); - auto pipeControlIt = reverse_find(rItorStoreRegMemIt, hwParser.cmdList.rbegin()); + auto pipeControlIt = reverseFind(rItorStoreRegMemIt, hwParser.cmdList.rbegin()); auto pipeControl = genCmdCast(*pipeControlIt); EXPECT_NE(nullptr, pipeControl); @@ -220,7 +220,7 @@ HWTEST_F(TimestampPacketTests, givenBlockedQueueWhenEnqueueingBarrierThenRequest MockCommandQueueHw cmdQ(context, device.get(), nullptr); - auto userEvent = make_releaseable(); + auto userEvent = makeReleaseable(); cl_event waitlist[] = {userEvent.get()}; cmdQ.enqueueBarrierWithWaitList(1, waitlist, nullptr); EXPECT_TRUE(csr.stallingCommandsOnNextFlushRequired); diff --git a/opencl/test/unit_test/helpers/validator_tests.cpp b/opencl/test/unit_test/helpers/validator_tests.cpp index e3ebed3fad..ce3fa7c1aa 100644 --- a/opencl/test/unit_test/helpers/validator_tests.cpp +++ b/opencl/test/unit_test/helpers/validator_tests.cpp @@ -195,21 +195,21 @@ INSTANTIATE_TEST_CASE_P(PatternSize, PatternSizeInvalid, ::testing::Values(0, 3, 5, 256, 512, 1024)); -TEST(WithCastToInternal, GivenNullPtrWhenCastingThenNullPtrIsReturned) { +TEST(withCastToInternal, GivenNullPtrWhenCastingThenNullPtrIsReturned) { Context *pContext = nullptr; cl_context context = nullptr; - auto ret = WithCastToInternal(context, &pContext); + auto ret = withCastToInternal(context, &pContext); EXPECT_EQ(ret, nullptr); } -TEST(WithCastToInternal, GivenNonNullPtrWhenCastingThenNonNullPtrIsReturned) { +TEST(withCastToInternal, GivenNonNullPtrWhenCastingThenNonNullPtrIsReturned) { Context *pContext = nullptr; auto temp = std::unique_ptr(new MockContext()); cl_context context = temp.get(); - auto ret = WithCastToInternal(context, &pContext); + auto ret = withCastToInternal(context, &pContext); EXPECT_NE(ret, nullptr); } diff --git a/opencl/test/unit_test/kernel/clone_kernel_tests.cpp b/opencl/test/unit_test/kernel/clone_kernel_tests.cpp index 06f0293c45..fb18f0771b 100644 --- a/opencl/test/unit_test/kernel/clone_kernel_tests.cpp +++ b/opencl/test/unit_test/kernel/clone_kernel_tests.cpp @@ -429,10 +429,10 @@ TEST_F(CloneKernelTest, GivenArgSamplerWhenCloningKernelThenKernelInfoIsCorrect) EXPECT_EQ(sampler->getSnapWaValue(), *pSnapWa); auto pAddressingMode = ptrOffset(crossThreadData, clonedArg.metadataPayload.samplerAddressingMode); - EXPECT_EQ(GetAddrModeEnum(sampler->addressingMode), *pAddressingMode); + EXPECT_EQ(getAddrModeEnum(sampler->addressingMode), *pAddressingMode); auto pNormalizedCoords = ptrOffset(crossThreadData, clonedArg.metadataPayload.samplerNormalizedCoords); - EXPECT_EQ(GetNormCoordsEnum(sampler->normalizedCoordinates), *pNormalizedCoords); + EXPECT_EQ(getNormCoordsEnum(sampler->normalizedCoordinates), *pNormalizedCoords); EXPECT_EQ(3, sampler->getRefInternalCount()); } diff --git a/opencl/test/unit_test/main.cpp b/opencl/test/unit_test/main.cpp index 6c3f011730..19865fb58f 100644 --- a/opencl/test/unit_test/main.cpp +++ b/opencl/test/unit_test/main.cpp @@ -114,7 +114,7 @@ void applyWorkarounds() { //Create FileLogger to prevent false memory leaks { - NEO::FileLoggerInstance(); + NEO::fileLoggerInstance(); } } diff --git a/opencl/test/unit_test/mem_obj/buffer_bcs_tests.cpp b/opencl/test/unit_test/mem_obj/buffer_bcs_tests.cpp index 61afee1ebf..207b684467 100644 --- a/opencl/test/unit_test/mem_obj/buffer_bcs_tests.cpp +++ b/opencl/test/unit_test/mem_obj/buffer_bcs_tests.cpp @@ -450,12 +450,12 @@ HWTEST_TEMPLATED_F(BcsBufferTests, givenBlockedBlitEnqueueWhenUnblockingThenMake mockCmdQ->obtainNewTimestampPacketNodes(1, previousTimestampPackets, false, *bcsCsr); auto dependencyFromPreviousEnqueue = mockCmdQ->timestampPacketContainer->peekNodes()[0]; - auto event = make_releaseable(mockCmdQ, CL_COMMAND_READ_BUFFER, 0, 0); + auto event = makeReleaseable(mockCmdQ, CL_COMMAND_READ_BUFFER, 0, 0); MockTimestampPacketContainer eventDependencyContainer(*bcsCsr->getTimestampPacketAllocator(), 1); auto eventDependency = eventDependencyContainer.getNode(0); event->addTimestampPacketNodes(eventDependencyContainer); - auto userEvent = make_releaseable(bcsMockContext.get()); + auto userEvent = makeReleaseable(bcsMockContext.get()); cl_event waitlist[] = {userEvent.get(), event.get()}; commandQueue->enqueueReadBuffer(bufferForBlt.get(), CL_FALSE, 0, 1, &hostPtr, nullptr, 2, waitlist, nullptr); diff --git a/opencl/test/unit_test/mem_obj/image_compression_fixture.h b/opencl/test/unit_test/mem_obj/image_compression_fixture.h index 9fd88b1ed5..d8b9a988e3 100644 --- a/opencl/test/unit_test/mem_obj/image_compression_fixture.h +++ b/opencl/test/unit_test/mem_obj/image_compression_fixture.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -36,7 +36,7 @@ class ImageCompressionTests : public ::testing::Test { mockExecutionEnvironment->memoryManager.reset(myMemoryManager); mockDevice = std::make_unique(MockDevice::createWithExecutionEnvironment(nullptr, mockExecutionEnvironment, 0u)); - mockContext = make_releaseable(mockDevice.get()); + mockContext = makeReleaseable(mockDevice.get()); } MockExecutionEnvironment *mockExecutionEnvironment; diff --git a/opencl/test/unit_test/memory_manager/surface_tests.cpp b/opencl/test/unit_test/memory_manager/surface_tests.cpp index d5dbf094fa..ec5d4c21c7 100644 --- a/opencl/test/unit_test/memory_manager/surface_tests.cpp +++ b/opencl/test/unit_test/memory_manager/surface_tests.cpp @@ -27,25 +27,25 @@ typedef ::testing::Types -Surface *Create(char *data, MockBuffer *buffer, GraphicsAllocation *gfxAllocation); +Surface *create(char *data, MockBuffer *buffer, GraphicsAllocation *gfxAllocation); template <> -Surface *Create(char *data, MockBuffer *buffer, GraphicsAllocation *gfxAllocation) { +Surface *create(char *data, MockBuffer *buffer, GraphicsAllocation *gfxAllocation) { return new NullSurface; } template <> -Surface *Create(char *data, MockBuffer *buffer, GraphicsAllocation *gfxAllocation) { +Surface *create(char *data, MockBuffer *buffer, GraphicsAllocation *gfxAllocation) { return new HostPtrSurface(data, 10, gfxAllocation); } template <> -Surface *Create(char *data, MockBuffer *buffer, GraphicsAllocation *gfxAllocation) { +Surface *create(char *data, MockBuffer *buffer, GraphicsAllocation *gfxAllocation) { return new MemObjSurface(buffer); } template <> -Surface *Create(char *data, MockBuffer *buffer, GraphicsAllocation *gfxAllocation) { +Surface *create(char *data, MockBuffer *buffer, GraphicsAllocation *gfxAllocation) { return new GeneralSurface(gfxAllocation); } } // namespace createSurface @@ -72,7 +72,7 @@ HWTEST_TYPED_TEST(SurfaceTest, GivenSurfaceWhenInterfaceIsUsedThenSurfaceBehaves auto osContext = executionEnvironment->memoryManager->createAndRegisterOsContext(csr.get(), EngineDescriptorHelper::getDefaultDescriptor(engine, PreemptionHelper::getDefaultPreemptionMode(hwInfo))); csr->setupContext(*osContext); - Surface *surface = createSurface::Create(this->data, + Surface *surface = createSurface::create(this->data, &this->buffer, &this->gfxAllocation); ASSERT_NE(nullptr, surface); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks) @@ -100,7 +100,7 @@ class CoherentMemObjSurface : public SurfaceTest { }; TEST_F(CoherentMemObjSurface, GivenCoherentMemObjWhenCreatingSurfaceFromMemObjThenSurfaceIsCoherent) { - Surface *surface = createSurface::Create(this->data, + Surface *surface = createSurface::create(this->data, &this->buffer, &this->gfxAllocation); diff --git a/opencl/test/unit_test/mt_tests/event/user_events_tests_mt.cpp b/opencl/test/unit_test/mt_tests/event/user_events_tests_mt.cpp index a1dac1637a..09c64a25c3 100644 --- a/opencl/test/unit_test/mt_tests/event/user_events_tests_mt.cpp +++ b/opencl/test/unit_test/mt_tests/event/user_events_tests_mt.cpp @@ -16,7 +16,7 @@ typedef HelloWorldTest EventTests; TEST_F(MockEventTests, GivenEventCreatedFromUserEventsThatIsNotSignaledThenDoNotFlushToCsr) { - uEvent = make_releaseable(); + uEvent = makeReleaseable(); cl_event retEvent = nullptr; cl_event eventWaitList[] = {uEvent.get()}; int sizeOfWaitList = sizeof(eventWaitList) / sizeof(cl_event); diff --git a/opencl/test/unit_test/mt_tests/utilities/reference_tracked_object_tests_mt.cpp b/opencl/test/unit_test/mt_tests/utilities/reference_tracked_object_tests_mt.cpp index 1ecb6cf4ab..bcdaacbd99 100644 --- a/opencl/test/unit_test/mt_tests/utilities/reference_tracked_object_tests_mt.cpp +++ b/opencl/test/unit_test/mt_tests/utilities/reference_tracked_object_tests_mt.cpp @@ -63,7 +63,7 @@ struct MockReferenceTrackedObjectDerivative : MockReferenceTrackedObject { } }; -void DecRefCount(MockReferenceTrackedObject *obj, bool useInternalRefCount, std::atomic *flagInsideCustomDeleter, std::atomic *flagUseCustomDeleter, std::atomic *flagAfterBgDecRefCount) { +void decRefCount(MockReferenceTrackedObject *obj, bool useInternalRefCount, std::atomic *flagInsideCustomDeleter, std::atomic *flagUseCustomDeleter, std::atomic *flagAfterBgDecRefCount) { while (*flagInsideCustomDeleter == false) { } @@ -97,7 +97,7 @@ TEST(ReferenceTrackedObject, whenDecreasingApiRefcountSimultaneouslyThenRetrieve ASSERT_EQ(2, obj->getRefInternalCount()); ASSERT_EQ(0, marker); - std::thread bgThread(DecRefCount, obj, false, &flagInsideCustomDeleter, &flagUseCustomDeleter, &flagAfterBgDecRefCount); + std::thread bgThread(decRefCount, obj, false, &flagInsideCustomDeleter, &flagUseCustomDeleter, &flagAfterBgDecRefCount); obj->decRefApi(); bgThread.join(); @@ -124,7 +124,7 @@ TEST(ReferenceTrackedObject, whenDecreasingInternalRefcountSimultaneouslyThenRet ASSERT_EQ(0, obj->getRefApiCount()); ASSERT_EQ(0, marker); - std::thread bgThread(DecRefCount, obj, true, &flagInsideCustomDeleter, &flagUseCustomDeleter, &flagAfterBgDecRefCount); + std::thread bgThread(decRefCount, obj, true, &flagInsideCustomDeleter, &flagUseCustomDeleter, &flagAfterBgDecRefCount); obj->decRefInternal(); bgThread.join(); diff --git a/opencl/test/unit_test/profiling/profiling_tests.cpp b/opencl/test/unit_test/profiling/profiling_tests.cpp index aa9a031499..a1211843cf 100644 --- a/opencl/test/unit_test/profiling/profiling_tests.cpp +++ b/opencl/test/unit_test/profiling/profiling_tests.cpp @@ -162,7 +162,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ProfilingTests, GivenCommandQueueWithProfolingWhenWa ASSERT_NE(cmdList.end(), itorGPGPUWalkerCmd); // Check PIPE_CONTROLs - auto itorBeforePC = reverse_find(rItorGPGPUWalkerCmd, cmdList.rbegin()); + auto itorBeforePC = reverseFind(rItorGPGPUWalkerCmd, cmdList.rbegin()); ASSERT_NE(cmdList.rbegin(), itorBeforePC); auto pBeforePC = genCmdCast(*itorBeforePC); ASSERT_NE(nullptr, pBeforePC); @@ -243,7 +243,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ProfilingTests, GivenCommandQueueWithProflingWhenWal ASSERT_NE(cmdList.end(), itorGPGPUWalkerCmd); // Check MI_STORE_REGISTER_MEMs - auto itorBeforeMI = reverse_find(rItorGPGPUWalkerCmd, cmdList.rbegin()); + auto itorBeforeMI = reverseFind(rItorGPGPUWalkerCmd, cmdList.rbegin()); ASSERT_NE(cmdList.rbegin(), itorBeforeMI); auto pBeforeMI = genCmdCast(*itorBeforeMI); pBeforeMI = genCmdCast(*itorBeforeMI); @@ -303,7 +303,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ProfilingTests, GivenCommandQueueBlockedWithProfilin ASSERT_NE(cmdList.end(), itorGPGPUWalkerCmd); // Check PIPE_CONTROLs - auto itorBeforePC = reverse_find(rItorGPGPUWalkerCmd, cmdList.rbegin()); + auto itorBeforePC = reverseFind(rItorGPGPUWalkerCmd, cmdList.rbegin()); ASSERT_NE(cmdList.rbegin(), itorBeforePC); auto pBeforePC = genCmdCast(*itorBeforePC); ASSERT_NE(nullptr, pBeforePC); @@ -362,7 +362,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ProfilingTests, GivenCommandQueueBlockedWithProfilin ASSERT_NE(cmdList.end(), itorGPGPUWalkerCmd); // Check MI_STORE_REGISTER_MEMs - auto itorBeforeMI = reverse_find(rItorGPGPUWalkerCmd, cmdList.rbegin()); + auto itorBeforeMI = reverseFind(rItorGPGPUWalkerCmd, cmdList.rbegin()); ASSERT_NE(cmdList.rbegin(), itorBeforeMI); auto pBeforeMI = genCmdCast(*itorBeforeMI); pBeforeMI = genCmdCast(*itorBeforeMI); @@ -818,7 +818,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ProfilingWithPerfCountersTests, GivenCommandQueueWit ASSERT_NE(cmdList.end(), itorGPGPUWalkerCmd); // Check PIPE_CONTROLs - auto itorBeforePC = reverse_find(rItorGPGPUWalkerCmd, cmdList.rbegin()); + auto itorBeforePC = reverseFind(rItorGPGPUWalkerCmd, cmdList.rbegin()); ASSERT_NE(cmdList.rbegin(), itorBeforePC); auto pBeforePC = genCmdCast(*itorBeforePC); ASSERT_NE(nullptr, pBeforePC); @@ -869,7 +869,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ProfilingWithPerfCountersTests, GivenCommandQueueWit ASSERT_NE(cmdList.end(), itorGPGPUWalkerCmd); // Check PIPE_CONTROLs - auto itorBeforePC = reverse_find(rItorGPGPUWalkerCmd, cmdList.rbegin()); + auto itorBeforePC = reverseFind(rItorGPGPUWalkerCmd, cmdList.rbegin()); ASSERT_NE(cmdList.rbegin(), itorBeforePC); auto pBeforePC = genCmdCast(*itorBeforePC); ASSERT_NE(nullptr, pBeforePC); @@ -929,7 +929,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ProfilingWithPerfCountersTests, GivenCommandQueueBlo ASSERT_NE(cmdList.end(), itorGPGPUWalkerCmd); // Check PIPE_CONTROLs - auto itorBeforePC = reverse_find(rItorGPGPUWalkerCmd, cmdList.rbegin()); + auto itorBeforePC = reverseFind(rItorGPGPUWalkerCmd, cmdList.rbegin()); ASSERT_NE(cmdList.rbegin(), itorBeforePC); auto pBeforePC = genCmdCast(*itorBeforePC); ASSERT_NE(nullptr, pBeforePC); @@ -977,7 +977,7 @@ HWTEST_F(ProfilingWithPerfCountersTests, GivenCommandQueueWithProfilingPerfCount ASSERT_NE(cmdList.end(), itorGPGPUWalkerCmd); // Check PIPE_CONTROLs - auto itorBeforePC = reverse_find(rItorGPGPUWalkerCmd, cmdList.rbegin()); + auto itorBeforePC = reverseFind(rItorGPGPUWalkerCmd, cmdList.rbegin()); ASSERT_NE(cmdList.rbegin(), itorBeforePC); auto pBeforePC = genCmdCast(*itorBeforePC); ASSERT_NE(nullptr, pBeforePC); @@ -1103,7 +1103,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ProfilingWithPerfCountersOnCCSTests, givenCommandQue ASSERT_NE(cmdList.end(), itorGPGPUWalkerCmd); // check PIPE_CONTROLs - auto itorBeforePC = reverse_find(rItorGPGPUWalkerCmd, cmdList.rbegin()); + auto itorBeforePC = reverseFind(rItorGPGPUWalkerCmd, cmdList.rbegin()); ASSERT_NE(cmdList.rbegin(), itorBeforePC); auto pBeforePC = genCmdCast(*itorBeforePC); ASSERT_NE(nullptr, pBeforePC); @@ -1152,7 +1152,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ProfilingWithPerfCountersOnCCSTests, givenCommandQue ASSERT_NE(cmdList.end(), itorGPGPUWalkerCmd); // check PIPE_CONTROLs - auto itorBeforePC = reverse_find(rItorGPGPUWalkerCmd, cmdList.rbegin()); + auto itorBeforePC = reverseFind(rItorGPGPUWalkerCmd, cmdList.rbegin()); ASSERT_NE(cmdList.rbegin(), itorBeforePC); auto pBeforePC = genCmdCast(*itorBeforePC); ASSERT_NE(nullptr, pBeforePC); diff --git a/opencl/test/unit_test/program/printf_helper_tests.cpp b/opencl/test/unit_test/program/printf_helper_tests.cpp index dec3f4e904..c17d4d3466 100644 --- a/opencl/test/unit_test/program/printf_helper_tests.cpp +++ b/opencl/test/unit_test/program/printf_helper_tests.cpp @@ -915,7 +915,7 @@ TEST(printToSTDOUTTest, GivenStringWhenPrintingToStdoutThenOutputOccurs) { TEST(simpleSprintf, GivenEmptyFormatStringWhenSimpleSprintfIsCalledThenBailOutWith0) { char out[1024] = {7, 0}; - auto ret = simple_sprintf(out, sizeof(out), "", 3.0f); + auto ret = simpleSprintf(out, sizeof(out), "", 3.0f); EXPECT_EQ(0U, ret); EXPECT_EQ(0, out[0]); EXPECT_EQ(0, out[1]); diff --git a/opencl/test/unit_test/sampler/sampler_set_arg_tests.cpp b/opencl/test/unit_test/sampler/sampler_set_arg_tests.cpp index 71d3b67686..55b5d53e04 100644 --- a/opencl/test/unit_test/sampler/sampler_set_arg_tests.cpp +++ b/opencl/test/unit_test/sampler/sampler_set_arg_tests.cpp @@ -426,7 +426,7 @@ HWTEST_P(NormalizedTest, WhenSettingKernelArgSamplerThenCoordsAreCorrect) { auto crossThreadData = reinterpret_cast(pKernel->getCrossThreadData()); auto normalizedCoordsAddress = ptrOffset(crossThreadData, 0x10); - unsigned int normalizedCoordsValue = GetNormCoordsEnum(normalizedCoordinates); + unsigned int normalizedCoordsValue = getNormCoordsEnum(normalizedCoordinates); EXPECT_EQ(normalizedCoordsValue, *normalizedCoordsAddress); } @@ -510,7 +510,7 @@ HWTEST_P(AddressingModeTest, WhenSettingKernelArgSamplerThenModesAreCorrect) { auto crossThreadData = reinterpret_cast(pKernel->getCrossThreadData()); auto addressingModeAddress = ptrOffset(crossThreadData, 0x8); - unsigned int addresingValue = GetAddrModeEnum(addressingMode); + unsigned int addresingValue = getAddrModeEnum(addressingMode); EXPECT_EQ(addresingValue, *addressingModeAddress); } diff --git a/opencl/test/unit_test/sharings/va/va_sharing_linux_tests.cpp b/opencl/test/unit_test/sharings/va/va_sharing_linux_tests.cpp index 581721f858..1f8b0b99ff 100644 --- a/opencl/test/unit_test/sharings/va/va_sharing_linux_tests.cpp +++ b/opencl/test/unit_test/sharings/va/va_sharing_linux_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -62,7 +62,7 @@ TEST(VASharingFunctions, GivenInitFunctionsWhenDLOpenFailsThenFunctionsAreNull) EXPECT_TRUE(functions.wereFunctionsAssignedNull()); } -void *GetLibFunc(VADisplay vaDisplay, const char *func) { +void *getLibFunc(VADisplay vaDisplay, const char *func) { return reinterpret_cast(uintptr_t(0xdeadbeef)); } @@ -79,7 +79,7 @@ TEST(VASharingFunctions, GivenInitFunctionsWhenDLOpenSuccedsThenFunctionsAreNotN }; VASharingFunctions::fdlsym = [&](void *handle, const char *symbol) -> void * { - return (void *)GetLibFunc; + return (void *)getLibFunc; }; VASharingFunctions::fdlclose = [&](void *handle) -> int { @@ -105,7 +105,7 @@ TEST(VASharingFunctions, GivenInitFunctionsWhenEnableVaLibCallsThenFunctionsAreA }; VASharingFunctions::fdlsym = [&](void *handle, const char *symbol) -> void * { - return (void *)GetLibFunc; + return (void *)getLibFunc; }; VASharingFunctions::fdlclose = [&](void *handle) -> int { diff --git a/shared/generate_cpp_array/source/generate_cpp_array.cpp b/shared/generate_cpp_array/source/generate_cpp_array.cpp index 0179b6fb20..c4e15da62e 100644 --- a/shared/generate_cpp_array/source/generate_cpp_array.cpp +++ b/shared/generate_cpp_array/source/generate_cpp_array.cpp @@ -13,7 +13,7 @@ constexpr int MIN_ARG_COUNT = 7; -static void show_usage(std::string name) { +static void showUsage(std::string name) { std::cerr << "Usage " << name << " - ALL BUT -p, --platform MUST BE SPECIFIED\n" << "Options :\n" << "\t -f, --file\t\tA file which content will be parsed into a uint32_t array in a .cpp file\n" @@ -73,7 +73,7 @@ std::string parseToCharArray(std::unique_ptr &binary, size_t size, st int main(int argc, char *argv[]) { if (argc < MIN_ARG_COUNT) { - show_usage(argv[0]); + showUsage(argv[0]); return 1; } std::string fileName; diff --git a/shared/source/debug_settings/debug_settings_manager.cpp b/shared/source/debug_settings/debug_settings_manager.cpp index 203f5b5f99..2230e9f6ed 100644 --- a/shared/source/debug_settings/debug_settings_manager.cpp +++ b/shared/source/debug_settings/debug_settings_manager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -19,7 +19,7 @@ #include namespace std { -static std::string to_string(const std::string &arg) { +static std::string to_string(const std::string &arg) { // NOLINT(readability-identifier-naming) return arg; } } // namespace std diff --git a/shared/source/helpers/casts.h b/shared/source/helpers/casts.h index 9f431cabf6..5416813f31 100644 --- a/shared/source/helpers/casts.h +++ b/shared/source/helpers/casts.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,7 +11,7 @@ namespace NEO { template -constexpr To r_pod_cast(From *f) { +constexpr To r_pod_cast(From *f) { // NOLINT(readability-identifier-naming) typedef typename std::remove_pointer::type FromType; typedef typename std::remove_pointer::type ToType; @@ -25,4 +25,4 @@ constexpr To r_pod_cast(From *f) { return reinterpret_cast(f); } -} // namespace NEO \ No newline at end of file +} // namespace NEO diff --git a/shared/source/helpers/pause_on_gpu_properties.h b/shared/source/helpers/pause_on_gpu_properties.h index 107365465e..e1f1c5cefe 100644 --- a/shared/source/helpers/pause_on_gpu_properties.h +++ b/shared/source/helpers/pause_on_gpu_properties.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -47,7 +47,7 @@ inline bool pauseModeAllowed(int32_t debugFlagValue, uint32_t taskCount, PauseMo return (debugFlagValue == static_cast(taskCount)); } -inline bool GpuScratchRegWriteAllowed(int32_t debugFlagValue, uint32_t taskCount) { +inline bool gpuScratchRegWriteAllowed(int32_t debugFlagValue, uint32_t taskCount) { if (!featureEnabled(debugFlagValue)) { // feature disabled return false; diff --git a/shared/source/helpers/stdio.h b/shared/source/helpers/stdio.h index 6807ec4576..9f3376c476 100644 --- a/shared/source/helpers/stdio.h +++ b/shared/source/helpers/stdio.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -13,7 +13,7 @@ #include #include -inline int fopen_s(FILE **pFile, const char *filename, const char *mode) { +inline int fopen_s(FILE **pFile, const char *filename, const char *mode) { // NOLINT(readability-identifier-naming) if ((pFile == nullptr) || (filename == nullptr) || (mode == nullptr)) { return -EINVAL; } diff --git a/shared/source/helpers/string.h b/shared/source/helpers/string.h index d4c0dbf8bf..cbd3c89268 100644 --- a/shared/source/helpers/string.h +++ b/shared/source/helpers/string.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -16,7 +16,7 @@ #include #include -inline int strcpy_s(char *dst, size_t dstSize, const char *src) { +inline int strcpy_s(char *dst, size_t dstSize, const char *src) { // NOLINT(readability-identifier-naming) if ((dst == nullptr) || (src == nullptr)) { return -EINVAL; } @@ -31,7 +31,7 @@ inline int strcpy_s(char *dst, size_t dstSize, const char *src) { return 0; } -inline int strncpy_s(char *dst, size_t numberOfElements, const char *src, size_t count) { +inline int strncpy_s(char *dst, size_t numberOfElements, const char *src, size_t count) { // NOLINT(readability-identifier-naming) if ((dst == nullptr) || (src == nullptr)) { return -EINVAL; } @@ -53,7 +53,7 @@ inline int strncpy_s(char *dst, size_t numberOfElements, const char *src, size_t return 0; } -inline size_t strnlen_s(const char *str, size_t count) { +inline size_t strnlen_s(const char *str, size_t count) { // NOLINT(readability-identifier-naming) if (str == nullptr) { return 0; } @@ -66,7 +66,7 @@ inline size_t strnlen_s(const char *str, size_t count) { return count; } -inline int memcpy_s(void *dst, size_t destSize, const void *src, size_t count) { +inline int memcpy_s(void *dst, size_t destSize, const void *src, size_t count) { // NOLINT(readability-identifier-naming) if ((dst == nullptr) || (src == nullptr)) { return -EINVAL; } @@ -79,7 +79,7 @@ inline int memcpy_s(void *dst, size_t destSize, const void *src, size_t count) { return 0; } -inline int memmove_s(void *dst, size_t numberOfElements, const void *src, size_t count) { +inline int memmove_s(void *dst, size_t numberOfElements, const void *src, size_t count) { // NOLINT(readability-identifier-naming) if ((dst == nullptr) || (src == nullptr)) { return -EINVAL; } @@ -93,7 +93,7 @@ inline int memmove_s(void *dst, size_t numberOfElements, const void *src, size_t } template -inline int snprintf_s(char *buffer, size_t sizeOfBuffer, size_t count, const char *format, Args &&...args) { +inline int snprintf_s(char *buffer, size_t sizeOfBuffer, size_t count, const char *format, Args &&...args) { // NOLINT(readability-identifier-naming) if ((buffer == nullptr) || (format == nullptr)) { return -EINVAL; } @@ -106,7 +106,7 @@ inline int snprintf_s(char *buffer, size_t sizeOfBuffer, size_t count, const cha #if defined(_WIN32) template -inline int snprintf_s(char *buffer, size_t sizeOfBuffer, size_t count, const char *format, Args &&...args) { +inline int snprintf_s(char *buffer, size_t sizeOfBuffer, size_t count, const char *format, Args &&...args) { // NOLINT(readability-identifier-naming) if ((buffer == nullptr) || (format == nullptr)) { return -EINVAL; } diff --git a/shared/source/memory_manager/graphics_allocation.cpp b/shared/source/memory_manager/graphics_allocation.cpp index 284dcf08f0..d48be31852 100644 --- a/shared/source/memory_manager/graphics_allocation.cpp +++ b/shared/source/memory_manager/graphics_allocation.cpp @@ -17,7 +17,7 @@ namespace NEO { void GraphicsAllocation::setAllocationType(AllocationType allocationType) { this->allocationType = allocationType; - FileLoggerInstance().logAllocation(this); + fileLoggerInstance().logAllocation(this); } GraphicsAllocation::GraphicsAllocation(uint32_t rootDeviceIndex, size_t numGmms, AllocationType allocationType, void *cpuPtrIn, uint64_t gpuAddress, diff --git a/shared/source/memory_manager/memory_manager.cpp b/shared/source/memory_manager/memory_manager.cpp index 73ee8bd17d..5a24e1c7de 100644 --- a/shared/source/memory_manager/memory_manager.cpp +++ b/shared/source/memory_manager/memory_manager.cpp @@ -497,7 +497,7 @@ GraphicsAllocation *MemoryManager::allocateGraphicsMemoryInPreferredPool(const A return nullptr; } - FileLoggerInstance().logAllocation(allocation); + fileLoggerInstance().logAllocation(allocation); registerAllocationInOs(allocation); return allocation; } diff --git a/shared/source/os_interface/linux/hw_info_config_uuid_xehp_and_later.inl b/shared/source/os_interface/linux/hw_info_config_uuid_xehp_and_later.inl index e3fc464311..528ac4eb31 100644 --- a/shared/source/os_interface/linux/hw_info_config_uuid_xehp_and_later.inl +++ b/shared/source/os_interface/linux/hw_info_config_uuid_xehp_and_later.inl @@ -6,7 +6,7 @@ */ namespace UuidUtil { -static inline bool UuidReadFromTelem(std::string_view telemDir, std::array &guidString, +static inline bool uuidReadFromTelem(std::string_view telemDir, std::array &guidString, const uint64_t offset, const uint8_t deviceIndex, std::array &uuid); } // namespace UuidUtil @@ -47,12 +47,12 @@ bool HwInfoConfigHw::getUuid(Device *device, std::array &guidString, const uint64_t offset, +bool uuidReadFromTelem(std::string_view telemDir, std::array &guidString, const uint64_t offset, const uint8_t deviceIndex, std::array &uuid) { auto pos = guidUuidOffsetMap.find(guidString.data()); if (pos != guidUuidOffsetMap.end()) { @@ -66,4 +66,4 @@ bool UuidReadFromTelem(std::string_view telemDir, std::array -size_t simple_sprintf(char *output, size_t outputSize, const char *format, T value) { +size_t simpleSprintf(char *output, size_t outputSize, const char *format, T value) { return snprintf(output, outputSize, format, value); } -size_t simple_sprintf(char *output, size_t outputSize, const char *format, const char *value) { +size_t simpleSprintf(char *output, size_t outputSize, const char *format, const char *value) { return snprintf(output, outputSize, format, value); } -template size_t simple_sprintf(char *output, size_t output_size, const char *format, float value); -template size_t simple_sprintf(char *output, size_t output_size, const char *format, double value); -template size_t simple_sprintf(char *output, size_t output_size, const char *format, char value); -template size_t simple_sprintf(char *output, size_t output_size, const char *format, int8_t value); -template size_t simple_sprintf(char *output, size_t output_size, const char *format, int16_t value); -template size_t simple_sprintf(char *output, size_t output_size, const char *format, int32_t value); -template size_t simple_sprintf(char *output, size_t output_size, const char *format, int64_t value); -template size_t simple_sprintf(char *output, size_t output_size, const char *format, uint8_t value); -template size_t simple_sprintf(char *output, size_t output_size, const char *format, uint16_t value); -template size_t simple_sprintf(char *output, size_t output_size, const char *format, uint32_t value); -template size_t simple_sprintf(char *output, size_t output_size, const char *format, uint64_t value); +template size_t simpleSprintf(char *output, size_t output_size, const char *format, float value); +template size_t simpleSprintf(char *output, size_t output_size, const char *format, double value); +template size_t simpleSprintf(char *output, size_t output_size, const char *format, char value); +template size_t simpleSprintf(char *output, size_t output_size, const char *format, int8_t value); +template size_t simpleSprintf(char *output, size_t output_size, const char *format, int16_t value); +template size_t simpleSprintf(char *output, size_t output_size, const char *format, int32_t value); +template size_t simpleSprintf(char *output, size_t output_size, const char *format, int64_t value); +template size_t simpleSprintf(char *output, size_t output_size, const char *format, uint8_t value); +template size_t simpleSprintf(char *output, size_t output_size, const char *format, uint16_t value); +template size_t simpleSprintf(char *output, size_t output_size, const char *format, uint32_t value); +template size_t simpleSprintf(char *output, size_t output_size, const char *format, uint64_t value); diff --git a/shared/source/os_interface/print.h b/shared/source/os_interface/print.h index 8c04cd2c1f..7cc214e6ec 100644 --- a/shared/source/os_interface/print.h +++ b/shared/source/os_interface/print.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,5 +12,5 @@ void printToSTDOUT(const char *str); template -size_t simple_sprintf(char *output, size_t outputSize, const char *format, T value); -size_t simple_sprintf(char *output, size_t outputSize, const char *format, const char *value); +size_t simpleSprintf(char *output, size_t outputSize, const char *format, T value); +size_t simpleSprintf(char *output, size_t outputSize, const char *format, const char *value); diff --git a/shared/source/os_interface/windows/print.cpp b/shared/source/os_interface/windows/print.cpp index f4cc8c965b..08f166123f 100644 --- a/shared/source/os_interface/windows/print.cpp +++ b/shared/source/os_interface/windows/print.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -33,7 +33,7 @@ void printToSTDOUT(const char *str) { } template -size_t simple_sprintf(char *output, size_t outputSize, const char *format, T value) { +size_t simpleSprintf(char *output, size_t outputSize, const char *format, T value) { #if (_MSC_VER == 1800) _set_output_format(_TWO_DIGIT_EXPONENT); #endif @@ -64,18 +64,18 @@ size_t simple_sprintf(char *output, size_t outputSize, const char *format, T val } } -size_t simple_sprintf(char *output, size_t outputSize, const char *format, const char *value) { +size_t simpleSprintf(char *output, size_t outputSize, const char *format, const char *value) { return sprintf_s(output, outputSize, format, value); } -template size_t simple_sprintf(char *output, size_t output_size, const char *format, float value); -template size_t simple_sprintf(char *output, size_t output_size, const char *format, double value); -template size_t simple_sprintf(char *output, size_t output_size, const char *format, char value); -template size_t simple_sprintf(char *output, size_t output_size, const char *format, int8_t value); -template size_t simple_sprintf(char *output, size_t output_size, const char *format, int16_t value); -template size_t simple_sprintf(char *output, size_t output_size, const char *format, int32_t value); -template size_t simple_sprintf(char *output, size_t output_size, const char *format, int64_t value); -template size_t simple_sprintf(char *output, size_t output_size, const char *format, uint8_t value); -template size_t simple_sprintf(char *output, size_t output_size, const char *format, uint16_t value); -template size_t simple_sprintf(char *output, size_t output_size, const char *format, uint32_t value); -template size_t simple_sprintf(char *output, size_t output_size, const char *format, uint64_t value); +template size_t simpleSprintf(char *output, size_t output_size, const char *format, float value); +template size_t simpleSprintf(char *output, size_t output_size, const char *format, double value); +template size_t simpleSprintf(char *output, size_t output_size, const char *format, char value); +template size_t simpleSprintf(char *output, size_t output_size, const char *format, int8_t value); +template size_t simpleSprintf(char *output, size_t output_size, const char *format, int16_t value); +template size_t simpleSprintf(char *output, size_t output_size, const char *format, int32_t value); +template size_t simpleSprintf(char *output, size_t output_size, const char *format, int64_t value); +template size_t simpleSprintf(char *output, size_t output_size, const char *format, uint8_t value); +template size_t simpleSprintf(char *output, size_t output_size, const char *format, uint16_t value); +template size_t simpleSprintf(char *output, size_t output_size, const char *format, uint32_t value); +template size_t simpleSprintf(char *output, size_t output_size, const char *format, uint64_t value); diff --git a/shared/source/os_interface/windows/wddm_memory_manager.cpp b/shared/source/os_interface/windows/wddm_memory_manager.cpp index f42d1fb962..28461f0c9e 100644 --- a/shared/source/os_interface/windows/wddm_memory_manager.cpp +++ b/shared/source/os_interface/windows/wddm_memory_manager.cpp @@ -449,7 +449,7 @@ GraphicsAllocation *WddmMemoryManager::createAllocationFromHandle(osHandle handl return nullptr; } - FileLoggerInstance().logAllocation(allocation.get()); + fileLoggerInstance().logAllocation(allocation.get()); return allocation.release(); } diff --git a/shared/source/program/print_formatter.cpp b/shared/source/program/print_formatter.cpp index 0d595b956b..c6043af826 100644 --- a/shared/source/program/print_formatter.cpp +++ b/shared/source/program/print_formatter.cpp @@ -163,10 +163,10 @@ size_t PrintFormatter::printStringToken(char *output, size_t size, const char *f switch (type) { default: - return simple_sprintf(output, size, formatString, 0); + return simpleSprintf(output, size, formatString, 0); case PRINTF_DATA_TYPE::STRING: case PRINTF_DATA_TYPE::POINTER: - return simple_sprintf(output, size, formatString, string); + return simpleSprintf(output, size, formatString, string); } } @@ -178,7 +178,7 @@ size_t PrintFormatter::printPointerToken(char *output, size_t size, const char * value &= 0x00000000FFFFFFFF; } - return simple_sprintf(output, size, formatString, value); + return simpleSprintf(output, size, formatString, value); } const char *PrintFormatter::queryPrintfString(uint32_t index) const { diff --git a/shared/source/program/print_formatter.h b/shared/source/program/print_formatter.h index e7c9dab187..4978f8f7fa 100644 --- a/shared/source/program/print_formatter.h +++ b/shared/source/program/print_formatter.h @@ -18,7 +18,7 @@ #include #include -extern int memcpy_s(void *dst, size_t destSize, const void *src, size_t count); +extern int memcpy_s(void *dst, size_t destSize, const void *src, size_t count); // NOLINT(readability-identifier-naming) namespace NEO { @@ -84,7 +84,7 @@ class PrintFormatter { size_t typedPrintToken(char *output, size_t size, const char *formatString) { T value = {0}; read(&value); - return simple_sprintf(output, size, formatString, value); + return simpleSprintf(output, size, formatString, value); } template @@ -101,9 +101,9 @@ class PrintFormatter { for (int i = 0; i < valueCount; i++) { read(&value); - charactersPrinted += simple_sprintf(output + charactersPrinted, size - charactersPrinted, strippedFormat, value); + charactersPrinted += simpleSprintf(output + charactersPrinted, size - charactersPrinted, strippedFormat, value); if (i < valueCount - 1) { - charactersPrinted += simple_sprintf(output + charactersPrinted, size - charactersPrinted, "%c", ','); + charactersPrinted += simpleSprintf(output + charactersPrinted, size - charactersPrinted, "%c", ','); } } diff --git a/shared/source/utilities/linux/aarch64/cpu_info.cpp b/shared/source/utilities/linux/aarch64/cpu_info.cpp index 21216e8f7c..726f6b024f 100644 --- a/shared/source/utilities/linux/aarch64/cpu_info.cpp +++ b/shared/source/utilities/linux/aarch64/cpu_info.cpp @@ -15,14 +15,14 @@ namespace NEO { -void cpuid_linux_wrapper(int cpuInfo[4], int functionId) { +void cpuidLinuxWrapper(int cpuInfo[4], int functionId) { cpuInfo[0] = getauxval(AT_HWCAP); } -void cpuidex_linux_wrapper(int *cpuInfo, int functionId, int subfunctionId) { +void cpuidexLinuxWrapper(int *cpuInfo, int functionId, int subfunctionId) { } -void get_cpu_flags_linux(std::string &cpuFlags) { +void getCpuFlagsLinux(std::string &cpuFlags) { std::ifstream cpuinfo(std::string(Os::sysFsProcPathPrefix) + "/cpuinfo"); std::string line; while (std::getline(cpuinfo, line)) { @@ -33,9 +33,9 @@ void get_cpu_flags_linux(std::string &cpuFlags) { } } -void (*CpuInfo::cpuidexFunc)(int *, int, int) = cpuidex_linux_wrapper; -void (*CpuInfo::cpuidFunc)(int[4], int) = cpuid_linux_wrapper; -void (*CpuInfo::getCpuFlagsFunc)(std::string &) = get_cpu_flags_linux; +void (*CpuInfo::cpuidexFunc)(int *, int, int) = cpuidexLinuxWrapper; +void (*CpuInfo::cpuidFunc)(int[4], int) = cpuidLinuxWrapper; +void (*CpuInfo::getCpuFlagsFunc)(std::string &) = getCpuFlagsLinux; const CpuInfo CpuInfo::instance; diff --git a/shared/source/utilities/linux/x86_64/cpu_info.cpp b/shared/source/utilities/linux/x86_64/cpu_info.cpp index 0da3dca9d6..2544de4907 100644 --- a/shared/source/utilities/linux/x86_64/cpu_info.cpp +++ b/shared/source/utilities/linux/x86_64/cpu_info.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -14,15 +14,15 @@ namespace NEO { -void cpuid_linux_wrapper(int cpuInfo[4], int functionId) { +void cpuidLinuxWrapper(int cpuInfo[4], int functionId) { __cpuid_count(functionId, 0, cpuInfo[0], cpuInfo[1], cpuInfo[2], cpuInfo[3]); } -void cpuidex_linux_wrapper(int *cpuInfo, int functionId, int subfunctionId) { +void cpuidexLinuxWrapper(int *cpuInfo, int functionId, int subfunctionId) { __cpuid_count(functionId, subfunctionId, cpuInfo[0], cpuInfo[1], cpuInfo[2], cpuInfo[3]); } -void get_cpu_flags_linux(std::string &cpuFlags) { +void getCpuFlagsLinux(std::string &cpuFlags) { std::ifstream cpuinfo(std::string(Os::sysFsProcPathPrefix) + "/cpuinfo"); std::string line; while (std::getline(cpuinfo, line)) { @@ -33,9 +33,9 @@ void get_cpu_flags_linux(std::string &cpuFlags) { } } -void (*CpuInfo::cpuidexFunc)(int *, int, int) = cpuidex_linux_wrapper; -void (*CpuInfo::cpuidFunc)(int[4], int) = cpuid_linux_wrapper; -void (*CpuInfo::getCpuFlagsFunc)(std::string &) = get_cpu_flags_linux; +void (*CpuInfo::cpuidexFunc)(int *, int, int) = cpuidexLinuxWrapper; +void (*CpuInfo::cpuidFunc)(int[4], int) = cpuidLinuxWrapper; +void (*CpuInfo::getCpuFlagsFunc)(std::string &) = getCpuFlagsLinux; const CpuInfo CpuInfo::instance; diff --git a/shared/source/utilities/logger.cpp b/shared/source/utilities/logger.cpp index bb1e0a880a..43d767b758 100644 --- a/shared/source/utilities/logger.cpp +++ b/shared/source/utilities/logger.cpp @@ -15,7 +15,7 @@ namespace NEO { -FileLogger &FileLoggerInstance() { +FileLogger &fileLoggerInstance() { static FileLogger fileLoggerInstance(std::string("igdrcl.log"), DebugManager.flags); return fileLoggerInstance; } diff --git a/shared/source/utilities/logger.h b/shared/source/utilities/logger.h index f8571afe11..7d6a303bd6 100644 --- a/shared/source/utilities/logger.h +++ b/shared/source/utilities/logger.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -180,7 +180,7 @@ class FileLogger { } }; -extern FileLogger &FileLoggerInstance(); +extern FileLogger &fileLoggerInstance(); template class LoggerApiEnterWrapper { @@ -188,12 +188,12 @@ class LoggerApiEnterWrapper { LoggerApiEnterWrapper(const char *funcName, const int *errorCode) : funcName(funcName), errorCode(errorCode) { if (Enabled) { - FileLoggerInstance().logApiCall(funcName, true, 0); + fileLoggerInstance().logApiCall(funcName, true, 0); } } ~LoggerApiEnterWrapper() { if (Enabled) { - FileLoggerInstance().logApiCall(funcName, false, (errorCode != nullptr) ? *errorCode : 0); + fileLoggerInstance().logApiCall(funcName, false, (errorCode != nullptr) ? *errorCode : 0); } } const char *funcName; @@ -206,7 +206,7 @@ class LoggerApiEnterWrapper { LOGGER.logLazyEvaluateArgs(PREDICATE, [&] { LOGGER.LOG_FUNCTION(__VA_ARGS__); }) #define DBG_LOG(PREDICATE, ...) \ - DBG_LOG_LAZY_EVALUATE_ARGS(NEO::FileLoggerInstance(), NEO::DebugManager.flags.PREDICATE.get(), log, NEO::DebugManager.flags.PREDICATE.get(), __VA_ARGS__) + DBG_LOG_LAZY_EVALUATE_ARGS(NEO::fileLoggerInstance(), NEO::DebugManager.flags.PREDICATE.get(), log, NEO::DebugManager.flags.PREDICATE.get(), __VA_ARGS__) #define DBG_LOG_INPUTS(...) \ - DBG_LOG_LAZY_EVALUATE_ARGS(NEO::FileLoggerInstance(), NEO::FileLoggerInstance().peekLogApiCalls(), logInputs, __VA_ARGS__) + DBG_LOG_LAZY_EVALUATE_ARGS(NEO::fileLoggerInstance(), NEO::fileLoggerInstance().peekLogApiCalls(), logInputs, __VA_ARGS__) diff --git a/shared/source/utilities/range.h b/shared/source/utilities/range.h index 5da0af304f..c7efa76ce7 100644 --- a/shared/source/utilities/range.h +++ b/shared/source/utilities/range.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -81,7 +81,7 @@ struct Range { }; template -inline Range CreateRange(T *base, size_t count) { +inline Range createRange(T *base, size_t count) { return Range(base, count); } } // namespace NEO diff --git a/shared/test/common/cmd_parse/gen_cmd_parse.h b/shared/test/common/cmd_parse/gen_cmd_parse.h index bbce5505ea..c5ad515b12 100644 --- a/shared/test/common/cmd_parse/gen_cmd_parse.h +++ b/shared/test/common/cmd_parse/gen_cmd_parse.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -76,7 +76,7 @@ static inline typename FamilyType::MI_LOAD_REGISTER_IMM *findMmioCmd(GenCmdList: } template -static inline GenCmdList::reverse_iterator reverse_find(GenCmdList::reverse_iterator itorStart, GenCmdList::const_reverse_iterator itorEnd) { +static inline GenCmdList::reverse_iterator reverseFind(GenCmdList::reverse_iterator itorStart, GenCmdList::const_reverse_iterator itorEnd) { GenCmdList::reverse_iterator itor = itorStart; while (itor != itorEnd) { if (genCmdCast(*itor)) diff --git a/shared/test/common/fixtures/preemption_fixture.h b/shared/test/common/fixtures/preemption_fixture.h index 26987157c8..2ddaab584d 100644 --- a/shared/test/common/fixtures/preemption_fixture.h +++ b/shared/test/common/fixtures/preemption_fixture.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -63,4 +63,4 @@ struct PreemptionTestHwDetails { }; template -PreemptionTestHwDetails GetPreemptionTestHwDetails(); +PreemptionTestHwDetails getPreemptionTestHwDetails(); diff --git a/shared/test/common/gen11/test_preemption_gen11.cpp b/shared/test/common/gen11/test_preemption_gen11.cpp index fdf700a3e8..ab7dda2093 100644 --- a/shared/test/common/gen11/test_preemption_gen11.cpp +++ b/shared/test/common/gen11/test_preemption_gen11.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -17,7 +17,7 @@ using namespace NEO; template <> -PreemptionTestHwDetails GetPreemptionTestHwDetails() { +PreemptionTestHwDetails getPreemptionTestHwDetails() { PreemptionTestHwDetails ret; ret.modeToRegValueMap[PreemptionMode::ThreadGroup] = DwordBuilder::build(1, true) | DwordBuilder::build(2, true, false); ret.modeToRegValueMap[PreemptionMode::MidBatch] = DwordBuilder::build(2, true) | DwordBuilder::build(1, true, false); diff --git a/shared/test/common/gen12lp/test_preemption_gen12lp.cpp b/shared/test/common/gen12lp/test_preemption_gen12lp.cpp index 945e39a1b2..edf95761de 100644 --- a/shared/test/common/gen12lp/test_preemption_gen12lp.cpp +++ b/shared/test/common/gen12lp/test_preemption_gen12lp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -14,7 +14,7 @@ using namespace NEO; template <> -PreemptionTestHwDetails GetPreemptionTestHwDetails() { +PreemptionTestHwDetails getPreemptionTestHwDetails() { PreemptionTestHwDetails ret; ret.modeToRegValueMap[PreemptionMode::ThreadGroup] = DwordBuilder::build(1, true) | DwordBuilder::build(2, true, false); ret.modeToRegValueMap[PreemptionMode::MidBatch] = DwordBuilder::build(2, true) | DwordBuilder::build(1, true, false); diff --git a/shared/test/common/gen8/test_preemption_gen8.cpp b/shared/test/common/gen8/test_preemption_gen8.cpp index 91c1b90f4f..e6d75e0478 100644 --- a/shared/test/common/gen8/test_preemption_gen8.cpp +++ b/shared/test/common/gen8/test_preemption_gen8.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -16,7 +16,7 @@ using namespace NEO; template <> -PreemptionTestHwDetails GetPreemptionTestHwDetails() { +PreemptionTestHwDetails getPreemptionTestHwDetails() { PreemptionTestHwDetails ret; ret.modeToRegValueMap[PreemptionMode::ThreadGroup] = 0; ret.modeToRegValueMap[PreemptionMode::MidBatch] = (1 << 2); diff --git a/shared/test/common/gen9/preamble_tests_gen9.cpp b/shared/test/common/gen9/preamble_tests_gen9.cpp index ed1dd21574..a65be81dd9 100644 --- a/shared/test/common/gen9/preamble_tests_gen9.cpp +++ b/shared/test/common/gen9/preamble_tests_gen9.cpp @@ -81,7 +81,7 @@ GEN9TEST_F(ThreadArbitrationGen9, givenPreambleWhenItIsProgrammedThenThreadArbit auto ppC = find(cmdList.begin(), cmdList.end()); ASSERT_EQ(cmdList.end(), ppC); - auto itorLRI = reverse_find(cmdList.rbegin(), cmdList.rend()); + auto itorLRI = reverseFind(cmdList.rbegin(), cmdList.rend()); ASSERT_NE(cmdList.rend(), itorLRI); const auto &lri = *reinterpret_cast(*itorLRI); @@ -108,7 +108,7 @@ GEN9TEST_F(ThreadArbitrationGen9, whenThreadArbitrationPolicyIsProgrammedThenCor auto ppC = find(cmdList.begin(), cmdList.end()); ASSERT_NE(ppC, cmdList.end()); - auto itorLRI = reverse_find(cmdList.rbegin(), cmdList.rend()); + auto itorLRI = reverseFind(cmdList.rbegin(), cmdList.rend()); ASSERT_NE(cmdList.rend(), itorLRI); const auto &lri = *reinterpret_cast(*itorLRI); diff --git a/shared/test/common/gen9/test_preemption_gen9.cpp b/shared/test/common/gen9/test_preemption_gen9.cpp index 0f82c6ed75..1d0ce1c173 100644 --- a/shared/test/common/gen9/test_preemption_gen9.cpp +++ b/shared/test/common/gen9/test_preemption_gen9.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -19,7 +19,7 @@ using namespace NEO; template <> -PreemptionTestHwDetails GetPreemptionTestHwDetails() { +PreemptionTestHwDetails getPreemptionTestHwDetails() { PreemptionTestHwDetails ret; ret.modeToRegValueMap[PreemptionMode::ThreadGroup] = DwordBuilder::build(1, true) | DwordBuilder::build(2, true, false); ret.modeToRegValueMap[PreemptionMode::MidBatch] = DwordBuilder::build(2, true) | DwordBuilder::build(1, true, false); diff --git a/shared/test/common/test_configuration/aub_tests/aub_tests_configuration.h b/shared/test/common/test_configuration/aub_tests/aub_tests_configuration.h index 1c9e019e02..b06a1514c5 100644 --- a/shared/test/common/test_configuration/aub_tests/aub_tests_configuration.h +++ b/shared/test/common/test_configuration/aub_tests/aub_tests_configuration.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,4 +12,4 @@ struct AubTestsConfig { }; template -AubTestsConfig GetAubTestsConfig(); +AubTestsConfig getAubTestsConfig(); diff --git a/shared/test/common/test_configuration/aub_tests/aub_tests_configuration.inl b/shared/test/common/test_configuration/aub_tests/aub_tests_configuration.inl index 5ddac919ec..7881a71323 100644 --- a/shared/test/common/test_configuration/aub_tests/aub_tests_configuration.inl +++ b/shared/test/common/test_configuration/aub_tests/aub_tests_configuration.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,7 +9,7 @@ #include "shared/test/common/test_configuration/aub_tests/aub_tests_configuration.h" template -AubTestsConfig GetAubTestsConfig() { +AubTestsConfig getAubTestsConfig() { AubTestsConfig aubTestsConfig; aubTestsConfig.testCanonicalAddress = true; return aubTestsConfig; diff --git a/shared/test/common/test_configuration/aub_tests/gen11/aub_tests_configuration_gen11.cpp b/shared/test/common/test_configuration/aub_tests/gen11/aub_tests_configuration_gen11.cpp index 8ccffa8c29..00d762d3b3 100644 --- a/shared/test/common/test_configuration/aub_tests/gen11/aub_tests_configuration_gen11.cpp +++ b/shared/test/common/test_configuration/aub_tests/gen11/aub_tests_configuration_gen11.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,4 +11,4 @@ using namespace NEO; -template AubTestsConfig GetAubTestsConfig(); +template AubTestsConfig getAubTestsConfig(); diff --git a/shared/test/common/test_configuration/aub_tests/gen12lp/aub_tests_configuration_gen12lp.cpp b/shared/test/common/test_configuration/aub_tests/gen12lp/aub_tests_configuration_gen12lp.cpp index 52a04a648c..1cb9148ce2 100644 --- a/shared/test/common/test_configuration/aub_tests/gen12lp/aub_tests_configuration_gen12lp.cpp +++ b/shared/test/common/test_configuration/aub_tests/gen12lp/aub_tests_configuration_gen12lp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,7 +12,7 @@ using namespace NEO; template <> -AubTestsConfig GetAubTestsConfig() { +AubTestsConfig getAubTestsConfig() { AubTestsConfig aubTestsConfig; aubTestsConfig.testCanonicalAddress = false; return aubTestsConfig; diff --git a/shared/test/common/test_configuration/aub_tests/gen8/aub_tests_configuration_gen8.cpp b/shared/test/common/test_configuration/aub_tests/gen8/aub_tests_configuration_gen8.cpp index 1dfab45ed7..b451403138 100644 --- a/shared/test/common/test_configuration/aub_tests/gen8/aub_tests_configuration_gen8.cpp +++ b/shared/test/common/test_configuration/aub_tests/gen8/aub_tests_configuration_gen8.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,4 +11,4 @@ using namespace NEO; -template AubTestsConfig GetAubTestsConfig(); +template AubTestsConfig getAubTestsConfig(); diff --git a/shared/test/common/test_configuration/aub_tests/gen9/aub_tests_configuration_gen9.cpp b/shared/test/common/test_configuration/aub_tests/gen9/aub_tests_configuration_gen9.cpp index 9889b33b4f..880903a071 100644 --- a/shared/test/common/test_configuration/aub_tests/gen9/aub_tests_configuration_gen9.cpp +++ b/shared/test/common/test_configuration/aub_tests/gen9/aub_tests_configuration_gen9.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,4 +11,4 @@ using namespace NEO; -template AubTestsConfig GetAubTestsConfig(); +template AubTestsConfig getAubTestsConfig(); diff --git a/shared/test/common/test_configuration/aub_tests/xe_hp_core/aub_tests_configuration_xe_hp_core.cpp b/shared/test/common/test_configuration/aub_tests/xe_hp_core/aub_tests_configuration_xe_hp_core.cpp index 51214d46e5..5b3f54fa4f 100644 --- a/shared/test/common/test_configuration/aub_tests/xe_hp_core/aub_tests_configuration_xe_hp_core.cpp +++ b/shared/test/common/test_configuration/aub_tests/xe_hp_core/aub_tests_configuration_xe_hp_core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,7 +12,7 @@ using namespace NEO; template <> -AubTestsConfig GetAubTestsConfig() { +AubTestsConfig getAubTestsConfig() { AubTestsConfig aubTestsConfig; aubTestsConfig.testCanonicalAddress = true; return aubTestsConfig; diff --git a/shared/test/common/test_configuration/aub_tests/xe_hpc_core/aub_tests_configuration_xe_hpc_core.cpp b/shared/test/common/test_configuration/aub_tests/xe_hpc_core/aub_tests_configuration_xe_hpc_core.cpp index b64cadce99..e5996b18b7 100644 --- a/shared/test/common/test_configuration/aub_tests/xe_hpc_core/aub_tests_configuration_xe_hpc_core.cpp +++ b/shared/test/common/test_configuration/aub_tests/xe_hpc_core/aub_tests_configuration_xe_hpc_core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,7 +12,7 @@ using namespace NEO; template <> -AubTestsConfig GetAubTestsConfig() { +AubTestsConfig getAubTestsConfig() { AubTestsConfig aubTestsConfig; aubTestsConfig.testCanonicalAddress = false; return aubTestsConfig; diff --git a/shared/test/common/test_configuration/aub_tests/xe_hpg_core/aub_tests_configuration_xe_hpg_core.cpp b/shared/test/common/test_configuration/aub_tests/xe_hpg_core/aub_tests_configuration_xe_hpg_core.cpp index 544ff28112..3355118cc5 100644 --- a/shared/test/common/test_configuration/aub_tests/xe_hpg_core/aub_tests_configuration_xe_hpg_core.cpp +++ b/shared/test/common/test_configuration/aub_tests/xe_hpg_core/aub_tests_configuration_xe_hpg_core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,7 +12,7 @@ using namespace NEO; template <> -AubTestsConfig GetAubTestsConfig() { +AubTestsConfig getAubTestsConfig() { AubTestsConfig aubTestsConfig; aubTestsConfig.testCanonicalAddress = true; return aubTestsConfig; diff --git a/shared/test/common/xe_hp_core/test_preemption_xe_hp_core.cpp b/shared/test/common/xe_hp_core/test_preemption_xe_hp_core.cpp index b9ac933c87..c082093235 100644 --- a/shared/test/common/xe_hp_core/test_preemption_xe_hp_core.cpp +++ b/shared/test/common/xe_hp_core/test_preemption_xe_hp_core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -13,7 +13,7 @@ using namespace NEO; HWTEST_EXCLUDE_PRODUCT(XeHPAndLaterPreemptionTests, GivenDebuggerUsedWhenProgrammingStateSipThenStateSipIsAdded, IGFX_XE_HP_CORE); template <> -PreemptionTestHwDetails GetPreemptionTestHwDetails() { +PreemptionTestHwDetails getPreemptionTestHwDetails() { PreemptionTestHwDetails ret; ret.modeToRegValueMap[PreemptionMode::ThreadGroup] = DwordBuilder::build(1, true) | DwordBuilder::build(2, true, false); ret.modeToRegValueMap[PreemptionMode::MidBatch] = DwordBuilder::build(2, true) | DwordBuilder::build(1, true, false); diff --git a/shared/test/common/xe_hpc_core/test_preemption_xe_hpc_core.cpp b/shared/test/common/xe_hpc_core/test_preemption_xe_hpc_core.cpp index 6fbbf80701..6b840ce5b3 100644 --- a/shared/test/common/xe_hpc_core/test_preemption_xe_hpc_core.cpp +++ b/shared/test/common/xe_hpc_core/test_preemption_xe_hpc_core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,7 +11,7 @@ using namespace NEO; template <> -PreemptionTestHwDetails GetPreemptionTestHwDetails() { +PreemptionTestHwDetails getPreemptionTestHwDetails() { PreemptionTestHwDetails ret; ret.modeToRegValueMap[PreemptionMode::ThreadGroup] = DwordBuilder::build(1, true) | DwordBuilder::build(2, true, false); ret.modeToRegValueMap[PreemptionMode::MidBatch] = DwordBuilder::build(2, true) | DwordBuilder::build(1, true, false); diff --git a/shared/test/common/xe_hpg_core/test_preemption_xe_hpg_core.cpp b/shared/test/common/xe_hpg_core/test_preemption_xe_hpg_core.cpp index c86cca516f..d010b3f29a 100644 --- a/shared/test/common/xe_hpg_core/test_preemption_xe_hpg_core.cpp +++ b/shared/test/common/xe_hpg_core/test_preemption_xe_hpg_core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,7 +11,7 @@ using namespace NEO; template <> -PreemptionTestHwDetails GetPreemptionTestHwDetails() { +PreemptionTestHwDetails getPreemptionTestHwDetails() { PreemptionTestHwDetails ret; ret.modeToRegValueMap[PreemptionMode::ThreadGroup] = DwordBuilder::build(1, true) | DwordBuilder::build(2, true, false); ret.modeToRegValueMap[PreemptionMode::MidBatch] = DwordBuilder::build(2, true) | DwordBuilder::build(1, true, false); diff --git a/shared/test/unit_test/device_binary_format/elf/elf_encoder_tests.cpp b/shared/test/unit_test/device_binary_format/elf/elf_encoder_tests.cpp index b04b54d9ce..ad7540c0ee 100644 --- a/shared/test/unit_test/device_binary_format/elf/elf_encoder_tests.cpp +++ b/shared/test/unit_test/device_binary_format/elf/elf_encoder_tests.cpp @@ -400,10 +400,10 @@ TEST(ElfEncoder, WhenDefaultAlignmentIsRaisedThenSegmentDataAbideByIt) { auto &header64 = *reinterpret_cast *>(elfData64.data()); auto sectionHeaders = reinterpret_cast *>(elfData64.data() + static_cast(header64.shOff)); auto programHeaders = reinterpret_cast *>(elfData64.data() + static_cast(header64.phOff)); - for (const auto §ion : NEO::CreateRange(sectionHeaders, header64.shNum)) { + for (const auto §ion : NEO::createRange(sectionHeaders, header64.shNum)) { EXPECT_EQ(0U, section.offset % 8U); } - for (const auto &segment : NEO::CreateRange(programHeaders, header64.phNum)) { + for (const auto &segment : NEO::createRange(programHeaders, header64.phNum)) { EXPECT_EQ(0U, segment.offset % alignment); EXPECT_LE(alignment, segment.align); } diff --git a/shared/test/unit_test/direct_submission/dispatchers/render_dispatcher_tests.cpp b/shared/test/unit_test/direct_submission/dispatchers/render_dispatcher_tests.cpp index ef6428827c..2f584aa796 100644 --- a/shared/test/unit_test/direct_submission/dispatchers/render_dispatcher_tests.cpp +++ b/shared/test/unit_test/direct_submission/dispatchers/render_dispatcher_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -20,7 +20,7 @@ HWTEST_F(RenderDispatcherTest, givenRenderWhenAskingForPreemptionCmdSizeThenRetu using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; size_t expectedCmdSize = 0u; - if (GetPreemptionTestHwDetails().supportsPreemptionProgramming()) { + if (getPreemptionTestHwDetails().supportsPreemptionProgramming()) { expectedCmdSize = sizeof(MI_LOAD_REGISTER_IMM); } EXPECT_EQ(expectedCmdSize, RenderDispatcher::getSizePreemption()); @@ -29,7 +29,7 @@ HWTEST_F(RenderDispatcherTest, givenRenderWhenAskingForPreemptionCmdSizeThenRetu HWTEST_F(RenderDispatcherTest, givenRenderWhenAddingPreemptionCmdThenExpectProperMmioAddress) { using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - auto preemptionDetails = GetPreemptionTestHwDetails(); + auto preemptionDetails = getPreemptionTestHwDetails(); RenderDispatcher::dispatchPreemption(cmdBuffer); diff --git a/shared/test/unit_test/encoders/test_encode_dispatch_kernel.cpp b/shared/test/unit_test/encoders/test_encode_dispatch_kernel.cpp index b1e1562254..4d5e23bd43 100644 --- a/shared/test/unit_test/encoders/test_encode_dispatch_kernel.cpp +++ b/shared/test/unit_test/encoders/test_encode_dispatch_kernel.cpp @@ -630,13 +630,13 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenDirtyHeapsWhenDispatch GenCmdList cmdList; CmdParse::parseCommandBuffer(cmdList, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); - auto itor = reverse_find(cmdList.rbegin(), cmdList.rend()); + auto itor = reverseFind(cmdList.rbegin(), cmdList.rend()); ASSERT_NE(cmdList.rend(), itor); auto cmdSba = genCmdCast(*itor); EXPECT_NE(nullptr, cmdSba); - auto itorPc = reverse_find(itor, cmdList.rend()); + auto itorPc = reverseFind(itor, cmdList.rend()); ASSERT_NE(cmdList.rend(), itorPc); bool foundPcWithDCFlush = false; diff --git a/shared/test/unit_test/main.cpp b/shared/test/unit_test/main.cpp index aa528e732c..6fb5f77962 100644 --- a/shared/test/unit_test/main.cpp +++ b/shared/test/unit_test/main.cpp @@ -112,7 +112,7 @@ void applyWorkarounds() { //Create FileLogger to prevent false memory leaks { - NEO::FileLoggerInstance(); + NEO::fileLoggerInstance(); } } diff --git a/shared/test/unit_test/page_fault_manager/default_asan_options.cpp b/shared/test/unit_test/page_fault_manager/default_asan_options.cpp index 633758919e..b43f15f75d 100644 --- a/shared/test/unit_test/page_fault_manager/default_asan_options.cpp +++ b/shared/test/unit_test/page_fault_manager/default_asan_options.cpp @@ -1,12 +1,12 @@ /* - * Copyright (C) 2019-2020 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ extern "C" { -const char *__asan_default_options() { +const char *__asan_default_options() { // NOLINT(readability-identifier-naming0 return "allow_user_segv_handler=1"; } } diff --git a/shared/test/unit_test/preemption/preemption_tests.cpp b/shared/test/unit_test/preemption/preemption_tests.cpp index 263956e356..4c9c45ff41 100644 --- a/shared/test/unit_test/preemption/preemption_tests.cpp +++ b/shared/test/unit_test/preemption/preemption_tests.cpp @@ -118,7 +118,7 @@ HWTEST_P(PreemptionHwTest, GivenPreemptionModeIsChangingWhenGettingRequiredCmdSt PreemptionMode mode = GetParam(); PreemptionMode differentPreemptionMode = static_cast(0); - if (false == GetPreemptionTestHwDetails().supportsPreemptionProgramming()) { + if (false == getPreemptionTestHwDetails().supportsPreemptionProgramming()) { EXPECT_EQ(0U, PreemptionHelper::getRequiredCmdStreamSize(mode, differentPreemptionMode)); return; } @@ -146,7 +146,7 @@ HWTEST_P(PreemptionHwTest, WhenProgrammingCmdStreamThenProperMiLoadRegisterImmCo PreemptionMode differentPreemptionMode = static_cast(0); auto mockDevice = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(nullptr)); - if (false == GetPreemptionTestHwDetails().supportsPreemptionProgramming()) { + if (false == getPreemptionTestHwDetails().supportsPreemptionProgramming()) { LinearStream cmdStream(nullptr, 0U); PreemptionHelper::programCmdStream(cmdStream, mode, differentPreemptionMode, nullptr); EXPECT_EQ(0U, cmdStream.getUsed()); @@ -154,7 +154,7 @@ HWTEST_P(PreemptionHwTest, WhenProgrammingCmdStreamThenProperMiLoadRegisterImmCo } using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - auto hwDetails = GetPreemptionTestHwDetails(); + auto hwDetails = getPreemptionTestHwDetails(); uint32_t defaultRegValue = hwDetails.defaultRegValue; @@ -383,7 +383,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, MidThreadPreemptionTests, WhenProgrammingPreemptionT dispatchFlags, *mockDevice); - auto hwDetails = GetPreemptionTestHwDetails(); + auto hwDetails = getPreemptionTestHwDetails(); HardwareParse hwParser; hwParser.parseCommands(csr.getCS(0)); diff --git a/shared/test/unit_test/utilities/base_object_utils.h b/shared/test/unit_test/utilities/base_object_utils.h index 569abff999..38d390baea 100644 --- a/shared/test/unit_test/utilities/base_object_utils.h +++ b/shared/test/unit_test/utilities/base_object_utils.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -28,7 +28,7 @@ static ReleaseableObjectPtr clUniquePtr(T *object) { } template -inline ReleaseableObjectPtr<_Ty> make_releaseable(_Types &&...args) { +inline ReleaseableObjectPtr<_Ty> makeReleaseable(_Types &&...args) { return (ReleaseableObjectPtr<_Ty>(new _Ty(std::forward<_Types>(args)...))); } } // namespace NEO