From 27c6d1eeb245cb79f18d9d6e36e7f4aaba06eea0 Mon Sep 17 00:00:00 2001 From: Juliana Franco Date: Wed, 28 Oct 2020 16:23:58 +0000 Subject: [PATCH] move variable declaration to avoid unused variable error (#5603) Co-authored-by: Juliana --- onnxruntime/core/framework/debug_node_inputs_outputs_utils.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/core/framework/debug_node_inputs_outputs_utils.cc b/onnxruntime/core/framework/debug_node_inputs_outputs_utils.cc index b6bd29005d..8437bcf36e 100644 --- a/onnxruntime/core/framework/debug_node_inputs_outputs_utils.cc +++ b/onnxruntime/core/framework/debug_node_inputs_outputs_utils.cc @@ -139,7 +139,6 @@ void DumpTensor( const SessionState& session_state) { // check tensor is on CPU before dumping it auto& tensor_location = tensor.Location(); - const auto data_type = tensor.DataType(); if (tensor_location.device.Type() == OrtDevice::CPU || tensor_location.mem_type == OrtMemTypeCPUInput || tensor_location.mem_type == OrtMemTypeCPUOutput) { @@ -148,6 +147,7 @@ void DumpTensor( std::cout << tensor_location << "\n"; #ifdef USE_CUDA + const auto data_type = tensor.DataType(); // Dumping GPU only when cuda is enabled. if (tensor_location.device.Type() == OrtDevice::GPU) { const auto& execution_providers = session_state.GetExecutionProviders();