Context management related changes in HIP.

-
-Contexts across threads are listed under device
-Device reset cleans up all contexts and re-initializes _primaryCtx

Change-Id: Ie1cfbb26d43a8dc6869be3e6ebaf7344ce374643
This commit is contained in:
Rahul Garg
2017-02-27 15:17:11 +05:30
parent 4a6166cd86
commit bddd6b73c0
4 changed files with 128 additions and 9 deletions
+6 -1
View File
@@ -166,11 +166,16 @@ hipError_t hipDeviceReset(void)
// This function currently does a user-level cleanup of known resources.
// It could benefit from KFD support to perform a more "nuclear" clean that would include any associated kernel resources and page table entries.
#if 0
if (ctx) {
// Release ctx resources (streams and memory):
ctx->locked_reset();
}
#endif
if (ctx) {
ihipDevice_t *deviceHandle = ctx->getWriteableDevice();
deviceHandle->locked_reset();
}
return ihipLogStatus(hipSuccess);
}