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]
This commit is contained in:
German Andryeyev committed 2023-09-22 13:04:27 -04:00
1 والد f62807d411
کامیت 2d492a201b
5 files changed
+13 -10

No files matched your search

@@ -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);
}