Fix Agent_global variables failing hipTestDeviceSymbol
Issue: Header uses std::vector<Agent_global> agent_globals which is created by hip_module.cpp - Move iterator fails to copy Agent_global from library source into header version - Due to different versions of std::string name in struct Agent_global Fix: Change Agent_global to use char* name instead of std::string name
Cette révision appartient à :
@@ -2506,7 +2506,7 @@ hipError_t hipModuleGetFunction(hipFunction_t* function, hipModule_t module, con
|
||||
hipError_t hipFuncGetAttributes(hipFuncAttributes* attr, const void* func);
|
||||
|
||||
struct Agent_global {
|
||||
std::string name;
|
||||
char* name;
|
||||
hipDeviceptr_t address;
|
||||
uint32_t byte_cnt;
|
||||
};
|
||||
@@ -2524,7 +2524,7 @@ template<typename ForwardIterator>
|
||||
std::pair<hipDeviceptr_t, std::size_t> read_global_description(
|
||||
ForwardIterator f, ForwardIterator l, const char* name) {
|
||||
const auto it = std::find_if(f, l, [=](const Agent_global& x) {
|
||||
return x.name == name;
|
||||
return strcmp(x.name, name) == 0;
|
||||
});
|
||||
|
||||
return it == l ?
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur