mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-23 19:32:23 +00:00
Merged PR 4596882: Fix assert in ReadbackFromGpu
`ExecutionProviderImpl::CopyTensors` calls `ReadbackFromGpu`, and depending on the mix of source/destination tensors (CPU/CPU, CPU/GPU, GPU/CPU, GPU/GPU), there can be anywhere from 0 to multiple tensors to copy. Copying 0 tensors is not an assertable failure and should just be a nop (tests work fine in release build). This assert reproes locally when running Pad tests (and some other operator tests too).
This commit is contained in:
parent
7c0b05eca0
commit
dd86e3be10
1 changed files with 7 additions and 1 deletions
|
|
@ -104,7 +104,13 @@ namespace Dml
|
|||
gsl::span<ID3D12Resource*> src,
|
||||
D3D12_RESOURCE_STATES srcState)
|
||||
{
|
||||
assert(!dst.empty());
|
||||
assert(dst.size() == src.size());
|
||||
assert(dstSizes.size() == src.size());
|
||||
|
||||
if (dst.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
uint32_t totalSize = 0;
|
||||
for (auto size : dstSizes)
|
||||
|
|
|
|||
Loading…
Reference in a new issue