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
5883ffad
Commit
5883ffad
authored
Jun 22, 2018
by
Paul
Browse files
Formatting
parent
8bbdc2db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/targets/miopen/include/rtg/miopen/hip.hpp
src/targets/miopen/include/rtg/miopen/hip.hpp
+3
-3
No files found.
src/targets/miopen/include/rtg/miopen/hip.hpp
View file @
5883ffad
...
...
@@ -29,8 +29,8 @@ inline hip_ptr write_to_gpu(const void* x, std::size_t sz)
template
<
class
T
>
hip_ptr
write_to_gpu
(
const
T
&
x
)
{
using
type
=
typename
T
::
value_type
;
auto
size
=
x
.
size
()
*
sizeof
(
type
);
using
type
=
typename
T
::
value_type
;
auto
size
=
x
.
size
()
*
sizeof
(
type
);
return
write_to_gpu
(
x
.
data
(),
size
);
}
...
...
@@ -54,7 +54,7 @@ inline rtg::argument from_gpu(rtg::argument arg)
rtg
::
argument
result
;
arg
.
visit
([
&
](
auto
x
)
{
using
type
=
typename
decltype
(
x
)
::
value_type
;
auto
v
=
read_from_gpu
<
type
>
(
arg
.
data
(),
x
.
get_shape
().
bytes
()
/
sizeof
(
type
));
auto
v
=
read_from_gpu
<
type
>
(
arg
.
data
(),
x
.
get_shape
().
bytes
()
/
sizeof
(
type
));
result
=
{
x
.
get_shape
(),
[
v
]()
mutable
{
return
reinterpret_cast
<
char
*>
(
v
.
data
());
}};
});
return
result
;
...
...
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