Update Aub tests

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2021-10-12 18:45:13 +00:00
committed by Compute-Runtime-Automation
parent 0f26ad1ec0
commit 3a5067c83f
3 changed files with 12 additions and 1 deletions

View File

@@ -164,6 +164,8 @@ HWTEST_P(AUBHelloWorldIntegrateTest, WhenEnqueingKernelThenExpectationsAreMet) {
cl_event *eventWaitList = nullptr;
cl_event *event = nullptr;
static_cast<AUBCommandStreamReceiverHw<FamilyType> &>(pCmdQ->getGpgpuCommandStreamReceiver()).initializeEngine();
writeMemory<FamilyType>(destBuffer->getGraphicsAllocation(pClDevice->getRootDeviceIndex()));
writeMemory<FamilyType>(srcBuffer->getGraphicsAllocation(pClDevice->getRootDeviceIndex()));

View File

@@ -16,6 +16,7 @@ using namespace NEO;
template <typename FamilyType>
void AubWriteCopyReadBuffer::runTest() {
auto simulatedCsr = AUBFixture::getSimulatedCsr<FamilyType>();
static_cast<AUBCommandStreamReceiverHw<FamilyType> &>(*simulatedCsr).initializeEngine();
char srcMemoryInitial[] = {1, 2, 3, 4, 5, 6, 7, 8};
char dstMemoryInitial[] = {11, 12, 13, 14, 15, 16, 17, 18};

View File

@@ -99,9 +99,12 @@ HWTEST_F(AUBcommandstreamTests, GivenVecsWhenTestingNoopIdThenAubIsCorrect) {
testNoopIdXcs<FamilyType>(aub_stream::ENGINE_VECS);
}
TEST_F(AUBcommandstreamTests, WhenCreatingResidentAllocationThenAllocationIsResident) {
HWTEST_F(AUBcommandstreamTests, WhenCreatingResidentAllocationThenAllocationIsResident) {
uint8_t buffer[0x10000];
size_t size = sizeof(buffer);
static_cast<AUBCommandStreamReceiverHw<FamilyType> &>(*pCommandStreamReceiver).initializeEngine();
auto &commandStreamReceiver = pDevice->getGpgpuCommandStreamReceiver();
auto graphicsAllocation = createResidentAllocationAndStoreItInCsr(buffer, size);
ResidencyContainer allocationsForResidency = {graphicsAllocation};
@@ -111,6 +114,9 @@ TEST_F(AUBcommandstreamTests, WhenCreatingResidentAllocationThenAllocationIsResi
HWTEST_F(AUBcommandstreamTests, GivenSingleAllocationWhenCreatingResidentAllocationThenAubIsCorrect) {
uint32_t buffer = 0xdeadbeef;
size_t size = sizeof(buffer);
static_cast<AUBCommandStreamReceiverHw<FamilyType> &>(*pCommandStreamReceiver).initializeEngine();
auto graphicsAllocation = createResidentAllocationAndStoreItInCsr(&buffer, size);
ResidencyContainer allocationsForResidency = {graphicsAllocation};
pCommandStreamReceiver->processResidency(allocationsForResidency, 0u);
@@ -126,6 +132,8 @@ HWTEST_F(AUBcommandstreamTests, GivenMultipleAllocationsWhenCreatingResidentAllo
buffer[index] = static_cast<uint8_t>(index);
}
static_cast<AUBCommandStreamReceiverHw<FamilyType> &>(*pCommandStreamReceiver).initializeEngine();
auto graphicsAllocation = createResidentAllocationAndStoreItInCsr(buffer, sizeBuffer);
ResidencyContainer allocationsForResidency = {graphicsAllocation};
pCommandStreamReceiver->processResidency(allocationsForResidency, 0u);