SWDEV-292021 - Fix Device Reset
- Device Reset should not purge the allocations that were not by the user - Addresses QMCPack Test abort due to the removal of all the mem objects during reset Change-Id: I7b7a123e72bcc985d7e51d17c2382bc618d3e041
Cette révision appartient à :
révisé par
Maneesh Gupta
Parent
8c5c2befeb
révision
924695fb5e
@@ -333,9 +333,11 @@ void MemObjMap::Purge(amd::Device* dev) {
|
||||
assert(dev != nullptr);
|
||||
|
||||
amd::ScopedLock lock(AllocatedLock_);
|
||||
for (auto it = MemObjMap_.cbegin() ; it != MemObjMap_.cend() ;) {
|
||||
const std::vector<Device*>& devices = it->second->getContext().devices();
|
||||
if (devices.size() == 1 && devices[0] == dev) {
|
||||
for (auto it = MemObjMap_.cbegin(); it != MemObjMap_.cend(); ) {
|
||||
amd::Memory* memObj = it->second;
|
||||
unsigned int flags = memObj->getMemFlags();
|
||||
const std::vector<Device*>& devices = memObj->getContext().devices();
|
||||
if (devices.size() == 1 && devices[0] == dev && !(flags & ROCCLR_MEM_INTERNAL_MEMORY)) {
|
||||
it = MemObjMap_.erase(it);
|
||||
} else {
|
||||
++it;
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur