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
c56d6e9e
Commit
c56d6e9e
authored
Jun 29, 2022
by
Paul
Browse files
Format
parent
f20c1124
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/targets/gpu/compile_gen.cpp
src/targets/gpu/compile_gen.cpp
+7
-7
No files found.
src/targets/gpu/compile_gen.cpp
View file @
c56d6e9e
...
...
@@ -81,21 +81,21 @@ preload preload::broadcasts(std::size_t axis, const std::vector<shape>& inputs)
const
std
::
size_t
max_lds_bytes
=
4096
;
std
::
vector
<
bool
>
result
(
inputs
.
size
());
std
::
vector
<
std
::
size_t
>
preloaded
;
for
(
auto
i
:
range
(
inputs
.
size
()))
for
(
auto
i
:
range
(
inputs
.
size
()))
{
if
(
inputs
[
i
].
strides
()[
axis
]
==
0
)
if
(
inputs
[
i
].
strides
()[
axis
]
==
0
)
preloaded
.
push_back
(
i
);
}
std
::
sort
(
preloaded
.
begin
(),
preloaded
.
end
(),
by
(
std
::
less
<>
{},
[
&
](
auto
i
)
{
return
inputs
[
i
].
bytes
();
}));
return
inputs
[
i
].
bytes
();
}));
std
::
size_t
bytes
=
0
;
for
(
auto
i
:
preloaded
)
for
(
auto
i
:
preloaded
)
{
auto
input
=
inputs
[
i
];
bytes
+=
input
.
bytes
();
if
(
bytes
>
max_lds_bytes
)
if
(
bytes
>
max_lds_bytes
)
break
;
result
[
i
]
=
true
;
}
...
...
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