Skip to content

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

Update PyTorch and torchvision versions to 2.12.1 and 0.27.1 in CI (#1943)

Sun, Xuehao354c6a3b8701
diff --git a/.azure-pipelines/docker/Dockerfile.devel b/.azure-pipelines/docker/Dockerfile.devel
index edde89d62..30d9663c8 100644
--- a/.azure-pipelines/docker/Dockerfile.devel
+++ b/.azure-pipelines/docker/Dockerfile.devel
@@ -48,6 +48,6 @@ ENV UV_NO_PROGRESS=1 \
RUN uv venv --python=3.12 /home/hostuser/.venv
RUN which python && python --version
-RUN uv pip install torch==2.12.0 torchvision==0.27.0 --extra-index-url https://download.pytorch.org/whl/cpu
+RUN uv pip install torch==2.12.1 torchvision==0.27.1 --extra-index-url https://download.pytorch.org/whl/cpu
WORKDIR /home/hostuser
diff --git a/.azure-pipelines/docker/Dockerfile_xpu.devel b/.azure-pipelines/docker/Dockerfile_xpu.devel
index 3f58171fb..0e66bc9d2 100644
--- a/.azure-pipelines/docker/Dockerfile_xpu.devel
+++ b/.azure-pipelines/docker/Dockerfile_xpu.devel
@@ -48,6 +48,6 @@ ENV UV_NO_PROGRESS=1 \
RUN uv venv --python=3.12 /home/hostuser/.venv
RUN which python && python --version
-RUN uv pip install torch==2.11.0 torchvision==0.26.0 --extra-index-url https://download.pytorch.org/whl/xpu
+RUN uv pip install torch==2.12.1 torchvision==0.27.1 --extra-index-url https://download.pytorch.org/whl/xpu
WORKDIR /home/hostuser
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 98383b95d..5b8abf8fe 100644
--- a/.azure-pipelines/scripts/cuda_unit_test/run_cuda_ut.sh
+++ b/.azure-pipelines/scripts/cuda_unit_test/run_cuda_ut.sh
@@ -62,7 +62,7 @@ function run_unit_test() {
# install unit test dependencies
echo "##[group]set up UT env..."
cd "${BUILD_SOURCESDIRECTORY}" || exit 1
- uv pip install torch==2.12.0 torchvision torchao --index-url https://download.pytorch.org/whl/cu130
+ uv pip install torch==2.12.1 torchvision torchao --index-url https://download.pytorch.org/whl/cu130
uv pip install llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu130
uv pip install 'git+https://github.com/ggml-org/llama.cpp.git#subdirectory=gguf-py'
uv pip install -r test/test_cuda/requirements.txt
@@ -70,7 +70,7 @@ function run_unit_test() {
uv pip install -U transformers chardet
uv pip install kernels==0.12.3 # For sm120: https://github.com/huggingface/transformers/blob/v5.12.1/setup.py#L94
uv pip uninstall torch torchvision
- uv pip install torch==2.12.0 torchvision torchao --index-url https://download.pytorch.org/whl/cu130
+ uv pip install torch==2.12.1 torchvision torchao --index-url https://download.pytorch.org/whl/cu130
uv pip install .
echo "##[endgroup]"
diff --git a/.azure-pipelines/scripts/ut/collect_result.py b/.azure-pipelines/scripts/ut/collect_result.py
index b3dbb051f..86813b1d2 100644
--- a/.azure-pipelines/scripts/ut/collect_result.py
+++ b/.azure-pipelines/scripts/ut/collect_result.py
@@ -57,8 +57,8 @@ class LogAnalyzer:
"ERROR:",
"== ERRORS ==",
" errors:",
- "Exception",
- "Traceback",
+ "Exception:",
+ "Traceback ",
"Illegal instruction",
)
diff --git a/.azure-pipelines/scripts/ut/constraints.txt b/.azure-pipelines/scripts/ut/constraints.txt
index 6a7778a58..afb0aef07 100644
--- a/.azure-pipelines/scripts/ut/constraints.txt
+++ b/.azure-pipelines/scripts/ut/constraints.txt
@@ -1,2 +1,2 @@
-torch==2.12.0
-torchvision==0.27.0
+torch==2.12.1
+torchvision==0.27.1