diff --git a/onnxruntime/core/providers/dml/DmlExecutionProvider/src/DmlRuntimeFusedGraphKernel.cpp b/onnxruntime/core/providers/dml/DmlExecutionProvider/src/DmlRuntimeFusedGraphKernel.cpp index 2f110ba339beb..1b4034f10eaa3 100644 --- a/onnxruntime/core/providers/dml/DmlExecutionProvider/src/DmlRuntimeFusedGraphKernel.cpp +++ b/onnxruntime/core/providers/dml/DmlExecutionProvider/src/DmlRuntimeFusedGraphKernel.cpp @@ -170,11 +170,11 @@ namespace Dml const uint32_t fusedNodeInputCount = gsl::narrow_cast(m_indexedSubGraph->GetMetaDef()->inputs.size()); std::vector initInputBindings(fusedNodeInputCount); std::vector isInputsUploadedByDmlEP(fusedNodeInputCount); - auto providerImpl = static_cast(Info().GetExecutionProvider())->GetImpl(); + const ExecutionProviderImpl* cProviderImpl = static_cast(Info().GetExecutionProvider())->GetImpl(); // Convert partitionONNXGraph into DML EP GraphDesc ComPtr device; - ORT_THROW_IF_FAILED(providerImpl->GetDmlDevice(device.GetAddressOf())); + ORT_THROW_IF_FAILED(cProviderImpl->GetDmlDevice(device.GetAddressOf())); // This map will be used to transfer the initializer to D3D12 system heap memory. // 'serializedDmlGraphDesc' will have constant input as intermediate edges, that's why // we need a mapping between intermediateEdgeIndex and indexedSubGraph's (a given partition) @@ -192,7 +192,7 @@ namespace Dml isInputsUploadedByDmlEP.size(), m_isInitializerTransferable, m_partitionNodePropsMap, - providerImpl, + cProviderImpl, m_modelPath, m_subgraphNodePointers, m_subgraphInputs, @@ -220,7 +220,7 @@ namespace Dml m_compiledExecutionPlanOperator = DmlGraphFusionHelper::TryCreateCompiledOperator( graphDesc, *m_indexedSubGraph, - providerImpl, + cProviderImpl, &serializedGraphInputIndexToSubgraphInputIndex, &serializedGraphLargeConstantNameToSubgraphInputIndex); diff --git a/onnxruntime/core/providers/dml/DmlExecutionProvider/src/ExecutionProvider.cpp b/onnxruntime/core/providers/dml/DmlExecutionProvider/src/ExecutionProvider.cpp index fb0275deceed6..043853ccae336 100644 --- a/onnxruntime/core/providers/dml/DmlExecutionProvider/src/ExecutionProvider.cpp +++ b/onnxruntime/core/providers/dml/DmlExecutionProvider/src/ExecutionProvider.cpp @@ -991,7 +991,6 @@ namespace Dml srcDatas.push_back(srcAllocInfo->GetResource()); } - const uint64_t srcOffset = 0; const auto srcState = D3D12_RESOURCE_STATE_UNORDERED_ACCESS; // GPU resources are always kept in UAV state // Performs a blocking call to synchronize and read back data from the GPU into the destination buffer diff --git a/winml/adapter/winml_adapter_model.cpp b/winml/adapter/winml_adapter_model.cpp index ce224c1f6939e..195bf6e5f0ffd 100644 --- a/winml/adapter/winml_adapter_model.cpp +++ b/winml/adapter/winml_adapter_model.cpp @@ -1029,7 +1029,7 @@ ORT_API_STATUS_IMPL( } // add identity ops to rename all of the first model outputs to secondmodel inputs with prefix for each linkage - for (int i = 0; i < num_linkages; i++) { + for (size_t i = 0; i < num_linkages; i++) { auto op_output_name = second_model_prefix + *(input_names + i); const char* const op_output_name_const_str = op_output_name.c_str(); std::string name = "IdentityTo";