Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[CPU][DEBUG_CAPS][AGENTS] Improve debug caps readme (#35242)

Egor Duplenskiie9832597d8ee
diff --git a/.claude/skills/debug/components/debug-intel-cpu-plugin.md b/.claude/skills/debug/components/debug-intel-cpu-plugin.md
index 07646312dc9..89a458c7894 100644
--- a/.claude/skills/debug/components/debug-intel-cpu-plugin.md
+++ b/.claude/skills/debug/components/debug-intel-cpu-plugin.md
@@ -1,8 +1,10 @@
-The debug and troubleshooting can be performed using various debug capabilities activated via environment variables (see below).
+The debug and troubleshooting can be performed using various debug capabilities activated via environment variables.
# Reference
-Read `src/plugins/intel_cpu/docs/debug_capabilities/README.md` for the full list of debug environment variables.
+Read `src/plugins/intel_cpu/docs/debug_capabilities/README.md` — use the "When to use" guidance to match the observed problem to the right capability.
# Steps
-1. Read the debug capabilities doc to find relevant variables
-2. Find and use the ones which fit for the current debug scenario
+1. Read the debug capabilities README
+2. Match the observed symptom to the relevant "When to use" entries
+3. Read the linked detail doc for the chosen capability when one is provided
+4. Use suitable environment variables
diff --git a/src/plugins/intel_cpu/docs/debug_capabilities/README.md b/src/plugins/intel_cpu/docs/debug_capabilities/README.md
index e052b6cdff6..7a9fa07bfd4 100644
--- a/src/plugins/intel_cpu/docs/debug_capabilities/README.md
+++ b/src/plugins/intel_cpu/docs/debug_capabilities/README.md
@@ -7,27 +7,46 @@ Use the following cmake option to enable debug capabilities:
`-DENABLE_DEBUG_CAPS=ON`
-* [Verbose mode](verbose.md)
- `OV_CPU_VERBOSE=1`
-* [Blob dumping](blob_dumping.md)
- `OV_CPU_BLOB_DUMP_NODE_NAME="*" OV_CPU_BLOB_DUMP_DIR=blob_dump`
-* [Graph serialization](graph_serialization.md)
- `OV_CPU_EXEC_GRAPH_PATH=graph.xml`
- `OV_CPU_DUMP_IR="transformations dir=path/dumpdir formats=svg,xml,dot"`
-* [Graph transformation disabling](feature_disabling.md#graph-transformations)
- `OV_CPU_DISABLE="transformations=common,preLpt,lpt,postLpt,snippets,specific"`
-* [Logging](logging.md)
- `OV_CPU_DEBUG_LOG=-`
-* [Inference Precision](infer_prc.md)
- `OV_CPU_INFER_PRC_POS_PATTERN="^FullyConnected@"`
-* Performance summary
- `OV_CPU_SUMMARY_PERF=1`
- Set the environment variable to display performance summary at the time when model is being destructed.
- Internal performance counter will be enabled automatically.
-* [Average counters](average_counters.md)
- `OV_CPU_AVERAGE_COUNTERS=filename`
-* Memory statistics
- `OV_CPU_MEMORY_STATISTICS_PATH=cout`
- Set this environment variable to dump memory usage statistics to the standard output when the compiled model is destructed.
- `OV_CPU_MEMORY_STATISTICS_PATH=<file_path>.csv`
- Set this environment variable to dump memory usage statistics to *.csv files. The `file_path` will be enhanced with the name of each compiled model: `file_path_<model_name>.csv`.
+* [Verbose mode](verbose.md)
+ When to use: need to understand execution flow — traces node execution with types, shapes, algorithms, and kernels.
+ Example: `OV_CPU_VERBOSE=1`
+
+* [Blob dumping](blob_dumping.md)
+ When to use: wrong results / accuracy issues — dump layer I/O tensors and compare against a reference.
+ Warning: raw blobs can have very big sizes
+ Example: `OV_CPU_BLOB_DUMP_NODE_NAME="*" OV_CPU_BLOB_DUMP_DIR=blob_dump`
+
+* [Execution graph serialization](exec_graph_serialization.md)
+ When to use: need to have full execution flow picture, i.e. complete graph structure, how nodes are related, who are the producers / consumers of a node.
+ Example: `OV_CPU_EXEC_GRAPH_PATH=graph.xml`
+
+* [IR serialization](ir_serialization.md)
+ When to use: unexpected graph structure — serialize IR at each transformation stage to see what changed.
+ Example: `OV_CPU_DUMP_IR="transformations dir=path/dumpdir formats=svg,xml,dot"`
+
+* [Graph transformation disabling](feature_disabling.md#graph-transformations)
+ When to use: crash or wrong results suspected in a transformation — disable groups to isolate the fault.
+ Example: `OV_CPU_DISABLE="transformations=common,preLpt,lpt,postLpt,snippets,specific"`
+
+* [Logging](logging.md)
+ When to use: need to debug a specific code path — enables `[ DEBUG ]` logs with source location, supports breakpoint traps. Logs can be filtered and used as breakpoints with `OV_CPU_DEBUG_LOG_BRK`.
+ Example: `OV_CPU_DEBUG_LOG=-`
+
+* [Inference Precision](infer_prc.md)
+ When to use: precision-related accuracy issues — override inference precision for specific nodes.
+ Example: `OV_CPU_INFER_PRC_POS_PATTERN="^FullyConnected@"`
+
+* [Average counters](average_counters.md)
+ When to use:
+ - performance analysis across multiple inferences — collects averaged execution counters.
+ - list of executed nodes, their types and primitive types
+ Example: `OV_CPU_AVERAGE_COUNTERS=filename`
+
+* Performance summary
+ When to use: slow inference — displays per-node timing summary when the model is destructed.
+ Example: `OV_CPU_SUMMARY_PERF=1`
+
+* Memory statistics
+ When to use:
+ - high memory usage or just memory profiling — dumps memory usage statistics per compiled model.
+ Example: `OV_CPU_MEMORY_STATISTICS_PATH=<file_path>.csv`
diff --git a/src/plugins/intel_cpu/docs/debug_capabilities/debug_caps_filters.md b/src/plugins/intel_cpu/docs/debug_capabilities/debug_caps_filters.md
index 834b0846a7b..388a7f47365 100644
--- a/src/plugins/intel_cpu/docs/debug_capabilities/debug_caps_filters.md
+++ b/src/plugins/intel_cpu/docs/debug_capabilities/debug_caps_filters.md
@@ -14,7 +14,7 @@ So filters below are equal:
## IR format filter
-IR format filter is used to specify output IR formats, e.g. for [serialization](graph_serialization.md#graph-transformations).
+IR format filter is used to specify output IR formats, e.g. for [serialization](ir_serialization.md).
```sh
formats=<comma_separated_tokens>
```
@@ -35,7 +35,7 @@ Generation is based on dot representation, so IR is additionally dumped to .svg.
## Transformation filter
Transformation filter is used to specify main graph transformation stages for different purposes,
-e.g. for [disabling](feature_disabling.md#graph-transformations) or [serialization](graph_serialization.md#graph-transformations).
+e.g. for [disabling](feature_disabling.md#graph-transformations) or [serialization](ir_serialization.md).
```sh
transformations=<comma_separated_tokens>
```
diff --git a/src/plugins/intel_cpu/docs/debug_capabilities/exec_graph_serialization.md b/src/plugins/intel_cpu/docs/debug_capabilities/exec_graph_serialization.md
new file mode 100644
index 00000000000..b597aab326d
--- /dev/null
+++ b/src/plugins/intel_cpu/docs/debug_capabilities/exec_graph_serialization.md
@@ -0,0 +1,13 @@
+# Execution graph serialization
+
+Execution graph serialization is disabled by default and controlled by environment variable **OV_CPU_EXEC_GRAPH_PATH**:
+```sh
+ OV_CPU_EXEC_GRAPH_PATH=<option> binary ...
+```
+Possible serialization options:
+* cout\
+Serialize to console output.
+* \<path\>_index.xml\
+Serialize graph into .xml and .bin files. Can be opened using, for example, *netron* app.
+* **TBD**: \<path\>.dot\
+Serialize graph into .dot file. Can be inspected using, for example, *graphviz* tools.
diff --git a/src/plugins/intel_cpu/docs/debug_capabilities/graph_serialization.md b/src/plugins/intel_cpu/docs/debug_capabilities/ir_serialization.md
similarity index 58%
rename from src/plugins/intel_cpu/docs/debug_capabilities/graph_serialization.md
rename to src/plugins/intel_cpu/docs/debug_capabilities/ir_serialization.md
index 601a25f3f1e..a9da2e74ead 100644
--- a/src/plugins/intel_cpu/docs/debug_capabilities/graph_serialization.md
+++ b/src/plugins/intel_cpu/docs/debug_capabilities/ir_serialization.md
@@ -1,24 +1,6 @@
-# Graph serialization
+# IR serialization
-Graph serialization is disabled by default and controlled by environment variables.
-
-## Execution graph
-
-Execution graph could be serialized using environment variable **OV_CPU_EXEC_GRAPH_PATH**:
-```sh
- OV_CPU_EXEC_GRAPH_PATH=<option> binary ...
-```
-Possible serialization options:
-* cout\
-Serialize to console output.
-* \<path\>_index.xml\
-Serialize graph into .xml and .bin files. Can be opened using, for example, *netron* app.
-* **TBD**: \<path\>.dot\
-Serialize graph into .dot file. Can be inspected using, for example, *graphviz* tools.
-
-## Graph transformations
-
-Additionally, IR could be serialized at specified stages using environment variable **OV_CPU_DUMP_IR**:
+IR could be serialized at specified stages using environment variable **OV_CPU_DUMP_IR**:
```sh
OV_CPU_DUMP_IR=<space_separated_options> binary ...
```