Unverified Commit 668ecc6c authored by strgrb's avatar strgrb Committed by GitHub
Browse files

Fix ut mla-test-1-gpu-amd (#4813)


Co-authored-by: default avatarZhang Kaihong <zhangkaihong.zkh@alibaba-inc.com>
parent 886fcbdd
...@@ -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 .
......
...@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment