Commit d042eb98 authored by umang yadav's avatar umang yadav
Browse files

Add doc string steps

parent 7d10ba33
......@@ -223,17 +223,28 @@ Given target assignments (tass) for the instructions, generate run_on_target mod
automatically. Input graph should be uncompiled migraphx program. target assignments (tass) map
should have a map of instruction to target_id. Instructions that are not inside tass map are
considered to be targeted for the "Ref" by default. params, literals and other builtins shouldn't be
part of the tass, only compute and reshape instructions should be part of tass. Copy, sync and alloc
instructions would be generated by compiler at later stage, so those shouldn't be considered.
part of the tass, only compute and reshaper instructions should be part of tass. Copy, sync and
alloc instructions would be generated by compiler at later stage, so those shouldn't be considered.
(TODO): CustomOps may require special handling.
Identify subgraph boundaries, Ref is used for instructions that do not have assignments
Step 1:
Identify subgraph boundaries
Ref is used for instructions that do not have assignments.
Boundaries can happen in following cases.
1. Ref --> Target X --> Ref
2. Ref --> Target X --> Target 2
2. Ref --> Target X --> Target Y
3. Target X --> Target Y --> Target Z , in this case target X and target Z can be same
4. Target X --> "@return"
5. Target X --> Ref --> "@return"
Each of those identified regions could have futher nested sub modules which needs to be handled
separately.
Step 2:
Collect parameters and return instructions for the subgraphs identified in Step 1.
Step 3:
Create modules using information collected in step 2 and insert run_on_target instructions.
*/
void partition(migraphx::module_ref mm,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment