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
2a2c146c
Unverified
Commit
2a2c146c
authored
Jun 25, 2019
by
mvermeulen
Committed by
GitHub
Jun 25, 2019
Browse files
Merge pull request #278 from ROCmSoftwarePlatform/device-refactor
Refactor device
parents
15eb1987
8be483c5
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
16 deletions
+7
-16
src/targets/gpu/include/migraphx/gpu/device/logsoftmax.hpp
src/targets/gpu/include/migraphx/gpu/device/logsoftmax.hpp
+1
-4
src/targets/gpu/include/migraphx/gpu/device/softmax.hpp
src/targets/gpu/include/migraphx/gpu/device/softmax.hpp
+1
-4
src/targets/gpu/logsoftmax.cpp
src/targets/gpu/logsoftmax.cpp
+3
-4
src/targets/gpu/softmax.cpp
src/targets/gpu/softmax.cpp
+2
-4
No files found.
src/targets/gpu/include/migraphx/gpu/device/logsoftmax.hpp
View file @
2a2c146c
...
...
@@ -10,10 +10,7 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace
gpu
{
namespace
device
{
argument
logsoftmax
(
hipStream_t
stream
,
const
migraphx
::
shape
&
output_shape
,
std
::
vector
<
migraphx
::
argument
>
args
,
int
axis
);
argument
logsoftmax
(
hipStream_t
stream
,
argument
result
,
argument
arg
,
int
axis
);
}
// namespace device
}
// namespace gpu
...
...
src/targets/gpu/include/migraphx/gpu/device/softmax.hpp
View file @
2a2c146c
...
...
@@ -10,10 +10,7 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace
gpu
{
namespace
device
{
argument
softmax
(
hipStream_t
stream
,
const
migraphx
::
shape
&
output_shape
,
std
::
vector
<
migraphx
::
argument
>
args
,
int
axis
);
argument
softmax
(
hipStream_t
stream
,
argument
result
,
argument
arg
,
int
axis
);
}
// namespace device
}
// namespace gpu
...
...
src/targets/gpu/logsoftmax.cpp
View file @
2a2c146c
...
...
@@ -15,11 +15,10 @@ shape hip_logsoftmax::compute_shape(const std::vector<shape>& inputs) const
return
op
.
compute_shape
({
inputs
.
at
(
0
)});
}
argument
hip_logsoftmax
::
compute
(
context
&
ctx
,
const
shape
&
output_shape
,
const
std
::
vector
<
argument
>&
args
)
const
argument
hip_logsoftmax
::
compute
(
context
&
ctx
,
const
shape
&
,
const
std
::
vector
<
argument
>&
args
)
const
{
return
device
::
logsoftmax
(
ctx
.
get_stream
().
get
(),
output_shape
,
args
,
op
.
axis
);
return
device
::
logsoftmax
(
ctx
.
get_stream
().
get
(),
args
[
1
]
,
args
[
0
]
,
op
.
axis
);
}
}
// namespace gpu
...
...
src/targets/gpu/softmax.cpp
View file @
2a2c146c
...
...
@@ -37,11 +37,9 @@ shape hip_softmax::compute_shape(const std::vector<shape>& inputs) const
return
op
.
compute_shape
({
inputs
.
at
(
0
)});
}
argument
hip_softmax
::
compute
(
context
&
ctx
,
const
shape
&
output_shape
,
const
std
::
vector
<
argument
>&
args
)
const
argument
hip_softmax
::
compute
(
context
&
ctx
,
const
shape
&
,
const
std
::
vector
<
argument
>&
args
)
const
{
return
device
::
softmax
(
ctx
.
get_stream
().
get
(),
output_shape
,
args
,
op
.
axis
);
return
device
::
softmax
(
ctx
.
get_stream
().
get
(),
args
[
1
]
,
args
[
0
]
,
op
.
axis
);
}
}
// namespace gpu
...
...
Prev
1
2
Next
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