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
246dc9fd
Commit
246dc9fd
authored
Apr 23, 2019
by
Shucai Xiao
Browse files
add one more test for the adjust allocation pass
parent
19ef6b6d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
test/gpu/adjust_allocation.cpp
test/gpu/adjust_allocation.cpp
+11
-14
No files found.
test/gpu/adjust_allocation.cpp
View file @
246dc9fd
...
...
@@ -20,8 +20,11 @@ struct lowering_target
std
::
vector
<
migraphx
::
pass
>
get_passes
(
migraphx
::
context
&
gctx
)
const
{
auto
&
ctx
=
migraphx
::
any_cast
<
migraphx
::
gpu
::
context
>
(
gctx
);
return
{
migraphx
::
auto_contiguous
{},
migraphx
::
gpu
::
lowering
{
ctx
},
migraphx
::
dead_code_elimination
{},
migraphx
::
eliminate_contiguous
{},
migraphx
::
dead_code_elimination
{}};
return
{
migraphx
::
auto_contiguous
{},
migraphx
::
gpu
::
lowering
{
ctx
},
migraphx
::
dead_code_elimination
{},
migraphx
::
eliminate_contiguous
{},
migraphx
::
dead_code_elimination
{}};
}
migraphx
::
gpu
::
context
get_context
()
const
{
return
migraphx
::
gpu
::
context
{};
}
};
...
...
@@ -42,9 +45,6 @@ TEST_CASE(trans_tanh)
auto
p2
=
create_program
();
EXPECT
(
p1
==
p2
);
std
::
cout
<<
"p1 = "
<<
p1
<<
std
::
endl
;
std
::
cout
<<
"p2 = "
<<
p2
<<
std
::
endl
;
p1
.
compile
(
lowering_target
{});
p2
.
compile
(
lowering_target
{});
...
...
@@ -60,9 +60,6 @@ TEST_CASE(trans_tanh)
}
EXPECT
(
p1
!=
p2
);
std
::
cout
<<
"p1 = "
<<
p1
<<
std
::
endl
;
std
::
cout
<<
"p2 = "
<<
p2
<<
std
::
endl
;
migraphx
::
run_passes
(
p1
,
{
migraphx
::
gpu
::
adjust_allocation
{},
migraphx
::
dead_code_elimination
{}});
EXPECT
(
p1
==
p2
);
...
...
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