P4 to Git Change 1607675 by gandryey@gera-w8 on 2018/09/18 18:42:34

SWDEV-79445 - OCL generic changes and code clean-up
	Program compilation clean-up. Step#1:
	- Move device::Program implementation into a separate file
	- Combine the common fields accros all 3 layers into the abstract device::Program

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#230 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#318 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#1 add
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.hpp#1 add
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpucompiler.cpp#159 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#241 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.hpp#73 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#72 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.hpp#29 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#125 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#86 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.hpp#35 edit


[ROCm/clr commit: 0253c1afb3]
This commit is contained in:
foreman
2018-09-18 18:53:08 -04:00
parent c1913716c2
commit bc0ac6bd43
12 changed files with 923 additions and 906 deletions
@@ -136,44 +136,26 @@ bool Segment::freeze(bool destroySysmem) {
HSAILProgram::HSAILProgram(Device& device)
: Program(device),
llvmBinary_(),
binaryElf_(nullptr),
rawBinary_(nullptr),
kernels_(nullptr),
codeSegGpu_(nullptr),
codeSegment_(nullptr),
maxScratchRegs_(0),
flags_(0),
executable_(nullptr),
loaderContext_(this) {
memset(&binOpts_, 0, sizeof(binOpts_));
binOpts_.struct_size = sizeof(binOpts_);
binOpts_.elfclass = LP64_SWITCH(ELFCLASS32, ELFCLASS64);
binOpts_.bitness = ELFDATA2LSB;
binOpts_.alloc = &::malloc;
binOpts_.dealloc = &::free;
loader_ = amd::hsa::loader::Loader::Create(&loaderContext_);
}
HSAILProgram::HSAILProgram(NullDevice& device)
: Program(device),
llvmBinary_(),
binaryElf_(nullptr),
rawBinary_(nullptr),
kernels_(nullptr),
codeSegGpu_(nullptr),
codeSegment_(nullptr),
maxScratchRegs_(0),
flags_(0),
executable_(nullptr),
loaderContext_(this) {
memset(&binOpts_, 0, sizeof(binOpts_));
isNull_ = true;
binOpts_.struct_size = sizeof(binOpts_);
binOpts_.elfclass = LP64_SWITCH(ELFCLASS32, ELFCLASS64);
binOpts_.bitness = ELFDATA2LSB;
binOpts_.alloc = &::malloc;
binOpts_.dealloc = &::free;
loader_ = amd::hsa::loader::Loader::Create(&loaderContext_);
}
@@ -1599,7 +1581,7 @@ bool LightningProgram::setKernels(amd::option::Options* options, void* binary, s
buildLog_ += "Error: Failed to get kernel names\n";
return false;
}
globalVars_ = (glbVarNames.size() != 0) ? true : false;
hasGlobalStores_ = (glbVarNames.size() != 0) ? true : false;
DestroySegmentCpuAccess();