Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
d042eb98
Commit
d042eb98
authored
Sep 07, 2023
by
umang yadav
Browse files
Add doc string steps
parent
7d10ba33
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
src/partitioner.cpp
src/partitioner.cpp
+16
-5
No files found.
src/partitioner.cpp
View file @
d042eb98
...
...
@@ -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 reshape
r
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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment