Fix hash_for undefined reference in hipTestConstant test
Issue: mismatch undefined symbols in different user env - Binary expects modified return value std::string& - Fails to match libhip_hcc.so: return value is std::string& but doesn't match modified C++ env Fix: Change return value to char*, create new key std::string in header from char*
Tento commit je obsažen v:
@@ -2518,7 +2518,7 @@ struct Agent_global {
|
||||
|
||||
namespace hip_impl {
|
||||
hsa_executable_t executable_for(hipModule_t);
|
||||
const std::string& hash_for(hipModule_t);
|
||||
const char* hash_for(hipModule_t);
|
||||
|
||||
template<typename ForwardIterator>
|
||||
std::pair<hipDeviceptr_t, std::size_t> read_global_description(
|
||||
@@ -2543,7 +2543,8 @@ hipError_t read_agent_global_from_module(hipDeviceptr_t* dptr, size_t* bytes,
|
||||
// hipModule_t instance
|
||||
static std::unordered_map<
|
||||
std::string, std::vector<Agent_global>> agent_globals;
|
||||
auto key = hash_for(hmod);
|
||||
const char* hash = hash_for(hmod);
|
||||
std::string key(hash);
|
||||
|
||||
if (agent_globals.count(key) == 0) {
|
||||
static std::mutex mtx;
|
||||
|
||||
@@ -287,8 +287,8 @@ namespace hip_impl {
|
||||
return hmod->executable;
|
||||
}
|
||||
|
||||
const std::string& hash_for(hipModule_t hmod) {
|
||||
return hmod->hash;
|
||||
const char* hash_for(hipModule_t hmod) {
|
||||
return hmod->hash.c_str();
|
||||
}
|
||||
|
||||
hsa_agent_t this_agent() {
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele