mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-06 00:03:22 +00:00
fix OrtValue Release condition (#1182)
CUDAFence::CanRelease should also check wirte_event_
This commit is contained in:
parent
204bd38d6a
commit
2bfbcd323a
1 changed files with 2 additions and 1 deletions
|
|
@ -43,7 +43,8 @@ void CUDAFence::BeforeUsingAsOutput(onnxruntime::ProviderType provider_type, int
|
|||
}
|
||||
|
||||
bool CUDAFence::CanRelease() {
|
||||
return cudaEventQuery(read_event_) == cudaSuccess;
|
||||
return cudaEventQuery(read_event_) == cudaSuccess &&
|
||||
cudaEventQuery(write_event_) == cudaSuccess;
|
||||
}
|
||||
|
||||
void CUDAFence::AfterUsedAsInput(int queue_id) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue