Unverified Commit 468690a6 authored by Nikita Shulga's avatar Nikita Shulga Committed by GitHub
Browse files

Move TorchAudio conda package to use pytorch-mutex (#1904)

This is follow up after https://github.com/pytorch/builder/pull/823 that gets rids of `feature` and migrate it to `run_constrained`
parent b9395a4f
...@@ -246,9 +246,9 @@ setup_conda_pytorch_constraint() { ...@@ -246,9 +246,9 @@ setup_conda_pytorch_constraint() {
# Translate CUDA_VERSION into CUDA_CUDATOOLKIT_CONSTRAINT # Translate CUDA_VERSION into CUDA_CUDATOOLKIT_CONSTRAINT
setup_conda_cudatoolkit_constraint() { setup_conda_cudatoolkit_constraint() {
export CONDA_CPUONLY_FEATURE="" export CONDA_BUILD_VARIANT="cuda"
if [[ "$(uname)" == Darwin ]]; then if [[ "$(uname)" == Darwin ]]; then
export CONDA_CUDATOOLKIT_CONSTRAINT="" export CONDA_BUILD_VARIANT="cpu"
else else
case "$CU_VERSION" in case "$CU_VERSION" in
cu113) cu113)
...@@ -277,7 +277,7 @@ setup_conda_cudatoolkit_constraint() { ...@@ -277,7 +277,7 @@ setup_conda_cudatoolkit_constraint() {
;; ;;
cpu) cpu)
export CONDA_CUDATOOLKIT_CONSTRAINT="" export CONDA_CUDATOOLKIT_CONSTRAINT=""
export CONDA_CPUONLY_FEATURE="- cpuonly" export CONDA_BUILD_VARIANT="cpu"
;; ;;
*) *)
echo "Unrecognized CU_VERSION=$CU_VERSION" echo "Unrecognized CU_VERSION=$CU_VERSION"
......
{% set build_variant = environ.get('CONDA_BUILD_VARIANT', 'cpu') %}
package: package:
name: torchaudio name: torchaudio
version: "{{ environ.get('BUILD_VERSION', '0.0.0') }}" version: "{{ environ.get('BUILD_VERSION', '0.0.0') }}"
...@@ -16,25 +17,32 @@ requirements: ...@@ -16,25 +17,32 @@ requirements:
- cmake - cmake
- ninja - ninja
- defaults::numpy >=1.11 - defaults::numpy >=1.11
- pytorch-mutex 1.0 {{ build_variant }} # [not osx ]
{{ environ.get('CONDA_PYTORCH_BUILD_CONSTRAINT', 'pytorch') }} {{ environ.get('CONDA_PYTORCH_BUILD_CONSTRAINT', 'pytorch') }}
{{ environ.get('CONDA_EXTRA_BUILD_CONSTRAINT', '') }} {{ environ.get('CONDA_EXTRA_BUILD_CONSTRAINT', '') }}
{{ environ.get('CONDA_CPUONLY_FEATURE', '') }}
{{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT', '') }} {{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT', '') }}
run: run:
- python - python
- defaults::numpy >=1.11 - defaults::numpy >=1.11
- pytorch-mutex 1.0 {{ build_variant }} # [not osx ]
{{ environ.get('CONDA_PYTORCH_CONSTRAINT', 'pytorch') }} {{ environ.get('CONDA_PYTORCH_CONSTRAINT', 'pytorch') }}
{{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT', '') }} {{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT', '') }}
{% if build_variant == 'cpu' %}
run_constrained:
- cpuonly
{% elif not osx %}
run_constrained:
- cpuonly <0
{% endif %}
build: build:
string: py{{py}}_{{ environ.get('CU_VERSION', 'cpu') }} string: py{{py}}_{{ environ.get('CU_VERSION', 'cpu') }}
script_env: script_env:
- BUILD_VERSION - BUILD_VERSION
- USE_CUDA - USE_CUDA
- TORCH_CUDA_ARCH_LIST - TORCH_CUDA_ARCH_LIST
features:
{{ environ.get('CONDA_CPUONLY_FEATURE', '') }}
test: test:
imports: imports:
...@@ -52,7 +60,7 @@ test: ...@@ -52,7 +60,7 @@ test:
# Ideally we would test this, but conda doesn't provide librosa # Ideally we would test this, but conda doesn't provide librosa
# - librosa >=0.4.3 # - librosa >=0.4.3
- scipy - scipy
{{ environ.get('CONDA_CPUONLY_FEATURE', '') }} - pytorch-mutex 1.0 {{ build_variant }} # [not osx ]
about: about:
home: https://github.com/pytorch/audio home: https://github.com/pytorch/audio
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment