mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 05:56:36 +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 {
|
void SetUp() override {
|
||||||
std::tie(KernelFixture::simd, param) = GetParam();
|
std::tie(KernelFixture::simd, param) = GetParam();
|
||||||
ParentClass::SetUp();
|
ParentClass::SetUp();
|
||||||
auto &commandStreamReceiver = pDevice->getCommandStreamReceiver();
|
|
||||||
commandStreamReceiver.createAllocationAndHandleResidency(pDestMemory, sizeUserMemory);
|
|
||||||
commandStreamReceiver.createAllocationAndHandleResidency(pSrcMemory, sizeUserMemory);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TearDown() override {
|
void TearDown() override {
|
||||||
ParentClass::TearDown();
|
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;
|
TestParam param;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -140,6 +151,9 @@ HWTEST_P(AUBHelloWorldIntegrateTest, simple) {
|
|||||||
cl_event *eventWaitList = nullptr;
|
cl_event *eventWaitList = nullptr;
|
||||||
cl_event *event = nullptr;
|
cl_event *event = nullptr;
|
||||||
|
|
||||||
|
writeMemory<FamilyType>(destBuffer->getGraphicsAllocation());
|
||||||
|
writeMemory<FamilyType>(srcBuffer->getGraphicsAllocation());
|
||||||
|
|
||||||
auto retVal = this->pCmdQ->enqueueKernel(
|
auto retVal = this->pCmdQ->enqueueKernel(
|
||||||
this->pKernel,
|
this->pKernel,
|
||||||
workDim,
|
workDim,
|
||||||
|
|||||||
Reference in New Issue
Block a user