P4 to Git Change 1767752 by wchau@wchau_OCL_Linux on 2019/04/09 22:58:03
SWDEV-165259 - Update OpenCL runtime to support MsgPack metadata - Add support for the V3 code objects Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.cpp#19 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.hpp#14 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#39 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.hpp#24 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#336 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.hpp#134 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/inc/core/palCmdBuffer.h#63 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6ComputeCmdBuffer.cpp#63 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9ComputeCmdBuffer.cpp#69 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#77 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.hpp#27 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#90 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#76 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.hpp#21 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#130 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#52 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.hpp#27 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#103 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.hpp#47 edit
Este commit está contenido en:
@@ -747,6 +747,25 @@ bool LightningProgram::setKernels(amd::option::Options* options, void* binary, s
|
||||
return false;
|
||||
}
|
||||
|
||||
#if defined(USE_COMGR_LIBRARY)
|
||||
for (const auto &kernelMeta : kernelMetadataMap_) {
|
||||
auto kernelName = kernelMeta.first;
|
||||
auto kernel = new LightningKernel(kernelName, this,
|
||||
options->origOptionStr + ProcessOptions(options));
|
||||
kernels()[kernelName] = kernel;
|
||||
|
||||
if (!kernel->init()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
kernel->setUniformWorkGroupSize(options->oVariables->UniformWorkGroupSize);
|
||||
|
||||
// Find max scratch regs used in the program. It's used for scratch buffer preallocation
|
||||
// with dynamic parallelism, since runtime doesn't know which child kernel will be called
|
||||
maxScratchRegs_ =
|
||||
std::max(static_cast<uint>(kernel->workGroupInfo()->scratchRegs_), maxScratchRegs_);
|
||||
}
|
||||
#else
|
||||
// Get the list of kernels
|
||||
std::vector<std::string> kernelNameList;
|
||||
status = executable_->IterateSymbols(GetKernelNamesCallback, &kernelNameList);
|
||||
@@ -781,7 +800,7 @@ bool LightningProgram::setKernels(amd::option::Options* options, void* binary, s
|
||||
maxScratchRegs_ =
|
||||
std::max(static_cast<uint>(kernel->workGroupInfo()->scratchRegs_), maxScratchRegs_);
|
||||
}
|
||||
|
||||
#endif // defined(USE_COMGR_LIBRARY)
|
||||
DestroySegmentCpuAccess();
|
||||
#endif // defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
|
||||
return true;
|
||||
|
||||
Referencia en una nueva incidencia
Block a user