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
b5e49114
Commit
b5e49114
authored
Aug 05, 2022
by
Ted Themistokleous
Browse files
fixup! Add test case to parse in empty constant int64 proto buffer
parent
497262b4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
2 deletions
+2
-2
test/onnx/constant_scalar_test2.onnx
test/onnx/constant_scalar_test2.onnx
+0
-0
test/onnx/gen_onnx.py
test/onnx/gen_onnx.py
+1
-1
test/onnx/onnx_test.cpp
test/onnx/onnx_test.cpp
+1
-1
No files found.
test/onnx/constant_scalar_test2.onnx
View file @
b5e49114
No preview for this file type
test/onnx/gen_onnx.py
View file @
b5e49114
...
@@ -630,7 +630,7 @@ def constant_scalar_test():
...
@@ -630,7 +630,7 @@ def constant_scalar_test():
@
onnx_test
@
onnx_test
def
constant_scalar_test2
():
def
constant_scalar_test2
():
x
=
np
.
array
([]).
astype
(
np
.
int64
)
x
=
np
.
array
([]).
astype
(
np
.
int64
)
y
=
helper
.
make_tensor_value_info
(
'0'
,
TensorProto
.
INT64
,
[
1
])
y
=
helper
.
make_tensor_value_info
(
'0'
,
TensorProto
.
INT64
,
[
0
])
node
=
onnx
.
helper
.
make_node
(
node
=
onnx
.
helper
.
make_node
(
'Constant'
,
'Constant'
,
...
...
test/onnx/onnx_test.cpp
View file @
b5e49114
...
@@ -640,7 +640,7 @@ TEST_CASE(constant_scalar_test2)
...
@@ -640,7 +640,7 @@ TEST_CASE(constant_scalar_test2)
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
*
mm
=
p
.
get_main_module
();
mm
->
add_literal
(
migraphx
::
literal
{
migraphx
::
shape
{
migraphx
::
shape
::
int64_type
,
{
1
}},
{
0
}});
mm
->
add_literal
(
migraphx
::
literal
{
migraphx
::
shape
{
migraphx
::
shape
::
int64_type
,
{}},
{
0
}});
auto
prog
=
optimize_onnx
(
"constant_scalar_test2.onnx"
);
auto
prog
=
optimize_onnx
(
"constant_scalar_test2.onnx"
);
EXPECT
(
p
==
prog
);
EXPECT
(
p
==
prog
);
...
...
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