mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-24 19:43:35 +00:00
Update TryConvertTensorToBroadcastScalar to exit early if constExpTen… (#18495)
Update TryConvertTensorToBroadcastScalar to fail gracefully if not CPU tensor ### Description Added early exit for in TryConvertTensorToBroadcastScalar if there is no CpuData to prevent failure caused by constExpTensor->GetByteData() throwing. ### Motivation and Context DmlPrototype branch was failing in QLinearConv when there was no CpuData --------- Co-authored-by: Christian Larson <28911437+chrilaMSFT@users.noreply.github.com>
This commit is contained in:
parent
5b936221ed
commit
e36cc6e27f
1 changed files with 5 additions and 1 deletions
|
|
@ -862,7 +862,11 @@ namespace Dml
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
else if (!IsCpuData())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
uint32_t totalKernelInputElementCount = constExpTensor->GetTotalElementCount();
|
||||
if (totalKernelInputElementCount <= 1)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue