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
93bcb779
Commit
93bcb779
authored
Jul 19, 2023
by
umangyadav
Browse files
add docstring for the get_target_assignments
parent
dc7397bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
src/program.cpp
src/program.cpp
+7
-0
test/multi_target/multitarget_test.cpp
test/multi_target/multitarget_test.cpp
+0
-1
No files found.
src/program.cpp
View file @
93bcb779
...
@@ -172,6 +172,13 @@ instruction_ref program::validate() const
...
@@ -172,6 +172,13 @@ instruction_ref program::validate() const
return
mm
->
validate
();
return
mm
->
validate
();
}
}
/*
Assigns each instruction inside program to a target.
It does it by first finding subgraphs supported on a given target based on assignment options.
It is possible that instructions have multiple target assignments and part of multiple subgraphs.
Current logic is simple and assigns entire subgraph containing supported instruction to a particular
target on first seen basis and doesn't find the "best" target assignment.
*/
target_assignments
program
::
get_target_assignments
(
const
std
::
vector
<
target
>&
targets
,
target_assignments
program
::
get_target_assignments
(
const
std
::
vector
<
target
>&
targets
,
assignment_options
options
)
assignment_options
options
)
{
{
...
...
test/multi_target/multitarget_test.cpp
View file @
93bcb779
...
@@ -438,7 +438,6 @@ TEST_CASE(multitarget_compile_nested_if_then_else)
...
@@ -438,7 +438,6 @@ TEST_CASE(multitarget_compile_nested_if_then_else)
migraphx
::
make_target
(
"ref"
),
migraphx
::
make_target
(
"ref"
),
migraphx
::
make_target
(
"ref"
)}));
migraphx
::
make_target
(
"ref"
)}));
// do evaluation using different conditions
// do evaluation using different conditions
// TODO: make two conditional to cover all the paths
migraphx
::
parameter_map
params
;
migraphx
::
parameter_map
params
;
float
x_i
=
2.0
;
float
x_i
=
2.0
;
float
y_i
=
3.0
;
float
y_i
=
3.0
;
...
...
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