P4 to Git Change 1390019 by kzhuravl@kzhuravl-fiji-cl-on-lc-git-overlay on 2017/03/23 18:19:56
SWDEV-102699 - Update runtime for upcoming metadata changes: - https://reviews.llvm.org/D29948 - https://reviews.llvm.org/D29949 - https://reviews.llvm.org/D30969 - https://reviews.llvm.org/D30970 ReviewBoardURL: http://ocltc.amd.com/reviews/r/12486/ Testing: lightning ocl conformance locally + windows build Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/build/Makefile.pal#9 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#32 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.hpp#10 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#37 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.hpp#16 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/build/Makefile.oclrocm#13 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#21 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.hpp#15 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#60 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.hpp#21 edit
Tá an tiomantas seo le fáil i:
@@ -20,7 +20,7 @@
|
||||
#include "hsa_ext_image.h"
|
||||
#include "amd_hsa_loader.hpp"
|
||||
#if defined(WITH_LIGHTNING_COMPILER)
|
||||
#include "AMDGPURuntimeMetadata.h"
|
||||
#include "AMDGPUCodeObjectMetadata.h"
|
||||
#include "driver/AmdCompiler.h"
|
||||
#include "libraries.amdgcn.inc"
|
||||
#include "gelf.h"
|
||||
@@ -1615,16 +1615,20 @@ LightningProgram::setKernels(
|
||||
//! @todo: Use constants and enums defined in AMDGPUPTNote.h.
|
||||
//! In order to switch to using constants and enums defined in
|
||||
//! AMDGPUPTNote.h, we need to clean up internal header files.
|
||||
if (note->n_type == 7 /*AMDGPU::ElfNote::NT_AMDGPU_HSA_RUNTIME_METADATA_V_1*/) {
|
||||
buildLog_ += "Error: object code with metadata v1 is not " \
|
||||
if (note->n_type == 7 || note->n_type == 8) {
|
||||
buildLog_ += "Error: object code with old metadata is not " \
|
||||
"supported\n";
|
||||
return false;
|
||||
}
|
||||
else if (note->n_type == 8 /*AMDGPU::ElfNote::NT_AMDGPU_HSA_RUNTIME_METADATA*/
|
||||
else if (note->n_type == 10 /*AMDGPU::ElfNote::NT_AMDGPU_HSA_CODE_OBJECT_METADATA*/
|
||||
&& note->n_namesz == sizeof "AMD"
|
||||
&& !memcmp(name, "AMD", note->n_namesz)) {
|
||||
std::string metadataStr((const char *) desc, (size_t) note->n_descsz);
|
||||
metadata_ = new AMDGPU::RuntimeMD::Program::Metadata(metadataStr);
|
||||
metadata_ = new CodeObjectMD();
|
||||
if (CodeObjectMD::fromYamlString(metadataStr, *metadata_)) {
|
||||
buildLog_ += "Error: failed to process metadata\n";
|
||||
return false;
|
||||
}
|
||||
// We've found and loaded the runtime metadata, exit the
|
||||
// note record loop now.
|
||||
break;
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir