From 13d47efdc77f60879fbf21b78294e358af2b622c Mon Sep 17 00:00:00 2001 From: ROCm CI Service Account <66695075+rocm-ci@users.noreply.github.com> Date: Tue, 24 Jan 2023 04:28:47 +0530 Subject: [PATCH] SWDEV-364604 - Add hipEventDisableReleaseToSystem (#3132) Add the above flag to be used with hipEventCreateWithFlags API Change-Id: I4dcd259e579546178865879f69b78410f5ad1b57 [ROCm/hip commit: d8f39ab8d23a3528be5a945187ebf6aff6580780] --- projects/hip/include/hip/hip_runtime_api.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/projects/hip/include/hip/hip_runtime_api.h b/projects/hip/include/hip/hip_runtime_api.h index e8f82ed937..8a466e75d7 100644 --- a/projects/hip/include/hip/hip_runtime_api.h +++ b/projects/hip/include/hip/hip_runtime_api.h @@ -585,6 +585,10 @@ enum hipLimit_t { /** Event can support IPC. hipEventDisableTiming also must be set.*/ #define hipEventInterprocess 0x4 +/** Disable any system scope releases for events. May improve performance. + * The flag is a no-op on CUDA platforms.*/ +#define hipEventDisableReleaseToSystem 0x20000000 + /** Use a device-scope release when recording this event. This flag is useful to obtain more * precise timings of commands between events. The flag is a no-op on CUDA platforms.*/ #define hipEventReleaseToDevice 0x40000000 @@ -2416,6 +2420,9 @@ hipError_t hipStreamWriteValue64(hipStream_t stream, void* ptr, uint64_t value, would not record profiling data and provide best performance if used for synchronization. * #hipEventInterprocess : The event can be used as an interprocess event. hipEventDisableTiming flag also must be set when hipEventInterprocess flag is set. + * #hipEventDisableReleaseToSystem : Disable releasing any cached memory to system scope. This may + improve performance but device memory may not be visible to the host and other devices + if this flag is set. * * @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorInvalidValue, #hipErrorLaunchFailure, #hipErrorOutOfMemory