diff --git a/onnxruntime/core/providers/dml/OperatorAuthorHelper/OperatorHelper.h b/onnxruntime/core/providers/dml/OperatorAuthorHelper/OperatorHelper.h index aeec2deeec..c944c1b59b 100644 --- a/onnxruntime/core/providers/dml/OperatorAuthorHelper/OperatorHelper.h +++ b/onnxruntime/core/providers/dml/OperatorAuthorHelper/OperatorHelper.h @@ -437,6 +437,7 @@ public: template GemmHelper(const Info_t& info, const Shape_t& shape) { + ORT_UNUSED_PARAMETER(shape); m_transA = info.GetOptionalAttribute(AttrName::TransA, 0); m_transB = info.GetOptionalAttribute(AttrName::TransB, 0); m_broadcast = info.GetOptionalAttribute(AttrName::Broadcast, 0); @@ -528,7 +529,7 @@ public: ends.push_back(gsl::narrow_cast(endsData[i])); } uint32_t inputCount = operatorInfo.GetInputCount(); - if (operatorInfo.GetInputCount() > 3) + if (inputCount > 3) { MLOperatorTensor axesTensor = operatorInfo.GetConstantInputTensor(3); const std::vector& axesTensorDimensions = axesTensor.GetShape(); @@ -540,7 +541,7 @@ public: } } - if (operatorInfo.GetInputCount() > 4) + if (inputCount > 4) { MLOperatorTensor stepsTensor = operatorInfo.GetConstantInputTensor(4); const std::vector& stepsTensorDimensions = stepsTensor.GetShape(); diff --git a/winml/test/common/protobufHelpers.cpp b/winml/test/common/protobufHelpers.cpp index 0f3c22fb1c..dbd440b9ab 100644 --- a/winml/test/common/protobufHelpers.cpp +++ b/winml/test/common/protobufHelpers.cpp @@ -323,9 +323,9 @@ winrt::Windows::AI::MachineLearning::LearningModel ProtobufHelpers::CreateModel( DataWriter m_dataWriter; }; - auto size = model.ByteSize(); + auto size = model.ByteSizeLong(); auto raw_array = std::unique_ptr(new char[size]); - model.SerializeToArray(raw_array.get(), size); + model.SerializeToArray(raw_array.get(), static_cast(size)); BufferStreamAdapter buffer; std::ostream os(&buffer);