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
687cd084
"test/ut/sdk/test_builtin_tuners.py" did not exist on "e31839cc4a212311cac677dfebd4526ea343e9be"
Commit
687cd084
authored
Jul 08, 2022
by
Paul
Browse files
Update
parent
d362aa6e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
src/partition.cpp
src/partition.cpp
+12
-0
No files found.
src/partition.cpp
View file @
687cd084
#include <migraphx/partition.hpp>
#include <migraphx/program.hpp>
#include <migraphx/register_op.hpp>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
...
...
@@ -10,11 +11,22 @@ struct partition_op
std
::
string
name
()
const
{
return
"partition"
;
}
// TODO: Implement compute_shape and compute
};
MIGRAPHX_REGISTER_OP
(
partition_op
);
void
partition
(
program
&
p
,
module
&
root
,
const
std
::
unordered_map
<
instruction_ref
,
std
::
string
>&
assignments
)
{
// Group instructions based on label
// TODO: Recurse traverse submodule from root
for
(
auto
ins
:
iterator_for
(
root
))
{
// Rough idea of inserting submodules
std
::
string
label
;
auto
sm
=
p
.
create_module
(
label
);
root
.
add_instruction
(
partition_op
{
label
},
{},
{
sm
});
}
}
}
// namespace MIGRAPHX_INLINE_NS
...
...
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