Fix ut mla-test-1-gpu-amd (#4813)
Co-authored-by: Zhang Kaihong <zhangkaihong.zkh@alibaba-inc.com>
This commit is contained in:
1
.github/workflows/pr-test-amd.yml
vendored
1
.github/workflows/pr-test-amd.yml
vendored
@@ -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):
|
|||||||
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,
|
||||||
|
|||||||
Reference in New Issue
Block a user