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
d353641d
Unverified
Commit
d353641d
authored
Mar 14, 2022
by
Shucai Xiao
Committed by
GitHub
Mar 14, 2022
Browse files
Increase max groups in kernel (#1120)
change max number of groups in a kernel to 1B for greater performance
parent
9077db18
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
src/targets/gpu/device/include/migraphx/gpu/device/multi_index.hpp
...ts/gpu/device/include/migraphx/gpu/device/multi_index.hpp
+4
-3
No files found.
src/targets/gpu/device/include/migraphx/gpu/device/multi_index.hpp
View file @
d353641d
...
...
@@ -57,9 +57,10 @@ inline auto mi_nglobal(const hip_shape<N>& s, index_int nlocal)
{
assert
(
s
.
standard
);
assert
(
s
.
elements
()
>
0
);
index_int
n
=
s
.
elements
();
index_int
groups
=
(
n
+
nlocal
-
1
)
/
nlocal
;
index_int
nglobal
=
std
::
min
<
index_int
>
(
128
,
groups
)
*
nlocal
;
index_int
n
=
s
.
elements
();
index_int
groups
=
(
n
+
nlocal
-
1
)
/
nlocal
;
// max possible number of blocks is set to 1B (1,073,741,824)
index_int
nglobal
=
std
::
min
<
index_int
>
(
1073741824
,
groups
)
*
nlocal
;
assert
(
groups
>
0
);
assert
(
nglobal
>
0
);
...
...
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