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.

此提交包含在:
Alex Voicu committed 2017-12-03 23:09:06 +00:00
1 父節點 954b7dadf7
當前提交 e186bd9533
5 file changed
+340 -461

No files matched your search

+3 -1
查看文件
@@ -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.