SWDEV-505930 - Avoid static initialization of ModuleGuard (#604)
This is to prevent calling catch2 macros from outside catch2 TEST_CASE that can lead to undefined bahavior. This change also disables hipGetProcAddress tests that are not supported on static build. Co-authored-by: Ioannis Assiouras <Ioannis.Assiouras@amd.com>
This commit is contained in:
committed by
GitHub
parent
ec5e9673ad
commit
605be4bebc
@@ -33,6 +33,11 @@ ModuleGuard ModuleGuard::LoadModule(const char* fname) {
|
||||
return ModuleGuard{module};
|
||||
}
|
||||
|
||||
ModuleGuard ModuleGuard::InitModule(const char* fname) {
|
||||
HIP_CHECK(hipFree(nullptr));
|
||||
return LoadModule(fname);
|
||||
}
|
||||
|
||||
ModuleGuard ModuleGuard::LoadModuleDataFile(const char* fname) {
|
||||
const auto loaded_module = LoadModuleIntoBuffer(fname);
|
||||
hipModule_t module = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user