PTQ-Level Efficiency, QAT-Level Accuracy | 训练后量化的效率,量化感知训练的精度
Update auto-round-lib release package build (#1895)
chen, suyue6c707b1fbb43
diff --git a/.azure-pipelines/ark-unit-test.yml b/.azure-pipelines/ark-unit-test.ymlindex 707840b44..4e93301b8 100644--- a/.azure-pipelines/ark-unit-test.yml+++ b/.azure-pipelines/ark-unit-test.yml@@ -19,12 +19,14 @@ parameters:displayName: "Python versions"type: string# Comma-separated list to avoid YAML float parsing in runtime inputs.+ # For example, "3.10,3.11,3.12,3.13,3.14"default: "3.12"- name: torchVersionsdisplayName: "Torch versions"type: string# Comma-separated list to align with pythonVersions runtime input style.- default: "2.11.0"+ # For example, "2.11.0,2.12.0"+ default: "2.12.0"- name: publishTargetdisplayName: "Publish wheels to"type: string@@ -98,35 +100,41 @@ stages:exit 1fi- - stage: PublishWheels- displayName: Publish wheels (${{ parameters.publishTarget }})+ - stage: PublishDist+ displayName: Publish dist (${{ parameters.publishTarget }})dependsOn: TestArkcondition: and(succeeded(), ne('${{ parameters.publishTarget }}', 'none'))jobs:- - job: PublishWheels- displayName: Publish all wheels to ${{ parameters.publishTarget }}+ - job: PublishDist+ displayName: Publish all dist to ${{ parameters.publishTarget }}pool: B60steps:- checkout: none- task: Bash@3- displayName: Clean wheel download directory+ displayName: Clean dist download directoryinputs:targetType: inlinescript: |set -euxo pipefail- rm -rf "$(Pipeline.Workspace)/wheels"- mkdir -p "$(Pipeline.Workspace)/wheels"+ rm -rf "$(Pipeline.Workspace)/dist" "$(Pipeline.Workspace)/wheelhouse" || true+ mkdir -p "$(Pipeline.Workspace)/dist"- ${{ each pythonVersion in split(parameters.pythonVersions, ',') }}:- task: DownloadPipelineArtifact@2displayName: Download wheel (py${{ trim(pythonVersion) }})inputs:artifact: auto-round-lib-wheel-cp${{ replace(trim(pythonVersion), '.', '') }}- path: $(Pipeline.Workspace)/wheels+ path: $(Pipeline.Workspace)/dist++ - task: DownloadPipelineArtifact@2+ displayName: Download source dist+ inputs:+ artifact: auto-round-lib-dist+ path: $(Pipeline.Workspace)/dist- task: Bash@3- displayName: Upload wheels to ${{ parameters.publishTarget }}+ displayName: Upload dist to ${{ parameters.publishTarget }}env:TWINE_USERNAME: "__token__"${{ if eq(parameters.publishTarget, 'pypi') }}:@@ -146,7 +154,7 @@ stages:pip install --upgrade twinePUBLISH_TARGET="${{ parameters.publishTarget }}"if [ "${PUBLISH_TARGET}" == "testpypi" ]; then- twine upload --repository-url https://test.pypi.org/legacy/ $(Pipeline.Workspace)/wheels/*.whl+ twine upload --repository-url https://test.pypi.org/legacy/ $(Pipeline.Workspace)/dist/*else- twine upload $(Pipeline.Workspace)/wheels/*.whl+ twine upload $(Pipeline.Workspace)/dist/*fi\ No newline at end of filediff --git a/.azure-pipelines/template/lib-build-template.yml b/.azure-pipelines/template/lib-build-template.ymlindex 1f18b68ed..d506097fe 100644--- a/.azure-pipelines/template/lib-build-template.yml+++ b/.azure-pipelines/template/lib-build-template.yml@@ -100,14 +100,25 @@ stages:&& export BUILD_MODE=${{ parameters.buildMode }} \&& python -m build --wheel --no-isolation \&& auditwheel repair dist/*.whl --exclude lib* -w wheelhouse/ \- && ls -lah wheelhouse"-+ && ls -lah wheelhouse \+ && if [[ "$python_version_fix" == "312" ]] && [[ "\$BUILD_MODE" == "release" ]]; then \+ rm -rf dist/* && python -m build --sdist --no-isolation && ls -lah dist; \+ fi"+- task: PublishPipelineArtifact@1displayName: Publish wheel artifactinputs:targetPath: $(Build.SourcesDirectory)/auto_round_extension/ark/wheelhouseartifact: auto-round-lib-wheel-cp${{ replace(trim(pythonVersion), '.', '') }}publishLocation: pipeline++ - task: PublishPipelineArtifact@1+ condition: and(succeeded(), eq('${{ parameters.buildMode }}', 'release'), eq('${{ replace(trim(pythonVersion), '.', '') }}', '312'))+ displayName: Publish dist artifact+ inputs:+ targetPath: $(Build.SourcesDirectory)/auto_round_extension/ark/dist+ artifact: auto-round-lib-dist+ publishLocation: pipeline- ${{ if eq(parameters.publishToTestPyPI, true) }}:- task: Bash@3@@ -133,4 +144,4 @@ stages:quay.io/pypa/manylinux_2_28_x86_64 \bash -c "source venv/bin/activate \&& python -m pip install --upgrade twine \- && twine upload --repository-url https://test.pypi.org/legacy/ wheelhouse/*.whl"\ No newline at end of file+ && twine upload --repository-url https://test.pypi.org/legacy/ wheelhouse/*.whl"diff --git a/auto_round_extension/ark/MANIFEST.in b/auto_round_extension/ark/MANIFEST.innew file mode 100644index 000000000..553c80927--- /dev/null+++ b/auto_round_extension/ark/MANIFEST.in@@ -0,0 +1,11 @@+include LICENSE+include README.md+include requirements.txt++graft auto_round_kernel+graft tools+graft test++prune build+prune xbuild+global-exclude __pycache__ *.py[cod] *.so *.pyd\ No newline at end of file