mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 17:13:29 +08:00
Fix filling buffers in AUBHelloWorldIntegrateTest
- whole buffers should be written with data prior usage Change-Id: I7399a77e3c62e0eb971733537fd276a46925bd25
This commit is contained in:
committed by
sys_ocldev
parent
f3a732081e
commit
271e588c6e
@@ -120,14 +120,25 @@ struct AUBHelloWorldIntegrateTest : public HelloWorldFixture<AUBHelloWorldFixtur
|
||||
void SetUp() override {
|
||||
std::tie(KernelFixture::simd, param) = GetParam();
|
||||
ParentClass::SetUp();
|
||||
auto &commandStreamReceiver = pDevice->getCommandStreamReceiver();
|
||||
commandStreamReceiver.createAllocationAndHandleResidency(pDestMemory, sizeUserMemory);
|
||||
commandStreamReceiver.createAllocationAndHandleResidency(pSrcMemory, sizeUserMemory);
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
ParentClass::TearDown();
|
||||
}
|
||||
|
||||
template <typename FamilyType>
|
||||
void writeMemory(GraphicsAllocation *allocation) {
|
||||
AUBCommandStreamReceiverHw<FamilyType> *aubCsr = nullptr;
|
||||
if (testMode == TestMode::AubTests) {
|
||||
aubCsr = reinterpret_cast<AUBCommandStreamReceiverHw<FamilyType> *>(pCommandStreamReceiver);
|
||||
} else if (testMode == TestMode::AubTestsWithTbx) {
|
||||
auto tbxWithAubCsr = reinterpret_cast<CommandStreamReceiverWithAUBDump<TbxCommandStreamReceiverHw<FamilyType>> *>(pCommandStreamReceiver);
|
||||
aubCsr = reinterpret_cast<AUBCommandStreamReceiverHw<FamilyType> *>(tbxWithAubCsr->aubCSR);
|
||||
tbxWithAubCsr->writeMemory(*allocation);
|
||||
}
|
||||
|
||||
aubCsr->writeMemory(*allocation);
|
||||
}
|
||||
TestParam param;
|
||||
};
|
||||
|
||||
@@ -140,6 +151,9 @@ HWTEST_P(AUBHelloWorldIntegrateTest, simple) {
|
||||
cl_event *eventWaitList = nullptr;
|
||||
cl_event *event = nullptr;
|
||||
|
||||
writeMemory<FamilyType>(destBuffer->getGraphicsAllocation());
|
||||
writeMemory<FamilyType>(srcBuffer->getGraphicsAllocation());
|
||||
|
||||
auto retVal = this->pCmdQ->enqueueKernel(
|
||||
this->pKernel,
|
||||
workDim,
|
||||
|
||||
Reference in New Issue
Block a user