From 474bff5f536f56f29eed38316c868d30a30dadee Mon Sep 17 00:00:00 2001 From: foreman Date: Mon, 16 Jan 2017 22:57:00 -0500 Subject: [PATCH] P4 to Git Change 1362565 by kzhuravl@kzhuravl-fiji-cl-on-lc on 2017/01/16 22:47:35 SWDEV-102713 - Fix pal build issues caused by recent metadata changes (CL 1362323) ReviewBoardURL: http://ocltc.amd.com/reviews/r/12178/ Testing: local build (linux, windows) Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#31 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.hpp#9 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#30 edit --- rocclr/runtime/device/pal/palkernel.cpp | 6 +++--- rocclr/runtime/device/pal/palkernel.hpp | 4 ++++ rocclr/runtime/device/pal/palprogram.cpp | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/rocclr/runtime/device/pal/palkernel.cpp b/rocclr/runtime/device/pal/palkernel.cpp index d097cc1ca5..9f5a4ff062 100644 --- a/rocclr/runtime/device/pal/palkernel.cpp +++ b/rocclr/runtime/device/pal/palkernel.cpp @@ -1529,7 +1529,7 @@ LightningKernel::initArgList(const AMDGPU::RuntimeMD::Kernel::Metadata& kernelMD size_t offset = 0; - for (size_t i = 0; i < kernelMD->KernelArgCount(); ++i) { + for (size_t i = 0; i < kernelMD.Args.size(); ++i) { const AMDGPU::RuntimeMD::KernelArg::Metadata& lcArg = kernelMD.Args[i]; @@ -1615,7 +1615,7 @@ LightningKernel::init(amd::hsa::loader::Symbol* symbol) assert(programMD != nullptr); const AMDGPU::RuntimeMD::Kernel::Metadata* kernelMD = - FindKernelMetadata(programMd, name()); + FindKernelMetadata(programMD, name()); if (kernelMD == nullptr) { return false; @@ -1656,7 +1656,7 @@ LightningKernel::init(amd::hsa::loader::Symbol* symbol) workGroupInfo_.size_ = dev().info().maxWorkGroupSize_; } - initPrintf(programMD->PrintfInfo()); + initPrintf(programMD->PrintfInfo); /*FIXME_lmoriche: size_t sizeOfWavesPerSimdHint = sizeof(workGroupInfo_.wavesPerSimdHint_); diff --git a/rocclr/runtime/device/pal/palkernel.hpp b/rocclr/runtime/device/pal/palkernel.hpp index 34218bf24f..8658979d7a 100644 --- a/rocclr/runtime/device/pal/palkernel.hpp +++ b/rocclr/runtime/device/pal/palkernel.hpp @@ -16,6 +16,10 @@ #include "device/pal/palwavelimiter.hpp" #include "hsa.h" +#if defined(WITH_LIGHTNING_COMPILER) +#include "AMDGPURuntimeMetadata.h" +#endif // defined(WITH_LIGHTNING_COMPILER) + namespace amd { namespace hsa { namespace loader { diff --git a/rocclr/runtime/device/pal/palprogram.cpp b/rocclr/runtime/device/pal/palprogram.cpp index 710d93b43c..73b11c2da0 100644 --- a/rocclr/runtime/device/pal/palprogram.cpp +++ b/rocclr/runtime/device/pal/palprogram.cpp @@ -20,7 +20,7 @@ #include "hsa_ext_image.h" #include "amd_hsa_loader.hpp" #if defined(WITH_LIGHTNING_COMPILER) -#include "libamdhsacode/amdgpu_metadata.hpp" +#include "AMDGPURuntimeMetadata.h" #include "driver/AmdCompiler.h" #include "libraries.amdgcn.inc" #include "gelf.h"