@@ -972,36 +972,39 @@ def to_edge_transform_and_lower(
972972 exported programs in ATen dialect. It differs fundamentally from to_edge in that it
973973 combines the conversion of the ATen dialect to the edge dialect program, then running
974974 the transformation passes and then subsequently lowering the programs to their
975- corresponding backends all in a single pass.
975+ corresponding backends all into a single API.
976+
976977 This is fundamentally useful for lowering to backends that have ops registered that they
977978 do not want to be decomposed and thus rely on matching with these non-decomposed ops. For
978979 these sorts of backends this is the *only* API that should be used to lower to the edge
979980 dialect. Using a combination of to_edge(...) and to_backend(...) will result in inconsistent
980981 or wrong behavior.
981982
983+ This API is the primary recommended way to lower to the CPU based XNNPack backend.
984+
982985 Args:
983986 programs: Can be a single ExportedProgram or a dictionary mapping function names
984- to their corresponding ExportedPrograms. If only a single ExportedProgram is
985- provided it will be assigned the name "forward".
987+ to their corresponding ExportedPrograms. If only a single ExportedProgram is
988+ provided it will be assigned the name "forward".
986989
987990 transform_passes: The passes can either be a list of passes, or a dictionary
988- mapping method names to lists of passes. If it is just a list of passes, all methods
989- in the given EdgeProgramManager will be transformed with the provided passes. If it
990- is a dictionary, only method names specified in the dictionary will be transformed
991- with their corresponding passes.
991+ mapping method names to lists of passes. If it is just a list of passes, all methods
992+ in the given EdgeProgramManager will be transformed with the provided passes. If it
993+ is a dictionary, only method names specified in the dictionary will be transformed
994+ with their corresponding passes.
992995
993996 partitioner: The partitioner can either be a Partitioner subclass instance, or a
994- dictionary mapping method names to Partitioner subclass instance. If it is a
995- Partitioner subclass, all programs in the given EdgeProgramManager will be lowered
996- using the given partitioner. If it is a dictionary, only method names specified in
997- the dictionary will be lowered with the given partitioner.
997+ dictionary mapping method names to Partitioner subclass instance. If it is a
998+ Partitioner subclass, all programs in the given EdgeProgramManager will be lowered
999+ using the given partitioner. If it is a dictionary, only method names specified in
1000+ the dictionary will be lowered with the given partitioner.
9981001
9991002 constant_methods: An optional dictionary of method name to the constant value
1000- returned by that method in eager mode. Often used to store config information on
1001- Edge models.
1003+ returned by that method in eager mode. Often used to store config information on
1004+ Edge models.
10021005
10031006 compile_config: An optional argument used to provide greater control over the
1004- transformation to edge dialect process.
1007+ transformation to edge dialect process.
10051008
10061009 Returns:
10071010 EdgeProgramManager
0 commit comments