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
ec31c597
Commit
ec31c597
authored
Jun 24, 2019
by
Paul
Browse files
Fix tidy warnings
parent
46653e67
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
10 deletions
+9
-10
src/include/migraphx/raw_data.hpp
src/include/migraphx/raw_data.hpp
+3
-2
src/targets/gpu/device/include/migraphx/gpu/device/nary.hpp
src/targets/gpu/device/include/migraphx/gpu/device/nary.hpp
+4
-6
src/targets/gpu/device/include/migraphx/gpu/device/types.hpp
src/targets/gpu/device/include/migraphx/gpu/device/types.hpp
+1
-1
src/targets/gpu/device/include/migraphx/gpu/device/vector.hpp
...targets/gpu/device/include/migraphx/gpu/device/vector.hpp
+1
-1
No files found.
src/include/migraphx/raw_data.hpp
View file @
ec31c597
...
...
@@ -223,8 +223,9 @@ auto visit_all(const std::vector<T>& x)
s
.
visit_type
([
&
](
auto
as
)
{
using
type
=
typename
decltype
(
as
)
::
type
;
std
::
vector
<
tensor_view
<
type
>>
result
;
for
(
const
auto
&
y
:
x
)
result
.
push_back
(
make_view
(
y
.
get_shape
(),
as
.
from
(
y
.
data
())));
std
::
transform
(
x
.
begin
(),
x
.
end
(),
std
::
back_inserter
(
result
),
[
&
](
const
auto
&
y
)
{
return
make_view
(
y
.
get_shape
(),
as
.
from
(
y
.
data
()));
});
v
(
result
);
});
};
...
...
src/targets/gpu/device/include/migraphx/gpu/device/nary.hpp
View file @
ec31c597
...
...
@@ -70,12 +70,10 @@ void nary_broadcast_vec_impl(
auto
bidx
=
((
i
*
vec_size
)
%
bdim_next_stride
)
/
bdim_stride
;
auto
b
=
bp
[
bidx
];
auto
out
=
output
.
data
()[
i
];
pack
(
inputs
.
data
()[
i
]...)([
&
](
auto
...
xs
)
__device__
{
for
(
std
::
size_t
j
=
0
;
j
<
vec_size
;
j
++
)
{
out
[
j
]
=
f
(
xs
[
j
]...,
b
);
}
});
for
(
std
::
size_t
j
=
0
;
j
<
vec_size
;
j
++
)
{
out
[
j
]
=
f
(
inputs
.
data
()[
i
][
j
]...,
b
);
}
output
.
data
()[
i
]
=
out
;
}
});
...
...
src/targets/gpu/device/include/migraphx/gpu/device/types.hpp
View file @
ec31c597
...
...
@@ -18,7 +18,7 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace
gpu
{
namespace
device
{
#define MIGRAPHX_DEVICE_CONSTEXPR constexpr __device__ __host__
#define MIGRAPHX_DEVICE_CONSTEXPR constexpr __device__ __host__
// NOLINT
template
<
class
T
,
std
::
size_t
N
>
using
vec
=
T
__attribute__
((
ext_vector_type
(
N
)));
...
...
src/targets/gpu/device/include/migraphx/gpu/device/vector.hpp
View file @
ec31c597
...
...
@@ -24,7 +24,7 @@ struct hip_vector
__device__
__host__
hip_vector
(
std
::
initializer_list
<
T
>
x
)
{
auto
it
=
std
::
copy
(
x
.
begin
(),
x
.
end
(),
d
);
std
::
copy
(
x
.
begin
(),
x
.
end
(),
d
);
len
=
x
.
size
();
}
...
...
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