SWDEV-423317 - Enable GPU wait for hip sync calls

hipStreamSynchronize and hipDeviceSynchronize won't longer wait
for CPU commands in DD mode

Change-Id: I079c8bbfc34ddc6d3e2d74c92a34665877e512a5


[ROCm/clr commit: fbea58ba11]
Cette révision appartient à :
German Andryeyev
2023-09-21 15:47:56 -04:00
Parent f62807d411
révision 2d492a201b
5 fichiers modifiés avec 13 ajouts et 10 suppressions
+3 -2
Voir le fichier
@@ -509,7 +509,7 @@ hipError_t hipDeviceSetLimit ( hipLimit_t limit, size_t value ) {
hipError_t hipDeviceSetSharedMemConfig ( hipSharedMemConfig config ) {
HIP_INIT_API(hipDeviceSetSharedMemConfig, config);
if (config != hipSharedMemBankSizeDefault &&
config != hipSharedMemBankSizeFourByte &&
config != hipSharedMemBankSizeFourByte &&
config != hipSharedMemBankSizeEightByte) {
HIP_RETURN(hipErrorInvalidValue);
}
@@ -520,7 +520,8 @@ hipError_t hipDeviceSetSharedMemConfig ( hipSharedMemConfig config ) {
hipError_t hipDeviceSynchronize() {
HIP_INIT_API(hipDeviceSynchronize);
hip::Stream::SyncAllStreams(hip::getCurrentDevice()->deviceId());
constexpr bool kDontWaitForCpu = false;
hip::Stream::SyncAllStreams(hip::getCurrentDevice()->deviceId(), kDontWaitForCpu);
HIP_RETURN(hipSuccess);
}