PTQ-Level Efficiency, QAT-Level Accuracy | 训练后量化的效率,量化感知训练的精度
chore: update CI to PyTorch 2.15 (#2570)
Sun, Xuehao853b26411c0d
diff --git a/.azure-pipelines/ark-unit-test.yml b/.azure-pipelines/ark-unit-test.ymlindex 653a8e68d..2dc80a0f4 100644--- a/.azure-pipelines/ark-unit-test.yml+++ b/.azure-pipelines/ark-unit-test.yml@@ -26,8 +26,8 @@ parameters:displayName: "Torch versions"type: string# Comma-separated list to align with pythonVersions runtime input style.- # For example, "2.14.0"- default: "2.14.0"+ # For example, "2.15.0"+ default: "2.15.0"- name: publishTargetdisplayName: "Publish wheels to"type: stringdiff --git a/.azure-pipelines/docker/cpu.dockerfile b/.azure-pipelines/docker/cpu.dockerfileindex d3c08a7ff..1887f44e8 100644--- a/.azure-pipelines/docker/cpu.dockerfile+++ b/.azure-pipelines/docker/cpu.dockerfile@@ -49,6 +49,6 @@ ENV UV_NO_PROGRESS=1 \RUN uv python install 3.14RUN uv venv --python=3.14 /home/hostuser/.venvRUN which python && python --version-RUN uv pip install torch==2.14.0 torchvision==0.29.0 --extra-index-url https://download.pytorch.org/whl/cpu+RUN uv pip install torch==2.15.0 torchvision==0.29.2 --extra-index-url https://download.pytorch.org/whl/cpuWORKDIR /home/hostuserdiff --git a/.azure-pipelines/docker/xpu.dockerfile b/.azure-pipelines/docker/xpu.dockerfileindex 84f7da4d2..1ba52c149 100644--- a/.azure-pipelines/docker/xpu.dockerfile+++ b/.azure-pipelines/docker/xpu.dockerfile@@ -49,6 +49,6 @@ ENV UV_NO_PROGRESS=1 \RUN uv python install 3.14RUN uv venv --python=3.14 /home/hostuser/.venvRUN which python && python --version-RUN uv pip install torch==2.14.0 torchvision==0.29.0 --extra-index-url https://download.pytorch.org/whl/xpu+RUN uv pip install torch==2.15.0 torchvision==0.29.2 --extra-index-url https://download.pytorch.org/whl/xpuWORKDIR /home/hostuserdiff --git a/.azure-pipelines/scripts/cuda_unit_test/run_cuda_ut.sh b/.azure-pipelines/scripts/cuda_unit_test/run_cuda_ut.shindex 1e4661429..399e84841 100644--- a/.azure-pipelines/scripts/cuda_unit_test/run_cuda_ut.sh+++ b/.azure-pipelines/scripts/cuda_unit_test/run_cuda_ut.sh@@ -79,8 +79,8 @@ function setup_basic_test_env() {cd "${BUILD_SOURCESDIRECTORY}" || exit 1rm -rf /root/.venvuv venv --python=3.14 /root/.venv- uv pip install torch==2.14.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 torch==2.15.0 torchvision torchao --index-url https://download.pytorch.org/whl/cu132+ uv pip install llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu132uv pip install 'git+https://github.com/ggml-org/llama.cpp.git@master#subdirectory=gguf-py'uv pip install -r test/unit/test_cuda/requirements.txtuv pip install -r test/unit/test_cuda/requirements_diffusion.txt@@ -88,7 +88,7 @@ function setup_basic_test_env() {uv pip install -U pytest-cov pytest-timeoutuv pip install kernels==0.17.2 # For sm120: https://github.com/huggingface/transformers/blob/v5.19.0/setup.py#L94uv pip uninstall torch torchvision- uv pip install torch==2.14.1 torchvision torchao --index-url https://download.pytorch.org/whl/cu130+ uv pip install torch==2.15.0 torchvision torchao --index-url https://download.pytorch.org/whl/cu132uv pip install .echo "List dependencies ..."@@ -182,7 +182,7 @@ function run_unit_test_llmc() {uv pip install -U pytest-cov pytest-timeoutBUILD_TYPE="nightly" uv pip install \-r test/integration/test_cuda/requirements_llmc.txt \- --extra-index-url https://download.pytorch.org/whl/cu130 \+ --extra-index-url https://download.pytorch.org/whl/cu132 \--index-strategy unsafe-best-matchuv pip install -U chardetuv pip install .diff --git a/.azure-pipelines/scripts/ut/constraints.txt b/.azure-pipelines/scripts/ut/constraints.txtindex c2a43a813..cc122cd84 100644--- a/.azure-pipelines/scripts/ut/constraints.txt+++ b/.azure-pipelines/scripts/ut/constraints.txt@@ -1,2 +1,2 @@-torch==2.14.0-torchvision==0.29.0+torch==2.15.0+torchvision==0.29.2diff --git a/.azure-pipelines/scripts/ut/run_ut_cuda.sh b/.azure-pipelines/scripts/ut/run_ut_cuda.shindex aee016f37..c2b6df4bf 100644--- a/.azure-pipelines/scripts/ut/run_ut_cuda.sh+++ b/.azure-pipelines/scripts/ut/run_ut_cuda.sh@@ -5,7 +5,7 @@ set -xeCONDA_ENV_NAME="unittest_cuda"PYTHON_VERSION="3.12"-TORCH_VERSION="2.14.1"+TORCH_VERSION="2.15.0"REPO_PATH=$(git rev-parse --show-toplevel)LOG_DIR=${REPO_PATH}/ut_log_dir@@ -96,14 +96,14 @@ function run_unit_test() {cd ${REPO_PATH}/testrm -rf .coverage* *.xml *.html- uv pip install torch==${TORCH_VERSION} 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 torch==${TORCH_VERSION} torchvision torchao --index-url https://download.pytorch.org/whl/cu132+ uv pip install llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu132uv pip install 'git+https://github.com/ggml-org/llama.cpp.git@master#subdirectory=gguf-py'uv pip install -r unit/test_cuda/requirements.txtuv pip install -r unit/test_cuda/requirements_diffusion.txtuv pip install -U transformers chardet timmuv pip uninstall torch torchvision- uv pip install torch==${TORCH_VERSION} torchvision torchao --index-url https://download.pytorch.org/whl/cu130+ uv pip install torch==${TORCH_VERSION} torchvision torchao --index-url https://download.pytorch.org/whl/cu132cd ${REPO_PATH} && uv pip install . && cd ${REPO_PATH}/testpip list > ${LOG_DIR}/ut_pip_list.txt@@ -132,10 +132,10 @@ function run_unit_test_vlm() {cd ${REPO_PATH}/testrm -rf .coverage* *.xml *.html- uv pip install torch==${TORCH_VERSION} torchvision --index-url https://download.pytorch.org/whl/cu130+ uv pip install torch==${TORCH_VERSION} torchvision --index-url https://download.pytorch.org/whl/cu132uv pip install git+https://github.com/haotian-liu/[email protected] --no-depsuv pip install -r unit/test_cuda/requirements_vlm.txt \- --extra-index-url https://download.pytorch.org/whl/cu130 \+ --extra-index-url https://download.pytorch.org/whl/cu132 \--index-strategy unsafe-best-matchuv pip install -U chardetcd ${REPO_PATH} && uv pip install . && cd ${REPO_PATH}/test@@ -167,7 +167,7 @@ function run_unit_test_llmc() {cd ${REPO_PATH}/testrm -rf .coverage* *.xml *.htmlBUILD_TYPE="nightly" uv pip install -r integration/test_cuda/requirements_llmc.txt \- --extra-index-url https://download.pytorch.org/whl/cu130 \+ --extra-index-url https://download.pytorch.org/whl/cu132 \--index-strategy unsafe-best-matchuv pip install -U chardetcd ${REPO_PATH} && uv pip install . && cd ${REPO_PATH}/test