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
change
sglang
Commits
514f37c3
"vscode:/vscode.git/clone" did not exist on "2c277d620643091314fb77aafbd174a92a9bb0ee"
Unverified
Commit
514f37c3
authored
Jan 27, 2025
by
Byron Hsu
Committed by
GitHub
Jan 27, 2025
Browse files
[kernel] Fix position ids in rope (#3173)
parent
52c03f16
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
3 deletions
+7
-3
sgl-kernel/pyproject.toml
sgl-kernel/pyproject.toml
+1
-1
sgl-kernel/src/sgl-kernel/ops/__init__.py
sgl-kernel/src/sgl-kernel/ops/__init__.py
+1
-1
sgl-kernel/tests/test_rotary_embedding.py
sgl-kernel/tests/test_rotary_embedding.py
+4
-0
sgl-kernel/version.py
sgl-kernel/version.py
+1
-1
No files found.
sgl-kernel/pyproject.toml
View file @
514f37c3
...
...
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name
=
"sgl-kernel"
version
=
"0.0.2.post
19
"
version
=
"0.0.2.post
20
"
description
=
"Kernel Library for SGLang"
readme
=
"README.md"
requires-python
=
">=3.9"
...
...
sgl-kernel/src/sgl-kernel/ops/__init__.py
View file @
514f37c3
...
...
@@ -51,7 +51,7 @@ def apply_rope_with_cos_sin_cache_inplace(
raise
ValueError
(
"cos_sin_cache should be float32"
)
with
query
.
device
as
device
:
pos
_id
s
=
pos
_id
s
.
int
()
pos
ition
s
=
pos
ition
s
.
int
()
torch
.
ops
.
sgl_kernels
.
apply_rope_pos_ids_cos_sin_cache
(
q
=
query
.
view
(
query
.
shape
[
0
],
-
1
,
head_size
),
k
=
key
.
view
(
key
.
shape
[
0
],
-
1
,
head_size
),
...
...
sgl-kernel/tests/test_rotary_embedding.py
View file @
514f37c3
...
...
@@ -196,3 +196,7 @@ def test_correctness(
query_ref_out
,
query_flashinfer_out
,
atol
=
1e-2
,
rtol
=
1e-2
)
torch
.
testing
.
assert_close
(
key_ref_out
,
key_flashinfer_out
,
atol
=
1e-2
,
rtol
=
1e-2
)
if
__name__
==
"__main__"
:
pytest
.
main
([
__file__
])
sgl-kernel/version.py
View file @
514f37c3
__version__
=
"0.0.2.post
19
"
__version__
=
"0.0.2.post
20
"
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