SWDEV-276396 - Implement hipDeviceReset
Add a hip::Stream::destroyAllStreams static function to destroy all streams Also call MemObjMap::Purge Change-Id: I6ee7e3f26ab1f1870a9271c65e99fb818134482b
Этот коммит содержится в:
коммит произвёл
Saleel Kudchadker
родитель
2223a508f5
Коммит
bea4fa8700
@@ -156,6 +156,21 @@ void Stream::syncNonBlockingStreams() {
|
||||
}
|
||||
}
|
||||
|
||||
void Stream::destroyAllStreams(int deviceId) {
|
||||
std::vector<Stream*> toBeDeleted;
|
||||
{
|
||||
amd::ScopedLock lock(streamSetLock);
|
||||
for (auto& it : streamSet) {
|
||||
if (it->Null() == false && it->DeviceId() == deviceId) {
|
||||
toBeDeleted.push_back(it);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (auto& it : toBeDeleted) {
|
||||
delete it;
|
||||
}
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
bool isValid(hipStream_t stream) {
|
||||
// NULL stream is always valid
|
||||
|
||||
Ссылка в новой задаче
Block a user