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
36eaf9e5
"...python/git@developer.sourcefind.cn:zhaoyu6/sglang.git" did not exist on "8491c794ad9964a2658e06b654a40802ecd7edbd"
Unverified
Commit
36eaf9e5
authored
Oct 02, 2023
by
Umang Yadav
Committed by
GitHub
Oct 02, 2023
Browse files
just use one flush call (#2272)
parent
ae5cc13e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
src/targets/gpu/device/include/migraphx/gpu/device/launch.hpp
...targets/gpu/device/include/migraphx/gpu/device/launch.hpp
+8
-0
No files found.
src/targets/gpu/device/include/migraphx/gpu/device/launch.hpp
View file @
36eaf9e5
...
@@ -81,6 +81,14 @@ inline auto launch(hipStream_t stream, index_int global, index_int local)
...
@@ -81,6 +81,14 @@ inline auto launch(hipStream_t stream, index_int global, index_int local)
using
f_type
=
decltype
(
f
);
using
f_type
=
decltype
(
f
);
dim3
nblocks
(
global
/
local
);
dim3
nblocks
(
global
/
local
);
dim3
nthreads
(
local
);
dim3
nthreads
(
local
);
/*
hipGetLastError() returns error for the first failed HIP call that happened previously.
MIGraphX calls into various backend libraries and failed HIP calls can also happen there.
Calling hipGetLastError() would reset error code to hipSuccess, so that inside MIGraphX
failed call to hipLaunchKernelGGL() can be captured.
*/
hipError_t
flush_call
=
hipGetLastError
();
(
void
)(
flush_call
);
// cppcheck-suppress UseDeviceLaunch
// cppcheck-suppress UseDeviceLaunch
hipLaunchKernelGGL
((
launcher
<
f_type
>
),
nblocks
,
nthreads
,
0
,
stream
,
f
);
hipLaunchKernelGGL
((
launcher
<
f_type
>
),
nblocks
,
nthreads
,
0
,
stream
,
f
);
hipError_t
kernel_launch_status
=
hipGetLastError
();
hipError_t
kernel_launch_status
=
hipGetLastError
();
...
...
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