Implement BCS selection heuristic for OpenCL CommandQueue

Related-To: NEO-6057
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
Maciej Dziuban 2021-10-06 17:40:30 +00:00 committed by Compute-Runtime-Automation
parent 3bff852ac0
commit 4c4b37f8d2
6 changed files with 272 additions and 48 deletions

View File

@ -157,16 +157,53 @@ CommandStreamReceiver *CommandQueue::getBcsForAuxTranslation() const {
}
CommandStreamReceiver &CommandQueue::selectCsrForBuiltinOperation(const CsrSelectionArgs &args) const {
const bool blitAllowed = blitEnqueueAllowed(args);
const bool blitPreferred = blitEnqueuePreferred(args);
const bool blitRequired = isCopyOnly;
const bool blit = blitAllowed && (blitPreferred || blitRequired);
if (blit) {
if (isCopyOnly) {
return *getAnyBcs();
} else {
}
if (!blitEnqueueAllowed(args)) {
return getGpgpuCommandStreamReceiver();
}
bool preferBcs = true;
aub_stream::EngineType preferredBcsEngineType = aub_stream::EngineType::NUM_ENGINES;
switch (args.direction) {
case TransferDirection::LocalToLocal: {
const auto &clHwHelper = ClHwHelper::get(device->getHardwareInfo().platform.eRenderCoreFamily);
preferBcs = clHwHelper.preferBlitterForLocalToLocalTransfers();
if (auto flag = DebugManager.flags.PreferCopyEngineForCopyBufferToBuffer.get(); flag != -1) {
preferBcs = static_cast<bool>(flag);
}
if (preferBcs) {
preferredBcsEngineType = aub_stream::EngineType::ENGINE_BCS;
}
break;
}
case TransferDirection::HostToHost:
case TransferDirection::HostToLocal:
case TransferDirection::LocalToHost: {
preferBcs = true;
preferredBcsEngineType = EngineHelpers::getBcsEngineType(device->getHardwareInfo(), device->getDeviceBitfield(),
device->getSelectorCopyEngine(), false);
break;
}
default:
UNRECOVERABLE_IF(true);
}
CommandStreamReceiver *selectedCsr = nullptr;
if (preferBcs) {
selectedCsr = getBcsCommandStreamReceiver(preferredBcsEngineType);
if (selectedCsr == nullptr) {
selectedCsr = getAnyBcs();
}
}
if (selectedCsr == nullptr) {
selectedCsr = &getGpgpuCommandStreamReceiver();
}
UNRECOVERABLE_IF(selectedCsr == nullptr);
return *selectedCsr;
}
Device &CommandQueue::getDevice() const noexcept {
@ -752,10 +789,6 @@ bool CommandQueue::queueDependenciesClearRequired() const {
}
bool CommandQueue::blitEnqueueAllowed(const CsrSelectionArgs &args) const {
if (getAnyBcs() == nullptr) {
return false;
}
bool blitEnqueueAllowed = getGpgpuCommandStreamReceiver().peekTimestampPacketWriteEnabled() || this->isCopyOnly;
if (DebugManager.flags.EnableBlitterForEnqueueOperations.get() != -1) {
blitEnqueueAllowed = DebugManager.flags.EnableBlitterForEnqueueOperations.get();
@ -789,18 +822,6 @@ bool CommandQueue::blitEnqueueAllowed(const CsrSelectionArgs &args) const {
}
}
bool CommandQueue::blitEnqueuePreferred(const CsrSelectionArgs &args) const {
if (args.direction == TransferDirection::LocalToLocal) {
if (DebugManager.flags.PreferCopyEngineForCopyBufferToBuffer.get() != -1) {
return static_cast<bool>(DebugManager.flags.PreferCopyEngineForCopyBufferToBuffer.get());
}
const auto &clHwHelper = ClHwHelper::get(device->getHardwareInfo().platform.eRenderCoreFamily);
return clHwHelper.preferBlitterForLocalToLocalTransfers();
}
return true;
}
bool CommandQueue::blitEnqueueImageAllowed(const size_t *origin, const size_t *region, const Image &image) const {
const auto &hwInfo = device->getHardwareInfo();
const auto &hwInfoConfig = HwInfoConfig::get(hwInfo.platform.eProductFamily);

View File

@ -368,7 +368,6 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
void providePerformanceHint(TransferProperties &transferProperties);
bool queueDependenciesClearRequired() const;
bool blitEnqueueAllowed(const CsrSelectionArgs &args) const;
bool blitEnqueuePreferred(const CsrSelectionArgs &args) const;
MOCKABLE_VIRTUAL bool blitEnqueueImageAllowed(const size_t *origin, const size_t *region, const Image &image) const;
void aubCaptureHook(bool &blocking, bool &clearAllDependencies, const MultiDispatchInfo &multiDispatchInfo);
virtual bool obtainTimestampPacketForCacheFlush(bool isCacheFlushRequired) const = 0;

View File

@ -1301,11 +1301,44 @@ TEST(CommandQueue, givenImageToBufferClCommandWhenCallingBlitEnqueueAllowedThenR
EXPECT_FALSE(queue.blitEnqueueAllowed(args));
}
TEST(CommandQueue, givenLocalToLocalCopyBufferCommandWhenCallingBlitEnqueuePreferredThenReturnValueBasedOnDebugFlagAndHwPreference) {
const bool preferBlitterHw = ClHwHelper::get(::defaultHwInfo->platform.eRenderCoreFamily).preferBlitterForLocalToLocalTransfers();
template <bool blitter, bool selectBlitterWithQueueFamilies>
struct CsrSelectionCommandQueueTests : ::testing::Test {
void SetUp() override {
HardwareInfo hwInfo = *::defaultHwInfo;
hwInfo.capabilityTable.blitterOperationsSupported = blitter;
if (blitter) {
REQUIRE_FULL_BLITTER_OR_SKIP(&hwInfo);
}
device = MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo);
clDevice = std::make_unique<MockClDevice>(device);
context = std::make_unique<MockContext>(clDevice.get());
cl_command_queue_properties queueProperties[5] = {};
if (selectBlitterWithQueueFamilies) {
queueProperties[0] = CL_QUEUE_FAMILY_INTEL;
queueProperties[1] = device->getIndexOfNonEmptyEngineGroup(EngineGroupType::Copy);
queueProperties[2] = CL_QUEUE_INDEX_INTEL;
queueProperties[3] = 0;
}
queue = std::make_unique<MockCommandQueue>(context.get(), clDevice.get(), queueProperties, false);
}
MockDevice *device;
std::unique_ptr<MockClDevice> clDevice;
std::unique_ptr<MockContext> context;
std::unique_ptr<MockCommandQueue> queue;
};
using CsrSelectionCommandQueueWithoutBlitterTests = CsrSelectionCommandQueueTests<false, false>;
using CsrSelectionCommandQueueWithBlitterTests = CsrSelectionCommandQueueTests<true, false>;
using CsrSelectionCommandQueueWithQueueFamiliesBlitterTests = CsrSelectionCommandQueueTests<true, true>;
TEST_F(CsrSelectionCommandQueueWithoutBlitterTests, givenBlitterNotPresentWhenSelectingBlitterThenReturnGpgpuCsr) {
DebugManagerStateRestore restore{};
MockContext context{};
MockCommandQueue queue{context};
DebugManager.flags.EnableBlitterForEnqueueOperations.set(1);
BuiltinOpParams builtinOpParams{};
MockGraphicsAllocation srcGraphicsAllocation{};
MockGraphicsAllocation dstGraphicsAllocation{};
@ -1313,24 +1346,104 @@ TEST(CommandQueue, givenLocalToLocalCopyBufferCommandWhenCallingBlitEnqueuePrefe
MockBuffer dstMemObj{dstGraphicsAllocation};
builtinOpParams.srcMemObj = &srcMemObj;
builtinOpParams.dstMemObj = &dstMemObj;
{
srcGraphicsAllocation.memoryPool = MemoryPool::System4KBPages;
dstGraphicsAllocation.memoryPool = MemoryPool::System4KBPages;
CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr};
EXPECT_EQ(&queue->getGpgpuCommandStreamReceiver(), &queue->selectCsrForBuiltinOperation(args));
}
{
srcGraphicsAllocation.memoryPool = MemoryPool::System4KBPages;
dstGraphicsAllocation.memoryPool = MemoryPool::LocalMemory;
CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr};
EXPECT_EQ(&queue->getGpgpuCommandStreamReceiver(), &queue->selectCsrForBuiltinOperation(args));
}
{
srcGraphicsAllocation.memoryPool = MemoryPool::LocalMemory;
dstGraphicsAllocation.memoryPool = MemoryPool::System4KBPages;
CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr};
EXPECT_EQ(&queue->getGpgpuCommandStreamReceiver(), &queue->selectCsrForBuiltinOperation(args));
}
{
srcGraphicsAllocation.memoryPool = MemoryPool::LocalMemory;
dstGraphicsAllocation.memoryPool = MemoryPool::LocalMemory;
CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr};
DebugManager.flags.PreferCopyEngineForCopyBufferToBuffer.set(-1);
EXPECT_EQ(preferBlitterHw, queue.blitEnqueuePreferred(args));
DebugManager.flags.PreferCopyEngineForCopyBufferToBuffer.set(0);
EXPECT_FALSE(queue.blitEnqueuePreferred(args));
DebugManager.flags.PreferCopyEngineForCopyBufferToBuffer.set(1);
EXPECT_TRUE(queue.blitEnqueuePreferred(args));
EXPECT_EQ(&queue->getGpgpuCommandStreamReceiver(), &queue->selectCsrForBuiltinOperation(args));
}
}
TEST(CommandQueue, givenNotLocalToLocalCopyBufferCommandWhenCallingBlitEnqueuePreferredThenReturnTrueRegardlessOfDebugFlag) {
TEST_F(CsrSelectionCommandQueueWithBlitterTests, givenBlitterPresentButDisabledWithDebugFlagWhenSelectingBlitterThenReturnGpgpuCsr) {
DebugManagerStateRestore restore{};
MockContext context{};
MockCommandQueue queue{context};
DebugManager.flags.EnableBlitterForEnqueueOperations.set(0);
BuiltinOpParams builtinOpParams{};
MockGraphicsAllocation srcGraphicsAllocation{};
MockGraphicsAllocation dstGraphicsAllocation{};
MockBuffer srcMemObj{srcGraphicsAllocation};
MockBuffer dstMemObj{dstGraphicsAllocation};
builtinOpParams.srcMemObj = &srcMemObj;
builtinOpParams.dstMemObj = &dstMemObj;
{
srcGraphicsAllocation.memoryPool = MemoryPool::System4KBPages;
dstGraphicsAllocation.memoryPool = MemoryPool::System4KBPages;
CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr};
EXPECT_EQ(&queue->getGpgpuCommandStreamReceiver(), &queue->selectCsrForBuiltinOperation(args));
}
{
srcGraphicsAllocation.memoryPool = MemoryPool::System4KBPages;
dstGraphicsAllocation.memoryPool = MemoryPool::LocalMemory;
CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr};
EXPECT_EQ(&queue->getGpgpuCommandStreamReceiver(), &queue->selectCsrForBuiltinOperation(args));
}
{
srcGraphicsAllocation.memoryPool = MemoryPool::LocalMemory;
dstGraphicsAllocation.memoryPool = MemoryPool::System4KBPages;
CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr};
EXPECT_EQ(&queue->getGpgpuCommandStreamReceiver(), &queue->selectCsrForBuiltinOperation(args));
}
{
srcGraphicsAllocation.memoryPool = MemoryPool::LocalMemory;
dstGraphicsAllocation.memoryPool = MemoryPool::LocalMemory;
CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr};
EXPECT_EQ(&queue->getGpgpuCommandStreamReceiver(), &queue->selectCsrForBuiltinOperation(args));
}
}
TEST_F(CsrSelectionCommandQueueWithBlitterTests, givenBlitterPresentAndLocalToLocalCopyBufferCommandWhenSelectingBlitterThenReturnValueBasedOnDebugFlagAndHwPreference) {
DebugManagerStateRestore restore{};
DebugManager.flags.EnableBlitterForEnqueueOperations.set(1);
const bool hwPreference = ClHwHelper::get(::defaultHwInfo->platform.eRenderCoreFamily).preferBlitterForLocalToLocalTransfers();
const auto &hwPreferenceCsr = hwPreference ? *queue->getBcsCommandStreamReceiver(aub_stream::ENGINE_BCS) : queue->getGpgpuCommandStreamReceiver();
BuiltinOpParams builtinOpParams{};
MockGraphicsAllocation srcGraphicsAllocation{};
MockGraphicsAllocation dstGraphicsAllocation{};
MockBuffer srcMemObj{srcGraphicsAllocation};
MockBuffer dstMemObj{dstGraphicsAllocation};
builtinOpParams.srcMemObj = &srcMemObj;
builtinOpParams.dstMemObj = &dstMemObj;
srcGraphicsAllocation.memoryPool = MemoryPool::LocalMemory;
dstGraphicsAllocation.memoryPool = MemoryPool::LocalMemory;
CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr};
DebugManager.flags.PreferCopyEngineForCopyBufferToBuffer.set(-1);
EXPECT_EQ(&hwPreferenceCsr, &queue->selectCsrForBuiltinOperation(args));
DebugManager.flags.PreferCopyEngineForCopyBufferToBuffer.set(0);
EXPECT_EQ(&queue->getGpgpuCommandStreamReceiver(), &queue->selectCsrForBuiltinOperation(args));
DebugManager.flags.PreferCopyEngineForCopyBufferToBuffer.set(1);
EXPECT_EQ(queue->getBcsCommandStreamReceiver(aub_stream::ENGINE_BCS), &queue->selectCsrForBuiltinOperation(args));
}
TEST_F(CsrSelectionCommandQueueWithBlitterTests, givenBlitterPresentAndNotLocalToLocalCopyBufferCommandWhenSelectingCsrThenUseBcsRegardlessOfDebugFlag) {
DebugManagerStateRestore restore{};
DebugManager.flags.EnableBlitterForEnqueueOperations.set(1);
const auto &bcsCsr = *queue->getBcsCommandStreamReceiver(aub_stream::ENGINE_BCS);
BuiltinOpParams builtinOpParams{};
MockGraphicsAllocation srcGraphicsAllocation{};
MockGraphicsAllocation dstGraphicsAllocation{};
@ -1344,35 +1457,125 @@ TEST(CommandQueue, givenNotLocalToLocalCopyBufferCommandWhenCallingBlitEnqueuePr
dstGraphicsAllocation.memoryPool = MemoryPool::LocalMemory;
CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr};
DebugManager.flags.PreferCopyEngineForCopyBufferToBuffer.set(-1);
EXPECT_TRUE(queue.blitEnqueuePreferred(args));
EXPECT_EQ(&bcsCsr, &queue->selectCsrForBuiltinOperation(args));
DebugManager.flags.PreferCopyEngineForCopyBufferToBuffer.set(0);
EXPECT_TRUE(queue.blitEnqueuePreferred(args));
EXPECT_EQ(&bcsCsr, &queue->selectCsrForBuiltinOperation(args));
DebugManager.flags.PreferCopyEngineForCopyBufferToBuffer.set(1);
EXPECT_TRUE(queue.blitEnqueuePreferred(args));
EXPECT_EQ(&bcsCsr, &queue->selectCsrForBuiltinOperation(args));
}
{
srcGraphicsAllocation.memoryPool = MemoryPool::LocalMemory;
dstGraphicsAllocation.memoryPool = MemoryPool::System4KBPages;
CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr};
DebugManager.flags.PreferCopyEngineForCopyBufferToBuffer.set(-1);
EXPECT_TRUE(queue.blitEnqueuePreferred(args));
EXPECT_EQ(&bcsCsr, &queue->selectCsrForBuiltinOperation(args));
DebugManager.flags.PreferCopyEngineForCopyBufferToBuffer.set(0);
EXPECT_TRUE(queue.blitEnqueuePreferred(args));
EXPECT_EQ(&bcsCsr, &queue->selectCsrForBuiltinOperation(args));
DebugManager.flags.PreferCopyEngineForCopyBufferToBuffer.set(1);
EXPECT_TRUE(queue.blitEnqueuePreferred(args));
EXPECT_EQ(&bcsCsr, &queue->selectCsrForBuiltinOperation(args));
}
{
srcGraphicsAllocation.memoryPool = MemoryPool::System4KBPages;
dstGraphicsAllocation.memoryPool = MemoryPool::System4KBPages;
CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr};
DebugManager.flags.PreferCopyEngineForCopyBufferToBuffer.set(-1);
EXPECT_TRUE(queue.blitEnqueuePreferred(args));
EXPECT_EQ(&bcsCsr, &queue->selectCsrForBuiltinOperation(args));
DebugManager.flags.PreferCopyEngineForCopyBufferToBuffer.set(0);
EXPECT_TRUE(queue.blitEnqueuePreferred(args));
EXPECT_EQ(&bcsCsr, &queue->selectCsrForBuiltinOperation(args));
DebugManager.flags.PreferCopyEngineForCopyBufferToBuffer.set(1);
EXPECT_TRUE(queue.blitEnqueuePreferred(args));
EXPECT_EQ(&bcsCsr, &queue->selectCsrForBuiltinOperation(args));
}
}
TEST_F(CsrSelectionCommandQueueWithBlitterTests, givenInvalidTransferDirectionWhenSelectingCsrThenThrowError) {
DebugManagerStateRestore restore{};
DebugManager.flags.EnableBlitterForEnqueueOperations.set(1);
BuiltinOpParams builtinOpParams{};
MockGraphicsAllocation srcGraphicsAllocation{};
MockGraphicsAllocation dstGraphicsAllocation{};
MockBuffer srcMemObj{srcGraphicsAllocation};
MockBuffer dstMemObj{dstGraphicsAllocation};
builtinOpParams.srcMemObj = &srcMemObj;
builtinOpParams.dstMemObj = &dstMemObj;
CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr};
args.direction = static_cast<TransferDirection>(0xFF);
EXPECT_ANY_THROW(queue->selectCsrForBuiltinOperation(args));
}
TEST_F(CsrSelectionCommandQueueWithQueueFamiliesBlitterTests, givenBlitterSelectedWithQueueFamiliesWhenSelectingBlitterThenSelectBlitter) {
DebugManagerStateRestore restore{};
BuiltinOpParams builtinOpParams{};
MockGraphicsAllocation srcGraphicsAllocation{};
MockGraphicsAllocation dstGraphicsAllocation{};
MockBuffer srcMemObj{srcGraphicsAllocation};
MockBuffer dstMemObj{dstGraphicsAllocation};
builtinOpParams.srcMemObj = &srcMemObj;
builtinOpParams.dstMemObj = &dstMemObj;
{
srcGraphicsAllocation.memoryPool = MemoryPool::System4KBPages;
dstGraphicsAllocation.memoryPool = MemoryPool::System4KBPages;
CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr};
EXPECT_EQ(queue->getBcsCommandStreamReceiver(aub_stream::ENGINE_BCS), &queue->selectCsrForBuiltinOperation(args));
}
{
srcGraphicsAllocation.memoryPool = MemoryPool::System4KBPages;
dstGraphicsAllocation.memoryPool = MemoryPool::LocalMemory;
CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr};
EXPECT_EQ(queue->getBcsCommandStreamReceiver(aub_stream::ENGINE_BCS), &queue->selectCsrForBuiltinOperation(args));
}
{
srcGraphicsAllocation.memoryPool = MemoryPool::LocalMemory;
dstGraphicsAllocation.memoryPool = MemoryPool::System4KBPages;
CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr};
EXPECT_EQ(queue->getBcsCommandStreamReceiver(aub_stream::ENGINE_BCS), &queue->selectCsrForBuiltinOperation(args));
}
{
srcGraphicsAllocation.memoryPool = MemoryPool::LocalMemory;
dstGraphicsAllocation.memoryPool = MemoryPool::LocalMemory;
CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr};
EXPECT_EQ(queue->getBcsCommandStreamReceiver(aub_stream::ENGINE_BCS), &queue->selectCsrForBuiltinOperation(args));
}
}
TEST_F(CsrSelectionCommandQueueWithQueueFamiliesBlitterTests, givenBlitterSelectedWithQueueFamiliesButDisabledWithDebugFlagWhenSelectingBlitterThenIgnoreDebugFlagAndSelectBlitter) {
DebugManagerStateRestore restore{};
DebugManager.flags.EnableBlitterForEnqueueOperations.set(0);
BuiltinOpParams builtinOpParams{};
MockGraphicsAllocation srcGraphicsAllocation{};
MockGraphicsAllocation dstGraphicsAllocation{};
MockBuffer srcMemObj{srcGraphicsAllocation};
MockBuffer dstMemObj{dstGraphicsAllocation};
builtinOpParams.srcMemObj = &srcMemObj;
builtinOpParams.dstMemObj = &dstMemObj;
{
srcGraphicsAllocation.memoryPool = MemoryPool::System4KBPages;
dstGraphicsAllocation.memoryPool = MemoryPool::System4KBPages;
CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr};
EXPECT_EQ(queue->getBcsCommandStreamReceiver(aub_stream::ENGINE_BCS), &queue->selectCsrForBuiltinOperation(args));
}
{
srcGraphicsAllocation.memoryPool = MemoryPool::System4KBPages;
dstGraphicsAllocation.memoryPool = MemoryPool::LocalMemory;
CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr};
EXPECT_EQ(queue->getBcsCommandStreamReceiver(aub_stream::ENGINE_BCS), &queue->selectCsrForBuiltinOperation(args));
}
{
srcGraphicsAllocation.memoryPool = MemoryPool::LocalMemory;
dstGraphicsAllocation.memoryPool = MemoryPool::System4KBPages;
CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr};
EXPECT_EQ(queue->getBcsCommandStreamReceiver(aub_stream::ENGINE_BCS), &queue->selectCsrForBuiltinOperation(args));
}
{
srcGraphicsAllocation.memoryPool = MemoryPool::LocalMemory;
dstGraphicsAllocation.memoryPool = MemoryPool::LocalMemory;
CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr};
EXPECT_EQ(queue->getBcsCommandStreamReceiver(aub_stream::ENGINE_BCS), &queue->selectCsrForBuiltinOperation(args));
}
}

