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
eca3cb69
"...targets/git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "10d8fa9c536af4b0bbc8147d9b36873d44a301db"
Commit
eca3cb69
authored
Sep 10, 2018
by
Paul
Browse files
Fix problem with no output
parent
3e6d18a4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
3 deletions
+20
-3
src/targets/gpu/fuse_ops.cpp
src/targets/gpu/fuse_ops.cpp
+4
-1
src/targets/gpu/lowering.cpp
src/targets/gpu/lowering.cpp
+1
-1
test/gpu/miopen.cpp
test/gpu/miopen.cpp
+15
-1
No files found.
src/targets/gpu/fuse_ops.cpp
View file @
eca3cb69
...
...
@@ -31,7 +31,10 @@ void fuse_ops::apply(program& p) const
auto
add_ins
=
ins
->
arguments
.
front
();
if
(
add_ins
->
op
.
name
()
!=
"gpu::add"
)
continue
;
p
.
replace_instruction
(
ins
,
hip_add_relu
{},
add_ins
->
arguments
);
auto
args
=
add_ins
->
arguments
;
// Use the allocation from the relu operator
args
.
back
()
=
ins
->
arguments
.
back
();
p
.
replace_instruction
(
ins
,
hip_add_relu
{},
args
);
}
}
...
...
src/targets/gpu/lowering.cpp
View file @
eca3cb69
...
...
@@ -355,7 +355,7 @@ struct miopen_apply
instruction_ref
insert_allocation
(
instruction_ref
ins
,
const
shape
&
s
,
std
::
string
tag
=
""
)
{
if
(
ins
==
--
prog
->
end
()
and
not
tag
.
empty
())
if
(
ins
==
--
prog
->
end
()
and
tag
.
empty
())
{
return
prog
->
add_parameter
(
"output"
,
s
);
}
...
...
test/gpu/miopen.cpp
View file @
eca3cb69
...
...
@@ -123,7 +123,7 @@ migraph::argument run_gpu()
{
m
[
x
.
first
]
=
migraph
::
gpu
::
to_gpu
(
migraph
::
generate_argument
(
x
.
second
,
get_hash
(
x
.
first
)));
}
EXPECT
(
bool
{
m
.
find
(
"output"
)
!=
m
.
end
()});
return
migraph
::
gpu
::
from_gpu
(
p
.
eval
(
m
));
}
...
...
@@ -235,6 +235,19 @@ struct test_add_broadcast5
}
};
struct
test_conv
{
migraph
::
program
create_program
()
const
{
migraph
::
program
p
;
auto
input
=
p
.
add_parameter
(
"x"
,
migraph
::
shape
{
migraph
::
shape
::
float_type
,
{
4
,
3
,
3
,
3
}});
auto
weights
=
p
.
add_parameter
(
"w"
,
migraph
::
shape
{
migraph
::
shape
::
float_type
,
{
4
,
3
,
3
,
3
}});
p
.
add_instruction
(
migraph
::
convolution
{},
input
,
weights
);
return
p
;
}
};
struct
test_conv_relu
{
migraph
::
program
create_program
()
const
...
...
@@ -482,6 +495,7 @@ int main()
verify_program
<
test_add_broadcast3
>
();
verify_program
<
test_add_broadcast4
>
();
verify_program
<
test_add_broadcast5
>
();
verify_program
<
test_conv
>
();
verify_program
<
test_conv_relu
>
();
verify_program
<
test_add_relu
>
();
verify_program
<
test_conv_pooling
>
();
...
...
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