From 0fb0fb1d8b5cdd915d049635df031575bcaa079e Mon Sep 17 00:00:00 2001 From: foreman Date: Fri, 23 Sep 2016 18:18:01 -0400 Subject: [PATCH] P4 to Git Change 1318412 by lmoriche@lmoriche_opencl_dev on 2016/09/23 17:57:01 SWDEV-94610 - Remove the padding at the end of the kernargs (It was for the hidden arguments, but now, LC reports the correct size). Set the LLVM triple to amdgcn-amd-amdhsa-opencl when building the built-in library. Affected files ... ... //depot/stg/opencl/drivers/opencl/opencldefs#186 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/roccompiler.cpp#20 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#37 edit --- rocclr/runtime/device/rocm/roccompiler.cpp | 2 +- rocclr/runtime/device/rocm/rocprogram.cpp | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/rocclr/runtime/device/rocm/roccompiler.cpp b/rocclr/runtime/device/rocm/roccompiler.cpp index 05fa1fdc20..ce1a62261e 100644 --- a/rocclr/runtime/device/rocm/roccompiler.cpp +++ b/rocclr/runtime/device/rocm/roccompiler.cpp @@ -168,7 +168,7 @@ HSAILProgram::compileImpl_LC( std::ofstream f(options->getDumpFileName(".cl").c_str(), std::ios::trunc); if(f.is_open()) { f << "/* Compiler options:\n" \ - "-c -emit-llvm -target amdgcn--amdhsa-opencl -x cl" \ + "-c -emit-llvm -target amdgcn-amd-amdhsa-opencl -x cl" \ " -include opencl-c.h " << driverOptions << "\n*/\n\n" << sourceCode; } else { diff --git a/rocclr/runtime/device/rocm/rocprogram.cpp b/rocclr/runtime/device/rocm/rocprogram.cpp index d49f1c27de..37f54cb353 100644 --- a/rocclr/runtime/device/rocm/rocprogram.cpp +++ b/rocclr/runtime/device/rocm/rocprogram.cpp @@ -1119,10 +1119,7 @@ HSAILProgram::setKernels_LC(amd::option::Options *options, void* binary, size_t kernelCodeHandle, workgroupGroupSegmentByteSize, workitemPrivateSegmentByteSize, - // TODO: remove the workaround - // add 24 bytes for global offsets as workaround for LC reporting - // excluded the hidden arguments - amd::alignUp(kernargSegmentByteSize, sizeof(size_t)) + 3 * sizeof(size_t), + kernargSegmentByteSize, amd::alignUp(kernargSegmentAlignment,device().info().globalMemCacheLineSize_)); if (!aKernel->init()) { return false;