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
4001eef7
Commit
4001eef7
authored
May 19, 2022
by
Paul
Browse files
Format
parent
2aa25de2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
src/targets/gpu/jit/pointwise.cpp
src/targets/gpu/jit/pointwise.cpp
+6
-7
No files found.
src/targets/gpu/jit/pointwise.cpp
View file @
4001eef7
...
@@ -56,11 +56,9 @@ struct pointwise_compiler : compiler<pointwise_compiler>
...
@@ -56,11 +56,9 @@ struct pointwise_compiler : compiler<pointwise_compiler>
static
std
::
size_t
compute_local
(
gen
::
vectorize
v
,
const
std
::
vector
<
shape
>&
inputs
)
static
std
::
size_t
compute_local
(
gen
::
vectorize
v
,
const
std
::
vector
<
shape
>&
inputs
)
{
{
const
std
::
size_t
max_local
=
1024
;
const
std
::
size_t
max_local
=
1024
;
if
(
std
::
none_of
(
inputs
.
begin
(),
inputs
.
end
(),
[
&
](
auto
s
)
{
if
(
std
::
none_of
(
inputs
.
begin
(),
inputs
.
end
(),
[
&
](
auto
s
)
{
return
s
.
transposed
();
}))
return
s
.
transposed
();
}))
return
max_local
;
return
max_local
;
if
(
std
::
any_of
(
inputs
.
begin
(),
inputs
.
end
(),
[
&
](
auto
s
)
{
if
(
std
::
any_of
(
inputs
.
begin
(),
inputs
.
end
(),
[
&
](
auto
s
)
{
return
s
.
broadcasted
()
or
s
.
strides
()[
v
.
axis
]
!=
1
;
return
s
.
broadcasted
()
or
s
.
strides
()[
v
.
axis
]
!=
1
;
}))
}))
return
max_local
;
return
max_local
;
...
@@ -80,7 +78,8 @@ struct pointwise_compiler : compiler<pointwise_compiler>
...
@@ -80,7 +78,8 @@ struct pointwise_compiler : compiler<pointwise_compiler>
v
,
v
,
compute_global_for
(
ctx
,
compute_global_for
(
ctx
,
options
.
output
.
elements
()
/
vec
.
size
,
options
.
output
.
elements
()
/
vec
.
size
,
oversubscribe_if
(
not
preloads
.
is_preloading
())),
compute_local
(
vec
,
options
.
virtual_inputs
));
oversubscribe_if
(
not
preloads
.
is_preloading
())),
compute_local
(
vec
,
options
.
virtual_inputs
));
auto
src
=
interpolate_string
(
pointwise_kernel
,
auto
src
=
interpolate_string
(
pointwise_kernel
,
{{
"params"
,
enum_params
(
inputs
.
size
(),
"void * private_p"
)},
{{
"params"
,
enum_params
(
inputs
.
size
(),
"void * private_p"
)},
{
"args"
,
enum_params
(
inputs
.
size
(),
"private_p"
)},
{
"args"
,
enum_params
(
inputs
.
size
(),
"private_p"
)},
...
...
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