diff --git a/.github/scripts/get_system_info.sh b/.github/scripts/get_system_info.sh index 6ca38a33ef..8301c99099 100755 --- a/.github/scripts/get_system_info.sh +++ b/.github/scripts/get_system_info.sh @@ -53,7 +53,7 @@ function system_info { echo "**********/proc/meminfo**********" cat /proc/meminfo echo "**********build/bin/urinfo**********" - $(dirname "$(readlink -f "$0")")/../../build/bin/urinfo || true + $(dirname "$(readlink -f "$0")")/../../build/bin/urinfo --no-linear-ids --verbose || true echo "******OpenCL*******" # The driver version of OpenCL Graphics is the compute-runtime version clinfo || echo "OpenCL not installed" diff --git a/CMakeLists.txt b/CMakeLists.txt index 482c0727c1..e9cc1dfed5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception cmake_minimum_required(VERSION 3.14.0 FATAL_ERROR) -project(unified-runtime VERSION 0.9.1) +project(unified-runtime VERSION 0.9.2) include(GNUInstallDirs) include(CheckCXXSourceCompiles) diff --git a/source/adapters/level_zero/context.cpp b/source/adapters/level_zero/context.cpp index cb86026508..e2ec2dea38 100644 --- a/source/adapters/level_zero/context.cpp +++ b/source/adapters/level_zero/context.cpp @@ -14,7 +14,6 @@ #include #include "context.hpp" -#include "logger/ur_logger.hpp" #include "queue.hpp" #include "ur_level_zero.hpp" @@ -176,8 +175,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urContextSetExtendedDeleter( std::ignore = Context; std::ignore = Deleter; std::ignore = UserData; - logger::error(logger::LegacyMessage("[UR][L0] {} function not implemented!"), - "{} function not implemented!", __FUNCTION__); + urPrint("[UR][L0] %s function not implemented!\n", __FUNCTION__); return UR_RESULT_ERROR_UNSUPPORTED_FEATURE; } @@ -513,8 +511,7 @@ ur_result_t ur_context_handle_t_::getFreeSlotInExistingOrNewPool( ZeEventPoolDesc.flags |= ZE_EVENT_POOL_FLAG_HOST_VISIBLE; if (ProfilingEnabled) ZeEventPoolDesc.flags |= ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP; - logger::debug("ze_event_pool_desc_t flags set to: {}", - ZeEventPoolDesc.flags); + urPrint("ze_event_pool_desc_t flags set to: %d\n", ZeEventPoolDesc.flags); std::vector ZeDevices; if (ZeDevice) { @@ -658,6 +655,11 @@ ur_result_t ur_context_handle_t_::getAvailableCommandList( if (Queue->hasOpenCommandList(UseCopyEngine)) { if (AllowBatching) { bool batchingAllowed = true; + if (ForcedCmdQueue && + CommandBatch.OpenCommandList->second.ZeQueue != *ForcedCmdQueue) { + // Current open batch doesn't match the forced command queue + batchingAllowed = false; + } if (!UrL0OutOfOrderIntegratedSignalEvent && Queue->Device->isIntegrated()) { batchingAllowed = eventCanBeBatched(Queue, UseCopyEngine, diff --git a/source/adapters/level_zero/device.cpp b/source/adapters/level_zero/device.cpp index b1eb1a7b1b..b0a5f3fefa 100644 --- a/source/adapters/level_zero/device.cpp +++ b/source/adapters/level_zero/device.cpp @@ -1078,7 +1078,7 @@ bool ur_device_handle_t_::useDriverInOrderLists() { static const bool UseDriverInOrderLists = [] { const char *UrRet = std::getenv("UR_L0_USE_DRIVER_INORDER_LISTS"); if (!UrRet) - return true; + return false; return std::atoi(UrRet) != 0; }(); diff --git a/source/adapters/level_zero/event.cpp b/source/adapters/level_zero/event.cpp index 0364cd2ebf..d061c73b2a 100644 --- a/source/adapters/level_zero/event.cpp +++ b/source/adapters/level_zero/event.cpp @@ -17,7 +17,6 @@ #include "command_buffer.hpp" #include "common.hpp" #include "event.hpp" -#include "logger/ur_logger.hpp" #include "ur_level_zero.hpp" void printZeEventList(const _ur_ze_event_list_t &UrZeEventList) { @@ -367,8 +366,16 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueEventsWaitWithBarrier( } // Execute each command list so the barriers can be encountered. - for (ur_command_list_ptr_t &CmdList : CmdLists) + for (ur_command_list_ptr_t &CmdList : CmdLists) { + bool IsCopy = + CmdList->second.isCopy(reinterpret_cast(Queue)); + const auto &CommandBatch = + (IsCopy) ? Queue->CopyCommandBatch : Queue->ComputeCommandBatch; + // Only batch if the matching CmdList is already open. + OkToBatch = CommandBatch.OpenCommandList == CmdList; + UR_CALL(Queue->executeCommandList(CmdList, false, OkToBatch)); + } UR_CALL(Queue->ActiveBarriers.clear()); auto UREvent = reinterpret_cast(*Event); @@ -689,7 +696,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urEventWait( die("The host-visible proxy event missing"); ze_event_handle_t ZeEvent = HostVisibleEvent->ZeEvent; - logger::debug("ZeEvent = {}", ur_cast(ZeEvent)); + urPrint("ZeEvent = %#llx\n", ur_cast(ZeEvent)); // If this event was an inner batched event, then sync with // the Queue instead of waiting on the event. if (HostVisibleEvent->IsInnerBatchedEvent && Event->ZeBatchedQueue) { diff --git a/source/adapters/opencl/device.cpp b/source/adapters/opencl/device.cpp index 229c2429a3..6831ea1384 100644 --- a/source/adapters/opencl/device.cpp +++ b/source/adapters/opencl/device.cpp @@ -506,7 +506,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, cl_adapter::cast(hDevice), {"cl_khr_fp16"}, Supported)); if (!Supported) { - return UR_RESULT_ERROR_INVALID_ENUMERATION; + return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION; } } diff --git a/test/conformance/device/device_adapter_opencl.match b/test/conformance/device/device_adapter_opencl.match index 716ebd54fe..e69de29bb2 100644 --- a/test/conformance/device/device_adapter_opencl.match +++ b/test/conformance/device/device_adapter_opencl.match @@ -1 +0,0 @@ -urDeviceGetInfoTest.Success/UR_DEVICE_INFO_HALF_FP_CONFIG