Fix Signed Mismatch (#18258)

This PR fixes the the signed mismatch warning in
DmlRuntimeFusedGraphKernel. This warning is treated as an error on the
x86 versions of our internal builds preventing us from updating to
latest ORT.
This commit is contained in:
Numfor Tiapo 2023-11-03 10:16:37 -07:00 committed by GitHub
parent e207060ac9
commit 192caee81f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,7 +93,7 @@ namespace Dml
onnxruntime::Status Compute(onnxruntime::OpKernelContext* kernelContext) const override
{
ORT_THROW_HR_IF(E_UNEXPECTED, m_subgraphInputs.size() != kernelContext->InputCount());
ORT_THROW_HR_IF(E_UNEXPECTED, static_cast<ptrdiff_t>(m_subgraphInputs.size()) != kernelContext->InputCount());
bool recompileNeeded = m_compiledExecutionPlanOperator == nullptr;
@ -159,7 +159,7 @@ namespace Dml
if (iter != m_inferredInputShapes.end())
{
auto tensorShape = *nodeArg->Shape();
ORT_THROW_HR_IF(E_UNEXPECTED, tensorShape.dim_size() != iter->second.NumDimensions());
ORT_THROW_HR_IF(E_UNEXPECTED, tensorShape.dim_size() != static_cast<ptrdiff_t>(iter->second.NumDimensions()));
for (int i = 0; i < tensorShape.dim_size(); ++i)
{