Add capability to csr to allow N:1 aggregation when ooq is created.

- This allows applications to force the N:1 aggregation by creating out
of order queue.
- That switches csr to N:1 submission model where commands from multiple
command streams may be aggregated.
- That forces scenarios returning an event to be aggregated as well.

Change-Id: I8fd8d7f88bb2665234ee90870133120b206710a8
This commit is contained in:
Mrozek, Michal
2018-04-26 11:43:47 +02:00
committed by sys_ocldev
parent 82c9acddde
commit 34ff5852eb
5 changed files with 46 additions and 3 deletions

View File

@ -84,4 +84,16 @@ HWTEST_F(clCreateCommandQueueTest, givenOoqParametersWhenQueueIsCreatedThenComma
EXPECT_EQ(DispatchMode::BatchedDispatch, csr.dispatchMode);
retVal = clReleaseCommandQueue(cmdq);
}
HWTEST_F(clCreateCommandQueueTest, givenOoqParametersWhenQueueIsCreatedThenCommandStreamReceiverSwitchesToNTo1SubmissionModel) {
cl_int retVal = CL_SUCCESS;
cl_queue_properties ooq = CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE;
auto &csr = reinterpret_cast<UltCommandStreamReceiver<FamilyType> &>(pContext->getDevice(0)->getCommandStreamReceiver());
EXPECT_FALSE(csr.isNTo1SubmissionModelEnabled());
auto cmdq = clCreateCommandQueue(pContext, devices[0], ooq, &retVal);
EXPECT_TRUE(csr.isNTo1SubmissionModelEnabled());
retVal = clReleaseCommandQueue(cmdq);
}
} // namespace ULT