SWDEV-444670 - Enable teardown class

Force implicit runtime teardown with a global destructor.

Change-Id: Iabe63dedf5b94fefc98668585c45a61607120669
Tá an tiomantas seo le fáil i:
German Andryeyev tiomanta 2024-04-16 12:00:06 -04:00
1 tuismitheoir a1e0970d6d
tiomantas c95a75a2bf
7 comhad athraithe
+37 -14

Níor tháinig aon chomhaid le do chuardach

+3 -4
Féach ar an gComhad
@@ -259,7 +259,7 @@ Device::~Device() {
p2p_stage_ = nullptr;
}
if (nullptr != mg_sync_) {
amd::SvmBuffer::free(GlbCtx(), mg_sync_);
GlbCtx().svmFree(mg_sync_);
mg_sync_ = nullptr;
}
if (glb_ctx_ != nullptr) {
@@ -619,9 +619,8 @@ bool Device::init() {
// Allocate mgpu sync buffer for cooperative launches
if (amd::IS_HIP) {
mg_sync_ = reinterpret_cast<address>(amd::SvmBuffer::malloc(
*glb_ctx_, (CL_MEM_SVM_FINE_GRAIN_BUFFER | CL_MEM_SVM_ATOMICS),
kMGInfoSizePerDevice * devices.size(), kMGInfoSizePerDevice));
mg_sync_ = reinterpret_cast<address>(glb_ctx_->svmAlloc(kMGInfoSizePerDevice * devices.size(),
kMGInfoSizePerDevice, (CL_MEM_SVM_FINE_GRAIN_BUFFER | CL_MEM_SVM_ATOMICS)));
if (mg_sync_ == nullptr) {
LogError("mgpu sync buffer alloc failed");
return false;