In hipFree, synchronize owner of memory (#1018)

* In hipFree, if memory is associated with a device, synchronize that device's streams.

This changes the behavior from synchronizing the currently set TLS device.

* All devices sync in hipFree for _appId=-1 case.

* Revert "All devices sync in hipFree for _appId=-1 case."

This reverts commit 1efb34d6a8426661e45bc5f763422a1147aeac10.

* add HIP_SYNC_FREE env var
Ta zmiana jest zawarta w:
Jeff Daily authored and Maneesh Gupta committed 2019-04-16 08:35:55 +05:30
1 rodzic dc07b1b06c
złożenie 2b3037a6ea
3 plików zmienionych
+28 -4

Żadne pliki nie pasują do Twojego wyszukiwania

+3
Wyświetl plik
@@ -92,6 +92,7 @@ int HIP_EVENT_SYS_RELEASE = 0;
int HIP_HOST_COHERENT = 1;
int HIP_SYNC_HOST_ALLOC = 1;
int HIP_SYNC_FREE = 0;
int HIP_INIT_ALLOC = -1;
@@ -1279,6 +1280,8 @@ void HipReadEnv() {
READ_ENV_I(release, HIP_SYNC_STREAM_WAIT, 0, "hipStreamWaitEvent will synchronize to host");
READ_ENV_I(release, HIP_SYNC_FREE, 0,
"Force all calls to hipFree to sync all devices and all streams");
READ_ENV_I(release, HIP_HOST_COHERENT, 0,
"If set, all host memory will be allocated as fine-grained system memory. This "