From a8b3563e29eb44519657da10ee229f58b143484f Mon Sep 17 00:00:00 2001 From: "Li, Todd tiantuo" Date: Tue, 1 Jul 2025 03:55:58 -0700 Subject: [PATCH] SWDEV-541096 - add hipEventWaitDefault and hipEventWaitExternal --- include/hip/hip_runtime_api.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/include/hip/hip_runtime_api.h b/include/hip/hip_runtime_api.h index 5d8db05a1d..aa52c54e3f 100644 --- a/include/hip/hip_runtime_api.h +++ b/include/hip/hip_runtime_api.h @@ -752,6 +752,13 @@ enum hipLimit_t { /** Event is captured in the graph as an external event node when performing stream capture. */ #define hipEventRecordExternal 0x01 +//Flags that can be used with hipStreamWaitEvent. +/** Default flag. */ +#define hipEventWaitDefault 0x00 + +/** Wait is captured in the graph as an external event node when performing stream capture. */ +#define hipEventWaitExternal 0x01 + /** Disable performing a system scope sequentially consistent memory fence when the event * transitions from recording to recorded. This can be used for events that are only being * used to measure timing, and do not require the event inspection operations @@ -2803,14 +2810,20 @@ hipError_t hipStreamSynchronize(hipStream_t stream); * * @param[in] stream Stream to make wait * @param[in] event Event to wait on - * @param[in] flags Parameters to control the operation [must be 0] + * @param[in] flags Parameters to control the operation * - * @returns #hipSuccess, #hipErrorInvalidHandle + * @returns #hipSuccess, #hipErrorInvalidHandle, #hipErrorInvalidValue, + * #hipErrorStreamCaptureIsolation * * This function inserts a wait operation into the specified stream. * All future work submitted to @p stream will wait until @p event reports completion before * beginning execution. * + * Flags include: + * hipEventWaitDefault: Default event creation flag. + * hipEventWaitExternal: Wait is captured in the graph as an external event node when + * performing stream capture + * * This function only waits for commands in the current stream to complete. Notably, this function * does not implicitly wait for commands in the default stream to complete, even if the specified * stream is created with hipStreamNonBlocking = 0.