MCPcopy Create free account
hub / github.com/pytorch/executorch / generate_debug_handle

Function generate_debug_handle

exir/backend/backend_api.py:222–229  ·  view source on GitHub ↗

Generate a debug handle for the given ExportedProgram.

(ep: ExportedProgram)

Source from the content-addressed store, hash-verified

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"

Callers 1

Calls 1

getMethod · 0.45

Tested by

no test coverage detected