This is primarily intended as an additional cleanup of the module functionality, in the aftermath of adopting module based dispatch. The main effort was associated with refactoring the questionable ihipModuleGetSymbol. It was quaintly written and misleading, in that it had little to do with getting symbols, and was exactly retrieving a kernel object. Error handling is modified so as to reduce branching depth. Functions which serve as interfaces to the HSA RT are moved in a separate helper header. Code object readers are properly deleted. Some leftover dead functionality pertaining to associating namespace scope variables with their allocated memory is removed. Executable loading is changed to use a string which holds the ELF image of the code object being loaded, thus avoiding some corner cases where using a istream would fail.
Cette révision appartient à :
@@ -80,5 +80,7 @@ namespace hip_impl
|
||||
std::unordered_map<std::string, RAII_global>& globals();
|
||||
|
||||
hsa_executable_t load_executable(
|
||||
hsa_executable_t executable, hsa_agent_t agent, std::istream& file);
|
||||
const std::string& file,
|
||||
hsa_executable_t executable,
|
||||
hsa_agent_t agent);
|
||||
} // Namespace hip_impl.
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur