mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-01 04:23:00 +08:00
Replace Event::eventNotReady with CompletionStamp::levelNotReady
- move some files to core - remove unnecessary includes Related-To: NEO-4175 Change-Id: Ib33dff644452c7cfd6fda7e9bb4b68cd6eb3a61c Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
fba25e696c
commit
b6825933f8
@@ -6,10 +6,10 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "core/command_stream/csr_definitions.h"
|
||||
#include "core/helpers/heap_helper.h"
|
||||
#include "core/helpers/non_copyable_or_moveable.h"
|
||||
#include "core/indirect_heap/indirect_heap.h"
|
||||
#include "runtime/command_stream/csr_definitions.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
set(NEO_CORE_COMMAND_STREAM
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/csr_definitions.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/csr_deps.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/csr_deps.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/linear_stream.cpp
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2019 Intel Corporation
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "core/command_stream/csr_definitions.h"
|
||||
#include "core/helpers/pipeline_select_helper.h"
|
||||
#include "core/helpers/preamble_bdw_plus.inl"
|
||||
#include "runtime/command_stream/csr_definitions.h"
|
||||
|
||||
#include "reg_configs_common.h"
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Intel Corporation
|
||||
* Copyright (C) 2019-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "core/command_stream/csr_definitions.h"
|
||||
#include "core/helpers/preamble_bdw_plus.inl"
|
||||
#include "runtime/command_stream/csr_definitions.h"
|
||||
#include "runtime/gen12lp/helpers_gen12lp.h"
|
||||
#include "runtime/helpers/hardware_commands_helper.h"
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "core/command_stream/csr_definitions.h"
|
||||
#include "core/helpers/preamble_bdw_plus.inl"
|
||||
#include "runtime/command_stream/csr_definitions.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2019 Intel Corporation
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "core/command_stream/csr_definitions.h"
|
||||
#include "core/command_stream/preemption.h"
|
||||
#include "core/command_stream/preemption.inl"
|
||||
#include "runtime/built_ins/built_ins.h"
|
||||
#include "runtime/command_stream/csr_definitions.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
|
||||
@@ -13,15 +13,20 @@ set(NEO_CORE_HELPERS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cache_policy.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cache_policy.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/common_types.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/completion_stamp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/completion_stamp.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/debug_helpers.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/deferred_deleter_helper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/dirty_state_helpers.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/dirty_state_helpers.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/engine_control.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/engine_node_helper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/engine_node_helper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/extendable_enum.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/file_io.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/file_io.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/flush_stamp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/flush_stamp.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hash.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/heap_helper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/heap_helper.h
|
||||
|
||||
14
core/helpers/completion_stamp.cpp
Normal file
14
core/helpers/completion_stamp.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "core/helpers/completion_stamp.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
const uint32_t CompletionStamp::levelNotReady = 0xFFFFFFF0;
|
||||
|
||||
} // namespace NEO
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -15,5 +15,8 @@ struct CompletionStamp {
|
||||
uint32_t taskCount;
|
||||
uint32_t taskLevel;
|
||||
FlushStamp flushStamp;
|
||||
|
||||
static const uint32_t levelNotReady;
|
||||
};
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "runtime/helpers/dirty_state_helpers.h"
|
||||
#include "core/helpers/dirty_state_helpers.h"
|
||||
|
||||
#include "core/indirect_heap/indirect_heap.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "runtime/helpers/flush_stamp.h"
|
||||
#include "core/helpers/flush_stamp.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -37,7 +37,7 @@ struct HardwareInfo;
|
||||
extern const char *folderAUB;
|
||||
|
||||
// Initial value for HW tag
|
||||
// Set to 0 if using HW or simulator, otherwise 0xFFFFFF00, needs to be lower then Event::EventNotReady.
|
||||
// Set to 0 if using HW or simulator, otherwise 0xFFFFFF00, needs to be lower then CompletionStamp::levelNotReady.
|
||||
extern uint32_t initialHardwareTag;
|
||||
|
||||
// Number of devices in the platform
|
||||
|
||||
@@ -134,7 +134,7 @@ volatile uint32_t *CommandQueue::getHwTagAddress() const {
|
||||
|
||||
bool CommandQueue::isCompleted(uint32_t taskCount) const {
|
||||
uint32_t tag = getHwTag();
|
||||
DEBUG_BREAK_IF(tag == Event::eventNotReady);
|
||||
DEBUG_BREAK_IF(tag == CompletionStamp::levelNotReady);
|
||||
return tag >= taskCount;
|
||||
}
|
||||
|
||||
@@ -284,7 +284,7 @@ cl_int CommandQueue::enqueueReleaseSharedObjects(cl_uint numObjects, const cl_me
|
||||
void CommandQueue::updateFromCompletionStamp(const CompletionStamp &completionStamp) {
|
||||
DEBUG_BREAK_IF(this->taskLevel > completionStamp.taskLevel);
|
||||
DEBUG_BREAK_IF(this->taskCount > completionStamp.taskCount);
|
||||
if (completionStamp.taskCount != Event::eventNotReady) {
|
||||
if (completionStamp.taskCount != CompletionStamp::levelNotReady) {
|
||||
taskCount = completionStamp.taskCount;
|
||||
}
|
||||
flushStamp->setStamp(completionStamp.flushStamp);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -44,7 +44,7 @@ void *CommandQueue::cpuDataTransferHandler(TransferProperties &transferPropertie
|
||||
}
|
||||
|
||||
if (eventsRequest.outEvent) {
|
||||
eventBuilder.create<Event>(this, transferProperties.cmdType, Event::eventNotReady, Event::eventNotReady);
|
||||
eventBuilder.create<Event>(this, transferProperties.cmdType, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady);
|
||||
outEventObj = eventBuilder.getEvent();
|
||||
outEventObj->setQueueTimeStamp();
|
||||
outEventObj->setCPUProfilingPath(true);
|
||||
|
||||
@@ -157,7 +157,7 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
|
||||
}
|
||||
EventBuilder eventBuilder;
|
||||
if (event) {
|
||||
eventBuilder.create<Event>(this, commandType, Event::eventNotReady, 0);
|
||||
eventBuilder.create<Event>(this, commandType, CompletionStamp::levelNotReady, 0);
|
||||
*event = eventBuilder.getEvent();
|
||||
if (eventBuilder.getEvent()->isProfilingEnabled()) {
|
||||
eventBuilder.getEvent()->setQueueTimeStamp(&queueTimeStamp);
|
||||
@@ -263,7 +263,7 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
|
||||
}
|
||||
}
|
||||
|
||||
CompletionStamp completionStamp = {Event::eventNotReady, taskLevel, 0};
|
||||
CompletionStamp completionStamp = {CompletionStamp::levelNotReady, taskLevel, 0};
|
||||
|
||||
const EnqueueProperties enqueueProperties(blitEnqueue, !multiDispatchInfo.empty(), isCacheFlushCommand(commandType),
|
||||
flushDependenciesForNonKernelCommand, &blitPropertiesContainer);
|
||||
@@ -580,7 +580,7 @@ template <typename GfxFamily>
|
||||
void CommandQueueHw<GfxFamily>::obtainTaskLevelAndBlockedStatus(unsigned int &taskLevel, cl_uint &numEventsInWaitList, const cl_event *&eventWaitList, bool &blockQueueStatus, unsigned int commandType) {
|
||||
auto isQueueBlockedStatus = isQueueBlocked();
|
||||
taskLevel = getTaskLevelFromWaitList(this->taskLevel, numEventsInWaitList, eventWaitList);
|
||||
blockQueueStatus = (taskLevel == Event::eventNotReady) || isQueueBlockedStatus;
|
||||
blockQueueStatus = (taskLevel == CompletionStamp::levelNotReady) || isQueueBlockedStatus;
|
||||
|
||||
auto taskLevelUpdateRequired = isTaskLevelUpdateRequired(taskLevel, eventWaitList, numEventsInWaitList, commandType);
|
||||
if (taskLevelUpdateRequired) {
|
||||
@@ -593,7 +593,7 @@ template <typename GfxFamily>
|
||||
bool CommandQueueHw<GfxFamily>::isTaskLevelUpdateRequired(const uint32_t &taskLevel, const cl_event *eventWaitList, const cl_uint &numEventsInWaitList, unsigned int commandType) {
|
||||
bool updateTaskLevel = true;
|
||||
//if we are blocked by user event then no update
|
||||
if (taskLevel == Event::eventNotReady) {
|
||||
if (taskLevel == CompletionStamp::levelNotReady) {
|
||||
updateTaskLevel = false;
|
||||
}
|
||||
//if we are executing command without kernel then it will inherit state from
|
||||
@@ -756,7 +756,7 @@ CompletionStamp CommandQueueHw<GfxFamily>::enqueueNonBlocked(
|
||||
dispatchFlags.csrDependencies.makeResident(getGpgpuCommandStreamReceiver());
|
||||
}
|
||||
|
||||
DEBUG_BREAK_IF(taskLevel >= Event::eventNotReady);
|
||||
DEBUG_BREAK_IF(taskLevel >= CompletionStamp::levelNotReady);
|
||||
|
||||
if (anyUncacheableArgs) {
|
||||
dispatchFlags.l3CacheSettings = L3CachingSettings::l3CacheOff;
|
||||
|
||||
@@ -24,7 +24,6 @@ set(RUNTIME_SRCS_COMMAND_STREAM
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_with_aub_dump.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/create_command_stream_impl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/create_command_stream_impl.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/csr_definitions.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}/command_stream_receiver_simulated_hw.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_common_hw.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_common_hw_base.inl
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "core/command_stream/preemption.h"
|
||||
#include "core/execution_environment/root_device_environment.h"
|
||||
#include "core/helpers/cache_policy.h"
|
||||
#include "core/helpers/flush_stamp.h"
|
||||
#include "core/helpers/hw_helper.h"
|
||||
#include "core/helpers/string.h"
|
||||
#include "core/memory_manager/internal_allocation_storage.h"
|
||||
@@ -23,7 +24,6 @@
|
||||
#include "runtime/event/event.h"
|
||||
#include "runtime/gtpin/gtpin_notify.h"
|
||||
#include "runtime/helpers/array_count.h"
|
||||
#include "runtime/helpers/flush_stamp.h"
|
||||
#include "runtime/helpers/timestamp_packet.h"
|
||||
#include "runtime/memory_manager/memory_manager.h"
|
||||
#include "runtime/memory_manager/surface.h"
|
||||
@@ -408,7 +408,7 @@ bool CommandStreamReceiver::createAllocationForHostSurface(HostPtrSurface &surfa
|
||||
if (allocation == nullptr) {
|
||||
return false;
|
||||
}
|
||||
allocation->updateTaskCount(Event::eventNotReady, osContext->getContextId());
|
||||
allocation->updateTaskCount(CompletionStamp::levelNotReady, osContext->getContextId());
|
||||
surface.setAllocation(allocation);
|
||||
internalAllocationStorage->storeAllocation(std::unique_ptr<GraphicsAllocation>(allocation), TEMPORARY_ALLOCATION);
|
||||
return true;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "core/command_stream/csr_definitions.h"
|
||||
#include "core/command_stream/linear_stream.h"
|
||||
#include "core/command_stream/thread_arbitration_policy.h"
|
||||
#include "core/helpers/aligned_memory.h"
|
||||
@@ -14,7 +15,6 @@
|
||||
#include "core/indirect_heap/indirect_heap.h"
|
||||
#include "core/kernel/grf_config.h"
|
||||
#include "runtime/command_stream/aub_subcapture.h"
|
||||
#include "runtime/command_stream/csr_definitions.h"
|
||||
#include "runtime/command_stream/submissions_aggregator.h"
|
||||
#include "runtime/helpers/blit_commands_helper.h"
|
||||
#include "runtime/helpers/flat_batch_buffer_helper.h"
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "core/helpers/dirty_state_helpers.h"
|
||||
#include "core/helpers/hw_cmds.h"
|
||||
#include "core/helpers/hw_info.h"
|
||||
#include "core/helpers/options.h"
|
||||
#include "runtime/command_stream/command_stream_receiver.h"
|
||||
#include "runtime/execution_environment/execution_environment.h"
|
||||
#include "runtime/helpers/dirty_state_helpers.h"
|
||||
|
||||
namespace NEO {
|
||||
template <typename GfxFamily>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "core/execution_environment/root_device_environment.h"
|
||||
#include "core/gmm_helper/page_table_mngr.h"
|
||||
#include "core/helpers/cache_policy.h"
|
||||
#include "core/helpers/flush_stamp.h"
|
||||
#include "core/helpers/hw_helper.h"
|
||||
#include "core/helpers/options.h"
|
||||
#include "core/helpers/preamble.h"
|
||||
@@ -19,17 +20,13 @@
|
||||
#include "core/indirect_heap/indirect_heap.h"
|
||||
#include "core/memory_manager/internal_allocation_storage.h"
|
||||
#include "core/os_interface/os_context.h"
|
||||
#include "runtime/command_queue/gpgpu_walker.h"
|
||||
#include "runtime/command_stream/command_stream_receiver_hw.h"
|
||||
#include "runtime/command_stream/experimental_command_buffer.h"
|
||||
#include "runtime/command_stream/scratch_space_controller_base.h"
|
||||
#include "runtime/device/device.h"
|
||||
#include "runtime/event/event.h"
|
||||
#include "runtime/gtpin/gtpin_notify.h"
|
||||
#include "runtime/helpers/blit_commands_helper.h"
|
||||
#include "runtime/helpers/flat_batch_buffer_helper_hw.h"
|
||||
#include "runtime/helpers/flush_stamp.h"
|
||||
#include "runtime/helpers/state_compute_mode_helper.h"
|
||||
#include "runtime/helpers/timestamp_packet.h"
|
||||
#include "runtime/memory_manager/memory_manager.h"
|
||||
#include "runtime/utilities/tag_allocator.h"
|
||||
@@ -146,7 +143,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
|
||||
|
||||
DEBUG_BREAK_IF(&commandStreamTask == &commandStream);
|
||||
DEBUG_BREAK_IF(!(dispatchFlags.preemptionMode == PreemptionMode::Disabled ? device.getPreemptionMode() == PreemptionMode::Disabled : true));
|
||||
DEBUG_BREAK_IF(taskLevel >= Event::eventNotReady);
|
||||
DEBUG_BREAK_IF(taskLevel >= CompletionStamp::levelNotReady);
|
||||
|
||||
DBG_LOG(LogTaskCounts, __FUNCTION__, "Line: ", __LINE__, "taskLevel", taskLevel);
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Intel Corporation
|
||||
* Copyright (C) 2019-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "core/command_stream/csr_definitions.h"
|
||||
#include "core/command_stream/linear_stream.h"
|
||||
#include "runtime/command_stream/command_stream_receiver_hw.h"
|
||||
#include "runtime/command_stream/csr_definitions.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
#include "submissions_aggregator.h"
|
||||
|
||||
#include "core/helpers/flush_stamp.h"
|
||||
#include "core/memory_manager/graphics_allocation.h"
|
||||
#include "runtime/helpers/flush_stamp.h"
|
||||
|
||||
void NEO::SubmissionAggregator::recordCommandBuffer(CommandBuffer *commandBuffer) {
|
||||
this->cmdBuffers.pushTailOne(*commandBuffer);
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "core/command_stream/csr_definitions.h"
|
||||
#include "core/command_stream/linear_stream.h"
|
||||
#include "core/memory_manager/residency_container.h"
|
||||
#include "core/utilities/idlist.h"
|
||||
#include "core/utilities/stackvec.h"
|
||||
#include "runtime/command_stream/csr_definitions.h"
|
||||
#include "runtime/helpers/properties_helper.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -36,7 +36,7 @@ void AsyncEventsHandler::registerEvent(Event *event) {
|
||||
}
|
||||
|
||||
Event *AsyncEventsHandler::processList() {
|
||||
uint32_t lowestTaskCount = Event::eventNotReady;
|
||||
uint32_t lowestTaskCount = CompletionStamp::levelNotReady;
|
||||
Event *sleepCandidate = nullptr;
|
||||
pendingList.clear();
|
||||
|
||||
|
||||
@@ -30,8 +30,6 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
const cl_uint Event::eventNotReady = 0xFFFFFFF0;
|
||||
|
||||
Event::Event(
|
||||
Context *ctx,
|
||||
CommandQueue *cmdQueue,
|
||||
@@ -323,7 +321,7 @@ void Event::calculateProfilingDataInternal(uint64_t contextStartTS, uint64_t con
|
||||
}
|
||||
|
||||
inline bool Event::wait(bool blocking, bool useQuickKmdSleep) {
|
||||
while (this->taskCount == Event::eventNotReady) {
|
||||
while (this->taskCount == CompletionStamp::levelNotReady) {
|
||||
if (blocking == false) {
|
||||
return false;
|
||||
}
|
||||
@@ -332,7 +330,7 @@ inline bool Event::wait(bool blocking, bool useQuickKmdSleep) {
|
||||
cmdQueue->waitUntilComplete(taskCount.load(), flushStamp->peekStamp(), useQuickKmdSleep);
|
||||
updateExecutionStatus();
|
||||
|
||||
DEBUG_BREAK_IF(this->taskLevel == Event::eventNotReady && this->executionStatus >= 0);
|
||||
DEBUG_BREAK_IF(this->taskLevel == CompletionStamp::levelNotReady && this->executionStatus >= 0);
|
||||
|
||||
auto *allocationStorage = cmdQueue->getGpgpuCommandStreamReceiver().getInternalAllocationStorage();
|
||||
allocationStorage->cleanAllocationList(this->taskCount, TEMPORARY_ALLOCATION);
|
||||
@@ -341,7 +339,7 @@ inline bool Event::wait(bool blocking, bool useQuickKmdSleep) {
|
||||
}
|
||||
|
||||
void Event::updateExecutionStatus() {
|
||||
if (taskLevel == Event::eventNotReady) {
|
||||
if (taskLevel == CompletionStamp::levelNotReady) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -397,11 +395,11 @@ void Event::unblockEventsBlockedByThis(int32_t transitionStatus) {
|
||||
(void)status;
|
||||
DEBUG_BREAK_IF(!(isStatusCompleted(status) || (peekIsSubmitted(status))));
|
||||
|
||||
uint32_t taskLevelToPropagate = Event::eventNotReady;
|
||||
uint32_t taskLevelToPropagate = CompletionStamp::levelNotReady;
|
||||
|
||||
if (isStatusCompletedByTermination(transitionStatus) == false) {
|
||||
//if we are event on top of the tree , obtain taskLevel from CSR
|
||||
if (taskLevel == Event::eventNotReady) {
|
||||
if (taskLevel == CompletionStamp::levelNotReady) {
|
||||
this->taskLevel = getTaskLevel(); // NOLINT(clang-analyzer-optin.cplusplus.VirtualCall)
|
||||
taskLevelToPropagate = this->taskLevel;
|
||||
} else {
|
||||
@@ -498,7 +496,7 @@ void Event::submitCommand(bool abortTasks) {
|
||||
} else if (profilingCpuPath && endTimeStamp == 0) {
|
||||
setEndTimeStamp();
|
||||
}
|
||||
if (this->taskCount == Event::eventNotReady) {
|
||||
if (this->taskCount == CompletionStamp::levelNotReady) {
|
||||
if (!this->isUserEvent() && this->eventWithoutCommand) {
|
||||
if (this->cmdQueue) {
|
||||
auto lockCSR = this->getCommandQueue()->getGpgpuCommandStreamReceiver().obtainUniqueOwnership();
|
||||
@@ -522,7 +520,7 @@ cl_int Event::waitForEvents(cl_uint numEvents,
|
||||
for (const cl_event *it = eventList, *end = eventList + numEvents; it != end; ++it) {
|
||||
Event *event = castToObjectOrAbort<Event>(*it);
|
||||
if (event->cmdQueue) {
|
||||
if (event->taskLevel != Event::eventNotReady) {
|
||||
if (event->taskLevel != CompletionStamp::levelNotReady) {
|
||||
event->cmdQueue->flush();
|
||||
}
|
||||
}
|
||||
@@ -572,7 +570,7 @@ inline void Event::unblockEventBy(Event &event, uint32_t taskLevel, int32_t tran
|
||||
}
|
||||
DBG_LOG(EventsDebugEnable, "Event", this, "is unblocked by", &event);
|
||||
|
||||
if (this->taskLevel == Event::eventNotReady) {
|
||||
if (this->taskLevel == CompletionStamp::levelNotReady) {
|
||||
this->taskLevel = std::max(cmdQueue->getGpgpuCommandStreamReceiver().peekTaskLevel(), taskLevel);
|
||||
} else {
|
||||
this->taskLevel = std::max(this->taskLevel.load(), taskLevel);
|
||||
@@ -594,7 +592,7 @@ bool Event::updateStatusAndCheckCompletion() {
|
||||
}
|
||||
|
||||
bool Event::isReadyForSubmission() {
|
||||
return taskLevel != Event::eventNotReady ? true : false;
|
||||
return taskLevel != CompletionStamp::levelNotReady ? true : false;
|
||||
}
|
||||
|
||||
void Event::addCallback(Callback::ClbFuncT fn, cl_int type, void *data) {
|
||||
@@ -663,7 +661,7 @@ void Event::tryFlushEvent() {
|
||||
//only if event is not completed, completed event has already been flushed
|
||||
if (cmdQueue && updateStatusAndCheckCompletion() == false) {
|
||||
//flush the command queue only if it is not blocked event
|
||||
if (taskLevel != Event::eventNotReady) {
|
||||
if (taskLevel != CompletionStamp::levelNotReady) {
|
||||
cmdQueue->getGpgpuCommandStreamReceiver().flushBatchedSubmissions();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "core/helpers/flush_stamp.h"
|
||||
#include "core/os_interface/os_time.h"
|
||||
#include "core/utilities/arrayref.h"
|
||||
#include "core/utilities/idlist.h"
|
||||
@@ -13,7 +14,6 @@
|
||||
#include "runtime/api/cl_types.h"
|
||||
#include "runtime/event/hw_timestamps.h"
|
||||
#include "runtime/helpers/base_object.h"
|
||||
#include "runtime/helpers/flush_stamp.h"
|
||||
#include "runtime/helpers/task_information.h"
|
||||
#include "runtime/os_interface/performance_counters.h"
|
||||
|
||||
@@ -78,7 +78,6 @@ class Event : public BaseObject<_cl_event>, public IDNode<Event> {
|
||||
};
|
||||
|
||||
static const cl_ulong objectMagic = 0x80134213A43C981ALL;
|
||||
static const cl_uint eventNotReady;
|
||||
|
||||
Event(CommandQueue *cmdQueue, cl_command_type cmdType,
|
||||
uint32_t taskLevel, uint32_t taskCount);
|
||||
@@ -244,13 +243,13 @@ class Event : public BaseObject<_cl_event>, public IDNode<Event> {
|
||||
virtual void unblockEventBy(Event &event, uint32_t taskLevel, int32_t transitionStatus);
|
||||
|
||||
void updateTaskCount(uint32_t taskCount) {
|
||||
if (taskCount == Event::eventNotReady) {
|
||||
if (taskCount == CompletionStamp::levelNotReady) {
|
||||
DEBUG_BREAK_IF(true);
|
||||
return;
|
||||
}
|
||||
|
||||
uint32_t prevTaskCount = this->taskCount.exchange(taskCount);
|
||||
if ((prevTaskCount != Event::eventNotReady) && (prevTaskCount > taskCount)) {
|
||||
if ((prevTaskCount != CompletionStamp::levelNotReady) && (prevTaskCount > taskCount)) {
|
||||
this->taskCount = prevTaskCount;
|
||||
DEBUG_BREAK_IF(true);
|
||||
}
|
||||
@@ -322,7 +321,7 @@ class Event : public BaseObject<_cl_event>, public IDNode<Event> {
|
||||
bool calcProfilingData();
|
||||
MOCKABLE_VIRTUAL void calculateProfilingDataInternal(uint64_t contextStartTS, uint64_t contextEndTS, uint64_t *contextCompleteTS, uint64_t globalStartTS);
|
||||
MOCKABLE_VIRTUAL void synchronizeTaskCount() {
|
||||
while (this->taskCount == Event::eventNotReady)
|
||||
while (this->taskCount == CompletionStamp::levelNotReady)
|
||||
;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -54,7 +54,7 @@ void EventBuilder::finalize() {
|
||||
|
||||
//do not add as child if:
|
||||
//parent has no parents and is not blocked
|
||||
if (!(parent->peekIsBlocked() == false && parent->taskLevel != Event::eventNotReady) ||
|
||||
if (!(parent->peekIsBlocked() == false && parent->taskLevel != CompletionStamp::levelNotReady) ||
|
||||
(!parent->isEventWithoutCommand() && !parent->peekIsCmdSubmitted())) {
|
||||
parent->addChild(*this->event);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2019 Intel Corporation
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -46,14 +46,14 @@ void EventsTracker::dumpQueue(CommandQueue *cmdQ, std::ostream &out, CmdqSet &du
|
||||
out << label(cmdQ) << "[label=\"{------CmdQueue, ptr=" << cmdQ << "------|task count=";
|
||||
auto taskCount = cmdQ->taskCount;
|
||||
auto taskLevel = cmdQ->taskLevel;
|
||||
if (taskCount == Event::eventNotReady) {
|
||||
if (taskCount == CompletionStamp::levelNotReady) {
|
||||
out << "NOT_READY";
|
||||
} else {
|
||||
out << taskCount;
|
||||
}
|
||||
|
||||
out << ", level=";
|
||||
if (taskLevel == Event::eventNotReady) {
|
||||
if (taskLevel == CompletionStamp::levelNotReady) {
|
||||
out << "NOT_READY";
|
||||
} else {
|
||||
out << taskLevel;
|
||||
@@ -96,14 +96,14 @@ void EventsTracker::dumpNode(Event *node, std::ostream &out, const EventIdMap &e
|
||||
"|"
|
||||
<< commandType << "|" << status[statusId] << "|"
|
||||
"task count=";
|
||||
if (taskCount == Event::eventNotReady) {
|
||||
if (taskCount == CompletionStamp::levelNotReady) {
|
||||
out << "NOT_READY";
|
||||
} else {
|
||||
out << taskCount;
|
||||
}
|
||||
|
||||
out << ", level=";
|
||||
if (taskLevel == Event::eventNotReady) {
|
||||
if (taskLevel == CompletionStamp::levelNotReady) {
|
||||
out << "NOT_READY";
|
||||
} else {
|
||||
out << taskLevel;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -15,7 +15,7 @@
|
||||
namespace NEO {
|
||||
|
||||
UserEvent::UserEvent(Context *ctx)
|
||||
: Event(ctx, nullptr, CL_COMMAND_USER, eventNotReady, eventNotReady) {
|
||||
: Event(ctx, nullptr, CL_COMMAND_USER, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady) {
|
||||
transitionExecutionStatus(CL_QUEUED);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ uint32_t UserEvent::getTaskLevel() {
|
||||
if (peekExecutionStatus() == CL_COMPLETE) {
|
||||
return 0;
|
||||
}
|
||||
return Event::eventNotReady;
|
||||
return CompletionStamp::levelNotReady;
|
||||
}
|
||||
|
||||
bool UserEvent::isInitialEventStatus() const {
|
||||
@@ -44,7 +44,7 @@ bool UserEvent::isInitialEventStatus() const {
|
||||
}
|
||||
|
||||
VirtualEvent::VirtualEvent(CommandQueue *cmdQ, Context *ctx)
|
||||
: Event(ctx, cmdQ, -1, eventNotReady, eventNotReady) {
|
||||
: Event(ctx, cmdQ, -1, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady) {
|
||||
transitionExecutionStatus(CL_QUEUED);
|
||||
|
||||
// internal object - no need for API refcount
|
||||
|
||||
@@ -17,8 +17,6 @@ set(RUNTIME_SRCS_HELPERS_BASE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cl_helper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/convert_color.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/device_helpers.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/dirty_state_helpers.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/dirty_state_helpers.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/dispatch_info.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/dispatch_info.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/dispatch_info_builder.h
|
||||
@@ -29,8 +27,6 @@ set(RUNTIME_SRCS_HELPERS_BASE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/flat_batch_buffer_helper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/flat_batch_buffer_helper_hw.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/flat_batch_buffer_helper_hw.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/flush_stamp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/flush_stamp.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/get_info.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware_commands_helper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware_commands_helper.inl
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "core/command_stream/csr_definitions.h"
|
||||
#include "core/command_stream/preemption.h"
|
||||
#include "core/debug_settings/debug_settings_manager.h"
|
||||
#include "core/helpers/address_patch.h"
|
||||
@@ -14,7 +15,6 @@
|
||||
#include "core/helpers/string.h"
|
||||
#include "core/indirect_heap/indirect_heap.h"
|
||||
#include "runtime/command_queue/local_id_gen.h"
|
||||
#include "runtime/command_stream/csr_definitions.h"
|
||||
#include "runtime/helpers/dispatch_info.h"
|
||||
#include "runtime/kernel/kernel.h"
|
||||
#include "runtime/program/block_kernel_manager.h"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Intel Corporation
|
||||
* Copyright (C) 2019-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "core/command_stream/csr_definitions.h"
|
||||
#include "core/helpers/hw_cmds.h"
|
||||
#include "runtime/command_stream/csr_definitions.h"
|
||||
|
||||
namespace NEO {
|
||||
template <typename GfxFamily>
|
||||
|
||||
@@ -72,7 +72,7 @@ CompletionStamp &CommandMapUnmap::submit(uint32_t taskLevel, bool terminated) {
|
||||
false //epilogueRequired
|
||||
);
|
||||
|
||||
DEBUG_BREAK_IF(taskLevel >= Event::eventNotReady);
|
||||
DEBUG_BREAK_IF(taskLevel >= CompletionStamp::levelNotReady);
|
||||
|
||||
gtpinNotifyPreFlushTask(&commandQueue);
|
||||
|
||||
@@ -243,7 +243,7 @@ CompletionStamp &CommandComputeKernel::submit(uint32_t taskLevel, bool terminate
|
||||
dispatchFlags.epilogueRequired = true;
|
||||
}
|
||||
|
||||
DEBUG_BREAK_IF(taskLevel >= Event::eventNotReady);
|
||||
DEBUG_BREAK_IF(taskLevel >= CompletionStamp::levelNotReady);
|
||||
|
||||
gtpinNotifyPreFlushTask(&commandQueue);
|
||||
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
#include "core/gmm_helper/gmm_helper.h"
|
||||
#include "core/gmm_helper/page_table_mngr.h"
|
||||
#include "core/helpers/aligned_memory.h"
|
||||
#include "core/helpers/flush_stamp.h"
|
||||
#include "core/helpers/preamble.h"
|
||||
#include "core/memory_manager/residency.h"
|
||||
#include "core/os_interface/linux/drm_engine_mapper.h"
|
||||
#include "core/os_interface/linux/drm_neo.h"
|
||||
#include "core/os_interface/linux/os_interface.h"
|
||||
#include "runtime/execution_environment/execution_environment.h"
|
||||
#include "runtime/helpers/flush_stamp.h"
|
||||
#include "runtime/mem_obj/buffer.h"
|
||||
#include "runtime/os_interface/linux/drm_allocation.h"
|
||||
#include "runtime/os_interface/linux/drm_buffer_object.h"
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
#include "core/command_stream/linear_stream.h"
|
||||
#include "core/command_stream/preemption.h"
|
||||
#include "core/gmm_helper/page_table_mngr.h"
|
||||
#include "core/helpers/flush_stamp.h"
|
||||
#include "core/helpers/hw_cmds.h"
|
||||
#include "core/helpers/ptr_math.h"
|
||||
#include "core/helpers/windows/gmm_callbacks.h"
|
||||
#include "runtime/device/device.h"
|
||||
#include "runtime/helpers/flush_stamp.h"
|
||||
#include "runtime/mem_obj/mem_obj.h"
|
||||
#include "runtime/os_interface/windows/wddm/wddm.h"
|
||||
#include "runtime/os_interface/windows/wddm_device_command_stream.h"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
namespace NEO {
|
||||
GlArbSyncEvent::GlArbSyncEvent(Context &context)
|
||||
: Event(&context, nullptr, CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR, eventNotReady, eventNotReady),
|
||||
: Event(&context, nullptr, CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady),
|
||||
glSyncInfo(std::make_unique<CL_GL_SYNC_INFO>()) {
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
namespace NEO {
|
||||
GlSyncEvent::GlSyncEvent(Context &context, const GL_CL_SYNC_INFO &sync)
|
||||
: Event(&context, nullptr, CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR, eventNotReady, eventNotReady),
|
||||
: Event(&context, nullptr, CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady),
|
||||
glSync(std::make_unique<GL_CL_SYNC_INFO>(sync)) {
|
||||
transitionExecutionStatus(CL_SUBMITTED);
|
||||
}
|
||||
@@ -57,6 +57,6 @@ uint32_t GlSyncEvent::getTaskLevel() {
|
||||
if (peekExecutionStatus() == CL_COMPLETE) {
|
||||
return 0;
|
||||
}
|
||||
return Event::eventNotReady;
|
||||
return CompletionStamp::levelNotReady;
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
@@ -680,12 +680,12 @@ HWTEST_F(CommandQueueHwTest, GivenEventThatIsNotCompletedWhenFinishIsCalledAndIt
|
||||
};
|
||||
auto Value = 0u;
|
||||
|
||||
auto ev = new Event(this->pCmdQ, CL_COMMAND_COPY_BUFFER, 3, Event::eventNotReady + 1);
|
||||
auto ev = new Event(this->pCmdQ, CL_COMMAND_COPY_BUFFER, 3, CompletionStamp::levelNotReady + 1);
|
||||
clSetEventCallback(ev, CL_COMPLETE, ClbFuncTempStruct::ClbFuncT, &Value);
|
||||
|
||||
auto &csr = this->pCmdQ->getGpgpuCommandStreamReceiver();
|
||||
EXPECT_GT(3u, csr.peekTaskCount());
|
||||
*csr.getTagAddress() = Event::eventNotReady + 1;
|
||||
*csr.getTagAddress() = CompletionStamp::levelNotReady + 1;
|
||||
ret = clFinish(this->pCmdQ);
|
||||
ASSERT_EQ(CL_SUCCESS, ret);
|
||||
|
||||
@@ -916,14 +916,14 @@ HWTEST_F(CommandQueueHwTest, givenCommandQueueThatIsBlockedAndUsesCpuCopyWhenEve
|
||||
MockBuffer buffer;
|
||||
cl_event returnEvent = nullptr;
|
||||
auto retVal = CL_SUCCESS;
|
||||
cmdQHw->taskLevel = Event::eventNotReady;
|
||||
cmdQHw->taskLevel = CompletionStamp::levelNotReady;
|
||||
size_t offset = 0;
|
||||
size_t size = 4096u;
|
||||
TransferProperties transferProperties(&buffer, CL_COMMAND_READ_BUFFER, 0, false, &offset, &size, nullptr, false);
|
||||
EventsRequest eventsRequest(0, nullptr, &returnEvent);
|
||||
cmdQHw->cpuDataTransferHandler(transferProperties, eventsRequest, retVal);
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
EXPECT_EQ(Event::eventNotReady, castToObject<Event>(returnEvent)->peekTaskCount());
|
||||
EXPECT_EQ(CompletionStamp::levelNotReady, castToObject<Event>(returnEvent)->peekTaskCount());
|
||||
clReleaseEvent(returnEvent);
|
||||
}
|
||||
|
||||
@@ -942,12 +942,12 @@ HWTEST_F(CommandQueueHwTest, givenEventWithRecordedCommandWhenSubmitCommandIsCal
|
||||
std::atomic_bool *atomicFence = nullptr;
|
||||
};
|
||||
|
||||
mockEvent neoEvent(this->pCmdQ, CL_COMMAND_MAP_BUFFER, Event::eventNotReady, Event::eventNotReady);
|
||||
mockEvent neoEvent(this->pCmdQ, CL_COMMAND_MAP_BUFFER, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady);
|
||||
neoEvent.atomicFence = &go;
|
||||
EXPECT_TRUE(neoEvent.eventWithoutCommand);
|
||||
neoEvent.eventWithoutCommand = false;
|
||||
|
||||
EXPECT_EQ(Event::eventNotReady, neoEvent.peekTaskCount());
|
||||
EXPECT_EQ(CompletionStamp::levelNotReady, neoEvent.peekTaskCount());
|
||||
|
||||
std::thread t([&]() {
|
||||
while (!go)
|
||||
@@ -1112,7 +1112,7 @@ HWTEST_F(CommandQueueHwTest, givenBlockedOutOfOrderQueueWhenUserEventIsSubmitted
|
||||
neoEvent->updateExecutionStatus();
|
||||
|
||||
EXPECT_EQ(neoEvent->peekExecutionStatus(), CL_QUEUED);
|
||||
EXPECT_EQ(neoEvent->peekTaskCount(), Event::eventNotReady);
|
||||
EXPECT_EQ(neoEvent->peekTaskCount(), CompletionStamp::levelNotReady);
|
||||
|
||||
clSetUserEventStatus(userEvent, 0u);
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ TEST(CommandQueue, givenTimeStampWithTaskCountNotReadyStatusWhenupdateFromComple
|
||||
cmdQ.taskCount = 1u;
|
||||
|
||||
CompletionStamp cs = {
|
||||
Event::eventNotReady,
|
||||
CompletionStamp::levelNotReady,
|
||||
0,
|
||||
0};
|
||||
cmdQ.updateFromCompletionStamp(cs);
|
||||
|
||||
@@ -240,7 +240,7 @@ HWTEST_F(BarrierTest, givenBlockedCommandQueueAndEnqueueBarrierWithWaitlistRetur
|
||||
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
auto pEvent = (Event *)event;
|
||||
EXPECT_EQ(pEvent->peekTaskCount(), Event::eventNotReady);
|
||||
EXPECT_EQ(pEvent->peekTaskCount(), CompletionStamp::levelNotReady);
|
||||
event2.setStatus(CL_COMPLETE);
|
||||
clReleaseEvent(event);
|
||||
}
|
||||
|
||||
@@ -275,14 +275,14 @@ HWTEST_F(EnqueueHandlerTest, WhenEnqueuingHandlerForMarkerOnBlockedQueueThenTask
|
||||
auto mockCmdQ = std::unique_ptr<MockCommandQueueHw<FamilyType>>(new MockCommandQueueHw<FamilyType>(context, pClDevice, 0));
|
||||
|
||||
// put queue into initial blocked state
|
||||
mockCmdQ->taskLevel = Event::eventNotReady;
|
||||
mockCmdQ->taskLevel = CompletionStamp::levelNotReady;
|
||||
|
||||
mockCmdQ->enqueueMarkerWithWaitList(
|
||||
0,
|
||||
nullptr,
|
||||
nullptr);
|
||||
|
||||
EXPECT_EQ(Event::eventNotReady, mockCmdQ->taskLevel);
|
||||
EXPECT_EQ(CompletionStamp::levelNotReady, mockCmdQ->taskLevel);
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueHandlerTest, WhenEnqueuingBlockedWithoutReturnEventThenVirtualEventIsCreatedAndCommandQueueInternalRefCountIsIncremeted) {
|
||||
@@ -296,7 +296,7 @@ HWTEST_F(EnqueueHandlerTest, WhenEnqueuingBlockedWithoutReturnEventThenVirtualEv
|
||||
auto mockCmdQ = new MockCommandQueueHw<FamilyType>(context, pClDevice, 0);
|
||||
|
||||
// put queue into initial blocked state
|
||||
mockCmdQ->taskLevel = Event::eventNotReady;
|
||||
mockCmdQ->taskLevel = CompletionStamp::levelNotReady;
|
||||
|
||||
auto initialRefCountInternal = mockCmdQ->getRefInternalCount();
|
||||
|
||||
@@ -330,7 +330,7 @@ HWTEST_F(EnqueueHandlerTest, WhenEnqueuingBlockedThenVirtualEventIsSetAsCurrentC
|
||||
auto mockCmdQ = new MockCommandQueueHw<FamilyType>(context, pClDevice, 0);
|
||||
|
||||
// put queue into initial blocked state
|
||||
mockCmdQ->taskLevel = Event::eventNotReady;
|
||||
mockCmdQ->taskLevel = CompletionStamp::levelNotReady;
|
||||
|
||||
bool blocking = false;
|
||||
mockCmdQ->template enqueueHandler<CL_COMMAND_NDRANGE_KERNEL>(nullptr,
|
||||
|
||||
@@ -223,7 +223,7 @@ TEST_F(EnqueueReadBuffer, givenInOrderQueueAndForcedCpuCopyOnReadBufferAndEventN
|
||||
uint32_t taskLevelCmdQ = 17;
|
||||
pCmdQ->taskLevel = taskLevelCmdQ;
|
||||
|
||||
Event event1(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, Event::eventNotReady, 4);
|
||||
Event event1(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, CompletionStamp::levelNotReady, 4);
|
||||
|
||||
cl_bool blockingRead = CL_FALSE;
|
||||
size_t size = sizeof(cl_float);
|
||||
@@ -247,8 +247,8 @@ TEST_F(EnqueueReadBuffer, givenInOrderQueueAndForcedCpuCopyOnReadBufferAndEventN
|
||||
ASSERT_NE(nullptr, event);
|
||||
|
||||
auto pEvent = (Event *)event;
|
||||
EXPECT_EQ(Event::eventNotReady, pEvent->taskLevel);
|
||||
EXPECT_EQ(Event::eventNotReady, pCmdQ->taskLevel);
|
||||
EXPECT_EQ(CompletionStamp::levelNotReady, pEvent->taskLevel);
|
||||
EXPECT_EQ(CompletionStamp::levelNotReady, pCmdQ->taskLevel);
|
||||
event1.taskLevel = 20;
|
||||
event1.setStatus(CL_COMPLETE);
|
||||
pEvent->updateExecutionStatus();
|
||||
|
||||
@@ -148,7 +148,7 @@ TEST_F(EnqueueWriteBufferTypeTest, givenInOrderQueueAndForcedCpuCopyOnWriteBuffe
|
||||
uint32_t taskLevelCmdQ = 17;
|
||||
pCmdQ->taskLevel = taskLevelCmdQ;
|
||||
|
||||
Event event1(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, Event::eventNotReady, 4);
|
||||
Event event1(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, CompletionStamp::levelNotReady, 4);
|
||||
|
||||
cl_bool blockingWrite = CL_FALSE;
|
||||
size_t size = sizeof(cl_float);
|
||||
@@ -172,8 +172,8 @@ TEST_F(EnqueueWriteBufferTypeTest, givenInOrderQueueAndForcedCpuCopyOnWriteBuffe
|
||||
ASSERT_NE(nullptr, event);
|
||||
|
||||
auto pEvent = (Event *)event;
|
||||
EXPECT_EQ(Event::eventNotReady, pEvent->taskLevel);
|
||||
EXPECT_EQ(Event::eventNotReady, pCmdQ->taskLevel);
|
||||
EXPECT_EQ(CompletionStamp::levelNotReady, pEvent->taskLevel);
|
||||
EXPECT_EQ(CompletionStamp::levelNotReady, pCmdQ->taskLevel);
|
||||
event1.taskLevel = 20;
|
||||
event1.setStatus(CL_COMPLETE);
|
||||
pEvent->updateExecutionStatus();
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "core/command_stream/csr_definitions.h"
|
||||
#include "core/gmm_helper/gmm_helper.h"
|
||||
#include "core/helpers/hw_helper.h"
|
||||
#include "core/helpers/state_base_address.h"
|
||||
#include "core/memory_manager/internal_allocation_storage.h"
|
||||
#include "core/os_interface/os_context.h"
|
||||
#include "core/unit_tests/helpers/debug_manager_state_restore.h"
|
||||
#include "runtime/command_stream/csr_definitions.h"
|
||||
#include "runtime/command_stream/scratch_space_controller.h"
|
||||
#include "runtime/helpers/hardware_commands_helper.h"
|
||||
#include "test.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "core/command_stream/preemption.h"
|
||||
#include "core/helpers/flush_stamp.h"
|
||||
#include "core/helpers/hw_helper.h"
|
||||
#include "core/os_interface/os_context.h"
|
||||
#include "runtime/command_stream/aub_command_stream_receiver_hw.h"
|
||||
@@ -14,7 +15,6 @@
|
||||
#include "runtime/command_stream/tbx_command_stream_receiver_hw.h"
|
||||
#include "runtime/execution_environment/execution_environment.h"
|
||||
#include "runtime/helpers/dispatch_info.h"
|
||||
#include "runtime/helpers/flush_stamp.h"
|
||||
#include "runtime/helpers/timestamp_packet.h"
|
||||
#include "runtime/platform/platform.h"
|
||||
#include "runtime/utilities/tag_allocator.h"
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "core/helpers/flush_stamp.h"
|
||||
#include "runtime/command_stream/submissions_aggregator.h"
|
||||
#include "runtime/event/event.h"
|
||||
#include "runtime/helpers/flush_stamp.h"
|
||||
#include "test.h"
|
||||
#include "unit_tests/mocks/mock_command_queue.h"
|
||||
#include "unit_tests/mocks/mock_context.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -46,9 +46,9 @@ class AsyncEventsHandlerTests : public ::testing::Test {
|
||||
DebugManager.flags.EnableAsyncEventsHandler.set(false);
|
||||
handler.reset(new MockHandler());
|
||||
|
||||
event1 = new NiceMock<MyEvent>(nullptr, CL_COMMAND_BARRIER, Event::eventNotReady, Event::eventNotReady);
|
||||
event2 = new NiceMock<MyEvent>(nullptr, CL_COMMAND_BARRIER, Event::eventNotReady, Event::eventNotReady);
|
||||
event3 = new NiceMock<MyEvent>(nullptr, CL_COMMAND_BARRIER, Event::eventNotReady, Event::eventNotReady);
|
||||
event1 = new NiceMock<MyEvent>(nullptr, CL_COMMAND_BARRIER, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady);
|
||||
event2 = new NiceMock<MyEvent>(nullptr, CL_COMMAND_BARRIER, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady);
|
||||
event3 = new NiceMock<MyEvent>(nullptr, CL_COMMAND_BARRIER, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady);
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
@@ -85,7 +85,7 @@ TEST_F(AsyncEventsHandlerTests, givenEventsWhenListIsProcessedThenUpdateExecutio
|
||||
}
|
||||
|
||||
TEST_F(AsyncEventsHandlerTests, updateEventsRefInternalCount) {
|
||||
event1->setTaskStamp(Event::eventNotReady, 0);
|
||||
event1->setTaskStamp(CompletionStamp::levelNotReady, 0);
|
||||
|
||||
handler->registerEvent(event1);
|
||||
EXPECT_EQ(2, event1->getRefInternalCount());
|
||||
@@ -96,7 +96,7 @@ TEST_F(AsyncEventsHandlerTests, updateEventsRefInternalCount) {
|
||||
|
||||
TEST_F(AsyncEventsHandlerTests, givenNotCalledCallbacksWhenListIsProcessedThenDontUnregister) {
|
||||
int submittedCounter(0), completeCounter(0);
|
||||
event1->setTaskStamp(Event::eventNotReady, 0);
|
||||
event1->setTaskStamp(CompletionStamp::levelNotReady, 0);
|
||||
event1->addCallback(&this->callbackFcn, CL_SUBMITTED, &submittedCounter);
|
||||
event1->addCallback(&this->callbackFcn, CL_COMPLETE, &completeCounter);
|
||||
handler->registerEvent(event1);
|
||||
@@ -156,7 +156,7 @@ TEST_F(AsyncEventsHandlerTests, givenExternallSynchronizedEventWhenListIsProcess
|
||||
}
|
||||
|
||||
TEST_F(AsyncEventsHandlerTests, givenDoubleRegisteredEventWhenListIsProcessedAndNoCallbacksToProcessThenUnregister) {
|
||||
event1->setTaskStamp(Event::eventNotReady - 1, 0);
|
||||
event1->setTaskStamp(CompletionStamp::levelNotReady - 1, 0);
|
||||
event1->addCallback(&this->callbackFcn, CL_SUBMITTED, &counter);
|
||||
handler->registerEvent(event1);
|
||||
handler->registerEvent(event1);
|
||||
@@ -169,8 +169,8 @@ TEST_F(AsyncEventsHandlerTests, givenDoubleRegisteredEventWhenListIsProcessedAnd
|
||||
|
||||
TEST_F(AsyncEventsHandlerTests, givenEventsNotHandledByHandlderWhenDestructingThenUnreferenceAll) {
|
||||
auto myHandler = new MockHandler();
|
||||
event1->setTaskStamp(Event::eventNotReady, 0);
|
||||
event2->setTaskStamp(Event::eventNotReady, 0);
|
||||
event1->setTaskStamp(CompletionStamp::levelNotReady, 0);
|
||||
event2->setTaskStamp(CompletionStamp::levelNotReady, 0);
|
||||
event1->addCallback(&this->callbackFcn, CL_SUBMITTED, &counter);
|
||||
event2->addCallback(&this->callbackFcn, CL_SUBMITTED, &counter);
|
||||
|
||||
@@ -193,8 +193,8 @@ TEST_F(AsyncEventsHandlerTests, givenEventsNotHandledByHandlderWhenDestructingTh
|
||||
}
|
||||
|
||||
TEST_F(AsyncEventsHandlerTests, givenEventsNotHandledByHandlderWhenAsyncExecutionInterruptedThenUnreferenceAll) {
|
||||
event1->setTaskStamp(Event::eventNotReady, 0);
|
||||
event2->setTaskStamp(Event::eventNotReady, 0);
|
||||
event1->setTaskStamp(CompletionStamp::levelNotReady, 0);
|
||||
event2->setTaskStamp(CompletionStamp::levelNotReady, 0);
|
||||
event1->addCallback(&this->callbackFcn, CL_SUBMITTED, &counter);
|
||||
event2->addCallback(&this->callbackFcn, CL_SUBMITTED, &counter);
|
||||
|
||||
@@ -224,7 +224,7 @@ TEST_F(AsyncEventsHandlerTests, dontCreateThreadByDefault) {
|
||||
}
|
||||
|
||||
TEST_F(AsyncEventsHandlerTests, createThreadOnFirstRegister) {
|
||||
event1->setTaskStamp(Event::eventNotReady, 0);
|
||||
event1->setTaskStamp(CompletionStamp::levelNotReady, 0);
|
||||
|
||||
EXPECT_FALSE(handler->openThreadCalled);
|
||||
handler->registerEvent(event1);
|
||||
@@ -234,8 +234,8 @@ TEST_F(AsyncEventsHandlerTests, createThreadOnFirstRegister) {
|
||||
TEST_F(AsyncEventsHandlerTests, processAsynchronously) {
|
||||
DebugManager.flags.EnableAsyncEventsHandler.set(true);
|
||||
|
||||
event1->setTaskStamp(Event::eventNotReady, 0);
|
||||
event2->setTaskStamp(Event::eventNotReady, 0);
|
||||
event1->setTaskStamp(CompletionStamp::levelNotReady, 0);
|
||||
event2->setTaskStamp(CompletionStamp::levelNotReady, 0);
|
||||
|
||||
event1->addCallback(&this->callbackFcn, CL_SUBMITTED, &counter);
|
||||
event2->addCallback(&this->callbackFcn, CL_SUBMITTED, &counter);
|
||||
|
||||
@@ -47,7 +47,7 @@ TEST(Event, dontUpdateExecutionStatusOnNotReadyEvent) {
|
||||
auto mockDevice = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||
MockContext ctx;
|
||||
MockCommandQueue cmdQ(&ctx, mockDevice.get(), 0);
|
||||
Event event(&cmdQ, CL_COMMAND_NDRANGE_KERNEL, Event::eventNotReady, 0);
|
||||
Event event(&cmdQ, CL_COMMAND_NDRANGE_KERNEL, CompletionStamp::levelNotReady, 0);
|
||||
|
||||
EXPECT_FALSE(event.peekIsBlocked());
|
||||
EXPECT_EQ(CL_QUEUED, event.peekExecutionStatus());
|
||||
@@ -68,7 +68,7 @@ TEST(Event, givenEventThatStatusChangeWhenPeekIsCalledThenEventIsNotUpdated) {
|
||||
uint32_t callCount = 0u;
|
||||
};
|
||||
|
||||
mockEvent event(&cmdQ, CL_COMMAND_NDRANGE_KERNEL, Event::eventNotReady, 0);
|
||||
mockEvent event(&cmdQ, CL_COMMAND_NDRANGE_KERNEL, CompletionStamp::levelNotReady, 0);
|
||||
EXPECT_EQ(0u, event.callCount);
|
||||
event.peekExecutionStatus();
|
||||
EXPECT_EQ(0u, event.callCount);
|
||||
@@ -207,7 +207,7 @@ TEST(Event, waitForEventsWithNotReadyEventDoesNotFlushQueue) {
|
||||
MockContext context;
|
||||
|
||||
std::unique_ptr<MockCommandQueueWithFlushCheck> cmdQ1(new MockCommandQueueWithFlushCheck(context, device.get()));
|
||||
std::unique_ptr<Event> event1(new Event(cmdQ1.get(), CL_COMMAND_NDRANGE_KERNEL, Event::eventNotReady, 0));
|
||||
std::unique_ptr<Event> event1(new Event(cmdQ1.get(), CL_COMMAND_NDRANGE_KERNEL, CompletionStamp::levelNotReady, 0));
|
||||
cl_event eventWaitlist[] = {event1.get()};
|
||||
|
||||
Event::waitForEvents(1, eventWaitlist);
|
||||
@@ -216,7 +216,7 @@ TEST(Event, waitForEventsWithNotReadyEventDoesNotFlushQueue) {
|
||||
}
|
||||
|
||||
TEST(Event, givenNotReadyEventOnWaitlistWhenCheckingUserEventDependeciesThenTrueIsReturned) {
|
||||
auto event1 = std::make_unique<Event>(nullptr, CL_COMMAND_NDRANGE_KERNEL, Event::eventNotReady, 0);
|
||||
auto event1 = std::make_unique<Event>(nullptr, CL_COMMAND_NDRANGE_KERNEL, CompletionStamp::levelNotReady, 0);
|
||||
cl_event eventWaitlist[] = {event1.get()};
|
||||
|
||||
bool userEventDependencies = Event::checkUserEventDependencies(1, eventWaitlist);
|
||||
@@ -290,7 +290,7 @@ TEST_F(EventTest, GetEventInfo_CL_EVENT_COMMAND_EXECUTION_STATUS_returns_CL_SUBM
|
||||
}
|
||||
|
||||
TEST_F(EventTest, GetEventInfo_CL_EVENT_COMMAND_EXECUTION_STATUS_returnsSetStatus) {
|
||||
Event event(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, Event::eventNotReady, Event::eventNotReady);
|
||||
Event event(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady);
|
||||
cl_int eventStatus = -1;
|
||||
|
||||
event.setStatus(-1);
|
||||
@@ -383,7 +383,7 @@ TEST_F(EventTest, GetEventInfo_InvalidParam) {
|
||||
}
|
||||
|
||||
TEST_F(EventTest, Event_Wait_NonBlocking) {
|
||||
Event event(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, 3, Event::eventNotReady);
|
||||
Event event(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, 3, CompletionStamp::levelNotReady);
|
||||
auto result = event.wait(false, false);
|
||||
EXPECT_FALSE(result);
|
||||
}
|
||||
@@ -927,7 +927,7 @@ HWTEST_F(EventTest, givenVirtualEventWhenCommandSubmittedThenLockCSROccurs) {
|
||||
|
||||
std::unique_ptr<MockCommandComputeKernel> command = std::make_unique<MockCommandComputeKernel>(*pCmdQ, kernelOperation, surfaces, kernel);
|
||||
|
||||
auto virtualEvent = make_releaseable<MockEvent>(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, Event::eventNotReady, Event::eventNotReady);
|
||||
auto virtualEvent = make_releaseable<MockEvent>(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady);
|
||||
|
||||
virtualEvent->setCommand(std::move(command));
|
||||
|
||||
@@ -945,7 +945,7 @@ HWTEST_F(EventTest, givenVirtualEventWhenSubmitCommandEventNotReadyAndEventWitho
|
||||
taskLevel, taskCount) {}
|
||||
};
|
||||
|
||||
auto virtualEvent = make_releaseable<MockEvent>(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, Event::eventNotReady, Event::eventNotReady);
|
||||
auto virtualEvent = make_releaseable<MockEvent>(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady);
|
||||
|
||||
virtualEvent->submitCommand(false);
|
||||
|
||||
@@ -1202,23 +1202,23 @@ TEST_F(EventTest, GivenCompletedEventWhenQueryingExecutionStatusAfterFlushThenCs
|
||||
}
|
||||
|
||||
HWTEST_F(EventTest, submitCommandOnEventCreatedOnMapBufferWithoutCommandUpdatesTaskCount) {
|
||||
MockEvent<Event> ev(this->pCmdQ, CL_COMMAND_MAP_BUFFER, Event::eventNotReady, Event::eventNotReady);
|
||||
MockEvent<Event> ev(this->pCmdQ, CL_COMMAND_MAP_BUFFER, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady);
|
||||
|
||||
EXPECT_EQ(Event::eventNotReady, ev.peekTaskCount());
|
||||
EXPECT_EQ(CompletionStamp::levelNotReady, ev.peekTaskCount());
|
||||
ev.submitCommand(false);
|
||||
EXPECT_EQ(0u, ev.peekTaskCount());
|
||||
}
|
||||
|
||||
HWTEST_F(EventTest, submitCommandOnEventCreatedOnMapImageWithoutCommandUpdatesTaskCount) {
|
||||
MockEvent<Event> ev(this->pCmdQ, CL_COMMAND_MAP_IMAGE, Event::eventNotReady, Event::eventNotReady);
|
||||
MockEvent<Event> ev(this->pCmdQ, CL_COMMAND_MAP_IMAGE, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady);
|
||||
|
||||
EXPECT_EQ(Event::eventNotReady, ev.peekTaskCount());
|
||||
EXPECT_EQ(CompletionStamp::levelNotReady, ev.peekTaskCount());
|
||||
ev.submitCommand(false);
|
||||
EXPECT_EQ(0u, ev.peekTaskCount());
|
||||
}
|
||||
|
||||
TEST_F(EventTest, givenCmdQueueWithoutProfilingWhenIsCpuProfilingIsCalledThenFalseIsReturned) {
|
||||
MockEvent<Event> ev(this->pCmdQ, CL_COMMAND_MAP_IMAGE, Event::eventNotReady, Event::eventNotReady);
|
||||
MockEvent<Event> ev(this->pCmdQ, CL_COMMAND_MAP_IMAGE, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady);
|
||||
bool cpuProfiling = ev.isCPUProfilingPath() != 0;
|
||||
EXPECT_FALSE(cpuProfiling);
|
||||
}
|
||||
@@ -1247,7 +1247,7 @@ TEST_F(EventTest, givenCmdQueueWithProfilingWhenIsCpuProfilingIsCalledThenTrueIs
|
||||
const cl_queue_properties props[3] = {CL_QUEUE_PROPERTIES, CL_QUEUE_PROFILING_ENABLE, 0};
|
||||
std::unique_ptr<CommandQueue> pCmdQ(new CommandQueue(&mockContext, pClDevice, props));
|
||||
|
||||
MockEvent<Event> ev(pCmdQ.get(), CL_COMMAND_MAP_IMAGE, Event::eventNotReady, Event::eventNotReady);
|
||||
MockEvent<Event> ev(pCmdQ.get(), CL_COMMAND_MAP_IMAGE, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady);
|
||||
bool cpuProfiling = ev.isCPUProfilingPath() != 0;
|
||||
EXPECT_TRUE(cpuProfiling);
|
||||
}
|
||||
@@ -1351,8 +1351,8 @@ HWTEST_F(EventTest, givenEventWithNotReadyTaskLevelWhenUnblockedThenGetTaskLevel
|
||||
Event parentEventWithGreaterTaskLevel(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, initialTaskLevel + 5, 0);
|
||||
Event parentEventWithLowerTaskLevel(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, initialTaskLevel - 5, 0);
|
||||
|
||||
Event childEvent0(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, Event::eventNotReady, Event::eventNotReady);
|
||||
Event childEvent1(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, Event::eventNotReady, Event::eventNotReady);
|
||||
Event childEvent0(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady);
|
||||
Event childEvent1(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady);
|
||||
|
||||
auto &csr = reinterpret_cast<UltCommandStreamReceiver<FamilyType> &>(pCmdQ->getGpgpuCommandStreamReceiver());
|
||||
csr.taskLevel = initialTaskLevel;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2019 Intel Corporation
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -109,8 +109,8 @@ TEST(EventsTracker, givenAlreadyDumpedCmdqThenNotDumping) {
|
||||
|
||||
TEST(EventsTracker, givenCmqdWithTaskCountAndLevelNotReadyThenDumpingCmdqWithNotReadyLabels) {
|
||||
CommandQueue cmdq;
|
||||
cmdq.taskCount = Event::eventNotReady;
|
||||
cmdq.taskLevel = Event::eventNotReady;
|
||||
cmdq.taskCount = CompletionStamp::levelNotReady;
|
||||
cmdq.taskLevel = CompletionStamp::levelNotReady;
|
||||
|
||||
std::stringstream stream;
|
||||
std::set<CommandQueue *> dumped;
|
||||
@@ -155,8 +155,8 @@ TEST(EventsTracker, whenCallDumpEdgeThenGetStringWithProperLabelOfDumpedEdge) {
|
||||
|
||||
TEST(EventsTracker, givenEventWithTaskLevelAndCountNotReadyThenDumpingNodeWithNotReadyLabels) {
|
||||
UserEvent uEvent;
|
||||
uEvent.taskLevel = Event::eventNotReady;
|
||||
uEvent.updateTaskCount(Event::eventNotReady);
|
||||
uEvent.taskLevel = CompletionStamp::levelNotReady;
|
||||
uEvent.updateTaskCount(CompletionStamp::levelNotReady);
|
||||
|
||||
std::stringstream stream;
|
||||
std::unordered_map<Event *, int64_t> map;
|
||||
@@ -201,7 +201,7 @@ TEST(EventsTracker, givenNullptrEventThenNotDumpingNode) {
|
||||
|
||||
TEST(EventsTracker, givenEventAndUserEventThenDumpingNodeWithProperLabels) {
|
||||
UserEvent uEvent;
|
||||
Event event(nullptr, CL_COMMAND_NDRANGE_KERNEL, Event::eventNotReady, Event::eventNotReady);
|
||||
Event event(nullptr, CL_COMMAND_NDRANGE_KERNEL, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady);
|
||||
|
||||
std::stringstream stream;
|
||||
std::unordered_map<Event *, int64_t> map;
|
||||
@@ -264,7 +264,7 @@ TEST(EventsTracker, givenEventWithCallbackThenDumpingWithProperLabel) {
|
||||
}
|
||||
|
||||
TEST(EventsTracker, givenSubmittedEventThenDumpingWithProperLabel) {
|
||||
Event event(nullptr, CL_COMMAND_NDRANGE_KERNEL, Event::eventNotReady, Event::eventNotReady);
|
||||
Event event(nullptr, CL_COMMAND_NDRANGE_KERNEL, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady);
|
||||
|
||||
std::stringstream stream;
|
||||
std::unordered_map<Event *, int64_t> map;
|
||||
@@ -482,7 +482,7 @@ TEST(EventsTracker, givenTwoEventsWithSamePtrWhenFirstOneIsDeletedThenDumpingFir
|
||||
}
|
||||
|
||||
TEST(EventsTracker, whenNotifyCreationOfEventThenEventIsDumped) {
|
||||
Event event(nullptr, CL_COMMAND_USER, Event::eventNotReady, Event::eventNotReady);
|
||||
Event event(nullptr, CL_COMMAND_USER, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady);
|
||||
EventsTrackerMock evTrackerMock;
|
||||
|
||||
std::stringstream expected;
|
||||
@@ -624,7 +624,7 @@ TEST(EventsTracker, whenEventsDebugEnableFlagIsTrueAndCreateOrChangeStatusOrDest
|
||||
EventsTrackerMock evTrackerMock;
|
||||
evTrackerMock.overrideGlobal();
|
||||
|
||||
Event *ev = new Event(nullptr, CL_COMMAND_NDRANGE_KERNEL, Event::eventNotReady, Event::eventNotReady);
|
||||
Event *ev = new Event(nullptr, CL_COMMAND_NDRANGE_KERNEL, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady);
|
||||
|
||||
std::stringstream expected;
|
||||
expected << "digraph events_registry_" << &EventsTracker::getEventsTracker() << " {\nnode [shape=record]\n//pragma: somePragmaData\n\n}\n";
|
||||
|
||||
@@ -151,13 +151,13 @@ TEST(UserEvent, givenUserEventWhenStatusIsCompletedThenReturnZeroTaskLevel) {
|
||||
UserEvent uEvent;
|
||||
|
||||
uEvent.setStatus(CL_QUEUED);
|
||||
EXPECT_EQ(Event::eventNotReady, uEvent.getTaskLevel());
|
||||
EXPECT_EQ(CompletionStamp::levelNotReady, uEvent.getTaskLevel());
|
||||
|
||||
uEvent.setStatus(CL_SUBMITTED);
|
||||
EXPECT_EQ(Event::eventNotReady, uEvent.getTaskLevel());
|
||||
EXPECT_EQ(CompletionStamp::levelNotReady, uEvent.getTaskLevel());
|
||||
|
||||
uEvent.setStatus(CL_RUNNING);
|
||||
EXPECT_EQ(Event::eventNotReady, uEvent.getTaskLevel());
|
||||
EXPECT_EQ(CompletionStamp::levelNotReady, uEvent.getTaskLevel());
|
||||
|
||||
uEvent.setStatus(CL_COMPLETE);
|
||||
EXPECT_EQ(0u, uEvent.getTaskLevel());
|
||||
@@ -180,10 +180,10 @@ TEST_F(MockEventTests, blockedUserEventPassedToEnqueueNdRangeWithoutReturnEventI
|
||||
auto taskCountAfter = csr.peekTaskCount();
|
||||
|
||||
//queue should be in blocked state at this moment, task level should be inherited from user event
|
||||
EXPECT_EQ(NEO::Event::eventNotReady, pCmdQ->taskLevel);
|
||||
EXPECT_EQ(NEO::CompletionStamp::levelNotReady, pCmdQ->taskLevel);
|
||||
|
||||
//queue should be in blocked state at this moment, task count should be inherited from user event
|
||||
EXPECT_EQ(NEO::Event::eventNotReady, pCmdQ->taskCount);
|
||||
EXPECT_EQ(NEO::CompletionStamp::levelNotReady, pCmdQ->taskCount);
|
||||
|
||||
//queue should be in blocked state
|
||||
EXPECT_EQ(pCmdQ->isQueueBlocked(), true);
|
||||
@@ -213,10 +213,10 @@ TEST_F(MockEventTests, blockedUserEventPassedToEnqueueNdRangeWithReturnEventIsNo
|
||||
auto taskCountAfter = csr.peekTaskCount();
|
||||
|
||||
//queue should be in blocked state at this moment, task level should be inherited from user event
|
||||
EXPECT_EQ(NEO::Event::eventNotReady, pCmdQ->taskLevel);
|
||||
EXPECT_EQ(NEO::CompletionStamp::levelNotReady, pCmdQ->taskLevel);
|
||||
|
||||
//queue should be in blocked state at this moment, task count should be inherited from user event
|
||||
EXPECT_EQ(NEO::Event::eventNotReady, pCmdQ->taskCount);
|
||||
EXPECT_EQ(NEO::CompletionStamp::levelNotReady, pCmdQ->taskCount);
|
||||
|
||||
//queue should be in blocked state
|
||||
EXPECT_EQ(pCmdQ->isQueueBlocked(), true);
|
||||
@@ -232,7 +232,7 @@ TEST_F(MockEventTests, blockedUserEventPassedToEnqueueNdRangeWithReturnEventIsNo
|
||||
|
||||
//and if normal event inherited status from user event
|
||||
Event *returnEvent = castToObject<Event>(retEvent);
|
||||
EXPECT_EQ(returnEvent->taskLevel, NEO::Event::eventNotReady);
|
||||
EXPECT_EQ(returnEvent->taskLevel, NEO::CompletionStamp::levelNotReady);
|
||||
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
|
||||
@@ -384,7 +384,7 @@ TEST_F(EventTests, givenQueueThatIsBlockedByUserEventWhenIsQueueBlockedIsCalledT
|
||||
}
|
||||
bool updateExecutionStatusCalled = false;
|
||||
};
|
||||
mockEvent mockedVirtualEvent(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, Event::eventNotReady, 0);
|
||||
mockEvent mockedVirtualEvent(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, CompletionStamp::levelNotReady, 0);
|
||||
pCmdQ->virtualEvent = &mockedVirtualEvent;
|
||||
|
||||
EXPECT_TRUE(pCmdQ->isQueueBlocked());
|
||||
@@ -462,8 +462,8 @@ TEST_F(MockEventTests, normalEventsBasingOnUserEventHasProperTaskLevel) {
|
||||
|
||||
//check if dependency count is increased
|
||||
Event *returnEvent = castToObject<Event>(retEvent);
|
||||
EXPECT_EQ(Event::eventNotReady, returnEvent->taskLevel);
|
||||
EXPECT_EQ(Event::eventNotReady, returnEvent->peekTaskCount());
|
||||
EXPECT_EQ(CompletionStamp::levelNotReady, returnEvent->taskLevel);
|
||||
EXPECT_EQ(CompletionStamp::levelNotReady, returnEvent->peekTaskCount());
|
||||
|
||||
//now set user event for complete status, this triggers update of childs.
|
||||
uEvent->setStatus(CL_COMPLETE);
|
||||
@@ -489,7 +489,7 @@ TEST_F(MockEventTests, waitForEventThatWaitsOnSignaledUserEvent) {
|
||||
|
||||
//check if dependency count is increased
|
||||
Event *returnEvent = castToObject<Event>(retEvent);
|
||||
EXPECT_EQ(Event::eventNotReady, returnEvent->taskLevel);
|
||||
EXPECT_EQ(CompletionStamp::levelNotReady, returnEvent->taskLevel);
|
||||
|
||||
//now set user event for complete status, this triggers update of childs.
|
||||
uEvent->setStatus(CL_COMPLETE);
|
||||
@@ -535,7 +535,7 @@ TEST_F(MockEventTests, enqueueWithAbortedUserEventDoesntFlushToCSR) {
|
||||
EXPECT_EQ(taskCount, taskCountAfter);
|
||||
|
||||
Event *pChildEvent = (Event *)retEvent;
|
||||
EXPECT_EQ(Event::eventNotReady, pChildEvent->getTaskLevel());
|
||||
EXPECT_EQ(CompletionStamp::levelNotReady, pChildEvent->getTaskLevel());
|
||||
|
||||
cl_int eventStatus = 0;
|
||||
retVal = clGetEventInfo(retEvent, CL_EVENT_COMMAND_EXECUTION_STATUS, sizeof(cl_int), &eventStatus, NULL);
|
||||
@@ -572,7 +572,7 @@ TEST_F(MockEventTests, childEventDestructorDoesntProcessBlockedCommandsWhenParen
|
||||
EXPECT_EQ(taskCount, taskCountAfter);
|
||||
|
||||
Event *pChildEvent = (Event *)retEvent;
|
||||
EXPECT_EQ(Event::eventNotReady, pChildEvent->taskLevel);
|
||||
EXPECT_EQ(CompletionStamp::levelNotReady, pChildEvent->taskLevel);
|
||||
|
||||
cl_int eventStatus = 0;
|
||||
retVal = clGetEventInfo(retEvent, CL_EVENT_COMMAND_EXECUTION_STATUS, sizeof(cl_int), &eventStatus, NULL);
|
||||
|
||||
@@ -95,7 +95,7 @@ TEST_F(EventTests, givenUserEventBlockingEnqueueWithBlockingFlagWhenUserEventIsC
|
||||
while (true) {
|
||||
pCmdQ->takeOwnership();
|
||||
|
||||
if (pCmdQ->taskLevel == Event::eventNotReady) {
|
||||
if (pCmdQ->taskLevel == CompletionStamp::levelNotReady) {
|
||||
pCmdQ->releaseOwnership();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "core/helpers/dirty_state_helpers.h"
|
||||
#include "core/helpers/ptr_math.h"
|
||||
#include "core/indirect_heap/indirect_heap.h"
|
||||
#include "core/memory_manager/graphics_allocation.h"
|
||||
#include "runtime/helpers/dirty_state_helpers.h"
|
||||
#include "unit_tests/mocks/mock_graphics_allocation.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Intel Corporation
|
||||
* Copyright (C) 2019-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "runtime/command_stream/csr_definitions.h"
|
||||
#include "core/command_stream/csr_definitions.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "runtime/helpers/flush_stamp.h"
|
||||
#include "core/helpers/flush_stamp.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "core/debug_settings/debug_settings_manager.h"
|
||||
#include "core/gmm_helper/gmm_helper.h"
|
||||
#include "core/helpers/flush_stamp.h"
|
||||
#include "core/helpers/hw_helper.h"
|
||||
#include "core/helpers/options.h"
|
||||
#include "core/memory_manager/allocations_list.h"
|
||||
@@ -17,7 +18,6 @@
|
||||
#include "core/unit_tests/utilities/base_object_utils.h"
|
||||
#include "runtime/built_ins/builtins_dispatch_builder.h"
|
||||
#include "runtime/command_stream/command_stream_receiver_hw.h"
|
||||
#include "runtime/helpers/flush_stamp.h"
|
||||
#include "runtime/helpers/memory_properties_flags_helpers.h"
|
||||
#include "runtime/helpers/surface_formats.h"
|
||||
#include "runtime/kernel/kernel.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "core/helpers/flush_stamp.h"
|
||||
#include "core/helpers/hw_info.h"
|
||||
#include "core/helpers/options.h"
|
||||
#include "core/helpers/string.h"
|
||||
@@ -15,7 +16,6 @@
|
||||
#include "runtime/command_stream/command_stream_receiver_hw.h"
|
||||
#include "runtime/execution_environment/execution_environment.h"
|
||||
#include "runtime/helpers/flat_batch_buffer_helper_hw.h"
|
||||
#include "runtime/helpers/flush_stamp.h"
|
||||
#include "unit_tests/libult/ult_command_stream_receiver.h"
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
#include "core/gmm_helper/gmm_helper.h"
|
||||
#include "core/gmm_helper/page_table_mngr.h"
|
||||
#include "core/gmm_helper/resource_info.h"
|
||||
#include "core/helpers/flush_stamp.h"
|
||||
#include "core/memory_manager/graphics_allocation.h"
|
||||
#include "core/memory_manager/internal_allocation_storage.h"
|
||||
#include "core/memory_manager/residency.h"
|
||||
#include "core/os_interface/linux/os_interface.h"
|
||||
#include "core/os_interface/os_context.h"
|
||||
#include "core/unit_tests/helpers/debug_manager_state_restore.h"
|
||||
#include "runtime/helpers/flush_stamp.h"
|
||||
#include "runtime/helpers/memory_properties_flags_helpers.h"
|
||||
#include "runtime/mem_obj/buffer.h"
|
||||
#include "runtime/os_interface/linux/drm_buffer_object.h"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "core/command_stream/linear_stream.h"
|
||||
#include "core/command_stream/preemption.h"
|
||||
#include "core/helpers/flush_stamp.h"
|
||||
#include "core/helpers/hw_cmds.h"
|
||||
#include "core/helpers/options.h"
|
||||
#include "core/helpers/windows/gmm_callbacks.h"
|
||||
@@ -18,7 +19,6 @@
|
||||
#include "runtime/command_stream/command_stream_receiver_with_aub_dump.h"
|
||||
#include "runtime/command_stream/device_command_stream.h"
|
||||
#include "runtime/helpers/built_ins_helper.h"
|
||||
#include "runtime/helpers/flush_stamp.h"
|
||||
#include "runtime/mem_obj/buffer.h"
|
||||
#include "runtime/memory_manager/memory_manager.h"
|
||||
#include "runtime/os_interface/windows/os_context_win.h"
|
||||
|
||||
@@ -909,7 +909,7 @@ struct ProfilingTimestampPacketsTest : public ::testing::Test {
|
||||
MockContext context;
|
||||
cl_command_queue_properties props[5] = {0, 0, 0, 0, 0};
|
||||
ReleaseableObjectPtr<MockCommandQueue> cmdQ = clUniquePtr(new MockCommandQueue(&context, context.getDevice(0), props));
|
||||
ReleaseableObjectPtr<MockEvent<MyEvent>> ev = clUniquePtr(new MockEvent<MyEvent>(cmdQ.get(), CL_COMMAND_USER, Event::eventNotReady, Event::eventNotReady));
|
||||
ReleaseableObjectPtr<MockEvent<MyEvent>> ev = clUniquePtr(new MockEvent<MyEvent>(cmdQ.get(), CL_COMMAND_USER, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady));
|
||||
};
|
||||
|
||||
TEST_F(ProfilingTimestampPacketsTest, givenTimestampsPacketContainerWithOneElementAndTimestampNodeWhenCalculatingProfilingThenTimesAreTakenFromPacket) {
|
||||
|
||||
@@ -38,14 +38,14 @@ HWTEST_F(BarrierScenarioTest, givenBlockedEnqueueBarrierOnOOQWhenUserEventIsUnbl
|
||||
retVal = clEnqueueBarrierWithWaitList(clCommandQ, 1, &eventBlocking, nullptr);
|
||||
EXPECT_EQ(success, retVal);
|
||||
|
||||
EXPECT_EQ(Event::eventNotReady, mockCmdQ->taskLevel);
|
||||
EXPECT_EQ(CompletionStamp::levelNotReady, mockCmdQ->taskLevel);
|
||||
EXPECT_NE(nullptr, mockCmdQ->virtualEvent);
|
||||
|
||||
clSetUserEventStatus(eventBlocking, CL_COMPLETE);
|
||||
userEvent->release();
|
||||
|
||||
mockCmdQ->isQueueBlocked();
|
||||
EXPECT_NE(Event::eventNotReady, mockCmdQ->taskLevel);
|
||||
EXPECT_NE(CompletionStamp::levelNotReady, mockCmdQ->taskLevel);
|
||||
EXPECT_EQ(nullptr, mockCmdQ->virtualEvent);
|
||||
|
||||
retVal = clEnqueueNDRangeKernel(clCommandQ, clKernel, 1, offset, gws, nullptr, 0, nullptr, nullptr);
|
||||
|
||||
@@ -105,7 +105,7 @@ struct GlArbSyncEventTest : public ::testing::Test {
|
||||
MockBaseEvent *getBaseEvent() {
|
||||
if (baseEvent == nullptr) {
|
||||
triggerEvent = new UserEvent(ctx.get());
|
||||
baseEvent = new MockBaseEvent(cmdQ.get(), CL_COMMAND_RELEASE_GL_OBJECTS, Event::eventNotReady, Event::eventNotReady);
|
||||
baseEvent = new MockBaseEvent(cmdQ.get(), CL_COMMAND_RELEASE_GL_OBJECTS, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady);
|
||||
triggerEvent->addChild(*baseEvent);
|
||||
}
|
||||
return baseEvent;
|
||||
@@ -229,7 +229,7 @@ TEST_F(GlArbSyncEventTest, whenGlArbSyncEventGetsUnblockedBySubmittedOrCompleted
|
||||
}
|
||||
|
||||
TEST_F(GlArbSyncEventTest, whenGlArbSyncEventIsCreatedFromBaseEventWithoutValidContextThenCreationFails) {
|
||||
Event *baseEvent = new Event(nullptr, CL_COMMAND_RELEASE_GL_OBJECTS, Event::eventNotReady, Event::eventNotReady);
|
||||
Event *baseEvent = new Event(nullptr, CL_COMMAND_RELEASE_GL_OBJECTS, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady);
|
||||
auto *arbEvent = GlArbSyncEvent::create(*baseEvent);
|
||||
EXPECT_EQ(nullptr, arbEvent);
|
||||
baseEvent->release();
|
||||
|
||||
@@ -1105,8 +1105,8 @@ HWTEST_F(glSharingTests, givenSyncObjectWhenCreateEventIsCalledThenCreateGLSyncO
|
||||
auto eventObj = castToObject<Event>(event);
|
||||
EXPECT_TRUE(eventObj->getCommandType() == CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR);
|
||||
EXPECT_TRUE(eventObj->peekExecutionStatus() == CL_SUBMITTED);
|
||||
EXPECT_EQ(Event::eventNotReady, eventObj->taskLevel);
|
||||
EXPECT_EQ(Event::eventNotReady, eventObj->getTaskLevel());
|
||||
EXPECT_EQ(CompletionStamp::levelNotReady, eventObj->taskLevel);
|
||||
EXPECT_EQ(CompletionStamp::levelNotReady, eventObj->getTaskLevel());
|
||||
EXPECT_EQ(1, mockGlSharing->dllParam->getParam("GLRetainSyncCalled"));
|
||||
|
||||
eventObj->setStatus(CL_COMPLETE);
|
||||
|
||||
Reference in New Issue
Block a user