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
3ea86a4d
Commit
3ea86a4d
authored
Aug 19, 2018
by
Paul
Browse files
Formatting
parent
a4bb0fdb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
src/targets/gpu/hip.cpp
src/targets/gpu/hip.cpp
+1
-4
src/targets/gpu/include/migraph/gpu/hip.hpp
src/targets/gpu/include/migraph/gpu/hip.hpp
+8
-4
No files found.
src/targets/gpu/hip.cpp
View file @
3ea86a4d
...
@@ -88,10 +88,7 @@ argument from_gpu(argument arg)
...
@@ -88,10 +88,7 @@ argument from_gpu(argument arg)
return
result
;
return
result
;
}
}
void
gpu_sync
()
void
gpu_sync
()
{
hipDeviceSynchronize
();
}
{
hipDeviceSynchronize
();
}
}
// namespace gpu
}
// namespace gpu
...
...
src/targets/gpu/include/migraph/gpu/hip.hpp
View file @
3ea86a4d
...
@@ -52,14 +52,18 @@ struct hip_sync
...
@@ -52,14 +52,18 @@ struct hip_sync
std
::
string
name
()
const
{
return
"hip::sync"
;
}
std
::
string
name
()
const
{
return
"hip::sync"
;
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
{
{
if
(
inputs
.
empty
())
return
{};
if
(
inputs
.
empty
())
else
return
inputs
.
front
();
return
{};
else
return
inputs
.
front
();
}
}
argument
compute
(
context
&
,
const
shape
&
,
const
std
::
vector
<
argument
>&
args
)
const
argument
compute
(
context
&
,
const
shape
&
,
const
std
::
vector
<
argument
>&
args
)
const
{
{
gpu_sync
();
gpu_sync
();
if
(
args
.
empty
())
return
{};
if
(
args
.
empty
())
else
return
args
.
front
();
return
{};
else
return
args
.
front
();
}
}
};
};
...
...
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