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
03e15057
Commit
03e15057
authored
Sep 26, 2018
by
Paul
Browse files
Format tests
parent
528449d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
test/memory_coloring_test.cpp
test/memory_coloring_test.cpp
+5
-7
No files found.
test/memory_coloring_test.cpp
View file @
03e15057
...
...
@@ -68,11 +68,11 @@ void test2()
migraph
::
program
p
;
auto
input
=
p
.
add_parameter
(
"input"
,
migraph
::
shape
{
migraph
::
shape
::
float_type
,
{
16
}});
auto
a0
=
p
.
add_outline
(
migraph
::
shape
{
migraph
::
shape
::
float_type
,
{
128
}});
auto
a1
=
p
.
add_instruction
(
allocate
{},
a0
);
auto
p1
=
p
.
add_instruction
(
pass_memory
{},
input
,
a1
);
auto
a2
=
p
.
add_outline
(
migraph
::
shape
{
migraph
::
shape
::
float_type
,
{
40
}});
auto
p2
=
p
.
add_instruction
(
allocate
{},
a2
);
auto
a0
=
p
.
add_outline
(
migraph
::
shape
{
migraph
::
shape
::
float_type
,
{
128
}});
auto
a1
=
p
.
add_instruction
(
allocate
{},
a0
);
auto
p1
=
p
.
add_instruction
(
pass_memory
{},
input
,
a1
);
auto
a2
=
p
.
add_outline
(
migraph
::
shape
{
migraph
::
shape
::
float_type
,
{
40
}});
auto
p2
=
p
.
add_instruction
(
allocate
{},
a2
);
p
.
add_instruction
(
pass_memory
{},
p1
,
p2
);
p
.
compile
(
memory_coloring_target
{});
EXPECT
(
p
.
get_parameter_shape
(
"scratch"
).
bytes
()
==
672
);
...
...
@@ -96,7 +96,6 @@ void test3()
EXPECT
(
p
.
get_parameter_shape
(
"scratch"
).
bytes
()
==
704
);
}
// Like the previous test, but this tests a zero workspace memory allocation
void
test4
()
{
...
...
@@ -113,7 +112,6 @@ void test4()
EXPECT
(
p
.
get_parameter_shape
(
"scratch"
).
bytes
()
==
672
);
}
int
main
()
{
test1
();
...
...
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