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
19e87ea1
Commit
19e87ea1
authored
May 03, 2019
by
Shucai Xiao
Browse files
fixed a test example corresponding to a change in eliminate_contiguous.
parent
c2b7f349
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
test/gpu/adjust_allocation.cpp
test/gpu/adjust_allocation.cpp
+4
-2
No files found.
test/gpu/adjust_allocation.cpp
View file @
19e87ea1
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#include <migraphx/iterator_for.hpp>
#include <migraphx/iterator_for.hpp>
#include <migraphx/op/add.hpp>
#include <migraphx/op/add.hpp>
#include <migraphx/op/transpose.hpp>
#include <migraphx/op/transpose.hpp>
#include <migraphx/op/contiguous.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/pass_manager.hpp>
#include <migraphx/pass_manager.hpp>
#include <migraphx/op/tanh.hpp>
#include <migraphx/op/tanh.hpp>
...
@@ -37,7 +38,8 @@ TEST_CASE(tanh_shape)
...
@@ -37,7 +38,8 @@ TEST_CASE(tanh_shape)
auto
x
=
p
.
add_parameter
(
"x"
,
s
);
auto
x
=
p
.
add_parameter
(
"x"
,
s
);
auto
tx
=
p
.
add_instruction
(
migraphx
::
op
::
transpose
{{
1
,
0
}},
x
);
auto
tx
=
p
.
add_instruction
(
migraphx
::
op
::
transpose
{{
1
,
0
}},
x
);
auto
txh
=
p
.
add_instruction
(
migraphx
::
op
::
tanh
{},
tx
);
auto
txh
=
p
.
add_instruction
(
migraphx
::
op
::
tanh
{},
tx
);
p
.
add_instruction
(
migraphx
::
op
::
add
{},
txh
,
txh
);
auto
sum
=
p
.
add_instruction
(
migraphx
::
op
::
add
{},
txh
,
txh
);
p
.
add_instruction
(
migraphx
::
op
::
contiguous
{},
sum
);
return
p
;
return
p
;
};
};
...
@@ -61,7 +63,7 @@ TEST_CASE(tanh_shape)
...
@@ -61,7 +63,7 @@ TEST_CASE(tanh_shape)
}
}
EXPECT
(
p1
!=
p2
);
EXPECT
(
p1
!=
p2
);
migraphx
::
run_passes
(
p
1
,
migraphx
::
run_passes
(
p
2
,
{
migraphx
::
gpu
::
adjust_allocation
{},
migraphx
::
dead_code_elimination
{}});
{
migraphx
::
gpu
::
adjust_allocation
{},
migraphx
::
dead_code_elimination
{}});
EXPECT
(
p1
==
p2
);
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