Adding pthread_join / pthread_detach to clean up pthreads to avoid leaks (#322)

Este commit está contenido en:
gilbertlee-amd
2021-02-26 16:29:55 -07:00
cometido por GitHub
padre 7191d0959b
commit f4a9b9acba
Se han modificado 2 ficheros con 7 adiciones y 2 borrados
+3 -1
Ver fichero
@@ -186,6 +186,9 @@ ncclResult_t ncclIbInit(ncclDebugLogger_t logFunction) {
ncclNIbDevs++;
nPorts++;
pthread_create(&ncclIbAsyncThread, NULL, ncclIbAsyncThreadMain, context);
// [RCCL]
pthread_detach(ncclIbAsyncThread);
// [/RCCL]
}
if (nPorts == 0 && ncclSuccess != wrap_ibv_close_device(context)) { return ncclInternalError; }
}
@@ -915,4 +918,3 @@ ncclNet_t ncclNetIb = {
ncclIbCloseRecv,
ncclIbCloseListen
};