SWDEV-444670 - Enable teardown class

Force implicit runtime teardown with a global destructor.

Change-Id: Iabe63dedf5b94fefc98668585c45a61607120669
Este cometimento está contido em:
German Andryeyev cometeu 2024-04-16 12:00:06 -04:00
1 ascendente a1e0970d6d
cometimento c95a75a2bf
7 ficheiros modificados
+37 -14

Não existem ficheiros que correspondam à sua pesquisa

+3 -4
Ver ficheiro
@@ -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;