View File

@ -218,6 +218,7 @@ HWTEST_F(EnqueueCopyImageTest, givenDeviceWithBlitterSupportWhenEnqueueCopyImage
auto hwInfo = pClDevice->getRootDeviceEnvironment().getMutableHardwareInfo();
const auto &hwInfoConfig = HwInfoConfig::get(hwInfo->platform.eProductFamily);
hwInfo->capabilityTable.blitterOperationsSupported = true;
REQUIRE_FULL_BLITTER_OR_SKIP(hwInfo);
size_t srcOrigin[] = {0, 0, 0};
size_t dstOrigin[] = {0, 0, 0};

View File

@ -217,6 +217,7 @@ HWTEST_F(EnqueueWriteImageTest, givenDeviceWithBlitterSupportWhenEnqueueWriteIma
auto hwInfo = pClDevice->getRootDeviceEnvironment().getMutableHardwareInfo();
const auto &hwInfoConfig = HwInfoConfig::get(hwInfo->platform.eProductFamily);
hwInfo->capabilityTable.blitterOperationsSupported = true;
REQUIRE_FULL_BLITTER_OR_SKIP(hwInfo);
size_t origin[] = {0, 0, 0};
auto mockCmdQ = std::make_unique<MockCommandQueueHw<FamilyType>>(context, pClDevice, nullptr);
std::unique_ptr<Image> image(Image2dHelper<>::create(context));

View File

@ -21,7 +21,6 @@ class MockCommandQueue : public CommandQueue {
using CommandQueue::bcsEngines;
using CommandQueue::blitEnqueueAllowed;
using CommandQueue::blitEnqueueImageAllowed;
using CommandQueue::blitEnqueuePreferred;
using CommandQueue::bufferCpuCopyAllowed;
using CommandQueue::device;
using CommandQueue::gpgpuEngine;