@@ -120,14 +120,25 @@ struct AUBHelloWorldIntegrateTest : public HelloWorldFixture<AUBHelloWorldFixtur
120120 void SetUp () override {
121121 std::tie (KernelFixture::simd, param) = GetParam ();
122122 ParentClass::SetUp ();
123- auto &commandStreamReceiver = pDevice->getCommandStreamReceiver ();
124- commandStreamReceiver.createAllocationAndHandleResidency (pDestMemory, sizeUserMemory);
125- commandStreamReceiver.createAllocationAndHandleResidency (pSrcMemory, sizeUserMemory);
126123 }
127124
128125 void TearDown () override {
129126 ParentClass::TearDown ();
130127 }
128+
129+ template <typename FamilyType>
130+ void writeMemory (GraphicsAllocation *allocation) {
131+ AUBCommandStreamReceiverHw<FamilyType> *aubCsr = nullptr ;
132+ if (testMode == TestMode::AubTests) {
133+ aubCsr = reinterpret_cast <AUBCommandStreamReceiverHw<FamilyType> *>(pCommandStreamReceiver);
134+ } else if (testMode == TestMode::AubTestsWithTbx) {
135+ auto tbxWithAubCsr = reinterpret_cast <CommandStreamReceiverWithAUBDump<TbxCommandStreamReceiverHw<FamilyType>> *>(pCommandStreamReceiver);
136+ aubCsr = reinterpret_cast <AUBCommandStreamReceiverHw<FamilyType> *>(tbxWithAubCsr->aubCSR );
137+ tbxWithAubCsr->writeMemory (*allocation);
138+ }
139+
140+ aubCsr->writeMemory (*allocation);
141+ }
131142 TestParam param;
132143};
133144
@@ -140,6 +151,9 @@ HWTEST_P(AUBHelloWorldIntegrateTest, simple) {
140151 cl_event *eventWaitList = nullptr ;
141152 cl_event *event = nullptr ;
142153
154+ writeMemory<FamilyType>(destBuffer->getGraphicsAllocation ());
155+ writeMemory<FamilyType>(srcBuffer->getGraphicsAllocation ());
156+
143157 auto retVal = this ->pCmdQ ->enqueueKernel (
144158 this ->pKernel ,
145159 workDim,
0 commit comments