P4 to Git Change 1358063 by wchau@wchau_OCL_boltzmann on 2017/01/03 16:44:42
SWDEV-102698 - [OCL-LC-ROCm] Add code caching support to OpenCL program manager Affected files ... ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/build/Makefile.api#146 edit ... //depot/stg/opencl/drivers/opencl/compiler/tools/Makefile#20 edit ... //depot/stg/opencl/drivers/opencl/runtime/build/Makefile.runtime#65 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#205 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#280 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/build/Makefile.oclrocm#10 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/roccompiler.cpp#25 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#30 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.hpp#10 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#49 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.hpp#17 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocsettings.cpp#10 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocsettings.hpp#4 edit ... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#261 edit
Cette révision appartient à :
@@ -195,19 +195,20 @@ HSAILProgram::compileImpl_LC(
|
||||
return false;
|
||||
}
|
||||
|
||||
driverOptions.append(" -include-pch " + pch->Name());
|
||||
driverOptions.append(" -Xclang -fno-validate-pch");
|
||||
|
||||
// save the options for caching before including the temporary header file for amdgcn
|
||||
std::string cacheOpts = driverOptions + std::to_string(clcStd);
|
||||
|
||||
driverOptions.append(" -include-pch " + pch->Name());
|
||||
|
||||
// Tokenize the options string into a vector of strings
|
||||
std::istringstream istrstr(driverOptions);
|
||||
std::istream_iterator<std::string> sit(istrstr), end;
|
||||
std::vector<std::string> params(sit, end);
|
||||
|
||||
// Compile source to IR
|
||||
bool ret = C->CompileToLLVMBitcode(inputs, output, params);
|
||||
buildLog_ += C->Output();
|
||||
if (!ret) {
|
||||
buildLog_ += "Error: Failed to compile opencl source (from CL to LLVM IR).\n";
|
||||
if (!dev().cacheCompilation()->compileToLLVMBitcode(C.get(), inputs, output, params, cacheOpts)) {
|
||||
buildLog_ += dev().cacheCompilation()->buildLog();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur