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
zhaoyu6
sglang
Commits
0da0989a
"vscode:/vscode.git/clone" did not exist on "b36b469a1c9737f58e115b02074ec0066c1002e0"
Unverified
Commit
0da0989a
authored
Jan 23, 2025
by
Yineng Zhang
Committed by
GitHub
Jan 23, 2025
Browse files
sync flashinfer and update sgl-kernel tests (#3081)
parent
07a22cbb
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
4 deletions
+13
-4
.github/workflows/pr-test-sgl-kernel.yml
.github/workflows/pr-test-sgl-kernel.yml
+1
-1
sgl-kernel/3rdparty/flashinfer
sgl-kernel/3rdparty/flashinfer
+1
-1
sgl-kernel/Makefile
sgl-kernel/Makefile
+1
-1
sgl-kernel/tests/test_activation.py
sgl-kernel/tests/test_activation.py
+2
-1
sgl-kernel/tests/test_lightning_attention_decode.py
sgl-kernel/tests/test_lightning_attention_decode.py
+4
-0
sgl-kernel/tests/test_norm.py
sgl-kernel/tests/test_norm.py
+4
-0
No files found.
.github/workflows/pr-test-sgl-kernel.yml
View file @
0da0989a
...
@@ -47,7 +47,7 @@ jobs:
...
@@ -47,7 +47,7 @@ jobs:
pip3 list | grep sgl-kernel
pip3 list | grep sgl-kernel
-
name
:
Run test
-
name
:
Run test
timeout-minutes
:
1
0
timeout-minutes
:
3
0
run
:
|
run
:
|
cd sgl-kernel
cd sgl-kernel
find tests -name "test_*.py" | xargs -n 1 python3
find tests -name "test_*.py" | xargs -n 1 python3
...
...
flashinfer
@
93e1a263
Compare
4e8eb187
...
93e1a263
Subproject commit
4e8eb1879f9c3ba6d75511e5893183bf8f289
a6
2
Subproject commit
93e1a2634e22355b0856246b032b285ad1d1d
a6
b
sgl-kernel/Makefile
View file @
0da0989a
...
@@ -19,7 +19,7 @@ clean:
...
@@ -19,7 +19,7 @@ clean:
@
rm
-rf
build dist
*
.egg-info
@
rm
-rf
build dist
*
.egg-info
test
:
test
:
@
find tests
-name
"test_*.py"
| xargs
-n
1 python3
&&
pytest tests/test_norm.py
&&
pytest tests/test_activation.py
@
find tests
-name
"test_*.py"
| xargs
-n
1 python3
format
:
format
:
@
find src tests
-name
'*.cc'
-o
-name
'*.cu'
-o
-name
'*.cuh'
-o
-name
'*.h'
-o
-name
'*.hpp'
| xargs clang-format
-i
&&
find src tests
-name
'*.py'
| xargs isort
&&
find src tests
-name
'*.py'
| xargs black
@
find src tests
-name
'*.cc'
-o
-name
'*.cu'
-o
-name
'*.cuh'
-o
-name
'*.h'
-o
-name
'*.hpp'
| xargs clang-format
-i
&&
find src tests
-name
'*.py'
| xargs isort
&&
find src tests
-name
'*.py'
| xargs black
sgl-kernel/tests/test_activation.py
View file @
0da0989a
...
@@ -35,4 +35,5 @@ def test_fused_gelu_mul(dim, batch_size, seq_len):
...
@@ -35,4 +35,5 @@ def test_fused_gelu_mul(dim, batch_size, seq_len):
torch
.
testing
.
assert_close
(
y_ref
,
y
,
rtol
=
1e-3
,
atol
=
1e-3
)
torch
.
testing
.
assert_close
(
y_ref
,
y
,
rtol
=
1e-3
,
atol
=
1e-3
)
test_fused_silu_mul
(
128
,
1
,
1
)
if
__name__
==
"__main__"
:
pytest
.
main
([
__file__
])
sgl-kernel/tests/test_lightning_attention_decode.py
View file @
0da0989a
...
@@ -82,3 +82,7 @@ def test_lightning_attention_decode(dtype, batch_size, num_heads, dim, embed_dim
...
@@ -82,3 +82,7 @@ def test_lightning_attention_decode(dtype, batch_size, num_heads, dim, embed_dim
msg
=
f
"New KV mismatch for batch_size=
{
batch_size
}
, num_heads=
{
num_heads
}
, "
msg
=
f
"New KV mismatch for batch_size=
{
batch_size
}
, num_heads=
{
num_heads
}
, "
f
"dim=
{
dim
}
, embed_dim=
{
embed_dim
}
, dtype=
{
dtype
}
"
,
f
"dim=
{
dim
}
, embed_dim=
{
embed_dim
}
, dtype=
{
dtype
}
"
,
)
)
if
__name__
==
"__main__"
:
pytest
.
main
([
__file__
])
sgl-kernel/tests/test_norm.py
View file @
0da0989a
...
@@ -127,3 +127,7 @@ def test_gemma_fused_add_rmsnorm(batch_size, hidden_size, dtype):
...
@@ -127,3 +127,7 @@ def test_gemma_fused_add_rmsnorm(batch_size, hidden_size, dtype):
torch
.
testing
.
assert_close
(
x_fused
,
x_native
,
rtol
=
1e-3
,
atol
=
1e-3
)
torch
.
testing
.
assert_close
(
x_fused
,
x_native
,
rtol
=
1e-3
,
atol
=
1e-3
)
torch
.
testing
.
assert_close
(
residual_fused
,
residual_native
,
rtol
=
1e-3
,
atol
=
1e-3
)
torch
.
testing
.
assert_close
(
residual_fused
,
residual_native
,
rtol
=
1e-3
,
atol
=
1e-3
)
if
__name__
==
"__main__"
:
pytest
.
main
([
__file__
])
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