P4 to Git Change 1312581 by lmoriche@lmoriche_opencl_dev on 2016/09/08 19:11:07

SWDEV-102033 - [OCL-LC-ROCm] Change runtime metadata KeyArgKind
	- Required runtime changes to use the new hidden argument metadata

Affected files ...

... //depot/stg/opencl/drivers/opencl/make/llvm.git/llvmlibs#7 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/amdgpu_metadata.cpp#4 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/amdgpu_metadata.hpp#4 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#15 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.hpp#9 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#28 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#14 edit


[ROCm/clr commit: 8fadd2c115]
Этот коммит содержится в:
foreman
2016-09-08 20:29:42 -04:00
родитель b602575d44
Коммит 376b1f2bfa
6 изменённых файлов: 189 добавлений и 159 удалений
+21 -4
Просмотреть файл
@@ -36,6 +36,8 @@
#endif // !defined(WITH_LIGHTNING_COMPILER)
#include "utils/bif_section_labels.hpp"
#include "amd_hsa_kernel_code.h"
#include <string>
#include <vector>
#include <cstring>
@@ -1027,11 +1029,10 @@ HSAILProgram::linkImpl_LC(amd::option::Options *options)
return false;
}
for ( auto &kernelName : kernelNameList )
{
for (auto &kernelName : kernelNameList) {
hsa_executable_symbol_t kernelSymbol;
hsa_executable_get_symbol ( hsaExecutable_, "", kernelName.c_str(),
hsaDevice, 0, &kernelSymbol );
hsa_executable_get_symbol(
hsaExecutable_, "", kernelName.c_str(), hsaDevice, 0, &kernelSymbol);
uint64_t kernelCodeHandle;
status = hsa_executable_symbol_get_info(
@@ -1093,6 +1094,22 @@ HSAILProgram::linkImpl_LC(amd::option::Options *options)
return false;
}
#if 0
for (auto s = elf.nextSymbol(NULL); s != NULL; s = elf.nextSymbol(s)) {
amd::OclElf::SymbolInfo si;
if (!elf.getSymbolInfo(s, &si)
|| strcmp(si.sec_name, ".text") != 0
|| strcmp(si.sym_name, kernelName.c_str()) != 0) {
continue;
}
const amd_kernel_code_t* akc = (amd_kernel_code_t*)
((address) out_exec->Buf().data() + (si.address - si.sec_addr));
// FIXME_lmoriche: this is where we could get the SGPRs and VGPRs
break;
}
#endif
Kernel *aKernel = new roc::Kernel(
kernelName,
this,