mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-04 23:59:56 +00:00
Merged PR 4593169: Handle empty tensors in DML EP batched tensor copy
This fixes the test_slice_start_out_of_bounds ONNX test Related work items: #24837735
This commit is contained in:
parent
ab2b85649e
commit
7c0b05eca0
1 changed files with 8 additions and 0 deletions
|
|
@ -571,6 +571,14 @@ namespace Dml
|
|||
provider,
|
||||
true);
|
||||
|
||||
const size_t dataSizeInBytes = ComputeByteSizeFromTensor(dstWrapper);
|
||||
THROW_HR_IF(E_INVALIDARG, dataSizeInBytes != ComputeByteSizeFromTensor(srcWrapper)); // Tensors must be the same size
|
||||
|
||||
if (dataSizeInBytes == 0)
|
||||
{
|
||||
return onnxruntime::common::Status::OK();
|
||||
}
|
||||
|
||||
dataSizesInBytes.push_back(static_cast<uint32_t>(ComputeByteSizeFromTensor(dstWrapper)));
|
||||
THROW_HR_IF(E_INVALIDARG, dataSizesInBytes[i] != ComputeByteSizeFromTensor(srcWrapper)); // Tensors must be the same size
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue