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
4a880d96
Commit
4a880d96
authored
Nov 02, 2018
by
Paul
Browse files
Update last test
parent
d8597de7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
test/memory_coloring_test.cpp
test/memory_coloring_test.cpp
+7
-7
No files found.
test/memory_coloring_test.cpp
View file @
4a880d96
...
@@ -298,14 +298,14 @@ void test19()
...
@@ -298,14 +298,14 @@ void test19()
void
test20
()
void
test20
()
{
{
migraph
::
program
p
;
migraph
::
program
p
;
auto
a1
=
add_alloc
(
p
,
{
migraph
::
shape
::
float_type
,
{
8
}});
auto
a1
=
add_alloc
(
p
,
{
migraph
::
shape
::
float_type
,
{
32
}});
auto
p1
=
p
.
add_
instruction
(
pass_op
{},
a1
);
auto
a2
=
add_
alloc
(
p
,
{
migraph
::
shape
::
float_type
,
{
32
}}
);
auto
a
2
=
add_alloc
(
p
,
{
migraph
::
shape
::
float_type
,
{
40
}});
auto
a
3
=
add_alloc
(
p
,
{
migraph
::
shape
::
float_type
,
{
32
}});
auto
p
2
=
p
.
add_instruction
(
pass_op
{},
p
1
,
a2
);
auto
p
1
=
p
.
add_instruction
(
pass_op
{},
a
1
,
a2
,
a3
);
auto
a
3
=
add_alloc
(
p
,
{
migraph
::
shape
::
float_type
,
{
40
}});
auto
a
4
=
add_alloc
(
p
,
{
migraph
::
shape
::
float_type
,
{
32
}});
p
.
add_instruction
(
pass_op
{},
a
3
,
p2
,
p1
);
p
.
add_instruction
(
pass_op
{},
a
4
,
p1
);
p
.
compile
(
memory_coloring_target
{});
p
.
compile
(
memory_coloring_target
{});
EXPECT
(
p
.
get_parameter_shape
(
"scratch"
).
bytes
()
==
192
);
EXPECT
(
p
.
get_parameter_shape
(
"scratch"
).
bytes
()
==
384
);
EXPECT
(
no_allocate
(
p
));
EXPECT
(
no_allocate
(
p
));
}
}
...
...
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