mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-29 23:06:41 +00:00
Merged PR 6512710: Code clean up in DmlOperatorPadding
Addressed comments on the [PR:6511109](https://microsoft.visualstudio.com/DefaultCollection/WindowsAI/_git/onnxruntime/pullrequest/6511109)
This commit is contained in:
parent
8bcd076f3d
commit
39c2d76c4e
1 changed files with 2 additions and 2 deletions
|
|
@ -73,14 +73,14 @@ public:
|
|||
// Same applies to paddingValue.
|
||||
paddingDesc.PaddingValueDataType = this->m_inputTensorDescs[0].GetDmlDataType();
|
||||
CastToScalarUnion<float>(paddingDesc.PaddingValueDataType, 0.0f, /*out*/&paddingDesc.PaddingValue);
|
||||
|
||||
|
||||
// Read the constant value which can come from an attribute or tensor.
|
||||
if (opsetVersion >= 11)
|
||||
{
|
||||
if (kernelInfo.IsInputValid(2))
|
||||
{
|
||||
MLOperatorTensor constantPaddingValueTensor = kernelInfo.GetConstantInputTensor(2);
|
||||
ReadScalarTensorData(kernelInfo.GetConstantInputTensor(2), /*out*/ &paddingDesc.PaddingValue.Bytes, sizeof(paddingDesc.PaddingValue.Bytes));
|
||||
ReadScalarTensorData(constantPaddingValueTensor, /*out*/ &paddingDesc.PaddingValue.Bytes, sizeof(paddingDesc.PaddingValue.Bytes));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue