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
a1ef8caf
Commit
a1ef8caf
authored
Aug 05, 2022
by
Ted Themistokleous
Browse files
Revert "Imply type of literal returned based on input protobuff for zero element constant values."
This reverts commit
390bb853
.
parent
390bb853
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
src/onnx/parse_constant.cpp
src/onnx/parse_constant.cpp
+1
-3
No files found.
src/onnx/parse_constant.cpp
View file @
a1ef8caf
...
@@ -39,13 +39,11 @@ struct parse_constant : op_parser<parse_constant>
...
@@ -39,13 +39,11 @@ struct parse_constant : op_parser<parse_constant>
onnx_parser
::
node_info
info
,
onnx_parser
::
node_info
info
,
const
std
::
vector
<
instruction_ref
>&
/*args*/
)
const
const
std
::
vector
<
instruction_ref
>&
/*args*/
)
const
{
{
literal
v
=
parser
.
parse_value
(
info
.
attributes
.
at
(
"value"
));
literal
v
=
parser
.
parse_value
(
info
.
attributes
.
at
(
"value"
));
// return empty literal
// return empty literal
if
(
v
.
get_shape
().
elements
()
==
0
)
if
(
v
.
get_shape
().
elements
()
==
0
)
{
{
auto
dim_param
=
info
.
attributes
.
at
(
"value"
).
t
().
dims
();
return
info
.
add_literal
(
literal
{});
return
info
.
add_literal
(
literal
{
dim_param
.
at
(
0
)});
}
}
auto
dim_size
=
info
.
attributes
.
at
(
"value"
).
t
().
dims_size
();
auto
dim_size
=
info
.
attributes
.
at
(
"value"
).
t
().
dims_size
();
...
...
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