mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-07 00:13:17 +00:00
move variable declaration to avoid unused variable error (#5603)
Co-authored-by: Juliana <jufranc@microsoft.com>
This commit is contained in:
parent
0dbf3e8893
commit
27c6d1eeb2
1 changed files with 1 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue