SWDEV-276396 - Implement hipDeviceReset

Add a hip::Stream::destroyAllStreams static function to destroy all streams
Also call MemObjMap::Purge

Change-Id: I6ee7e3f26ab1f1870a9271c65e99fb818134482b


[ROCm/clr commit: bea4fa8700]
Этот коммит содержится в:
Christophe Paquot authored and Saleel Kudchadker committed 2021-06-15 13:13:09 -04:00
1 родитель 1b23aa0d88
Коммит 96f580a267
3 files changed
+21 -1

No files matched your search

+3 -1
Просмотреть файл
@@ -429,7 +429,9 @@ hipError_t hipDeviceGetSharedMemConfig ( hipSharedMemConfig * pConfig ) {
hipError_t hipDeviceReset ( void ) {
HIP_INIT_API(hipDeviceReset);
/* FIXME */
hip::Device* dev = hip::getCurrentDevice();
hip::Stream::destroyAllStreams(dev->deviceId());
amd::MemObjMap::Purge(dev->devices()[0]);
HIP_RETURN(hipSuccess);
}