P4 to Git Change 1361170 by wchau@wchau_WIN_OCL_LC on 2017/01/12 10:55:25

SWDEV-102698 - [OCL-LC-ROCm] Add code caching support to OpenCL program manager - resubmission of CL#1358063 with addition of PAL/LC support

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/build/Makefile.api#149 edit
... //depot/stg/opencl/drivers/opencl/compiler/tools/Makefile#22 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#207 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#282 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/build/Makefile.pal#8 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palcompiler.cpp#12 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#42 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.hpp#15 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#28 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/build/Makefile.oclrocm#12 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/roccompiler.cpp#27 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#34 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.hpp#12 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#51 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#264 edit
Cette révision appartient à :
foreman
2017-01-12 11:03:31 -05:00
Parent b7578da2ae
révision c9781ce180
11 fichiers modifiés avec 330 ajouts et 17 suppressions
+11 -4
Voir le fichier
@@ -531,7 +531,10 @@ HSAILProgram::linkImpl_LC(
}
std::vector<std::string> linkOptions;
bool ret = C->LinkLLVMBitcode(inputs, output, linkOptions);
// NOTE: The linkOptions parameter is also used to identy cached code object. This parameter
// should not contain any dyanamically generated filename.
bool ret = dev().cacheCompilation()->linkLLVMBitcode(C.get(), inputs, output, linkOptions, buildLog_);
buildLog_ += C->Output();
if (!ret) {
buildLog_ += "Error: Linking bitcode failed: linking source & IR libraries.\n";
@@ -770,7 +773,9 @@ HSAILProgram::linkImpl_LC(amd::option::Options *options)
return false;
}
bool ret = C->LinkLLVMBitcode(inputs, linked_bc, linkOptions);
// NOTE: The linkOptions parameter is also used to identy cached code object. This parameter
// should not contain any dyanamically generated filename.
bool ret = dev().cacheCompilation()->linkLLVMBitcode(C.get(), inputs, linked_bc, linkOptions, buildLog_);
buildLog_ += C->Output();
if (!ret) {
buildLog_ += "Error: Linking bitcode failed: linking source & IR libraries.\n";
@@ -812,10 +817,12 @@ HSAILProgram::linkImpl_LC(amd::option::Options *options)
std::istream_iterator<std::string> sit(strstr), end;
std::vector<std::string> params(sit, end);
ret = C->CompileAndLinkExecutable(inputs, out_exec, params);
// NOTE: The params is also used to identy cached code object. This paramete
// should not contain any dyanamically generated filename.
ret = dev().cacheCompilation()->compileAndLinkExecutable(C.get(), inputs, out_exec, params, buildLog_);
buildLog_ += C->Output();
if (!ret) {
buildLog_ += "Error: Creating the executable failed: Compiling LLVM IRs to exe.\n";
buildLog_ += "Error: Creating the executable failed: Compiling LLVM IRs to exeutable\n";
return false;
}