Revert "Use GPU instead of CPU address in programming commands for HwTim(...)"

This reverts commit 6202b2222b.
"Use GPU instead of CPU address in programming commands for HwTimeStamps"

Change-Id: I085382d95538ae41068a21c628d606039bf9cdf0
This commit is contained in:
Pawel Wilma
2018-12-20 16:32:47 +01:00
committed by sys_ocldev
parent 1e011f9a08
commit cc1f4bed60
14 changed files with 38 additions and 45 deletions

View File

@ -8,7 +8,6 @@
#include "runtime/command_queue/gpgpu_walker.h"
#include "runtime/command_queue/hardware_interface.h"
#include "runtime/event/hw_timestamps.h"
#include "runtime/utilities/tag_allocator.h"
#include "runtime/helpers/kernel_commands.h"
#include "runtime/helpers/task_information.h"
#include "unit_tests/mocks/mock_command_queue.h"
@ -57,9 +56,9 @@ class MockDeviceQueueHwWithCriticalSectionRelease : public DeviceQueueHw<GfxFami
indirectStateSetup = true;
return BaseClass::setupIndirectState(surfaceStateHeap, dynamicStateHeap, parentKernel, parentIDCount);
}
void addExecutionModelCleanUpSection(Kernel *parentKernel, TagNode<HwTimeStamps> *hwTimeStamp, uint32_t taskCount) override {
void addExecutionModelCleanUpSection(Kernel *parentKernel, HwTimeStamps *hwTimeStamp, uint32_t taskCount) override {
cleanupSectionAdded = true;
timestampAddedInCleanupSection = hwTimeStamp ? hwTimeStamp->tag : nullptr;
timestampAddedInCleanupSection = hwTimeStamp;
return BaseClass::addExecutionModelCleanUpSection(parentKernel, hwTimeStamp, taskCount);
}
void dispatchScheduler(CommandQueue &cmdQ, SchedulerKernel &scheduler, PreemptionMode preemptionMode, IndirectHeap *ssh, IndirectHeap *dsh) override {
@ -250,12 +249,13 @@ HWTEST_F(ParentKernelCommandQueueFixture, givenBlockedParentKernelWithProfilingW
std::vector<Surface *> surfaces;
auto *cmdComputeKernel = new CommandComputeKernel(*pCmdQ, std::unique_ptr<KernelOperation>(blockedCommandData), surfaces, false, false, false, nullptr, preemptionMode, parentKernel, 1);
auto timestamp = pCmdQ->getCommandStreamReceiver().getEventTsAllocator()->getTag();
cmdComputeKernel->timestamp = timestamp;
HwTimeStamps timestamp;
cmdComputeKernel->timestamp = &timestamp;
cmdComputeKernel->submit(0, false);
EXPECT_TRUE(mockDevQueue.cleanupSectionAdded);
EXPECT_EQ(mockDevQueue.timestampAddedInCleanupSection, timestamp->tag);
EXPECT_EQ(mockDevQueue.timestampAddedInCleanupSection, &timestamp);
delete cmdComputeKernel;
delete parentKernel;