refactor: Move logic for querying maxMemoryFillPatternSize to product helper

Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This commit is contained in:
Kacper Nowak
2024-04-05 02:02:14 +00:00
committed by Compute-Runtime-Automation
parent 3b49836d0d
commit b8d19ccfb5
8 changed files with 31 additions and 17 deletions

View File

@@ -914,7 +914,7 @@ HWTEST2_F(HostPointerManagerCommandListTest,
auto ret = hostDriverHandle->importExternalPointer(heapPointer, MemoryConstants::pageSize);
EXPECT_EQ(ZE_RESULT_SUCCESS, ret);
int pattern = 1;
char pattern = 'a';
ret = commandList->appendMemoryFill(heapPointer, reinterpret_cast<void *>(&pattern), sizeof(pattern), 64u, nullptr, 0, nullptr, false);
EXPECT_EQ(ZE_RESULT_SUCCESS, ret);
@@ -1091,7 +1091,7 @@ HWTEST2_F(HostPointerManagerCommandListTest, givenCommandListWhenMemoryFillWithS
auto ret = hostDriverHandle->importExternalPointer(heapPointer, MemoryConstants::pageSize);
EXPECT_EQ(ZE_RESULT_SUCCESS, ret);
int one = 1;
char pattern = 'a';
size_t size = 16;
ze_event_pool_desc_t eventPoolDesc = {};
@@ -1109,7 +1109,7 @@ HWTEST2_F(HostPointerManagerCommandListTest, givenCommandListWhenMemoryFillWithS
auto event1 = std::unique_ptr<L0::Event>(L0::Event::create<typename FamilyType::TimestampPacketType>(eventPool.get(), &eventDesc, device));
events.push_back(event1.get());
result = commandList->appendMemoryFill(heapPointer, reinterpret_cast<void *>(&one), sizeof(one), size,
result = commandList->appendMemoryFill(heapPointer, reinterpret_cast<void *>(&pattern), sizeof(pattern), size,
events[0], 1, &events[1], false);
EXPECT_EQ(ZE_RESULT_SUCCESS, result);

View File

@@ -4180,7 +4180,7 @@ HWTEST2_F(MultipleDevicePeerAllocationTest,
auto commandList = std::make_unique<::L0::ult::CommandListCoreFamily<gfxCoreFamily>>();
commandList->initialize(device1, NEO::EngineGroupType::renderCompute, 0u);
uint32_t pattern = 1;
char pattern = 'a';
result = commandList->appendBlitFill(ptr, &pattern, sizeof(pattern), size, nullptr, 0, nullptr, false);
EXPECT_EQ(result, ZE_RESULT_ERROR_INVALID_ARGUMENT);
@@ -4206,7 +4206,7 @@ HWTEST2_F(MultipleDevicePeerAllocationTest,
auto commandList = std::make_unique<::L0::ult::CommandListCoreFamily<gfxCoreFamily>>();
commandList->initialize(device0, NEO::EngineGroupType::renderCompute, 0u);
uint32_t pattern = 1;
char pattern = 'a';
result = commandList->appendBlitFill(ptr, &pattern, sizeof(pattern), size, nullptr, 0, nullptr, false);
EXPECT_EQ(result, ZE_RESULT_SUCCESS);
@@ -4233,7 +4233,7 @@ HWTEST2_F(MultipleDevicePeerAllocationTest,
auto commandList = std::make_unique<::L0::ult::CommandListCoreFamily<gfxCoreFamily>>();
commandList->initialize(device1, NEO::EngineGroupType::renderCompute, 0u);
uint32_t pattern = 1;
char pattern = 'a';
result = commandList->appendBlitFill(ptr, &pattern, sizeof(pattern), size, nullptr, 0, nullptr, false);
EXPECT_EQ(result, ZE_RESULT_SUCCESS);
@@ -4264,7 +4264,7 @@ HWTEST2_F(MultipleDevicePeerAllocationTest,
auto commandList = std::make_unique<::L0::ult::CommandListCoreFamily<gfxCoreFamily>>();
commandList->initialize(device1, NEO::EngineGroupType::renderCompute, 0u);
uint32_t pattern = 1;
char pattern = 'a';
result = commandList->appendBlitFill(ptr, &pattern, sizeof(pattern), size, nullptr, 0, nullptr, false);
EXPECT_EQ(result, ZE_RESULT_SUCCESS);
@@ -4291,7 +4291,7 @@ HWTEST2_F(MultipleDevicePeerAllocationTest,
auto commandList = std::make_unique<::L0::ult::CommandListCoreFamily<gfxCoreFamily>>();
commandList->initialize(device0, NEO::EngineGroupType::renderCompute, 0u);
uint32_t pattern = 1;
char pattern = 'a';
result = commandList->appendBlitFill(ptr, &pattern, sizeof(pattern), size, nullptr, 0, nullptr, false);
EXPECT_EQ(result, ZE_RESULT_SUCCESS);
@@ -4310,7 +4310,7 @@ HWTEST2_F(MultipleDevicePeerAllocationTest,
auto commandList = std::make_unique<::L0::ult::CommandListCoreFamily<gfxCoreFamily>>();
commandList->initialize(device0, NEO::EngineGroupType::renderCompute, 0u);
uint32_t pattern = 1;
char pattern = 'a';
ze_result_t result = commandList->appendBlitFill(ptr, &pattern, sizeof(pattern), size, nullptr, 0, nullptr, false);
EXPECT_EQ(result, ZE_RESULT_ERROR_INVALID_ARGUMENT);