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.
Этот коммит содержится в:
@@ -68,7 +68,14 @@ namespace hip_impl {
|
||||
const size_t data_size,
|
||||
hsa_executable_t executable,
|
||||
hsa_agent_t agent) {
|
||||
return impl->load_executable(data, data_size, executable, agent);
|
||||
return impl->load_executable(data, data_size, true, executable, agent);
|
||||
}
|
||||
|
||||
hsa_executable_t program_state::load_executable_no_copy(const char* data,
|
||||
const size_t data_size,
|
||||
hsa_executable_t executable,
|
||||
hsa_agent_t agent) {
|
||||
return impl->load_executable(data, data_size, false, executable, agent);
|
||||
}
|
||||
|
||||
hipFunction_t program_state::kernel_descriptor(std::uintptr_t function_address,
|
||||
|
||||
Ссылка в новой задаче
Block a user