With global flag, In addition to global vector, we need to check
thread local vector too. If both of them are empty then only
return false.
Change-Id: I3a24d16a35c702b34b9a8867dc410ebd80108f25
Avoid syncing blocking streams with the default stream,
since that introduces extra command dependencies and
doesn't allow to destroy memory after last submission
Change-Id: I618e9bd2091c4cf9157125612d8c4759030c5a80
- invalid to synchronize or query the execution status of a capturing stream but non-capturing streams can.
- If any local thread has an ongoing or concurrent capture sequence initiated with hipStreamCaptureModeGlobal, it is prohibited from unsafe calls
Change-Id: Ifa641e807216d3b7c3e8c2fb1be2f7a50bd641df
- cuda shows a different behaviour and different error need more
investigation
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I68771102ba4dff6157bca34a4135cb245f023d08
This reverts commit f39655c0c8.
Reason for revert: patch does not fix all stream hangs. So another patch was merged which fixes all issues.
Change-Id: I332d1ea29c23747b46b7667fe3e34e0ceefd2b23
- if the stream is null ptr and there is capture ongoing return an error
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: Iff33e4aebc253fb7bb56daf5c455722d726c6705
- stream capture should be done before any sync APIs.
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I3d65f67ee68777be71f97f48d460ccaefdd4e1af
- null stream should return error on host function
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I17659ad7af0814091dbf6cb4a2cb2644514551f0
Skip destruction of the null queue for MT. Windows can destroy worker
thread on exit during the stream destruction, causing a race condition.
Change-Id: I3e4bc3ab2b477d38c0aec1fc59e6f1af0f8f6b0f
Parallel streams can be destroyed during capture. Make sure runtime
removes the destoryed streams from the list of parallel captured streams
Change-Id: I46b6cbb951e8711f0bf02f2826c3b890b2541ffe
Remove extra barrier, since ROCR backend in DD mode blocks HW queue now when a callback is injected
Add a notificaiton for MT mode about possible waiter for a callback
Change-Id: Ifd70ce5597e1ba868e4197ad1850ace11a4f90ae
- Aggregate all TLS(Thread Local Storage) variables into a single class
- This is to improve cache accesses per thread
Change-Id: Ic8361eaeae290fff00254684e309471958365eb9
Remove the api_callbacks_table_t that was holding the API activities and
user callbacks. Instead use a single roctracer callback (TracerCallback)
used to report both API activities and callbacks.
Remove the hipInitActivityCallback that was setting the ROCtracer
callback and memory pool for asynchronous activities as it did not
allow disctinct pools to be used for each activity. Instead, use
hipRegisterTracerCallback to set the single roctracer callback.
Change-Id: I4c10f04f29a6e4cce8caf15db3016c3f72c86b04
Add lock protection for access to the pool list.
Remove destroyed stream from the list of the safe streams
Change-Id: I1863b89bd3f5e188c161227cc790c3adaf72cc58
Honor hipEventReleaseToDevice and hipEventReleaseToSystem flags.
hipEventRecord would flush caches if no release flags are provided. To
change this behavior set ROC_EVENT_NO_FLUSH=1
Change-Id: I03e41b515b1d0cf963b0c2d5b9901b09e71a0e59
HIP_MEM_POOL_SUPPORT controls memory pool support in runtime.
Currently it's disabled by default. The initial change doesn't
include: IPC, MGPU, virtual memory alloc, suballoc, defragmentation,
internal dependencies.
Change-Id: Ibed8528ebec698b045ebb247e49c0ecd6e587ed7
Queue creation and release fails during hipFree causing seg fault
if the null queue was not created until then and there is no
device memory left.
Change-Id: I118b86b58e777dac5415bc9ba0c4e23c986efa7d
HIP_RETURN(x) is not a value, it is a statement ending with a return,
this commit replaces all instances of "return HIP_RETURN(x)" with simply
"HIP_RETURN(x)"
Change-Id: I03293b2684a65367ff55e02b3a71ea49ec7a517a