Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove special cases for torchaudio FFmpeg #4358

Merged
merged 2 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/build_conda_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ jobs:
run: |
set -euxo pipefail
source "${BUILD_ENV_FILE}"
export FFMPEG_ROOT="${PWD}"/third_party/ffmpeg
export USE_FFMPEG="1"

${CONDA_RUN} conda build \
-c defaults \
Expand Down Expand Up @@ -178,7 +176,6 @@ jobs:
${CONDA_RUN_SMOKE} python3 -c "import ${PACKAGE_NAME}; print('package version is ', ${PACKAGE_NAME}.__version__)"
else
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} found"
export LD_LIBRARY_PATH="{LD_LIBRARY_PATH}:${{ inputs.repository }}/third_party/ffmpeg/lib"
conda install --yes --quiet 'ffmpeg<5'
${CONDA_RUN_SMOKE} python "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT}"
fi
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/build_conda_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,8 @@ jobs:
source "${BUILD_ENV_FILE}"

if [[ "${{ inputs.package-name }}" = "torchaudio" ]]; then
export USE_FFMPEG="1"
export USE_OPENMP="0"
fi
export FFMPEG_ROOT="${PWD}/third_party/ffmpeg"

${CONDA_RUN} conda build \
-c defaults \
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/build_conda_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@ jobs:
source "${BUILD_ENV_FILE}"
export VSTOOLCHAIN_PACKAGE=vs2019
export VSDEVCMD_ARGS=''
export FFMPEG_ROOT="${PWD}"/third_party/ffmpeg
export USE_FFMPEG="1"

#conda install -yq conda-build "conda-package-handling!=1.5.0"
#bash packaging/build_conda.sh
Expand Down Expand Up @@ -208,7 +206,6 @@ jobs:
${CONDA_RUN_SMOKE} python -c "import ${PACKAGE_NAME}; print('package version is ', ${PACKAGE_NAME}.__version__)"
else
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} found"
export LD_LIBRARY_PATH="{LD_LIBRARY_PATH}:${{ inputs.repository }}/third_party/ffmpeg/lib"
conda install --yes --quiet 'ffmpeg<5'
${CONDA_RUN_SMOKE} python "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT}"
fi
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/build_wheels_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ jobs:
run: |
set -euxo pipefail
source "${BUILD_ENV_FILE}"
export FFMPEG_ROOT="${PWD}"/third_party/ffmpeg
export USE_FFMPEG="1"
export PYTORCH_VERSION="$(${CONDA_RUN} pip show torch | grep ^Version: | sed 's/Version: *//' | sed 's/+.\+//')"
${CONDA_RUN} python setup.py bdist_wheel
- name: Upload wheel to GitHub
Expand Down Expand Up @@ -187,7 +185,6 @@ jobs:
fi
else
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} found"
export LD_LIBRARY_PATH="{LD_LIBRARY_PATH}:${{ inputs.repository }}/third_party/ffmpeg/lib"
${CONDA_RUN} python "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT}"
fi
- name: Upload package to pytorch.org
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/build_wheels_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,10 @@ jobs:
source "${BUILD_ENV_FILE}"

if [[ "${{ inputs.package-name }}" = "torchaudio" ]]; then
export USE_FFMPEG="1"
export USE_OPENMP="0"
fi
PYTORCH_VERSION="$(${CONDA_RUN} pip show torch | grep ^Version: | sed 's/Version: *//')"
export PYTORCH_VERSION
export FFMPEG_ROOT="${PWD}/third_party/ffmpeg"

${CONDA_RUN} python3 setup.py bdist_wheel
- name: Delocate wheel
Expand Down Expand Up @@ -193,10 +191,7 @@ jobs:
else
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} found"

export DYLD_FALLBACK_LIBRARY_PATH="${PWD}/${{ inputs.repository }}/third_party/ffmpeg/lib"
echo $DYLD_FALLBACK_LIBRARY_PATH

