mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 23:56:39 +08:00
Add AssignBCSAtEnqueue debug flag
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
05bf7a4315
commit
3c30e1b02b
@@ -179,8 +179,17 @@ CommandStreamReceiver &CommandQueue::selectCsrForBuiltinOperation(const CsrSelec
|
||||
case TransferDirection::HostToLocal:
|
||||
case TransferDirection::LocalToHost: {
|
||||
preferBcs = true;
|
||||
preferredBcsEngineType = EngineHelpers::getBcsEngineType(device->getHardwareInfo(), device->getDeviceBitfield(),
|
||||
device->getSelectorCopyEngine(), false);
|
||||
|
||||
auto preferredBCSType = true;
|
||||
|
||||
if (DebugManager.flags.AssignBCSAtEnqueue.get() != -1) {
|
||||
preferredBCSType = DebugManager.flags.AssignBCSAtEnqueue.get();
|
||||
}
|
||||
|
||||
if (preferredBCSType) {
|
||||
preferredBcsEngineType = EngineHelpers::getBcsEngineType(device->getHardwareInfo(), device->getDeviceBitfield(),
|
||||
device->getSelectorCopyEngine(), false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -189,7 +198,16 @@ CommandStreamReceiver &CommandQueue::selectCsrForBuiltinOperation(const CsrSelec
|
||||
|
||||
CommandStreamReceiver *selectedCsr = nullptr;
|
||||
if (preferBcs) {
|
||||
selectedCsr = getBcsCommandStreamReceiver(preferredBcsEngineType);
|
||||
auto assignBCS = true;
|
||||
|
||||
if (DebugManager.flags.AssignBCSAtEnqueue.get() != -1) {
|
||||
assignBCS = DebugManager.flags.AssignBCSAtEnqueue.get();
|
||||
}
|
||||
|
||||
if (assignBCS) {
|
||||
selectedCsr = getBcsCommandStreamReceiver(preferredBcsEngineType);
|
||||
}
|
||||
|
||||
if (selectedCsr == nullptr && !bcsEngineTypes.empty()) {
|
||||
selectedCsr = getBcsCommandStreamReceiver(bcsEngineTypes[0]);
|
||||
}
|
||||
|
||||
@@ -1069,6 +1069,7 @@ template <typename GfxFamily>
|
||||
template <uint32_t cmdType>
|
||||
void CommandQueueHw<GfxFamily>::enqueueBlit(const MultiDispatchInfo &multiDispatchInfo, cl_uint numEventsInWaitList, const cl_event *eventWaitList, cl_event *event, bool blocking, CommandStreamReceiver &bcsCsr) {
|
||||
auto commandStreamReceiverOwnership = getGpgpuCommandStreamReceiver().obtainUniqueOwnership();
|
||||
auto bcsCommandStreamReceiverOwnership = bcsCsr.obtainUniqueOwnership();
|
||||
|
||||
EventsRequest eventsRequest(numEventsInWaitList, eventWaitList, event);
|
||||
EventBuilder eventBuilder;
|
||||
@@ -1154,6 +1155,7 @@ void CommandQueueHw<GfxFamily>::enqueueBlit(const MultiDispatchInfo &multiDispat
|
||||
timestampPacketDependencies.moveNodesToNewContainer(*deferredTimestampPackets);
|
||||
|
||||
queueOwnership.unlock();
|
||||
bcsCommandStreamReceiverOwnership.unlock();
|
||||
commandStreamReceiverOwnership.unlock();
|
||||
|
||||
if (blocking) {
|
||||
|
||||
@@ -1780,6 +1780,27 @@ TEST_F(CsrSelectionCommandQueueWithBlitterTests, givenInvalidTransferDirectionWh
|
||||
EXPECT_ANY_THROW(queue->selectCsrForBuiltinOperation(args));
|
||||
}
|
||||
|
||||
TEST_F(CsrSelectionCommandQueueWithBlitterTests, givenBlitterAndAssignBCSAtEnqueueSetToFalseWhenSelectCsrThenDefaultBcsReturned) {
|
||||
DebugManagerStateRestore restore{};
|
||||
DebugManager.flags.EnableBlitterForEnqueueOperations.set(1);
|
||||
DebugManager.flags.AssignBCSAtEnqueue.set(0);
|
||||
|
||||
BuiltinOpParams builtinOpParams{};
|
||||
MockGraphicsAllocation srcGraphicsAllocation{};
|
||||
MockGraphicsAllocation dstGraphicsAllocation{};
|
||||
MockBuffer srcMemObj{srcGraphicsAllocation};
|
||||
MockBuffer dstMemObj{dstGraphicsAllocation};
|
||||
builtinOpParams.srcMemObj = &srcMemObj;
|
||||
builtinOpParams.dstMemObj = &dstMemObj;
|
||||
|
||||
CsrSelectionArgs args{CL_COMMAND_COPY_BUFFER, &srcMemObj, &dstMemObj, 0u, nullptr};
|
||||
args.direction = TransferDirection::LocalToHost;
|
||||
|
||||
auto &csr = queue->selectCsrForBuiltinOperation(args);
|
||||
|
||||
EXPECT_EQ(&csr, queue->getBcsCommandStreamReceiver(queue->bcsEngineTypes[0]));
|
||||
}
|
||||
|
||||
TEST_F(CsrSelectionCommandQueueWithQueueFamiliesBlitterTests, givenBlitterSelectedWithQueueFamiliesWhenSelectingBlitterThenSelectBlitter) {
|
||||
DebugManagerStateRestore restore{};
|
||||
|
||||
|
||||
@@ -376,6 +376,7 @@ ForceExtendedBufferSize = -1
|
||||
ForceExtendedUSMBufferSize = -1
|
||||
MakeIndirectAllocationsResidentAsPack = -1
|
||||
MakeEachAllocationResident = -1
|
||||
AssignBCSAtEnqueue = -1
|
||||
ReuseKernelBinaries = -1
|
||||
EnableChipsetUniqueUUID = -1
|
||||
ForceSimdMessageSizeInWalker = -1
|
||||
|
||||
Reference in New Issue
Block a user