From 51f603a4ccaf9a559a2e2e20e7f3d30478595b67 Mon Sep 17 00:00:00 2001 From: foreman Date: Wed, 11 Mar 2015 10:15:48 -0400 Subject: [PATCH] P4 to Git Change 1129348 by smekhano@stas-solstice-llvm-merge on 2015/03/10 20:49:28 EPR #414133 - HSA HLC: fixed device enqueue code for no-capture case A dead store to a context structure may be generated by clang, while our code was only expecting a bitcast. Affected files ... ... //depot/stg/opencl/drivers/opencl/compiler/llvm36/lib/Transforms/Scalar/AMDLowerEnqueueKernel.cpp#6 edit --- rocclr/runtime/device/gpu/gpuscsi.cpp | 6 ++++-- rocclr/runtime/utils/versions.hpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/rocclr/runtime/device/gpu/gpuscsi.cpp b/rocclr/runtime/device/gpu/gpuscsi.cpp index 5f5e548b84..5de3a41013 100644 --- a/rocclr/runtime/device/gpu/gpuscsi.cpp +++ b/rocclr/runtime/device/gpu/gpuscsi.cpp @@ -165,11 +165,13 @@ HSAILKernel::aqlCreateHWInfo(const void* shader, size_t shaderSize) char* headerBaseAddress = reinterpret_cast(siMetaData->common.hShaderMemHandle); + hsa_ext_code_descriptor_t* hcd = + reinterpret_cast(headerBaseAddress); amd_kernel_code_t* akc = reinterpret_cast( - headerBaseAddress); + headerBaseAddress + hcd->code.handle); address codeStartAddress = reinterpret_cast
(akc); - address codeEndAddress = reinterpret_cast
(akc) + siMetaData->common.codeLenInByte; + address codeEndAddress = reinterpret_cast
(hcd) + siMetaData->common.codeLenInByte; codeSize_ = codeEndAddress - codeStartAddress; code_ = new gpu::Memory(dev(), amd::alignUp(codeSize_, gpu::ConstBuffer::VectorSize)); diff --git a/rocclr/runtime/utils/versions.hpp b/rocclr/runtime/utils/versions.hpp index dec654c52f..5395169997 100644 --- a/rocclr/runtime/utils/versions.hpp +++ b/rocclr/runtime/utils/versions.hpp @@ -12,7 +12,7 @@ #endif // AMD_PLATFORM_NAME #ifndef AMD_PLATFORM_BUILD_NUMBER -# define AMD_PLATFORM_BUILD_NUMBER 1753 +# define AMD_PLATFORM_BUILD_NUMBER 1752 #endif // AMD_PLATFORM_BUILD_NUMBER #ifndef AMD_PLATFORM_REVISION_NUMBER