You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: exir/backend/backend_details.py
+63-9
Original file line number
Diff line number
Diff line change
@@ -50,15 +50,6 @@ class BackendDetails(ABC):
50
50
the decorators, this interface will be static, abstract and all inheritances are
51
51
enforced to implement this method.
52
52
53
-
Args:
54
-
edge_program: The original exported program. It will not be modified in place.
55
-
compile_specs: List of values needed for compilation
56
-
57
-
Returns:
58
-
PreprocessResult: It wraps the following information:
59
-
processed_bytes -> bytes: A compiled blob - a binary that can run the desired program in the backend.
60
-
debug_handle_map (Optional[Dict[int, Tuple[int]]]): For profiling purposes, a map from the node_id in the final graph (either EXIR or the user's self-defined IR)
61
-
to debug handle id attached in the original exported program.
62
53
"""
63
54
64
55
@staticmethod
@@ -70,6 +61,69 @@ def preprocess(
70
61
edge_program: ExportedProgram,
71
62
compile_specs: List[CompileSpec],
72
63
) ->PreprocessResult:
64
+
"""
65
+
Preprocesses an edge program and returns the preprocess result fo the given backend
66
+
67
+
Args:
68
+
edge_program: The original exported program. It will not be modified in place.
69
+
compile_specs: List of values needed for compilation
70
+
71
+
Returns:
72
+
PreprocessResult: It wraps the following information:
73
+
processed_bytes -> bytes: A compiled blob - a binary that can run the desired
74
+
program in the backend.
75
+
debug_handle_map (Optional[Dict[int, Tuple[int]]]): For profiling purposes, a
76
+
map from the node_id in the final graph (either EXIR or the user's self-defined
77
+
IR) to debug handle id attached in the original exported program.
78
+
"""
73
79
# Users should return a compiled blob - a binary that can run the desired
0 commit comments