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
ad0ab357
Commit
ad0ab357
authored
Oct 01, 2018
by
wsttiger
Browse files
Formatting
parent
6239e84a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
12 deletions
+15
-12
src/targets/gpu/add.cpp
src/targets/gpu/add.cpp
+3
-2
src/targets/gpu/batchnorm.cpp
src/targets/gpu/batchnorm.cpp
+4
-4
src/targets/gpu/contiguous.cpp
src/targets/gpu/contiguous.cpp
+2
-1
src/targets/gpu/include/migraph/gpu/contiguous.hpp
src/targets/gpu/include/migraph/gpu/contiguous.hpp
+0
-1
src/targets/gpu/relu.cpp
src/targets/gpu/relu.cpp
+3
-2
src/targets/gpu/softmax.cpp
src/targets/gpu/softmax.cpp
+3
-2
No files found.
src/targets/gpu/add.cpp
View file @
ad0ab357
...
...
@@ -26,8 +26,9 @@ shape miopen_add::compute_shape(const std::vector<shape>& inputs) const
return
inputs
.
at
(
0
);
}
argument
miopen_add
::
compute
(
context
&
ctx
,
const
shape
&
output_shape
,
const
std
::
vector
<
argument
>&
args
)
const
argument
miopen_add
::
compute
(
context
&
ctx
,
const
shape
&
output_shape
,
const
std
::
vector
<
argument
>&
args
)
const
{
float
alpha
=
1
,
beta
=
0
;
auto
a_desc
=
make_tensor
(
args
[
0
].
get_shape
());
...
...
src/targets/gpu/batchnorm.cpp
View file @
ad0ab357
...
...
@@ -10,12 +10,12 @@ namespace gpu {
shape
miopen_batch_norm_inference
::
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
{
check_shapes
{
inputs
,
*
this
}.
has
(
6
);
return
op
.
compute_shape
(
{
inputs
.
at
(
0
),
inputs
.
at
(
1
),
inputs
.
at
(
2
),
inputs
.
at
(
3
),
inputs
.
at
(
4
)});
return
op
.
compute_shape
({
inputs
.
at
(
0
),
inputs
.
at
(
1
),
inputs
.
at
(
2
),
inputs
.
at
(
3
),
inputs
.
at
(
4
)});
}
argument
miopen_batch_norm_inference
::
compute
(
context
&
ctx
,
const
shape
&
output_shape
,
const
std
::
vector
<
argument
>&
args
)
const
argument
miopen_batch_norm_inference
::
compute
(
context
&
ctx
,
const
shape
&
output_shape
,
const
std
::
vector
<
argument
>&
args
)
const
{
auto
x_desc
=
make_tensor
(
args
[
0
].
get_shape
());
auto
y_desc
=
make_tensor
(
output_shape
);
...
...
src/targets/gpu/contiguous.cpp
View file @
ad0ab357
...
...
@@ -12,7 +12,8 @@ shape miopen_contiguous::compute_shape(const std::vector<shape>& inputs) const
check_shapes
{
inputs
,
*
this
}.
has
(
2
);
return
op
.
compute_shape
({
inputs
.
at
(
0
)});
}
argument
miopen_contiguous
::
compute
(
context
&
,
shape
output_shape
,
const
std
::
vector
<
argument
>&
args
)
const
argument
miopen_contiguous
::
compute
(
context
&
,
shape
output_shape
,
const
std
::
vector
<
argument
>&
args
)
const
{
assert
(
output_shape
==
args
[
1
].
get_shape
());
assert
(
output_shape
.
standard
());
...
...
src/targets/gpu/include/migraph/gpu/contiguous.hpp
View file @
ad0ab357
...
...
@@ -20,7 +20,6 @@
namespace
migraph
{
namespace
gpu
{
struct
miopen_contiguous
{
contiguous
op
;
...
...
src/targets/gpu/relu.cpp
View file @
ad0ab357
...
...
@@ -13,8 +13,9 @@ shape miopen_relu::compute_shape(const std::vector<shape>& inputs) const
return
inputs
.
at
(
1
);
}
argument
miopen_relu
::
compute
(
context
&
ctx
,
const
shape
&
output_shape
,
const
std
::
vector
<
argument
>&
args
)
const
argument
miopen_relu
::
compute
(
context
&
ctx
,
const
shape
&
output_shape
,
const
std
::
vector
<
argument
>&
args
)
const
{
float
alpha
=
1
,
beta
=
0
;
auto
x_desc
=
make_tensor
(
args
[
0
].
get_shape
());
...
...
src/targets/gpu/softmax.cpp
View file @
ad0ab357
...
...
@@ -13,8 +13,9 @@ shape miopen_softmax::compute_shape(const std::vector<shape>& inputs) const
return
op
.
compute_shape
({
inputs
.
at
(
0
)});
}
argument
miopen_softmax
::
compute
(
context
&
ctx
,
const
shape
&
output_shape
,
const
std
::
vector
<
argument
>&
args
)
const
argument
miopen_softmax
::
compute
(
context
&
ctx
,
const
shape
&
output_shape
,
const
std
::
vector
<
argument
>&
args
)
const
{
float
alpha
=
1
,
beta
=
0
;
auto
x_desc
=
make_tensor
(
args
[
0
].
get_shape
());
...
...
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