SWDEV-472309 - Ensure static maps are destroyed after __hipUnregisterFatBinary

hipDeviceSynchronize called from __hipUnregisterFatBinary
accesses static maps and monitors. This change ensures these ojects
are not destroyed before __hipUnregisterFatBinary  is called.
Additionally it disables the teardown process for static build.

Change-Id: I46b58641d60efcf6637a8e99cdd786ffe9e2c77d
Этот коммит содержится в:
Ioannis Assiouras committed 2024-07-30 10:26:59 -04:00
1 родитель 7298b80112
Коммит 9b33db9b24
4 files changed
+7 -5

No files matched your search

+1 -1
Просмотреть файл
@@ -28,7 +28,7 @@
namespace hip {
std::once_flag g_ihipInitialized;
std::vector<hip::Device*> g_devices;
std::vector<hip::Device*> g_devices ROCCLR_INIT_PRIORITY(101);
thread_local TlsAggregator tls;
amd::Context* host_context = nullptr;
+4 -2
Просмотреть файл
@@ -51,8 +51,10 @@ const char* GetGraphNodeTypeString(uint32_t op) {
}
namespace hip {
std::unordered_map<GraphExec*, std::pair<hip::Stream*, bool>> GraphExecStatus_;
amd::Monitor GraphExecStatusLock_{"Guards graph execution state"};
std::unordered_map<GraphExec *, std::pair<hip::Stream *, bool>>
GraphExecStatus_ ROCCLR_INIT_PRIORITY(101);
amd::Monitor GraphExecStatusLock_ ROCCLR_INIT_PRIORITY(101){
"Guards graph execution state"};
int GraphNode::nextID = 0;
int Graph::nextID = 0;