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
fbe34dd4
"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "67533c798ca95172d7b9999dd28d9d6e57a67432"
Commit
fbe34dd4
authored
Jul 27, 2023
by
ltqin
Browse files
fix offset name
parent
da1afd7f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
include/ck/tensor_operation/gpu/device/masking_specialization.hpp
...ck/tensor_operation/gpu/device/masking_specialization.hpp
+8
-5
No files found.
include/ck/tensor_operation/gpu/device/masking_specialization.hpp
View file @
fbe34dd4
...
...
@@ -52,11 +52,14 @@ struct MaskUpperTriangleFromTopLeftPredicate
};
struct
MaskUpperTriangleFromBottomRightPredicate
{
MaskUpperTriangleFromBottomRightPredicate
()
:
offset_
(
0
)
{}
__host__
__device__
void
SetOffset
(
const
index_t
offset
)
{
offset_
=
offset
;
}
MaskUpperTriangleFromBottomRightPredicate
()
:
diagonal_offset_
(
0
)
{}
__host__
__device__
void
SetDiagonalOffset
(
const
index_t
diagonal_offset
)
{
diagonal_offset_
=
diagonal_offset
;
}
__host__
__device__
constexpr
bool
operator
()(
index_t
m
,
index_t
n
)
const
{
return
n
>
(
m
+
offset_
);
return
n
>
(
m
+
diagonal_
offset_
);
}
__host__
__device__
constexpr
bool
...
...
@@ -66,7 +69,7 @@ struct MaskUpperTriangleFromBottomRightPredicate
}
private:
index_t
offset_
;
index_t
diagonal_
offset_
;
};
// to track the points which need to be set to -inf on C0
...
...
@@ -80,7 +83,7 @@ struct C0MatrixMask_impl
MaskUpperTriangleFromBottomRightPredicate
>::
value
)
{
if
(
NRaw
>
MRaw
)
predicate_
.
SetOffset
(
NRaw
-
MRaw
);
predicate_
.
Set
Diagonal
Offset
(
NRaw
-
MRaw
);
}
}
...
...
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