diff --git a/projects/clr/rocclr/runtime/device/pal/palprogram.cpp b/projects/clr/rocclr/runtime/device/pal/palprogram.cpp index 19f4fc38c4..57f022b0f4 100644 --- a/projects/clr/rocclr/runtime/device/pal/palprogram.cpp +++ b/projects/clr/rocclr/runtime/device/pal/palprogram.cpp @@ -1523,6 +1523,14 @@ LightningProgram::linkImpl(amd::option::Options *options) } } + if (options->isDumpFlagSet(amd::option::DUMP_ISA)) { + std::string name = options->getDumpFileName(".s"); + File *dump = C->NewFile(DT_INTERNAL, name); + if (!C->DumpExecutableAsText(out_exec, dump)) { + buildLog_ += "Warning: failed to dump code object.\n"; + } + } + return setKernels(options, out_exec->Buf().data(), out_exec->Size()); } diff --git a/projects/clr/rocclr/runtime/device/rocm/rocprogram.cpp b/projects/clr/rocclr/runtime/device/rocm/rocprogram.cpp index c9cc6dc4eb..bf66c20e82 100644 --- a/projects/clr/rocclr/runtime/device/rocm/rocprogram.cpp +++ b/projects/clr/rocclr/runtime/device/rocm/rocprogram.cpp @@ -827,6 +827,14 @@ HSAILProgram::linkImpl_LC(amd::option::Options *options) } } + if (options->isDumpFlagSet(amd::option::DUMP_ISA)) { + std::string name = options->getDumpFileName(".s"); + File *dump = C->NewFile(DT_INTERNAL, name); + if (!C->DumpExecutableAsText(out_exec, dump)) { + buildLog_ += "Warning: failed to dump code object.\n"; + } + } + return setKernels_LC( options, out_exec->Buf().data(), out_exec->Size() ); }