llvm-project
llvm-project copied to clipboard
[ASan][Compiler-rt] Support Gracefull hsa-runtime shutdown. (#559)
Summary:
- Track runtime shutdown via AmdgpuMemFuncs::IsAmdgpuRuntimeShutdown() and gate further hsa_amd_pointer_info calls.
- Add interception of 'hsa_init' api call.
- Add registration of hsa-runtime associated system events via 'hsa_amd_register_system_event_handler'.
- HSA event registered is 'HSA_AMD_SYSTEM_SHUTDOWN_EVENT'