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
ddb6356b
"...composable_kernel_rocm.git" did not exist on "611064a13f149a5ef58a8bda338c1adac1936804"
Commit
ddb6356b
authored
Jun 20, 2019
by
Paul
Browse files
Formatting
parent
c8958d6f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
11 deletions
+5
-11
src/targets/gpu/device/include/migraphx/gpu/device/tensor_view.hpp
...ts/gpu/device/include/migraphx/gpu/device/tensor_view.hpp
+0
-2
src/targets/gpu/device/include/migraphx/gpu/device/visit.hpp
src/targets/gpu/device/include/migraphx/gpu/device/visit.hpp
+5
-9
No files found.
src/targets/gpu/device/include/migraphx/gpu/device/tensor_view.hpp
View file @
ddb6356b
...
@@ -44,8 +44,6 @@ hip_tensor_view<T, N> make_hip(tensor_view<T> x)
...
@@ -44,8 +44,6 @@ hip_tensor_view<T, N> make_hip(tensor_view<T> x)
return
x
;
return
x
;
}
}
}
// namespace device
}
// namespace device
}
// namespace gpu
}
// namespace gpu
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace MIGRAPHX_INLINE_NS
...
...
src/targets/gpu/device/include/migraphx/gpu/device/visit.hpp
View file @
ddb6356b
...
@@ -43,12 +43,9 @@ void visit_tensor_size(std::size_t n, F f)
...
@@ -43,12 +43,9 @@ void visit_tensor_size(std::size_t n, F f)
}
}
}
}
inline
std
::
size_t
tensor_size
(
const
shape
&
x
)
inline
std
::
size_t
tensor_size
(
const
shape
&
x
)
{
return
x
.
lens
().
size
();
}
{
return
x
.
lens
().
size
();
}
template
<
class
T
>
template
<
class
T
>
auto
tensor_size
(
const
T
&
x
)
->
decltype
(
x
.
get_shape
().
lens
().
size
())
auto
tensor_size
(
const
T
&
x
)
->
decltype
(
x
.
get_shape
().
lens
().
size
())
{
{
return
x
.
get_shape
().
lens
().
size
();
return
x
.
get_shape
().
lens
().
size
();
...
@@ -59,8 +56,7 @@ auto hip_visit_all(T&& x, Ts&&... xs)
...
@@ -59,8 +56,7 @@ auto hip_visit_all(T&& x, Ts&&... xs)
{
{
return
[
&
](
auto
f
)
{
return
[
&
](
auto
f
)
{
visit_tensor_size
(
tensor_size
(
x
),
[
&
](
auto
dim
)
{
visit_tensor_size
(
tensor_size
(
x
),
[
&
](
auto
dim
)
{
visit_all
(
x
,
visit_all
(
x
,
xs
...)([
&
](
auto
...
vs
)
{
f
(
make_hip
<
dim
>
(
device_cast
(
vs
))...);
});
xs
...)([
&
](
auto
...
vs
)
{
f
(
make_hip
<
dim
>
(
device_cast
(
vs
))...);
});
});
});
};
};
}
}
...
@@ -70,8 +66,8 @@ auto hip_vec_visit_all(T&& x, Ts&&... xs)
...
@@ -70,8 +66,8 @@ auto hip_vec_visit_all(T&& x, Ts&&... xs)
{
{
return
[
&
](
auto
f
)
{
return
[
&
](
auto
f
)
{
visit_tensor_size
(
tensor_size
(
x
),
[
&
](
auto
dim
)
{
visit_tensor_size
(
tensor_size
(
x
),
[
&
](
auto
dim
)
{
visit_all
(
x
,
xs
...)(
visit_all
(
x
,
[
&
](
auto
...
vs
)
{
f
(
make_hip
<
dim
>
(
as_vec
<
N
>
(
device_cast
(
vs
)))...);
});
xs
...)(
[
&
](
auto
...
vs
)
{
f
(
make_hip
<
dim
>
(
as_vec
<
N
>
(
device_cast
(
vs
)))...);
});
});
});
};
};
}
}
...
...
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