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
jerrrrry
infinicore
Commits
0b6bdab0
Commit
0b6bdab0
authored
Dec 10, 2025
by
Ceng23333
Browse files
issue/746: 修复causal_softmax在长宽在1024边缘的计算错误
Signed-off-by:
Ceng23333
<
441651826@qq.com
>
parent
51beebc6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
src/infiniop/ops/causal_softmax/cuda/kernel.cuh
src/infiniop/ops/causal_softmax/cuda/kernel.cuh
+1
-1
test/infiniop/causal_softmax.py
test/infiniop/causal_softmax.py
+3
-0
No files found.
src/infiniop/ops/causal_softmax/cuda/kernel.cuh
View file @
0b6bdab0
...
@@ -28,7 +28,7 @@ __device__ void causalSoftmaxKernel(
...
@@ -28,7 +28,7 @@ __device__ void causalSoftmaxKernel(
// 1 | * * * ... * * |
// 1 | * * * ... * * |
// 2 | * * * ... * * * |
// 2 | * * * ... * * * |
// height: 3 col_id->
// height: 3 col_id->
if
(
width
+
blockIdx
.
x
>=
threadIdx
.
x
+
height
)
{
if
(
width
+
blockIdx
.
x
>=
col
+
height
)
{
if
constexpr
(
std
::
is_same_v
<
Tdata
,
half
>
||
std
::
is_same_v
<
Tdata
,
cuda_bfloat16
>
)
{
if
constexpr
(
std
::
is_same_v
<
Tdata
,
half
>
||
std
::
is_same_v
<
Tdata
,
cuda_bfloat16
>
)
{
y
[
col
]
=
hexp
(
x
[
col
]
-
max_
);
y
[
col
]
=
hexp
(
x
[
col
]
-
max_
);
}
else
{
}
else
{
...
...
test/infiniop/causal_softmax.py
View file @
0b6bdab0
...
@@ -32,6 +32,9 @@ _TEST_CASES_ = [
...
@@ -32,6 +32,9 @@ _TEST_CASES_ = [
((
32
,
20
,
512
),
None
,
None
),
((
32
,
20
,
512
),
None
,
None
),
((
32
,
20
,
512
),
(
20480
,
512
,
1
),
None
),
((
32
,
20
,
512
),
(
20480
,
512
,
1
),
None
),
((
28
,
15
,
15
),
None
,
None
),
((
28
,
15
,
15
),
None
,
None
),
((
28
,
1024
,
1024
),
None
,
None
),
((
28
,
1025
,
1025
),
None
,
None
),
((
28
,
1031
,
1031
),
None
,
None
),
]
]
# Data types used for testing
# Data types used for testing
...
...
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