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
b75abee1
Commit
b75abee1
authored
Feb 28, 2019
by
Paul
Browse files
Formatting
parent
9167146e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
src/targets/gpu/include/migraphx/gpu/context.hpp
src/targets/gpu/include/migraphx/gpu/context.hpp
+6
-6
No files found.
src/targets/gpu/include/migraphx/gpu/context.hpp
View file @
b75abee1
...
@@ -35,7 +35,7 @@ struct hip_device
...
@@ -35,7 +35,7 @@ struct hip_device
{
{
hipStream_t
result
=
nullptr
;
hipStream_t
result
=
nullptr
;
// auto status = hipStreamCreateWithFlags(&result, hipStreamNonBlocking);
// auto status = hipStreamCreateWithFlags(&result, hipStreamNonBlocking);
auto
status
=
hipStreamCreate
(
&
result
);
auto
status
=
hipStreamCreate
(
&
result
);
if
(
status
!=
hipSuccess
)
if
(
status
!=
hipSuccess
)
MIGRAPHX_THROW
(
"Failed to allocate stream"
);
MIGRAPHX_THROW
(
"Failed to allocate stream"
);
...
@@ -104,10 +104,7 @@ struct hip_device
...
@@ -104,10 +104,7 @@ struct hip_device
streams
.
emplace_back
(
device_id
);
streams
.
emplace_back
(
device_id
);
}
}
std
::
size_t
nstreams
()
const
std
::
size_t
nstreams
()
const
{
return
streams
.
size
();
}
{
return
streams
.
size
();
}
stream
&
get_stream
()
{
return
streams
.
at
(
current_stream
);
}
stream
&
get_stream
()
{
return
streams
.
at
(
current_stream
);
}
...
@@ -143,7 +140,10 @@ struct hip_device
...
@@ -143,7 +140,10 @@ struct hip_device
struct
context
struct
context
{
{
context
(
std
::
size_t
device_id
=
0
,
std
::
size_t
n
=
4
)
:
current_device
(
std
::
make_shared
<
hip_device
>
(
device_id
,
n
))
{}
context
(
std
::
size_t
device_id
=
0
,
std
::
size_t
n
=
4
)
:
current_device
(
std
::
make_shared
<
hip_device
>
(
device_id
,
n
))
{
}
hip_device
&
get_current_device
()
const
hip_device
&
get_current_device
()
const
{
{
...
...
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