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
4fbc2575
Commit
4fbc2575
authored
Feb 28, 2019
by
Paul
Browse files
Use context sync as well
parent
add5ea47
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
src/targets/gpu/hip.cpp
src/targets/gpu/hip.cpp
+5
-1
src/targets/gpu/include/migraphx/gpu/context.hpp
src/targets/gpu/include/migraphx/gpu/context.hpp
+1
-2
No files found.
src/targets/gpu/hip.cpp
View file @
4fbc2575
...
@@ -10,7 +10,11 @@ namespace migraphx {
...
@@ -10,7 +10,11 @@ namespace migraphx {
inline
namespace
MIGRAPHX_INLINE_NS
{
inline
namespace
MIGRAPHX_INLINE_NS
{
namespace
gpu
{
namespace
gpu
{
void
gpu_sync
()
{
hipDeviceSynchronize
();
}
void
gpu_sync
()
{
hipDeviceSynchronize
();
hipCtxSynchronize
();
}
using
hip_ptr
=
MIGRAPHX_MANAGE_PTR
(
void
,
hipFree
);
using
hip_ptr
=
MIGRAPHX_MANAGE_PTR
(
void
,
hipFree
);
...
...
src/targets/gpu/include/migraphx/gpu/context.hpp
View file @
4fbc2575
...
@@ -34,8 +34,7 @@ struct hip_device
...
@@ -34,8 +34,7 @@ struct hip_device
static
hip_stream_ptr
create_stream
()
static
hip_stream_ptr
create_stream
()
{
{
hipStream_t
result
=
nullptr
;
hipStream_t
result
=
nullptr
;
auto
status
=
hipStreamCreate
(
&
result
);
auto
status
=
hipStreamCreateWithFlags
(
&
result
,
hipStreamNonBlocking
);
// auto status = hipStreamCreateWithFlags(&result, hipStreamNonBlocking);
if
(
status
!=
hipSuccess
)
if
(
status
!=
hipSuccess
)
MIGRAPHX_THROW
(
"Failed to allocate stream"
);
MIGRAPHX_THROW
(
"Failed to allocate stream"
);
...
...
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