aclrtRecordEvent Call Failure Due to Too Many Events
Symptom
When the aclrtRecordEvent API is called to record an event in a stream, the following error is displayed in the log, indicating that the event ID allocation fails.
Possible Cause
The possible cause is that no more event ID resource is available.
Solution
For synchronous wait of tasks between streams, the event ID resources can be reused as follows: After the aclrtRecordEvent and aclrtStreamWaitEvent APIs are called, if the specified event is complete, the aclrtResetEvent API needs to be called in time to release the event resource no longer needed.
You need to optimize the code logic based on the event ID reuse process.