mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
Refactor BCS in OpenCL CommandQueue
- use CopyEngineState class to hold task count and engine type - pass engine type to updateBcsTaskCount Related-To: NEO-6057 Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d6bb9bf0dd
commit
04b6a604ec
@@ -138,6 +138,7 @@ CompletionStamp &CommandComputeKernel::submit(uint32_t taskLevel, bool terminate
|
||||
auto &commandStreamReceiver = commandQueue.getGpgpuCommandStreamReceiver();
|
||||
bool executionModelKernel = kernel->isParentKernel;
|
||||
auto devQueue = commandQueue.getContext().getDefaultDeviceQueue();
|
||||
auto bcsCsrForAuxTranslation = commandQueue.getBcsForAuxTranslation();
|
||||
|
||||
auto commandStreamReceiverOwnership = commandStreamReceiver.obtainUniqueOwnership();
|
||||
bool isCcsUsed = EngineHelpers::isCcs(commandQueue.getGpgpuEngine().osContext->getEngineType());
|
||||
@@ -204,13 +205,12 @@ CompletionStamp &CommandComputeKernel::submit(uint32_t taskLevel, bool terminate
|
||||
}
|
||||
|
||||
if (kernelOperation->blitPropertiesContainer.size() > 0) {
|
||||
auto &bcsCsr = *commandQueue.getBcsForAuxTranslation();
|
||||
CsrDependencies csrDeps;
|
||||
eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, bcsCsr, CsrDependencies::DependenciesType::All);
|
||||
eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, *bcsCsrForAuxTranslation, CsrDependencies::DependenciesType::All);
|
||||
|
||||
BlitProperties::setupDependenciesForAuxTranslation(kernelOperation->blitPropertiesContainer, *timestampPacketDependencies,
|
||||
*currentTimestampPacketNodes, csrDeps,
|
||||
commandQueue.getGpgpuCommandStreamReceiver(), bcsCsr);
|
||||
commandQueue.getGpgpuCommandStreamReceiver(), *bcsCsrForAuxTranslation);
|
||||
}
|
||||
|
||||
const auto &kernelDescriptor = kernel->getKernelInfo().kernelDescriptor;
|
||||
@@ -288,8 +288,8 @@ CompletionStamp &CommandComputeKernel::submit(uint32_t taskLevel, bool terminate
|
||||
|
||||
uint32_t bcsTaskCount = 0u;
|
||||
if (kernelOperation->blitPropertiesContainer.size() > 0) {
|
||||
bcsTaskCount = commandQueue.getBcsForAuxTranslation()->blitBuffer(kernelOperation->blitPropertiesContainer, false, commandQueue.isProfilingEnabled(), commandQueue.getDevice());
|
||||
commandQueue.updateBcsTaskCount(bcsTaskCount);
|
||||
bcsTaskCount = bcsCsrForAuxTranslation->blitBuffer(kernelOperation->blitPropertiesContainer, false, commandQueue.isProfilingEnabled(), commandQueue.getDevice());
|
||||
commandQueue.updateBcsTaskCount(bcsCsrForAuxTranslation->getOsContext().getEngineType(), bcsTaskCount);
|
||||
}
|
||||
commandQueue.updateLatestSentEnqueueType(EnqueueProperties::Operation::GpuKernel);
|
||||
|
||||
@@ -326,9 +326,8 @@ void CommandWithoutKernel::dispatchBlitOperation() {
|
||||
eventsRequest.fillCsrDependenciesForTaskCountContainer(blitProperties.csrDependencies, *bcsCsr);
|
||||
}
|
||||
|
||||
auto bcsTaskCount = bcsCsr->blitBuffer(kernelOperation->blitPropertiesContainer, false, commandQueue.isProfilingEnabled(), commandQueue.getDevice());
|
||||
|
||||
commandQueue.updateBcsTaskCount(bcsTaskCount);
|
||||
const auto newTaskCount = bcsCsr->blitBuffer(kernelOperation->blitPropertiesContainer, false, commandQueue.isProfilingEnabled(), commandQueue.getDevice());
|
||||
commandQueue.updateBcsTaskCount(bcsCsr->getOsContext().getEngineType(), newTaskCount);
|
||||
}
|
||||
|
||||
CompletionStamp &CommandWithoutKernel::submit(uint32_t taskLevel, bool terminated) {
|
||||
|
||||
Reference in New Issue
Block a user