mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Revert "Fix event profiling for marker commands"
This reverts commit 5f0167b477993f3ebc804c53a110bc432638615b. Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
c04d545eb2
commit
ad3855ceb3
@ -7,7 +7,6 @@
|
||||
|
||||
#include "shared/source/command_stream/command_stream_receiver.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
|
||||
#include "opencl/source/event/user_event.h"
|
||||
#include "opencl/test/unit_test/command_queue/command_enqueue_fixture.h"
|
||||
@ -253,31 +252,3 @@ HWTEST_F(MarkerTest, givenMarkerCallFollowingNdrangeCallInBatchedModeWhenWaitFor
|
||||
clReleaseEvent(eventFromMarker);
|
||||
clReleaseEvent(eventFromNdr);
|
||||
}
|
||||
|
||||
struct MarkerWithProfilingTest : public MarkerTest {
|
||||
void SetUp() {
|
||||
dbgRestore = std::make_unique<DebugManagerStateRestore>();
|
||||
DebugManager.flags.EnableTimestampPacket.set(0);
|
||||
MarkerTest::SetUp();
|
||||
}
|
||||
|
||||
void TearDown() {
|
||||
MarkerTest::TearDown();
|
||||
dbgRestore.reset(nullptr);
|
||||
}
|
||||
|
||||
std::unique_ptr<DebugManagerStateRestore> dbgRestore;
|
||||
};
|
||||
|
||||
struct WhiteBoxCommandQueue : public CommandQueue {
|
||||
using CommandQueue::isBlockedCommandStreamRequired;
|
||||
};
|
||||
|
||||
HWTEST_F(MarkerWithProfilingTest, givenMarkerWithProfilingAndBlockedEnqueueThenBlockedCommandStreamIsRequired) {
|
||||
auto cmdQueueWB = static_cast<WhiteBoxCommandQueue *>(pCmdQ);
|
||||
EventsRequest eventsRequest(0, nullptr, nullptr);
|
||||
|
||||
bool ret = cmdQueueWB->isBlockedCommandStreamRequired(CL_COMMAND_MARKER, eventsRequest, true, true);
|
||||
|
||||
EXPECT_TRUE(ret);
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ProfilingTests, GivenCommandQueueWithProfolingWhenWa
|
||||
clReleaseEvent(event);
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ProfilingTests, GivenCommandQueueWithProfilingWhenNonBlockedEnqueueIsExecutedThenSubmittedTimestampHasGPUTime) {
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ProfilingTests, GivenCommandQueueWithProfilingWhenNonBlockedEnqueueIsExecutedThenSubmittedTimestampDoesntHaveGPUTime) {
|
||||
MockKernel kernel(program.get(), kernelInfo, *pClDevice);
|
||||
ASSERT_EQ(CL_SUCCESS, kernel.initialize());
|
||||
|
||||
@ -203,8 +203,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ProfilingTests, GivenCommandQueueWithProfilingWhenNo
|
||||
auto mockEvent = static_cast<MockEvent<Event> *>(event);
|
||||
EXPECT_NE(0u, mockEvent->queueTimeStamp.GPUTimeStamp);
|
||||
EXPECT_NE(0u, mockEvent->queueTimeStamp.CPUTimeinNS);
|
||||
EXPECT_LT(mockEvent->queueTimeStamp.GPUTimeStamp, mockEvent->submitTimeStamp.GPUTimeStamp);
|
||||
EXPECT_LT(mockEvent->queueTimeStamp.CPUTimeinNS, mockEvent->submitTimeStamp.CPUTimeinNS);
|
||||
EXPECT_EQ(0u, mockEvent->submitTimeStamp.GPUTimeStamp);
|
||||
|
||||
clReleaseEvent(event);
|
||||
}
|
||||
@ -455,71 +455,6 @@ HWTEST_F(ProfilingTests, givenMarkerEnqueueWhenNonBlockedEnqueueThenSetGpuPath)
|
||||
eventObj->release();
|
||||
}
|
||||
|
||||
HWTEST_F(ProfilingTests, givenMarkerEnqueueWhenBlockedEnqueueThenSetGpuPath) {
|
||||
cl_event event;
|
||||
cl_event userEvent = new UserEvent();
|
||||
pCmdQ->enqueueMarkerWithWaitList(1, &userEvent, &event);
|
||||
|
||||
auto eventObj = static_cast<Event *>(event);
|
||||
EXPECT_FALSE(eventObj->isCPUProfilingPath());
|
||||
|
||||
auto userEventObj = static_cast<UserEvent *>(userEvent);
|
||||
|
||||
pCmdQ->flush();
|
||||
userEventObj->setStatus(CL_COMPLETE);
|
||||
Event::waitForEvents(1, &event);
|
||||
|
||||
uint64_t queued, submit;
|
||||
cl_int retVal;
|
||||
|
||||
retVal = eventObj->getEventProfilingInfo(CL_PROFILING_COMMAND_QUEUED, sizeof(uint64_t), &queued, 0);
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
retVal = eventObj->getEventProfilingInfo(CL_PROFILING_COMMAND_SUBMIT, sizeof(uint64_t), &submit, 0);
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
|
||||
EXPECT_LT(0u, queued);
|
||||
EXPECT_LT(queued, submit);
|
||||
|
||||
eventObj->release();
|
||||
userEventObj->release();
|
||||
}
|
||||
|
||||
HWTEST_F(ProfilingTests, givenMarkerEnqueueWhenBlockedEnqueueThenPipeControlsArePresentInCS) {
|
||||
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
|
||||
|
||||
cl_event event;
|
||||
cl_event userEvent = new UserEvent();
|
||||
static_cast<CommandQueueHw<FamilyType> *>(pCmdQ)->enqueueMarkerWithWaitList(1, &userEvent, &event);
|
||||
|
||||
auto eventObj = static_cast<Event *>(event);
|
||||
EXPECT_FALSE(eventObj->isCPUProfilingPath());
|
||||
|
||||
auto userEventObj = static_cast<UserEvent *>(userEvent);
|
||||
|
||||
pCmdQ->flush();
|
||||
userEventObj->setStatus(CL_COMPLETE);
|
||||
Event::waitForEvents(1, &event);
|
||||
|
||||
parseCommands<FamilyType>(*pCmdQ);
|
||||
|
||||
// Check PIPE_CONTROLs
|
||||
auto itorFirstPC = find<PIPE_CONTROL *>(cmdList.begin(), cmdList.end());
|
||||
ASSERT_NE(cmdList.end(), itorFirstPC);
|
||||
auto pFirstPC = genCmdCast<PIPE_CONTROL *>(*itorFirstPC);
|
||||
ASSERT_NE(nullptr, pFirstPC);
|
||||
|
||||
auto itorSecondPC = find<PIPE_CONTROL *>(itorFirstPC, cmdList.end());
|
||||
ASSERT_NE(cmdList.end(), itorSecondPC);
|
||||
auto pSecondPC = genCmdCast<PIPE_CONTROL *>(*itorSecondPC);
|
||||
ASSERT_NE(nullptr, pSecondPC);
|
||||
|
||||
EXPECT_TRUE(static_cast<MockEvent<Event> *>(event)->calcProfilingData());
|
||||
|
||||
eventObj->release();
|
||||
userEventObj->release();
|
||||
pCmdQ->isQueueBlocked();
|
||||
}
|
||||
|
||||
template <typename TagType>
|
||||
struct MockTagNode : public TagNode<TagType> {
|
||||
public:
|
||||
|
Reference in New Issue
Block a user