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


[ROCm/clr commit: 9b33db9b24]
This commit is contained in:
Ioannis Assiouras
2024-07-11 22:50:41 +01:00
parent f518648183
commit 19d16561a4
4 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -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;