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
composable_kernel
Commits
b80b34f5
Commit
b80b34f5
authored
Sep 12, 2022
by
Po-Yen, Chen
Browse files
Remove redundant parameter in helper lambda function
parent
87d41af6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
include/ck/tensor_operation/gpu/device/device_permute.hpp
include/ck/tensor_operation/gpu/device/device_permute.hpp
+20
-20
No files found.
include/ck/tensor_operation/gpu/device/device_permute.hpp
View file @
b80b34f5
...
...
@@ -232,15 +232,13 @@ struct DevicePermute
static
bool
IsSupportedArgument
(
const
Argument
&
arg
)
{
constexpr
auto
IsScalarPerVectorValid
=
[](
const
std
::
array
<
index_t
,
NumDim
>&
lengths
,
const
std
::
array
<
index_t
,
NumDim
>&
strides
,
index_t
vectorDim
,
index_t
scalarPerVector
)
{
if
(
strides
[
vectorDim
]
==
1
&&
lengths
[
vectorDim
]
%
scalarPerVector
==
0
)
constexpr
auto
IsScalarPerVectorValid
=
[](
index_t
length
,
index_t
stride
,
index_t
scalarPerVector
)
{
if
(
stride
==
1
&&
length
%
scalarPerVector
==
0
)
{
return
true
;
}
else
if
(
stride
s
[
vectorDim
]
!=
1
&&
scalarPerVector
==
1
)
else
if
(
stride
!=
1
&&
scalarPerVector
==
1
)
{
return
true
;
}
...
...
@@ -248,10 +246,12 @@ struct DevicePermute
return
false
;
};
return
IsScalarPerVectorValid
(
arg
.
inLengths_
,
arg
.
inStrides_
,
SrcVectorDim
,
SrcScalarPerVector
)
&&
IsScalarPerVectorValid
(
arg
.
outLengths_
,
arg
.
outStrides_
,
DstVectorDim
,
DstScalarPerVector
)
&&
return
IsScalarPerVectorValid
(
arg
.
inLengths_
[
SrcVectorDim
],
arg
.
inStrides_
[
SrcVectorDim
],
SrcScalarPerVector
)
&&
IsScalarPerVectorValid
(
arg
.
outLengths_
[
DstVectorDim
],
arg
.
outStrides_
[
DstVectorDim
],
DstScalarPerVector
)
&&
GridwisePermute
::
CheckValidity
(
arg
.
in_grid_desc_
,
arg
.
out_grid_desc_
);
};
};
...
...
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