${CONDA_RUN} conda install --yes --quiet ffmpeg
${CONDA_RUN} conda install --yes --quiet 'ffmpeg<5'
${CONDA_RUN} python3 "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT}"
fi
export PATH=${OLD_PATH}
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/build_wheels_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ jobs:
BUILD_PARAMS: ${{ inputs.wheel-build-params }}
run: |
source "${BUILD_ENV_FILE}"
export FFMPEG_ROOT="${PWD}"/third_party/ffmpeg
export USE_FFMPEG="1"

if [[ "$CU_VERSION" == "cpu" ]]; then
# CUDA and CPU are ABI compatible on the CPU-only parts, so strip
Expand Down Expand Up @@ -187,7 +185,6 @@ jobs:
${CONDA_RUN} python -c "import ${PACKAGE_NAME}; print('package version is ', ${PACKAGE_NAME}.__version__)"
else
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} found"
export LD_LIBRARY_PATH="{LD_LIBRARY_PATH}:${{ inputs.repository }}/third_party/ffmpeg/lib"
${CONDA_RUN} python "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT}"
fi
- name: Upload package to pytorch.org
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test_build_conda_linux_with_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ jobs:
matrix:
include:
- repository: pytorch/audio
cache-path: /third_party/ffmpeg
cache-key: linux-ffmpeg
pre-script: packaging/pre_build_script.sh
post-script: packaging/post_build_script.sh
smoke-test-script: test/smoke_test/smoke_test.py
conda-package-directory: packaging/torchaudio
package-name: torchaudio
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test_build_conda_m1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ jobs:
matrix:
include:
- repository: pytorch/audio
cache-path: /third_party/ffmpeg
cache-key: macos-m1-ffmpeg
pre-script: packaging/pre_build_script.sh
post-script: packaging/post_build_script.sh
conda-package-directory: packaging/torchaudio
smoke-test-script: test/smoke_test/smoke_test.py
package-name: torchaudio
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test_build_conda_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ jobs:
matrix:
include:
- repository: pytorch/audio
cache-path: /third_party/ffmpeg
cache-key: macos-ffmpeg
pre-script: packaging/pre_build_script.sh
post-script: packaging/post_build_script.sh
conda-package-directory: packaging/torchaudio
smoke-test-script: test/smoke_test/smoke_test.py
package-name: torchaudio
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test_build_conda_windows_with_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ jobs:
matrix:
include:
- repository: pytorch/audio
cache-path: /third_party/ffmpeg
cache-key: windows-ffmpeg
pre-script: packaging/ffmpeg/build.bat
post-script: ""
smoke-test-script: test/smoke_test/smoke_test.py
conda-package-directory: packaging/torchaudio
package-name: torchaudio
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test_build_wheels_linux_with_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ jobs:
matrix:
include:
- repository: pytorch/audio
cache-path: /third_party/ffmpeg
cache-key: linux-ffmpeg
pre-script: packaging/pre_build_script.sh
post-script: packaging/post_build_script.sh
smoke-test-script: test/smoke_test/smoke_test.py
package-name: torchaudio
- repository: pytorch/vision
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test_build_wheels_m1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ jobs:
matrix:
include:
- repository: pytorch/audio
cache-path: /third_party/ffmpeg
cache-key: macos-m1-ffmpeg
pre-script: packaging/pre_build_script.sh
post-script: packaging/post_build_script.sh
conda-package-directory: packaging/torchaudio
smoke-test-script: test/smoke_test/smoke_test.py
package-name: torchaudio
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test_build_wheels_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ jobs:
matrix:
include:
- repository: pytorch/audio
cache-path: /third_party/ffmpeg
cache-key: macos-ffmpeg
pre-script: packaging/pre_build_script.sh
post-script: packaging/post_build_script.sh
conda-package-directory: packaging/torchaudio
smoke-test-script: test/smoke_test/smoke_test.py
package-name: torchaudio
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test_build_wheels_windows_with_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,8 @@ jobs:
matrix:
include:
- repository: pytorch/audio
pre-script: packaging/ffmpeg/build.bat
env-script: packaging/vc_env_helper.bat
cache-path: /third_party/ffmpeg
cache-key: windows-ffmpeg
wheel-build-params: "--plat-name win_amd64"
post-script: ""
smoke-test-script: test/smoke_test/smoke_test.py
package-name: torchaudio
- repository: pytorch/vision
Expand Down