P4 to Git Change 1599194 by gandryey@gera-w8 on 2018/08/28 18:38:33

SWDEV-79445 - OCL generic changes and code clean-up
	- Move printf setup in the kernels to the abstraction layer

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.cpp#2 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.hpp#2 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#329 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.hpp#131 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprintf.cpp#47 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprintf.hpp#16 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#238 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.hpp#71 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#62 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.hpp#21 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprintf.cpp#10 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprintf.hpp#4 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#41 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.hpp#25 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprintf.cpp#11 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprintf.hpp#6 edit
This commit is contained in:
foreman
2018-08-28 18:48:05 -04:00
parent 5cfeb120ed
commit ef83d84899
16 changed files with 201 additions and 466 deletions
+5 -5
View File
@@ -73,7 +73,7 @@ bool PrintfDbg::init(VirtualGPU& gpu, bool printfEnabled, const amd::NDRange& si
}
bool PrintfDbg::output(VirtualGPU& gpu, bool printfEnabled, const amd::NDRange& size,
const std::vector<PrintfInfo>& printfInfo) {
const std::vector<device::PrintfInfo>& printfInfo) {
// Are we expected to generate debug output?
if (printfEnabled && !printfInfo.empty()) {
uint32_t* workitemData;
@@ -116,7 +116,7 @@ bool PrintfDbg::output(VirtualGPU& gpu, bool printfEnabled, const amd::NDRange&
return false;
}
// Get the PrintfDbg info
const PrintfInfo& info = printfInfo[workitemData[z++]];
const device::PrintfInfo& info = printfInfo[workitemData[z++]];
// There's something in this buffer
outputDbgBuffer(info, workitemData, z);
}
@@ -340,7 +340,7 @@ size_t PrintfDbg::outputArgument(const std::string& fmt, bool printFloat, size_t
return copiedBytes;
}
void PrintfDbg::outputDbgBuffer(const PrintfInfo& info, const uint32_t* workitemData,
void PrintfDbg::outputDbgBuffer(const device::PrintfInfo& info, const uint32_t* workitemData,
size_t& i) const {
static const char* specifiers = "cdieEfgGaosuxXp";
static const char* modifiers = "hl";
@@ -558,7 +558,7 @@ bool PrintfDbgHSA::init(VirtualGPU& gpu, bool printfEnabled) {
}
bool PrintfDbgHSA::output(VirtualGPU& gpu, bool printfEnabled,
const std::vector<PrintfInfo>& printfInfo) {
const std::vector<device::PrintfInfo>& printfInfo) {
if (printfEnabled) {
uint32_t offsetSize = 0;
xferBufRead_ = &(dev().xferRead().acquire());
@@ -610,7 +610,7 @@ bool PrintfDbgHSA::output(VirtualGPU& gpu, bool printfEnabled,
LogError("Couldn't find the reported PrintfID!");
return false;
}
const PrintfInfo& info = printfInfo[(*dbgBufferPtr)];
const device::PrintfInfo& info = printfInfo[(*dbgBufferPtr)];
sb += sizeof(uint32_t);
for (const auto& it : info.arguments_) {
sb += it;