P4 to Git Change 1613522 by gandryey@gera-ocl-lc on 2018/10/02 11:44:38

SWDEV-79445 - OCL generic changes and code clean-up
	Program compilation clean-up. Step#7:
	- Introduce a new key to control the compilation path dynamically
	- InitBuild/finiBuild clean-up

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_device.cpp#73 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#231 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#321 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#9 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.hpp#7 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#245 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.hpp#78 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#111 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#67 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.hpp#25 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#80 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.hpp#36 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#58 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#43 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#93 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.hpp#41 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocsettings.cpp#37 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#96 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#299 edit
このコミットが含まれているのは:
foreman
2018-10-02 11:52:23 -04:00
コミット d219d45f7d
18個のファイルの変更179行の追加345行の削除
+32 -1
ファイルの表示
@@ -1044,6 +1044,7 @@ void Program::releaseClBinary() {
// ================================================================================================
bool Program::initBuild(amd::option::Options* options) {
compileOptions_ = options->origOptionStr;
programOptions_ = options;
if (options->oVariables->DumpFlags > 0) {
@@ -1054,11 +1055,41 @@ bool Program::initBuild(amd::option::Options* options) {
if (!initClBinary()) {
return false;
}
const char* devName = machineTarget_;
options->setPerBuildInfo((devName && (devName[0] != '\0')) ? devName : "gpu",
clBinary()->getEncryptCode(), true);
// Elf Binary setup
std::string outFileName;
// true means hsail required
clBinary()->init(options, true);
if (options->isDumpFlagSet(amd::option::DUMP_BIF)) {
outFileName = options->getDumpFileName(".bin");
}
if (!clBinary()->setElfOut(LP64_SWITCH(ELFCLASS32, ELFCLASS64),
(outFileName.size() > 0) ? outFileName.c_str() : nullptr)) {
LogError("Setup elf out for gpu failed");
return false;
}
return true;
}
// ================================================================================================
bool Program::finiBuild(bool isBuildGood) { return true; }
bool Program::finiBuild(bool isBuildGood) {
clBinary()->resetElfOut();
clBinary()->resetElfIn();
if (!isBuildGood) {
// Prevent the encrypted binary form leaking out
clBinary()->setBinary(nullptr, 0);
}
return true;
}
// ================================================================================================
cl_int Program::compile(const std::string& sourceCode,