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
e7e96a29
Unverified
Commit
e7e96a29
authored
Dec 10, 2025
by
PanZezhong1725
Committed by
GitHub
Dec 10, 2025
Browse files
Merge pull request #748 from InfiniTensor/issue/746
issue/746: 修复causal_softmax在长宽在1024边缘的计算错误
parents
51beebc6
0b6bdab0
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 @
e7e96a29
...
...
@@ -28,7 +28,7 @@ __device__ void causalSoftmaxKernel(
// 1 | * * * ... * * |
// 2 | * * * ... * * * |
// 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
>
)
{
y
[
col
]
=
hexp
(
x
[
col
]
-
max_
);
}
else
{
...
...
test/infiniop/causal_softmax.py
View file @
e7e96a29
...
...
@@ -32,6 +32,9 @@ _TEST_CASES_ = [
((
32
,
20
,
512
),
None
,
None
),
((
32
,
20
,
512
),
(
20480
,
512
,
1
),
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
...
...
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