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
42b24bd1
Commit
42b24bd1
authored
Jun 25, 2019
by
Shucai Xiao
Browse files
clang format
parent
b9575730
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
src/targets/gpu/device/logsoftmax.cpp
src/targets/gpu/device/logsoftmax.cpp
+2
-2
src/targets/gpu/device/softmax.cpp
src/targets/gpu/device/softmax.cpp
+3
-3
No files found.
src/targets/gpu/device/logsoftmax.cpp
View file @
42b24bd1
...
...
@@ -83,8 +83,8 @@ void logsoftmax(hipStream_t stream, argument result, argument arg, int axis)
for
(
size_t
i
=
thr_idx
;
i
<
batch_item_num
;
i
+=
block_size
)
{
data_idx
[
axis
]
=
i
;
output
[
data_idx
]
=
input
[
data_idx
]
-
log_batch_sum
;
data_idx
[
axis
]
=
i
;
output
[
data_idx
]
=
input
[
data_idx
]
-
log_batch_sum
;
}
});
});
...
...
src/targets/gpu/device/softmax.cpp
View file @
42b24bd1
...
...
@@ -83,9 +83,9 @@ void softmax(hipStream_t stream, argument result, argument arg, int axis)
for
(
size_t
i
=
thr_idx
;
i
<
batch_item_num
;
i
+=
block_size
)
{
data_idx
[
axis
]
=
i
;
auto
val
=
input
[
data_idx
]
-
batch_max
;
output
[
data_idx
]
=
::
exp
(
to_hip_type
(
val
))
/
batch_sum
;
data_idx
[
axis
]
=
i
;
auto
val
=
input
[
data_idx
]
-
batch_max
;
output
[
data_idx
]
=
::
exp
(
to_hip_type
(
val
))
/
batch_sum
;
}
});
});
...
...
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