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
[ROCm/clr commit: d219d45f7d]
Esse commit está contido em:
@@ -8,9 +8,14 @@
|
||||
#include "device/pal/palsched.hpp"
|
||||
#include "platform/commandqueue.hpp"
|
||||
#include "utils/options.hpp"
|
||||
|
||||
#include "acl.h"
|
||||
|
||||
#if defined(WITH_LIGHTNING_COMPILER)
|
||||
#include "llvm/Support/AMDGPUMetadata.h"
|
||||
|
||||
typedef llvm::AMDGPU::HSAMD::Kernel::Metadata KernelMD;
|
||||
#endif // defined(WITH_LIGHTNING_COMPILER)
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <fstream>
|
||||
@@ -85,9 +90,7 @@ HSAILKernel::~HSAILKernel() {
|
||||
}
|
||||
|
||||
bool HSAILKernel::init(amd::hsa::loader::Symbol* sym, bool finalize) {
|
||||
#if defined(WITH_LIGHTNING_COMPILER)
|
||||
assert(!"Should not reach here");
|
||||
#else // !defined(WITH_LIGHTNING_COMPILER)
|
||||
#if defined(WITH_COMPILER_LIB) || !defined(WITH_LIGHTNING_COMPILER)
|
||||
acl_error error = ACL_SUCCESS;
|
||||
std::string openClKernelName = openclMangledName(name());
|
||||
flags_.internalKernel_ =
|
||||
@@ -240,7 +243,7 @@ bool HSAILKernel::init(amd::hsa::loader::Symbol* sym, bool finalize) {
|
||||
delete[] VecTypeHint;
|
||||
}
|
||||
|
||||
#endif // !defined(WITH_LIGHTNING_COMPILER)
|
||||
#endif // defined(WITH_COMPILER_LIB) || !defined(WITH_LIGHTNING_COMPILER)
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -370,12 +373,11 @@ hsa_kernel_dispatch_packet_t* HSAILKernel::loadArguments(
|
||||
return hsaDisp;
|
||||
}
|
||||
|
||||
#if defined(WITH_LIGHTNING_COMPILER)
|
||||
|
||||
const LightningProgram& LightningKernel::prog() const {
|
||||
return reinterpret_cast<const LightningProgram&>(prog_);
|
||||
}
|
||||
|
||||
#if defined(WITH_LIGHTNING_COMPILER)
|
||||
static const KernelMD* FindKernelMetadata(const CodeObjectMD* programMD, const std::string& name) {
|
||||
for (const KernelMD& kernelMD : programMD->mKernels) {
|
||||
if (kernelMD.mName == name) {
|
||||
@@ -384,8 +386,10 @@ static const KernelMD* FindKernelMetadata(const CodeObjectMD* programMD, const s
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
#endif // defined(WITH_LIGHTNING_COMPILER)
|
||||
|
||||
bool LightningKernel::init(amd::hsa::loader::Symbol* symbol) {
|
||||
#if defined(WITH_LIGHTNING_COMPILER)
|
||||
flags_.internalKernel_ =
|
||||
(compileOptions_.find("-cl-internal-kernel") != std::string::npos) ? true : false;
|
||||
|
||||
@@ -462,10 +466,8 @@ bool LightningKernel::init(amd::hsa::loader::Symbol* symbol) {
|
||||
|
||||
waveLimiter_.enable();
|
||||
*/
|
||||
|
||||
#endif // defined(WITH_LIGHTNING_COMPILER)
|
||||
return true;
|
||||
}
|
||||
#endif // defined(WITH_LIGHTNING_COMPILER)
|
||||
|
||||
|
||||
} // namespace pal
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário