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
668ecc6c
Unverified
Commit
668ecc6c
authored
Mar 27, 2025
by
strgrb
Committed by
GitHub
Mar 27, 2025
Browse files
Fix ut mla-test-1-gpu-amd (#4813)
Co-authored-by:
Zhang Kaihong
<
zhangkaihong.zkh@alibaba-inc.com
>
parent
886fcbdd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
.github/workflows/pr-test-amd.yml
.github/workflows/pr-test-amd.yml
+1
-0
python/sglang/srt/layers/rotary_embedding.py
python/sglang/srt/layers/rotary_embedding.py
+12
-0
No files found.
.github/workflows/pr-test-amd.yml
View file @
668ecc6c
...
@@ -89,6 +89,7 @@ jobs:
...
@@ -89,6 +89,7 @@ jobs:
docker exec ci_sglang pip uninstall sgl-kernel -y || true
docker exec ci_sglang pip uninstall sgl-kernel -y || true
docker exec -w /sglang-checkout/sgl-kernel ci_sglang bash -c "rm -f pyproject.toml && mv pyproject_rocm.toml pyproject.toml && python3 setup_rocm.py install"
docker exec -w /sglang-checkout/sgl-kernel ci_sglang bash -c "rm -f pyproject.toml && mv pyproject_rocm.toml pyproject.toml && python3 setup_rocm.py install"
docker exec ci_sglang pip install -e "python[dev_hip]"
docker exec ci_sglang pip install -e "python[dev_hip]"
docker exec ci_sglang pip install py-spy || true
docker exec -w / ci_sglang git clone https://github.com/merrymercy/human-eval.git
docker exec -w / ci_sglang git clone https://github.com/merrymercy/human-eval.git
docker exec -w /human-eval ci_sglang pip install -e .
docker exec -w /human-eval ci_sglang pip install -e .
...
...
python/sglang/srt/layers/rotary_embedding.py
View file @
668ecc6c
...
@@ -645,6 +645,18 @@ class DeepseekScalingRotaryEmbedding(RotaryEmbedding):
...
@@ -645,6 +645,18 @@ class DeepseekScalingRotaryEmbedding(RotaryEmbedding):
cache
=
torch
.
cat
((
cos
,
sin
),
dim
=-
1
)
cache
=
torch
.
cat
((
cos
,
sin
),
dim
=-
1
)
return
cache
return
cache
def
forward
(
self
,
positions
:
torch
.
Tensor
,
query
:
torch
.
Tensor
,
key
:
torch
.
Tensor
,
offsets
:
Optional
[
torch
.
Tensor
]
=
None
,
)
->
Tuple
[
torch
.
Tensor
,
torch
.
Tensor
]:
if
_is_cuda_available
:
return
self
.
forward_cuda
(
positions
,
query
,
key
,
offsets
)
else
:
return
self
.
forward_native
(
positions
,
query
,
key
,
offsets
)
def
forward_native
(
def
forward_native
(
self
,
self
,
positions
:
torch
.
Tensor
,
positions
:
torch
.
Tensor
,
...
...
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