mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
Add patch info comments to AUB dump
Collect patching information and add as comments to AUB dump. Change-Id: Ib7c903a2589d68b6e3e614c1774c7cd5a000c29f
This commit is contained in:
@@ -1093,7 +1093,12 @@ cl_int Kernel::setArgBuffer(uint32_t argIndex,
|
||||
|
||||
auto patchSize = kernelArgInfo.kernelArgPatchInfoVector[0].size;
|
||||
|
||||
buffer->setArgStateless(patchLocation, patchSize, !this->isBuiltIn);
|
||||
uint64_t addressToPatch = buffer->setArgStateless(patchLocation, patchSize, !this->isBuiltIn);
|
||||
|
||||
if (DebugManager.flags.AddPatchInfoCommentsForAUBDump.get()) {
|
||||
PatchInfoData patchInfoData = {addressToPatch - buffer->getOffset(), buffer->getOffset(), PatchInfoAllocationType::KernelArg, reinterpret_cast<uint64_t>(getCrossThreadData()), kernelArgInfo.kernelArgPatchInfoVector[0].crossthreadOffset, PatchInfoAllocationType::IndirectObjectHeap};
|
||||
this->patchInfoDataList.push_back(patchInfoData);
|
||||
}
|
||||
|
||||
if (requiresSshForBuffers()) {
|
||||
auto surfaceState = ptrOffset(getSurfaceStateHeap(), kernelArgInfo.offsetHeap);
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "runtime/device_queue/device_queue.h"
|
||||
#include "runtime/helpers/base_object.h"
|
||||
#include "runtime/helpers/preamble.h"
|
||||
#include "runtime/helpers/address_patch.h"
|
||||
#include "runtime/program/program.h"
|
||||
#include "runtime/program/kernel_info.h"
|
||||
#include "runtime/os_interface/debug_settings_manager.h"
|
||||
@@ -369,6 +370,8 @@ class Kernel : public BaseObject<_cl_kernel> {
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::vector<PatchInfoData> &getPatchInfoDataList() { return patchInfoDataList; };
|
||||
|
||||
protected:
|
||||
struct ObjectCounts {
|
||||
uint32_t imageCount;
|
||||
@@ -476,5 +479,7 @@ class Kernel : public BaseObject<_cl_kernel> {
|
||||
|
||||
bool usingSharedObjArgs;
|
||||
uint32_t patchedArgumentsNum = 0;
|
||||
|
||||
std::vector<PatchInfoData> patchInfoDataList;
|
||||
};
|
||||
} // namespace OCLRT
|
||||
|
||||
Reference in New Issue
Block a user