Remove not needed code.

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
Michal Mrozek
2022-02-04 10:53:48 +00:00
committed by Compute-Runtime-Automation
parent 8986435bd7
commit dbcbd17c7c
2 changed files with 1 additions and 14 deletions

View File

@ -144,15 +144,10 @@ template <typename TagSizeT>
ze_result_t EventImp<TagSizeT>::hostEventSetValueTimestamps(TagSizeT eventVal) {
auto baseAddr = castToUint64(hostAddress);
auto signalScopeFlag = !!this->signalScope;
auto eventTsSetFunc = [&eventVal, &signalScopeFlag](auto tsAddr) {
auto eventTsSetFunc = [&eventVal](auto tsAddr) {
auto tsptr = reinterpret_cast<void *>(tsAddr);
memcpy_s(tsptr, sizeof(TagSizeT), static_cast<void *>(&eventVal), sizeof(TagSizeT));
if (!signalScopeFlag) {
NEO::CpuIntrinsics::clFlush(tsptr);
}
};
for (uint32_t i = 0; i < kernelCount; i++) {
uint32_t packetsToSet = kernelEventCompletionData[i].getPacketsUsed();
@ -190,7 +185,6 @@ ze_result_t EventImp<TagSizeT>::hostEventSetValue(TagSizeT eventVal) {
uint32_t packetsToSet = kernelEventCompletionData[i].getPacketsUsed();
for (uint32_t j = 0; j < packetsToSet; j++) {
memcpy_s(packetHostAddr, sizeof(TagSizeT), static_cast<void *>(&eventVal), sizeof(TagSizeT));
NEO::CpuIntrinsics::clFlush(packetHostAddr);
packetHostAddr = ptrOffset(packetHostAddr, singlePacketSize);
}
}

View File

@ -1346,18 +1346,11 @@ TEST_F(EventTests, givenRegularEventUseMultiplePacketsWhenHostSignalThenExpectAl
constexpr uint32_t packetsUsed = 4u;
event->setPacketsInUse(packetsUsed);
event->setEventTimestampFlag(false);
CpuIntrinsicsTests::lastClFlushedPtr = 0u;
CpuIntrinsicsTests::clFlushCounter = 0u;
event->hostSignal();
for (uint32_t i = 0; i < packetsUsed; i++) {
EXPECT_EQ(Event::STATE_SIGNALED, *hostAddr);
hostAddr = ptrOffset(hostAddr, event->getSinglePacketSize());
}
uintptr_t expectedPtrVal = reinterpret_cast<uintptr_t>(hostAddr) - event->getSinglePacketSize();
EXPECT_EQ(expectedPtrVal, CpuIntrinsicsTests::lastClFlushedPtr);
EXPECT_EQ(packetsUsed, CpuIntrinsicsTests::clFlushCounter);
}
struct EventSizeFixture : public DeviceFixture {