Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/scripts/ci_test_xpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export CXX=/usr/bin/g++
export SCCACHE_DISABLE=1

python3 -m pip install torch torchvision torchaudio pytorch-triton-xpu --index-url https://download.pytorch.org/whl/nightly/xpu --force-reinstall --no-cache-dir
cd torchao && python3 setup.py install && cd ..
cd torchao && pip install . --no-build-isolation && cd ..

python3 -c "import torch; import torchao; print(f'Torch version: {torch.__version__}')"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/1xH100_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
pip install uv
pip install ${{ matrix.torch-spec }}
uv pip install -r dev-requirements.txt
pip install .
pip install . --no-build-isolation
pytest test/integration --verbose -s
pytest test/dtypes/test_affine_quantized_float.py --verbose -s
python test/quantization/quantize_/workflows/float8/test_float8_tensor.py
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/1xL4_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
pip install uv
pip install ${{ matrix.torch-spec }}
uv pip install -r dev-requirements.txt
pip install .
pip install . --no-build-isolation
pytest test/integration --verbose -s
pytest test/dtypes/test_affine_quantized_float.py --verbose -s
./test/float8/test_everything_single_gpu.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/4xH100_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ jobs:
pip install uv
pip install ${{ matrix.torch-spec }}
uv pip install -r dev-requirements.txt
pip install .
pip install . --no-build-isolation
./test/float8/test_everything_multi_gpu.sh
./test/prototype/mx_formats/test_mx_dtensor.sh
2 changes: 1 addition & 1 deletion .github/workflows/dashboard_perf_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
${CONDA_RUN} python -m pip install --upgrade pip
${CONDA_RUN} pip install ${{ matrix.torch-spec }}
${CONDA_RUN} pip install -r dev-requirements.txt
${CONDA_RUN} pip install .
${CONDA_RUN} pip install . --no-build-isolation
# SAM 2.1
${CONDA_RUN} pip install -r examples/sam2_amg_server/requirements.txt

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/doc_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install torch
python -m pip install setuptools==78.1.1 --force-reinstall
python -m pip install -e .
python -m pip install -e . --no-build-isolation
pip install -r dev-requirements.txt
python -m pip install -r docs/requirements.txt
- name: Build docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly_smoke_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ jobs:
python -m pip install --upgrade pip
pip install ${{ matrix.torch-spec }}
pip install -r dev-requirements.txt
python setup.py install
pip install . --no-build-isolation
pytest test --verbose -s
4 changes: 2 additions & 2 deletions .github/workflows/regression_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
python -m pip install --upgrade pip
pip install ${{ matrix.torch-spec }}
pip install -r dev-requirements.txt
pip install .
pip install . --no-build-isolation
export CONDA=$(dirname $(dirname $(which conda)))
export LD_LIBRARY_PATH=$CONDA/lib/:$LD_LIBRARY_PATH
pytest test --verbose -s
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
pip install ${{ matrix.torch-spec }}
sed -i '${{ matrix.dev-requirements-overrides }}' dev-requirements.txt
pip install -r dev-requirements.txt
pip install .
pip install . --no-build-isolation
export CONDA=$(dirname $(dirname $(which conda)))
export LD_LIBRARY_PATH=$CONDA/lib/:$LD_LIBRARY_PATH
pytest test --verbose -s
4 changes: 2 additions & 2 deletions .github/workflows/regression_test_aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ jobs:
pip install executorch
pip install torch==2.7.0 --index-url https://download.pytorch.org/whl/cpu --force-reinstall
pip install -r dev-requirements.txt
USE_CPP=1 TORCHAO_BUILD_KLEIDIAI=1 pip install .
USE_CPP=1 TORCHAO_BUILD_KLEIDIAI=1 pip install . --no-build-isolation
- name: Install requirements linux
if: runner.os == 'Linux'
run: |
conda activate venv
pip install coremltools
pip install torch==2.7.0 --index-url https://download.pytorch.org/whl/cpu --force-reinstall
pip install -r dev-requirements.txt
BUILD_TORCHAO_EXPERIMENTAL=1 TORCHAO_BUILD_CPU_AARCH64=1 TORCHAO_BUILD_KLEIDIAI=1 TORCHAO_ENABLE_ARM_NEON_DOT=1 TORCHAO_PARALLEL_BACKEND=OPENMP pip install .
BUILD_TORCHAO_EXPERIMENTAL=1 TORCHAO_BUILD_CPU_AARCH64=1 TORCHAO_BUILD_KLEIDIAI=1 TORCHAO_ENABLE_ARM_NEON_DOT=1 TORCHAO_PARALLEL_BACKEND=OPENMP pip install . --no-build-isolation
- name: Run python tests
run: |
conda activate venv
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/regression_test_rocm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
python -m pip install --upgrade pip
pip install ${{ matrix.torch-spec }}
pip install -r dev-requirements.txt
pip install .
pip install . --no-build-isolation
export CONDA=$(dirname $(dirname $(which conda)))
export LD_LIBRARY_PATH=$CONDA/lib/:$LD_LIBRARY_PATH
pytest test --verbose -s
2 changes: 1 addition & 1 deletion .github/workflows/release_model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
pip install uv
pip install ${{ matrix.torch-spec }}
uv pip install -r dev-requirements.txt
pip install .
pip install . --no-build-isolation
HF_MODEL_ID=${{ github.event.inputs.hf_model_id }}
cd .github/scripts/torchao_model_releases
./release.sh --model_id $HF_MODEL_ID --push_to_hub
2 changes: 1 addition & 1 deletion .github/workflows/run_microbenchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
# Install dependencies
${CONDA_RUN} pip install ${{ matrix.torch-spec }}
${CONDA_RUN} pip install -r dev-requirements.txt
${CONDA_RUN} pip install .
${CONDA_RUN} pip install . --no-build-isolation

${CONDA_RUN} ls
${CONDA_RUN} bash -c 'pwd'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_tutorials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ jobs:
${CONDA_RUN} python -m pip install --upgrade pip
${CONDA_RUN} pip install ${{ matrix.torch-spec }}
${CONDA_RUN} pip install -r dev-requirements.txt
${CONDA_RUN} pip install .
${CONDA_RUN} pip install . --no-build-isolation
cd tutorials
${CONDA_RUN} bash run_all.sh
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@ pip install torchao
pip install torchao --index-url https://download.pytorch.org/whl/cpu # CPU only

# For developers
USE_CUDA=1 python setup.py develop
USE_CPP=0 python setup.py develop
# Note: the `--no-build-isolation` flag is required.
USE_CUDA=1 pip install -e . --no-build-isolation
USE_CPP=0 pip install -e . --no-build-isolation
```
</details>

Expand Down
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[build-system]
requires = [
"setuptools",
"wheel",
# TODO(future): consider declaring build-time dependencies such
# as `torch` here to enable PEP 517. For now, require the user to
# install `torch` in their environment before running the build,
# and only support builds with the `--no-build-isolation` flag.
]
build-backend = "setuptools.build_meta"
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pip uninstall torchao
# Install specific compatible version of torch (nightly 2.9.0dev)
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu129
# Build torchao from source
python setup.py develop
pip install . --no-build-isolation
# Should import successfully without warning
check_torchao_import "false" ""
## prev torch, torchao from source (do not rebuild), env var = True
Expand Down
Loading