Disable deviceEnqueue for BDW

Related-To: NEO-6378

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
Maciej Plewka
2021-10-26 16:15:57 +00:00
committed by Compute-Runtime-Automation
parent 4bd31de0f4
commit bdf5a1c39c
72 changed files with 351 additions and 1678 deletions

View File

@ -14,10 +14,7 @@ if(TESTS_GEN8)
${CMAKE_CURRENT_SOURCE_DIR}/image_tests_gen8.cpp
${CMAKE_CURRENT_SOURCE_DIR}/kernel_tests_gen8.cpp
${CMAKE_CURRENT_SOURCE_DIR}/sampler_tests_gen8.cpp
${CMAKE_CURRENT_SOURCE_DIR}/scheduler_dispatch_tests_gen8.cpp
${CMAKE_CURRENT_SOURCE_DIR}/scheduler_source_tests_gen8.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_gen8.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_device_queue_hw_gen8.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_platform_caps_gen8.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_preemption_gen8.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_sample_gen8.cpp

View File

@ -1,70 +0,0 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/built_ins/built_ins.h"
#include "shared/test/common/cmd_parse/hw_parse.h"
#include "opencl/source/command_queue/enqueue_kernel.h"
#include "opencl/source/command_queue/gpgpu_walker.h"
#include "opencl/source/device_queue/device_queue.h"
#include "opencl/source/device_queue/device_queue_hw.h"
#include "opencl/source/helpers/hardware_commands_helper.h"
#include "opencl/source/scheduler/scheduler_kernel.h"
#include "opencl/test/unit_test/fixtures/execution_model_fixture.h"
#include "test.h"
#include "gtest/gtest.h"
using namespace NEO;
typedef Test<ExecutionModelSchedulerTest> BdwSchedulerTest;
BDWTEST_F(BdwSchedulerTest, givenCallToDispatchSchedulerWhenPipeControlWithCSStallIsAddedThenDCFlushEnabledIsSet) {
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
if (pClDevice->areOcl21FeaturesSupported()) {
DeviceQueueHw<FamilyType> *pDevQueueHw = castToObject<DeviceQueueHw<FamilyType>>(pDevQueue);
SchedulerKernel &scheduler = context->getSchedulerKernel();
size_t minRequiredSizeForSchedulerSSH = HardwareCommandsHelper<FamilyType>::getSshSizeForExecutionModel(*parentKernel);
// Setup heaps in pCmdQ
MultiDispatchInfo multiDispatchinfo(&scheduler);
LinearStream &commandStream = getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*pCmdQ, CsrDependencies(),
false, false, false, multiDispatchinfo,
nullptr, 0, false, false);
pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, minRequiredSizeForSchedulerSSH);
GpgpuWalkerHelper<FamilyType>::dispatchScheduler(
commandStream,
*pDevQueueHw,
pDevice->getPreemptionMode(),
scheduler,
&pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u),
pDevQueueHw->getIndirectHeap(IndirectHeap::DYNAMIC_STATE),
false);
HardwareParse hwParser;
hwParser.parseCommands<FamilyType>(commandStream, 0);
hwParser.findHardwareCommands<FamilyType>();
ASSERT_NE(hwParser.cmdList.end(), hwParser.itorWalker);
GenCmdList pcList = hwParser.getCommandsList<PIPE_CONTROL>();
EXPECT_NE(0u, pcList.size());
for (GenCmdList::iterator it = pcList.begin(); it != pcList.end(); it++) {
PIPE_CONTROL *pc = (PIPE_CONTROL *)*it;
ASSERT_NE(nullptr, pc);
if (pc->getCommandStreamerStallEnable()) {
EXPECT_TRUE(pc->getDcFlushEnable());
}
}
}
}

View File

