Skip to content

PTQ-Level Efficiency, QAT-Level Accuracy | 训练后量化的效率,量化感知训练的精度

Update gaudi-docker to v1.24.0 & fix CUDA UT (#1708)

Sun, Xuehao8d7845056319
diff --git a/.azure-pipelines/scripts/cuda_unit_test/run_cuda_ut.sh b/.azure-pipelines/scripts/cuda_unit_test/run_cuda_ut.sh
index 0fe6f4440..68948e0d3 100644
--- a/.azure-pipelines/scripts/cuda_unit_test/run_cuda_ut.sh
+++ b/.azure-pipelines/scripts/cuda_unit_test/run_cuda_ut.sh
@@ -62,8 +62,8 @@ function run_unit_test() {
# install unit test dependencies
echo "##[group]set up UT env..."
cd "${BUILD_SOURCESDIRECTORY}" || exit 1
- uv pip install https://github.com/XuehaoSun/GPTQModel/releases/download/v5.8.0/gptqmodel-5.8.0+cu128torch2.11-cp312-cp312-linux_x86_64.whl
- uv pip install -r https://raw.githubusercontent.com/ModelCloud/GPTQModel/refs/tags/v5.8.0/requirements.txt
+ uv pip install https://github.com/ModelCloud/GPTQModel/releases/download/v6.0.3/gptqmodel-6.0.3+cu128torch2.11-cp312-cp312-linux_x86_64.whl
+ uv pip install -r https://raw.githubusercontent.com/ModelCloud/GPTQModel/refs/tags/v6.0.3/requirements.txt
uv pip install https://github.com/XuehaoSun/llama-cpp-python/releases/download/v0.3.16/llama_cpp_python-0.3.16-cp312-cp312-linux_x86_64.whl
uv pip install 'git+https://github.com/ggml-org/llama.cpp.git#subdirectory=gguf-py'
uv pip install -r test/test_cuda/requirements.txt
@@ -138,7 +138,7 @@ function run_unit_test_sglang() {
rm -rf /root/.venv
uv venv --python=3.12 /root/.venv
uv pip install -U pytest-cov pytest-html
- uv pip install -r test/test_cuda/requirements_sglang.txt
+ uv pip install -r test/test_cuda/requirements_sglang.txt --prerelease=allow
uv pip install .
uv pip list
echo "##[endgroup]"
diff --git a/.azure-pipelines/scripts/ut/collect_result.py b/.azure-pipelines/scripts/ut/collect_result.py
index 63a4c46b1..797a64140 100644
--- a/.azure-pipelines/scripts/ut/collect_result.py
+++ b/.azure-pipelines/scripts/ut/collect_result.py
@@ -114,8 +114,12 @@ class LogAnalyzer:
return TestStatus.NO_TESTS
def _extract_duration(self, content: str) -> str:
- if match := self.TIME_PATTERN.search(content):
- total_seconds = int(float(match.group(1)))
+ last_match = None
+ for match in self.TIME_PATTERN.finditer(content):
+ last_match = match
+
+ if last_match:
+ total_seconds = int(float(last_match.group(1)))
hours, remainder = divmod(total_seconds, 3600)
minutes, seconds = divmod(remainder, 60)
return f"{hours:02d}:{minutes:02d}:{seconds:02d}"
diff --git a/.azure-pipelines/scripts/ut/run_ut_cuda.sh b/.azure-pipelines/scripts/ut/run_ut_cuda.sh
index 1bdc63f5b..770da49c5 100644
--- a/.azure-pipelines/scripts/ut/run_ut_cuda.sh
+++ b/.azure-pipelines/scripts/ut/run_ut_cuda.sh
@@ -203,7 +203,7 @@ function run_unit_test_sglang() {
cd ${REPO_PATH}/test
rm -rf .coverage* *.xml *.html
- uv pip install -r test_cuda/requirements_sglang.txt
+ uv pip install -r test_cuda/requirements_sglang.txt --prerelease=allow
cd ${REPO_PATH} && uv pip install . && cd ${REPO_PATH}/test
pip list > ${LOG_DIR}/sglang_ut_pip_list.txt
diff --git a/.azure-pipelines/template/docker-template.yml b/.azure-pipelines/template/docker-template.yml
index a9eeb6133..4f4d5c06e 100644
--- a/.azure-pipelines/template/docker-template.yml
+++ b/.azure-pipelines/template/docker-template.yml
@@ -76,7 +76,7 @@ steps:
- ${{ if eq(parameters.imageSource, 'pull') }}:
- script: |
- docker pull vault.habana.ai/gaudi-docker/1.23.0/ubuntu24.04/habanalabs/pytorch-installer-2.9.0:latest
+ docker pull vault.habana.ai/gaudi-docker/1.24.0/ubuntu24.04/habanalabs/pytorch-installer-2.10.0:latest
displayName: "Pull habana docker image"
- script: |
@@ -97,7 +97,7 @@ steps:
else
docker run -dit --disable-content-trust --privileged --name=${{ parameters.containerName }} --shm-size="2g" \
--runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --net=host --ipc=host \
- -v ${BUILD_SOURCESDIRECTORY}:/auto-round vault.habana.ai/gaudi-docker/1.23.0/ubuntu24.04/habanalabs/pytorch-installer-2.9.0:latest
+ -v ${BUILD_SOURCESDIRECTORY}:/auto-round vault.habana.ai/gaudi-docker/1.24.0/ubuntu24.04/habanalabs/pytorch-installer-2.10.0:latest
docker exec ${{ parameters.containerName }} bash -c "ln -sf \$(which python3) /usr/bin/python"
fi
echo "Show the container list after docker run ... "
diff --git a/test/test_cuda/requirements_sglang.txt b/test/test_cuda/requirements_sglang.txt
index 384c162b5..604b6c44c 100644
--- a/test/test_cuda/requirements_sglang.txt
+++ b/test/test_cuda/requirements_sglang.txt
@@ -1 +1 @@
-sglang @ git+https://github.com/sgl-project/sglang.git@main#subdirectory=python
\ No newline at end of file
+sglang >= 0.5.10
\ No newline at end of file