Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
56715137
Commit
56715137
authored
Apr 23, 2019
by
Shucai Xiao
Browse files
save the test example.
parent
246dc9fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
test/gpu/adjust_allocation.cpp
test/gpu/adjust_allocation.cpp
+4
-3
No files found.
test/gpu/adjust_allocation.cpp
View file @
56715137
...
...
@@ -29,13 +29,14 @@ struct lowering_target
migraphx
::
gpu
::
context
get_context
()
const
{
return
migraphx
::
gpu
::
context
{};
}
};
TEST_CASE
(
t
r
an
s_tanh
)
TEST_CASE
(
tan
h_shape
)
{
auto
create_program
=
[]
{
migraphx
::
program
p
;
migraphx
::
shape
s
{
migraphx
::
shape
::
float_type
,
{
2
,
3
}};
auto
x
=
p
.
add_parameter
(
"x"
,
s
);
auto
txh
=
p
.
add_instruction
(
migraphx
::
op
::
tanh
{},
x
);
auto
tx
=
p
.
add_instruction
(
migraphx
::
op
::
transpose
{{
1
,
0
}},
x
);
auto
txh
=
p
.
add_instruction
(
migraphx
::
op
::
tanh
{},
tx
);
p
.
add_instruction
(
migraphx
::
op
::
add
{},
txh
,
txh
);
return
p
;
...
...
@@ -54,7 +55,7 @@ TEST_CASE(trans_tanh)
{
if
(
ins
->
name
()
==
"hip::allocate"
)
{
migraphx
::
shape
wrong_s
{
migraphx
::
shape
::
float_type
,
{
4
,
3
}};
migraphx
::
shape
wrong_s
{
migraphx
::
shape
::
float_type
,
{
2
,
2
}};
ins
->
replace
(
wrong_s
);
}
}
...
...
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