SWDEV-487905 - device_ptr_ is being removed and its amd:Memory obj is being deleted during ihipFree in hip::StatCO::removeFatBinary.

Change-Id: I89d9fdeb53dc4ce0699f1f445a28486917a36e72


[ROCm/clr commit: 164cbcc531]
This commit is contained in:
Jaydeep Patel
2024-10-03 17:21:58 +00:00
committato da Jaydeepkumar Patel
parent 491d3828dd
commit 3130b4639f
+3 -5
Vedi File
@@ -89,11 +89,9 @@ DeviceVar::DeviceVar(std::string name,
}
DeviceVar::~DeviceVar() {
if (amd_mem_obj_ != nullptr) {
amd::MemObjMap::RemoveMemObj(device_ptr_);
amd_mem_obj_->release();
}
// device_ptr_ is being removed and its amd:Memory obj is being released/deleted during
// ihipFree in hip::StatCO::removeFatBinary.
assert(amd::MemObjMap::FindMemObj(device_ptr_) == nullptr);
if (shadowVptr != nullptr) {
textureReference* texRef = reinterpret_cast<textureReference*>(shadowVptr);
hipError_t err = ihipUnbindTexture(texRef);