P4 to Git Change 1362323 by kzhuravl@kzhuravl-fiji-cl-on-lc on 2017/01/16 14:21:45
SWDEV-102713 - Update Runtime to Metadata 2.0. ReviewBoardURL: http://ocltc/reviews/r/11965/ Testing: some OCL SDK samples. Change by Nikolay Haustov Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#30 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.hpp#8 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#29 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.hpp#15 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/amdgpu_metadata.cpp#7 delete ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/amdgpu_metadata.hpp#6 delete ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#19 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.hpp#12 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#52 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.hpp#19 edit
This commit is contained in:
@@ -930,16 +930,11 @@ HSAILProgram::setKernels_LC(amd::option::Options *options, void* binary, size_t
|
||||
if (note->n_type == 7 /*AMDGPU::PT_NOTE::NT_AMDGPU_HSA_RUNTIME_METADATA*/
|
||||
&& note->n_namesz == sizeof "AMD"
|
||||
&& !memcmp(name, "AMD", note->n_namesz)) {
|
||||
metadata_ = new amd::hsa::code::Program::Metadata();
|
||||
if (metadata_ && metadata_->ReadFrom(desc,note->n_descsz)) {
|
||||
// We've found and loaded the runtime metadata, exit the
|
||||
// note record loop now.
|
||||
break;
|
||||
}
|
||||
|
||||
buildLog_ += "Error while parsing ELF program binary " \
|
||||
"runtime metadata section\n";
|
||||
return false;
|
||||
std::string metadataStr((const char *) desc, (size_t) note->n_descsz);
|
||||
metadata_ = new AMDGPU::RuntimeMD::Program::Metadata(metadataStr);
|
||||
// We've found and loaded the runtime metadata, exit the
|
||||
// note record loop now.
|
||||
break;
|
||||
}
|
||||
ptr += sizeof(*note)
|
||||
+ amd::alignUp(note->n_namesz, sizeof(int))
|
||||
|
||||
Reference in New Issue
Block a user