Skip to content

Commit 3a2b018

Browse files
Enable blitterOperationsSupported on DG1
Signed-off-by: Mateusz Jablonski <[email protected]>
1 parent 947297d commit 3a2b018

20 files changed

+81
-14
lines changed

opencl/source/command_queue/command_queue.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,12 @@ CommandQueue::CommandQueue(Context *context, ClDevice *device, const cl_queue_pr
7272
if (device) {
7373
auto &hwInfo = device->getHardwareInfo();
7474
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
75+
auto hwInfoConfig = HwInfoConfig::get(hwInfo.platform.eProductFamily);
7576

7677
gpgpuEngine = &device->getDefaultEngine();
7778
UNRECOVERABLE_IF(gpgpuEngine->getEngineType() >= aub_stream::EngineType::NUM_ENGINES);
7879

79-
bool bcsAllowed = hwInfo.capabilityTable.blitterOperationsSupported &&
80+
bool bcsAllowed = hwInfoConfig->isBlitterFullySupported(hwInfo) &&
8081
hwHelper.isSubDeviceEngineSupported(hwInfo, device->getDeviceBitfield(), aub_stream::EngineType::ENGINE_BCS);
8182

8283
if (bcsAllowed || gpgpuEngine->commandStreamReceiver->peekTimestampPacketWriteEnabled()) {

opencl/test/unit_test/command_queue/blit_enqueue_tests.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ struct BlitEnqueueTests : public ::testing::Test {
8989
bool createBcsEngine = !capabilityTable.blitterOperationsSupported;
9090
capabilityTable.blitterOperationsSupported = true;
9191

92+
if (!HwInfoConfig::get(defaultHwInfo->platform.eProductFamily)->isBlitterFullySupported(device->getHardwareInfo())) {
93+
GTEST_SKIP();
94+
}
9295
if (createBcsEngine) {
9396
auto &engine = device->getEngine(getChosenEngineType(device->getHardwareInfo()), EngineUsage::LowPriority);
9497
bcsOsContext.reset(OsContext::create(nullptr, 1,

opencl/test/unit_test/command_queue/command_queue_hw_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1506,7 +1506,7 @@ struct CommandQueueHwBlitTest : ClDeviceFixture, ContextFixture, CommandQueueHwF
15061506
using ContextFixture::SetUp;
15071507

15081508
void SetUp() override {
1509-
REQUIRE_BLITTER_OR_SKIP(defaultHwInfo.get());
1509+
REQUIRE_FULL_BLITTER_OR_SKIP(defaultHwInfo.get());
15101510

15111511
DebugManager.flags.EnableBlitterOperationsSupport.set(1);
15121512
DebugManager.flags.EnableTimestampPacket.set(1);

opencl/test/unit_test/command_queue/command_queue_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ TEST(CommandQueue, givenDeviceWithSubDevicesSupportingBlitOperationsWhenQueueIsC
250250
DebugManager.flags.EnableBlitterForEnqueueOperations.set(1);
251251
HardwareInfo hwInfo = *defaultHwInfo;
252252
hwInfo.capabilityTable.blitterOperationsSupported = true;
253-
REQUIRE_BLITTER_OR_SKIP(&hwInfo);
253+
REQUIRE_FULL_BLITTER_OR_SKIP(&hwInfo);
254254

255255
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
256256
EXPECT_EQ(2u, device->getNumGenericSubDevices());
@@ -1193,7 +1193,7 @@ TEST(CommandQueue, givenBlitterOperationsSupportedWhenCreatingQueueThenTimestamp
11931193

11941194
MockContext context{};
11951195
HardwareInfo *hwInfo = context.getDevice(0)->getRootDeviceEnvironment().getMutableHardwareInfo();
1196-
if (!HwInfoConfig::get(defaultHwInfo->platform.eProductFamily)->obtainBlitterPreference(*defaultHwInfo.get())) {
1196+
if (!HwInfoConfig::get(defaultHwInfo->platform.eProductFamily)->isBlitterFullySupported(*defaultHwInfo.get())) {
11971197
GTEST_SKIP();
11981198
}
11991199

opencl/test/unit_test/command_queue/enqueue_command_without_kernel_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ HWTEST_F(DispatchFlagsBlitTests, givenBlitEnqueueWhenDispatchingCommandsWithoutK
267267
DebugManager.flags.EnableTimestampPacket.set(1);
268268

269269
SetUpImpl<CsrType>();
270-
REQUIRE_BLITTER_OR_SKIP(&device->getHardwareInfo());
270+
REQUIRE_FULL_BLITTER_OR_SKIP(&device->getHardwareInfo());
271271

272272
auto mockCmdQ = std::make_unique<MockCommandQueueHw<FamilyType>>(context.get(), device.get(), nullptr);
273273
auto mockCsr = static_cast<CsrType *>(&mockCmdQ->getGpgpuCommandStreamReceiver());
@@ -312,7 +312,7 @@ HWTEST_F(DispatchFlagsBlitTests, givenN1EnabledWhenDispatchingWithoutKernelThenA
312312
DebugManager.flags.ForceGpgpuSubmissionForBcsEnqueue.set(1);
313313

314314
SetUpImpl<CsrType>();
315-
REQUIRE_BLITTER_OR_SKIP(&device->getHardwareInfo());
315+
REQUIRE_FULL_BLITTER_OR_SKIP(&device->getHardwareInfo());
316316

317317
auto mockCmdQ = std::make_unique<MockCommandQueueHw<FamilyType>>(context.get(), device.get(), nullptr);
318318
auto mockCsr = static_cast<CsrType *>(&mockCmdQ->getGpgpuCommandStreamReceiver());

opencl/test/unit_test/command_queue/enqueue_copy_image_tests.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ HWTEST_F(EnqueueCopyImageTest, givenDeviceWithBlitterSupportWhenEnqueueCopyImage
218218
auto hwInfo = pClDevice->getRootDeviceEnvironment().getMutableHardwareInfo();
219219
const auto &hwInfoConfig = HwInfoConfig::get(hwInfo->platform.eProductFamily);
220220
hwInfo->capabilityTable.blitterOperationsSupported = true;
221+
221222
size_t srcOrigin[] = {0, 0, 0};
222223
size_t dstOrigin[] = {0, 0, 0};
223224

@@ -240,7 +241,7 @@ HWTEST_F(EnqueueCopyImageTest, givenDeviceWithBlitterSupportWhenEnqueueCopyImage
240241
{
241242
size_t region[] = {BlitterConstants::maxBlitWidth, BlitterConstants::maxBlitHeight, 1};
242243
EnqueueCopyImageHelper<>::enqueueCopyImage(mockCmdQ.get(), srcImage.get(), dstImage.get(), srcOrigin, dstOrigin, region);
243-
EXPECT_TRUE(mockCmdQ->isBlitEnqueueImageAllowed);
244+
EXPECT_EQ(hwInfoConfig->isBlitterFullySupported(*hwInfo), mockCmdQ->isBlitEnqueueImageAllowed);
244245
}
245246
{
246247
DebugManager.flags.EnableBlitterForEnqueueImageOperations.set(-1);

opencl/test/unit_test/command_queue/enqueue_kernel_2_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ HWTEST_F(EnqueueAuxKernelTests, givenDebugVariableDisablingBuiltinTranslationWhe
933933

934934
auto hwInfo = pDevice->getExecutionEnvironment()->rootDeviceEnvironments[rootDeviceIndex]->getMutableHardwareInfo();
935935
hwInfo->capabilityTable.blitterOperationsSupported = true;
936-
REQUIRE_BLITTER_OR_SKIP(hwInfo);
936+
REQUIRE_FULL_BLITTER_OR_SKIP(hwInfo);
937937

938938
MockKernelWithInternals mockKernel(*pClDevice, context);
939939
MyCmdQ<FamilyType> cmdQ(context, pClDevice);

opencl/test/unit_test/command_queue/enqueue_read_image_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ HWTEST_F(EnqueueReadImageTest, givenDeviceWithBlitterSupportWhenEnqueueReadImage
865865
auto hwInfo = pClDevice->getRootDeviceEnvironment().getMutableHardwareInfo();
866866
const auto &hwInfoConfig = HwInfoConfig::get(hwInfo->platform.eProductFamily);
867867
hwInfo->capabilityTable.blitterOperationsSupported = true;
868-
REQUIRE_BLITTER_OR_SKIP(hwInfo);
868+
REQUIRE_FULL_BLITTER_OR_SKIP(hwInfo);
869869
size_t origin[] = {0, 0, 0};
870870
auto mockCmdQ = std::make_unique<MockCommandQueueHw<FamilyType>>(context, pClDevice, nullptr);
871871
std::unique_ptr<Image> image(Image2dHelper<>::create(context));

opencl/test/unit_test/command_queue/enqueue_write_image_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ HWTEST_F(EnqueueWriteImageTest, givenDeviceWithBlitterSupportWhenEnqueueWriteIma
228228
{
229229
size_t region[] = {BlitterConstants::maxBlitWidth, BlitterConstants::maxBlitHeight, 1};
230230
EnqueueWriteImageHelper<>::enqueueWriteImage(mockCmdQ.get(), image.get(), CL_FALSE, origin, region);
231-
EXPECT_TRUE(mockCmdQ->isBlitEnqueueImageAllowed);
231+
EXPECT_EQ(hwInfoConfig->isBlitterFullySupported(*hwInfo), mockCmdQ->isBlitEnqueueImageAllowed);
232232
}
233233
{
234234
DebugManager.flags.EnableBlitterForEnqueueImageOperations.set(-1);

opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_4_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ HWTEST_F(CrossDeviceDependenciesTests, givenWaitListWithEventBlockedByUserEventW
503503

504504
for (auto &rootDeviceEnvironment : deviceFactory->rootDevices[0]->getExecutionEnvironment()->rootDeviceEnvironments) {
505505
rootDeviceEnvironment->getMutableHardwareInfo()->capabilityTable.blitterOperationsSupported = true;
506-
REQUIRE_BLITTER_OR_SKIP(rootDeviceEnvironment->getHardwareInfo());
506+
REQUIRE_FULL_BLITTER_OR_SKIP(rootDeviceEnvironment->getHardwareInfo());
507507
}
508508

509509
auto clCmdQ1 = clCreateCommandQueue(context.get(), deviceFactory->rootDevices[1], {}, nullptr);

0 commit comments

Comments
 (0)