Simplify checkAndActivateAubSubCapture method

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2021-09-22 19:25:21 +00:00
committed by Compute-Runtime-Automation
parent 51b169e9a8
commit d348526941
15 changed files with 40 additions and 108 deletions

View File

@@ -900,7 +900,7 @@ void CommandQueue::overrideEngine(aub_stream::EngineType engineType, EngineUsage
void CommandQueue::aubCaptureHook(bool &blocking, bool &clearAllDependencies, const MultiDispatchInfo &multiDispatchInfo) {
if (DebugManager.flags.AUBDumpSubCaptureMode.get()) {
auto status = getGpgpuCommandStreamReceiver().checkAndActivateAubSubCapture(multiDispatchInfo);
auto status = getGpgpuCommandStreamReceiver().checkAndActivateAubSubCapture(multiDispatchInfo.peekMainKernel()->getDescriptor().kernelMetadata.kernelName);
if (!status.isActive) {
// make each enqueue blocking when subcapture is not active to split batch buffer
blocking = true;

View File

@@ -56,7 +56,7 @@ class AUBCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw<GfxFa
void expectMMIO(uint32_t mmioRegister, uint32_t expectedValue);
bool expectMemory(const void *gfxAddress, const void *srcAddress, size_t length, uint32_t compareOperation) override;
AubSubCaptureStatus checkAndActivateAubSubCapture(const MultiDispatchInfo &dispatchInfo) override;
AubSubCaptureStatus checkAndActivateAubSubCapture(const std::string &kernelName) override;
void addAubComment(const char *message) override;
// Family specific version

View File

@@ -29,7 +29,6 @@
#include "shared/source/os_interface/os_context.h"
#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h"
#include "opencl/source/helpers/dispatch_info.h"
#include "opencl/source/helpers/hardware_context_controller.h"
#include "opencl/source/helpers/neo_driver_version.h"
#include "opencl/source/os_interface/ocl_reg_path.h"
@@ -783,8 +782,7 @@ void AUBCommandStreamReceiverHw<GfxFamily>::dumpAllocation(GraphicsAllocation &g
}
template <typename GfxFamily>
AubSubCaptureStatus AUBCommandStreamReceiverHw<GfxFamily>::checkAndActivateAubSubCapture(const MultiDispatchInfo &dispatchInfo) {
auto &kernelName = dispatchInfo.peekMainKernel()->getKernelInfo().kernelDescriptor.kernelMetadata.kernelName;
AubSubCaptureStatus AUBCommandStreamReceiverHw<GfxFamily>::checkAndActivateAubSubCapture(const std::string &kernelName) {
auto status = subCaptureManager->checkAndActivateSubCapture(kernelName);
if (status.isActive) {
auto &subCaptureFile = subCaptureManager->getSubCaptureFileName(kernelName);

View File

@@ -29,7 +29,7 @@ class CommandStreamReceiverWithAUBDump : public BaseCSR {
bool flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override;
void makeNonResident(GraphicsAllocation &gfxAllocation) override;
AubSubCaptureStatus checkAndActivateAubSubCapture(const MultiDispatchInfo &dispatchInfo) override;
AubSubCaptureStatus checkAndActivateAubSubCapture(const std::string &kernelName) override;
void setupContext(OsContext &osContext) override;
CommandStreamReceiverType getType() override {

View File

@@ -52,10 +52,10 @@ void CommandStreamReceiverWithAUBDump<BaseCSR>::makeNonResident(GraphicsAllocati
}
template <typename BaseCSR>
AubSubCaptureStatus CommandStreamReceiverWithAUBDump<BaseCSR>::checkAndActivateAubSubCapture(const MultiDispatchInfo &dispatchInfo) {
auto status = BaseCSR::checkAndActivateAubSubCapture(dispatchInfo);
AubSubCaptureStatus CommandStreamReceiverWithAUBDump<BaseCSR>::checkAndActivateAubSubCapture(const std::string &kernelName) {
auto status = BaseCSR::checkAndActivateAubSubCapture(kernelName);
if (aubCSR) {
status = aubCSR->checkAndActivateAubSubCapture(dispatchInfo);
status = aubCSR->checkAndActivateAubSubCapture(kernelName);
}
BaseCSR::programForAubSubCapture(status.wasActiveInPreviousEnqueue, status.isActive);
return status;