Generate a debug handle for the given ExportedProgram.
(ep: ExportedProgram)
| 220 | call_delegate_args.append(call_sm_input) |
| 221 | |
| 222 | def generate_debug_handle(ep: ExportedProgram) -> int: |
| 223 | """ |
| 224 | Generate a debug handle for the given ExportedProgram. |
| 225 | """ |
| 226 | debug_handle = 0 |
| 227 | for node in ep.graph_module.graph.nodes: |
| 228 | debug_handle = max(debug_handle, node.meta.get("debug_handle", 0)) |
| 229 | return debug_handle + 1 |
| 230 | |
| 231 | # Replace the partitioned submodule with a lowered submodule |
| 232 | # Add call_method node with function "forward" |
no test coverage detected