From e2b53335fb7bdff0dba5e0f4485e4dfd33cc1cc6 Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 11 Mar 2015 10:30:26 -0400
Subject: [PATCH] P4 to Git Change 1129400 by kzhuravl@win-kzhuravl-stg-oclhsa
on 2015/03/11 00:40:42
EPR #333756 - Required oclhsa changes caused by CL 1129370: remove hsa code descriptor + remove hsa_ext_finalize.h
Reviewer: Hari
Testing: p4precheckin (http://ocltc:8111/viewModification.html?modId=48271&personal=true&init=1&tab=vcsModificationBuilds)
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsadevice.hpp#10 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsaprogram.cpp#11 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsaprogram.hpp#5 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsavirtual.hpp#16 edit
[ROCm/clr commit: 7019f146215bffb3d61b39bbb8d84588df2d32a7]
---
projects/clr/rocclr/runtime/device/gpu/gpuscsi.cpp | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/projects/clr/rocclr/runtime/device/gpu/gpuscsi.cpp b/projects/clr/rocclr/runtime/device/gpu/gpuscsi.cpp
index 5de3a41013..5f5e548b84 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gpuscsi.cpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gpuscsi.cpp
@@ -165,13 +165,11 @@ 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 + hcd->code.handle);
+ headerBaseAddress);
address codeStartAddress = reinterpret_cast(akc);
- address codeEndAddress = reinterpret_cast(hcd) + siMetaData->common.codeLenInByte;
+ address codeEndAddress = reinterpret_cast(akc) + siMetaData->common.codeLenInByte;
codeSize_ = codeEndAddress - codeStartAddress;
code_ = new gpu::Memory(dev(), amd::alignUp(codeSize_, gpu::ConstBuffer::VectorSize));