HIP program state re-initialization logic

This commit is to support kernels dynamically loaded thru means such as
dlopen() after HIP runtime initializes.


[ROCm/clr commit: 319f007bf1]
This commit is contained in:
Wen-Heng (Jack) Chung
2018-05-18 10:14:46 -05:00
parent 4746b1872b
commit 4e0f0b3e89
3 changed files with 124 additions and 32 deletions
@@ -93,11 +93,12 @@ public:
}
};
const std::unordered_map<hsa_agent_t, std::vector<hsa_executable_t>>& executables();
const std::unordered_map<hsa_agent_t, std::vector<hsa_executable_t>>& executables(
bool rebuild = false);
const std::unordered_map<std::uintptr_t, std::vector<std::pair<hsa_agent_t, Kernel_descriptor>>>&
functions();
const std::unordered_map<std::uintptr_t, std::string>& function_names();
std::unordered_map<std::string, void*>& globals();
functions(bool rebuild = false);
const std::unordered_map<std::uintptr_t, std::string>& function_names(bool rebuild = false);
std::unordered_map<std::string, void*>& globals(bool rebuild = false);
hsa_executable_t load_executable(const std::string& file, hsa_executable_t executable,
hsa_agent_t agent);