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
48b39e06
Commit
48b39e06
authored
Mar 29, 2022
by
Shucai Xiao
Browse files
clang format
parent
de99db23
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
10 deletions
+4
-10
src/targets/gpu/device/include/migraphx/gpu/device/visit.hpp
src/targets/gpu/device/include/migraphx/gpu/device/visit.hpp
+3
-6
src/targets/gpu/device/layernorm.cpp
src/targets/gpu/device/layernorm.cpp
+1
-4
No files found.
src/targets/gpu/device/include/migraphx/gpu/device/visit.hpp
View file @
48b39e06
...
...
@@ -176,15 +176,12 @@ template <index_int N, class T, class... Ts>
auto
hip_vec_visit_all
(
T
&&
x
,
Ts
&&
...
xs
)
{
return
[
&
](
auto
f
)
{
auto
sx
=
get_shape
(
x
);
auto
sx
=
get_shape
(
x
);
auto
lens
=
sx
.
lens
();
lens
.
back
()
/=
N
;
shape
ssx
{
sx
.
type
(),
lens
};
hip_visit_all_impl
(
ssx
,
make_hip_convert
([](
auto
*
p
)
{
return
as_vec
<
N
>
(
device_cast
(
p
));
}),
f
,
x
,
xs
...);
hip_visit_all_impl
(
ssx
,
make_hip_convert
([](
auto
*
p
)
{
return
as_vec
<
N
>
(
device_cast
(
p
));
}),
f
,
x
,
xs
...);
};
}
...
...
src/targets/gpu/device/layernorm.cpp
View file @
48b39e06
...
...
@@ -81,10 +81,7 @@ __device__ auto auto_block_reduce(index idx, Op op, T init, index_int n, F f)
}
template
<
index_int
MaxBlockSize
,
class
Input
,
class
Output
>
__device__
void
layernorm
(
index
idx
,
index_int
relements
,
Input
input
,
Output
output
)
__device__
void
layernorm
(
index
idx
,
index_int
relements
,
Input
input
,
Output
output
)
{
using
value_type
=
decltype
(
input
(
idx
.
local
));
const
auto
relements_v
=
relements
/
vector_size
<
value_type
>
{};
...
...
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