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
cdbe643c
"...git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "5e54c770b41bbdb7b228fe511b364f3f2aa96a88"
Commit
cdbe643c
authored
Nov 29, 2018
by
Khalique
Browse files
formatting
parent
cb8d9359
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
test/cpu_ops_test.cpp
test/cpu_ops_test.cpp
+6
-6
test/onnx/onnx_test.cpp
test/onnx/onnx_test.cpp
+3
-3
No files found.
test/cpu_ops_test.cpp
View file @
cdbe643c
...
...
@@ -1170,9 +1170,9 @@ TEST_CASE(max_test)
{
migraphx
::
program
p
;
migraphx
::
shape
s
{
migraphx
::
shape
::
float_type
,
{
3
}};
auto
l0
=
p
.
add_literal
(
migraphx
::
literal
{
s
,
{
1
,
4
,
3
}});
auto
l1
=
p
.
add_literal
(
migraphx
::
literal
{
s
,
{
2
,
8
,
6
}});
auto
l2
=
p
.
add_literal
(
migraphx
::
literal
{
s
,
{
7
,
5
,
9
}});
auto
l0
=
p
.
add_literal
(
migraphx
::
literal
{
s
,
{
1
,
4
,
3
}});
auto
l1
=
p
.
add_literal
(
migraphx
::
literal
{
s
,
{
2
,
8
,
6
}});
auto
l2
=
p
.
add_literal
(
migraphx
::
literal
{
s
,
{
7
,
5
,
9
}});
auto
curr_max
=
p
.
add_instruction
(
migraphx
::
op
::
max
{},
l0
,
l1
);
p
.
add_instruction
(
migraphx
::
op
::
max
{},
curr_max
,
l2
);
p
.
compile
(
migraphx
::
cpu
::
target
{});
...
...
@@ -1187,9 +1187,9 @@ TEST_CASE(min_test)
{
migraphx
::
program
p
;
migraphx
::
shape
s
{
migraphx
::
shape
::
float_type
,
{
3
}};
auto
l0
=
p
.
add_literal
(
migraphx
::
literal
{
s
,
{
1
,
4
,
3
}});
auto
l1
=
p
.
add_literal
(
migraphx
::
literal
{
s
,
{
2
,
8
,
6
}});
auto
l2
=
p
.
add_literal
(
migraphx
::
literal
{
s
,
{
7
,
5
,
9
}});
auto
l0
=
p
.
add_literal
(
migraphx
::
literal
{
s
,
{
1
,
4
,
3
}});
auto
l1
=
p
.
add_literal
(
migraphx
::
literal
{
s
,
{
2
,
8
,
6
}});
auto
l2
=
p
.
add_literal
(
migraphx
::
literal
{
s
,
{
7
,
5
,
9
}});
auto
curr_min
=
p
.
add_instruction
(
migraphx
::
op
::
min
{},
l0
,
l1
);
p
.
add_instruction
(
migraphx
::
op
::
min
{},
curr_min
,
l2
);
p
.
compile
(
migraphx
::
cpu
::
target
{});
...
...
test/onnx/onnx_test.cpp
View file @
cdbe643c
...
...
@@ -175,7 +175,7 @@ void sum_test()
auto
input0
=
p
.
add_parameter
(
"0"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
3
}});
auto
input1
=
p
.
add_parameter
(
"1"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
3
}});
auto
input2
=
p
.
add_parameter
(
"2"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
3
}});
auto
l0
=
p
.
add_instruction
(
migraphx
::
op
::
add
{},
input0
,
input1
);
auto
l0
=
p
.
add_instruction
(
migraphx
::
op
::
add
{},
input0
,
input1
);
p
.
add_instruction
(
migraphx
::
op
::
add
{},
l0
,
input2
);
auto
prog
=
migraphx
::
parse_onnx
(
"sum_test.onnx"
);
...
...
@@ -189,7 +189,7 @@ void max_test()
auto
input0
=
p
.
add_parameter
(
"0"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
3
}});
auto
input1
=
p
.
add_parameter
(
"1"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
3
}});
auto
input2
=
p
.
add_parameter
(
"2"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
3
}});
auto
l0
=
p
.
add_instruction
(
migraphx
::
op
::
max
{},
input0
,
input1
);
auto
l0
=
p
.
add_instruction
(
migraphx
::
op
::
max
{},
input0
,
input1
);
p
.
add_instruction
(
migraphx
::
op
::
max
{},
l0
,
input2
);
auto
prog
=
migraphx
::
parse_onnx
(
"max_test.onnx"
);
...
...
@@ -203,7 +203,7 @@ void min_test()
auto
input0
=
p
.
add_parameter
(
"0"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
3
}});
auto
input1
=
p
.
add_parameter
(
"1"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
3
}});
auto
input2
=
p
.
add_parameter
(
"2"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
3
}});
auto
l0
=
p
.
add_instruction
(
migraphx
::
op
::
min
{},
input0
,
input1
);
auto
l0
=
p
.
add_instruction
(
migraphx
::
op
::
min
{},
input0
,
input1
);
p
.
add_instruction
(
migraphx
::
op
::
min
{},
l0
,
input2
);
auto
prog
=
migraphx
::
parse_onnx
(
"min_test.onnx"
);
...
...
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