fix builds enabling onnxruntime_DEBUG_NODE_INPUTS_OUTPUTS (#2369)

* fix builds enabling onnxruntime_DEBUG_NODE_INPUTS_OUTPUTS

* update
This commit is contained in:
George Wu 2019-11-11 15:26:18 -08:00 committed by GitHub
parent 53ed36a3da
commit 0c6e9f94d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 0 deletions

View file

@ -106,6 +106,7 @@ The complete list of build options can be found by running `./build.sh (or .\bui
**Options**
* [OpenMP](#OpenMP)
* [OpenBLAS](#OpenBLAS)
* [DebugNodeInputsOutputs](#DebugNodeInputsOutputs)
**Architectures**
* [x86](#x86)
@ -424,6 +425,30 @@ The DirectML execution provider supports building for both x64 and x86 architect
---
### DebugNodeInputsOutputs
OnnxRuntime supports build options for enabling debugging of intermediate tensor shapes and data.
#### Build Instructions
##### Set onnxruntime_DEBUG_NODE_INPUTS_OUTPUTS=1
Dump tensor input/output shapes for all nodes to stdout.
```
# Linux
./build.sh --cmake_extra_defines onnxruntime_DEBUG_NODE_INPUTS_OUTPUTS=1
# Windows
.\build.bat --cmake_extra_defines onnxruntime_DEBUG_NODE_INPUTS_OUTPUTS=1
```
##### Set onnxruntime_DEBUG_NODE_INPUTS_OUTPUTS=2
Dump tensor input/output shapes and output data for all nodes to stdout.
```
# Linux
./build.sh --cmake_extra_defines onnxruntime_DEBUG_NODE_INPUTS_OUTPUTS=2
# Windows
.\build.bat --cmake_extra_defines onnxruntime_DEBUG_NODE_INPUTS_OUTPUTS=2
```
##### Set onnxruntime_DEBUG_NODE_INPUTS_OUTPUTS=0
To disable this functionality after previously enabling, set onnxruntime_DEBUG_NODE_INPUTS_OUTPUTS=0 or delete CMakeCache.txt.
---
## Architectures
### x86
#### Build Intsructions

View file

@ -646,6 +646,8 @@ void DumpNodeOutputs(OpKernelContext& context, const Node& node, const SessionSt
std::cout << " failed to transfer data to cpu.\n";
}
}
#else
ORT_UNUSED_PARAMETER(session_state);
#endif
}
}