P4 to Git Change 1321923 by smekhano@stas-mwamba-rocm-hsa on 2016/10/03 16:45:37
SWDEV-104346 - ROCm/HSA: allow code object and isa dump under -save-temps Reviewed by Laurent Morichetti Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/build/Makefile.oclrocm#9 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#38 edit
이 커밋은 다음에 포함됨:
@@ -15,6 +15,7 @@
|
||||
#include "libraries.amdgcn.inc"
|
||||
#else // !defined(WITH_LIGHTNING_COMPILER)
|
||||
#include "roccompilerlib.hpp"
|
||||
#include "amd_hsa_code.hpp"
|
||||
#endif // !defined(WITH_LIGHTNING_COMPILER)
|
||||
#include "utils/bif_section_labels.hpp"
|
||||
|
||||
@@ -1429,6 +1430,23 @@ HSAILProgram::linkImpl(amd::option::Options *options)
|
||||
}
|
||||
saveBinaryAndSetType(TYPE_EXECUTABLE);
|
||||
buildLog_ += g_complibApi._aclGetCompilerLog(device().compiler());
|
||||
|
||||
if (options->isDumpFlagSet(amd::option::DUMP_O) || options->isDumpFlagSet(amd::option::DUMP_ISA)) {
|
||||
amd::hsa::code::AmdHsaCode code;
|
||||
if (!code.InitAsHandle(hsaProgramCodeObject_)) {
|
||||
LogWarning("Error: Printing AMD HSA Code Object failed.");
|
||||
} else {
|
||||
if (options->isDumpFlagSet(amd::option::DUMP_O)) {
|
||||
std::string dumpFileName = options->getDumpFileName(".co");
|
||||
code.SaveToFile(dumpFileName);
|
||||
}
|
||||
if (options->isDumpFlagSet(amd::option::DUMP_ISA)) {
|
||||
std::string dumpFileName = options->getDumpFileName(".isa");
|
||||
code.PrintToFile(dumpFileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // !defined(WITH_LIGHTNING_COMPILER)
|
||||
return true;
|
||||
}
|
||||
|
||||
새 이슈에서 참조
사용자 차단