@ -1,32 +0,0 @@
/*
* Copyright (C) 2018-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/gen8/hw_cmds.h"
#include "opencl/source/device_queue/device_queue_hw.h"
// Keep the order of device_enqueue.h and scheduler_definitions.h as the latter uses defines from the first one
#include "opencl/source/gen8/device_enqueue.h"
#include "opencl/source/gen8/scheduler_definitions.h"
#include "opencl/test/unit_test/scheduler/scheduler_source_tests.h"
// Keep this include below scheduler_definitions.h and device_enqueue.h headers as it depends on defines defined in them
#include "opencl/test/unit_test/scheduler/scheduler_source_tests.inl"
using namespace NEO;
typedef SchedulerSourceTest SchedulerSourceTestGen8;
GEN8TEST_F(SchedulerSourceTestGen8, GivenDeviceQueueWhenCommandsSizeIsCalculatedThenItEqualsSpaceForEachEnqueueInSchedulerKernelCode) {
givenDeviceQueueWhenCommandsSizeIsCalculatedThenItEqualsSpaceForEachEnqueueInSchedulerKernelCodeTest<FamilyType>();
}
GEN8TEST_F(SchedulerSourceTestGen8, GivenDeviceQueueWhenSlbDummyCommandsAreBuildThenSizeUsedIsCorrect) {
givenDeviceQueueWhenSlbDummyCommandsAreBuildThenSizeUsedIsCorrectTest<FamilyType>();
}
GEN8TEST_F(SchedulerSourceTestGen8, GivenDeviceQueueThenNumberOfEnqueuesEqualsNumberOfEnqueuesInSchedulerKernelCode) {
givenDeviceQueueThenNumberOfEnqueuesEqualsNumberOfEnqueuesInSchedulerKernelCodeTest<FamilyType>();
}

View File

@ -82,3 +82,6 @@ GEN8TEST_F(Gen8DeviceCaps, givenGen8WhenCheckingImageSupportThenReturnTrue) {
GEN8TEST_F(Gen8DeviceCaps, givenGen8WhenCheckingMediaBlockSupportThenReturnTrue) {
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.supportsMediaBlock);
}
GEN8TEST_F(Gen8DeviceCaps, givenGen8WhenCheckingDeviceEnqueueSupportThenReturnFalse) {
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.supportsDeviceEnqueue);
}

View File

@ -1,81 +0,0 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/test/common/cmd_parse/hw_parse.h"
#include "opencl/source/context/context.h"
#include "opencl/test/unit_test/fixtures/device_host_queue_fixture.h"
#include "opencl/test/unit_test/mocks/mock_device_queue.h"
using namespace NEO;
using namespace DeviceHostQueue;
typedef DeviceQueueHwTest Gen8DeviceQueueSlb;
GEN8TEST_F(Gen8DeviceQueueSlb, WhenGettingSlbBufferSizeThenAllocationSizeIsCorrect) {
deviceQueue = createQueueObject();
ASSERT_NE(deviceQueue, nullptr);
auto expectedSize = getMinimumSlbSize<FamilyType>() +
sizeof(typename FamilyType::MI_ATOMIC) +
sizeof(typename FamilyType::MI_LOAD_REGISTER_IMM) +
sizeof(typename FamilyType::MI_LOAD_REGISTER_IMM);
expectedSize *= 128; //num of enqueues
expectedSize += sizeof(typename FamilyType::MI_BATCH_BUFFER_START);
expectedSize = alignUp(expectedSize, MemoryConstants::pageSize);
expectedSize += MockDeviceQueueHw<FamilyType>::getExecutionModelCleanupSectionSize();
expectedSize += (4 * MemoryConstants::pageSize);
expectedSize = alignUp(expectedSize, MemoryConstants::pageSize);
ASSERT_NE(deviceQueue->getSlbBuffer(), nullptr);
EXPECT_EQ(deviceQueue->getSlbBuffer()->getUnderlyingBufferSize(), expectedSize);
delete deviceQueue;
}
GEN8TEST_F(Gen8DeviceQueueSlb, WhenApplyingSlbCommandsWaThenCorrectWaAreEnabled) {
auto mockDeviceQueueHw = new MockDeviceQueueHw<FamilyType>(pContext, device,
DeviceHostQueue::deviceQueueProperties::minimumProperties[0]);
EXPECT_FALSE(mockDeviceQueueHw->arbCheckWa);
EXPECT_FALSE(mockDeviceQueueHw->pipeControlWa);
EXPECT_TRUE(mockDeviceQueueHw->miAtomicWa);
EXPECT_TRUE(mockDeviceQueueHw->lriWa);
delete mockDeviceQueueHw;
}
GEN8TEST_F(Gen8DeviceQueueSlb, WhenAddingProfilingEndCmdsThenPipeControlIsProgrammedCorrectly) {
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
auto mockDeviceQueueHw = new MockDeviceQueueHw<FamilyType>(pContext, device,
DeviceHostQueue::deviceQueueProperties::minimumProperties[0]);
uint64_t timestampAddress = 0x12345678555500;
uint32_t timestampAddressLow = (uint32_t)(timestampAddress & 0xFFFFFFFF);
uint32_t timestampAddressHigh = (uint32_t)(timestampAddress >> 32);
mockDeviceQueueHw->addProfilingEndCmds(timestampAddress);
HardwareParse hwParser;
auto *slbCS = mockDeviceQueueHw->getSlbCS();
hwParser.parseCommands<FamilyType>(*slbCS, 0);
auto pipeControlItor = find<PIPE_CONTROL *>(hwParser.cmdList.begin(), hwParser.cmdList.end());
ASSERT_NE(hwParser.cmdList.end(), pipeControlItor);
PIPE_CONTROL *pipeControl = (PIPE_CONTROL *)*pipeControlItor;
uint32_t postSyncOp = (uint32_t)PIPE_CONTROL::POST_SYNC_OPERATION_WRITE_TIMESTAMP;
EXPECT_EQ(postSyncOp, (uint32_t)pipeControl->getPostSyncOperation());
EXPECT_EQ(timestampAddressLow, pipeControl->getAddress());
EXPECT_EQ(timestampAddressHigh, pipeControl->getAddressHigh());
delete mockDeviceQueueHw;
}