Don't duplicate embedded code objects (#1991)
If the code object is embedded in an already mapped file, and the
lifetime of the mapped file exceeds the lifetime of the executable,
we do not need to make a copy of the binary.
This allows the ROCR to present the code object URI as
file:///path/to/file#offset=X&size=Y.
[ROCm/clr commit: 67830996a9]
이 커밋은 다음에 포함됨:
@@ -89,9 +89,9 @@ __hipRegisterFatBinary(const void* data)
|
||||
reinterpret_cast<uintptr_t>(header) + desc->offset), desc->size};
|
||||
if (HIP_DUMP_CODE_OBJECT)
|
||||
__hipDumpCodeObject(image);
|
||||
module->executable = hip_impl::get_program_state().load_executable(image.data(), image.size(),
|
||||
module->executable,
|
||||
agent);
|
||||
module->executable = hip_impl::get_program_state().load_executable_no_copy(
|
||||
reinterpret_cast<const char*>(header) + desc->offset, desc->size,
|
||||
module->executable, agent);
|
||||
|
||||
if (module->executable.handle) {
|
||||
modules->at(deviceId) = module;
|
||||
|
||||
새 이슈에서 참조
사용자 차단