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
07c05efb
Commit
07c05efb
authored
Sep 27, 2022
by
charlie
Browse files
Check dynamic() on shape when using dyn_output
parent
da5b6fef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
src/include/migraphx/operation.hpp
src/include/migraphx/operation.hpp
+3
-1
tools/include/operation.hpp
tools/include/operation.hpp
+3
-1
No files found.
src/include/migraphx/operation.hpp
View file @
07c05efb
...
@@ -116,7 +116,9 @@ struct compute_output_shape
...
@@ -116,7 +116,9 @@ struct compute_output_shape
operator
dyn_output
()
const
operator
dyn_output
()
const
{
{
return
ins_inputs
([](
const
auto
&
x
,
shape
ins_shape
,
const
std
::
vector
<
argument
>&
inputs
)
{
return
ins_inputs
([](
const
auto
&
x
,
shape
ins_shape
,
const
std
::
vector
<
argument
>&
inputs
)
{
return
dyn_output
{
ins_shape
,
compute_shape
(
x
,
to_shapes
(
inputs
))};
if
(
ins_shape
.
dynamic
())
return
dyn_output
{
ins_shape
,
compute_shape
(
x
,
to_shapes
(
inputs
))};
return
dyn_output
{
ins_shape
,
ins_shape
};
});
});
}
}
...
...
tools/include/operation.hpp
View file @
07c05efb
...
@@ -116,7 +116,9 @@ struct compute_output_shape
...
@@ -116,7 +116,9 @@ struct compute_output_shape
operator
dyn_output
()
const
operator
dyn_output
()
const
{
{
return
ins_inputs
([](
const
auto
&
x
,
shape
ins_shape
,
const
std
::
vector
<
argument
>&
inputs
)
{
return
ins_inputs
([](
const
auto
&
x
,
shape
ins_shape
,
const
std
::
vector
<
argument
>&
inputs
)
{
return
dyn_output
{
ins_shape
,
compute_shape
(
x
,
to_shapes
(
inputs
))};
if
(
ins_shape
.
dynamic
())
return
dyn_output
{
ins_shape
,
compute_shape
(
x
,
to_shapes
(
inputs
))};
return
dyn_output
{
ins_shape
,
ins_shape
};
});
});
}
}
...
...
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