Skip to content

Commit

Permalink
Build Wheels with NOVA
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdBarho committed Dec 12, 2022
1 parent df5ad1d commit f3b54da
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 1 deletion.
47 changes: 47 additions & 0 deletions .github/workflows/nova-wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Nova - Build Wheels

on:
workflow_dispatch: {}

jobs:
generate-matrix-linux:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: wheel
os: linux
channel: release
with-cuda: enable

build-linux:
needs: generate-matrix-linux
name: build-linux
uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@main
with:
repository: ${{ github.repository }}
ref: ""
pre-script: packaging/workflow_env_setup.sh
post-script: ""
smoke-test-script: ""
package-name: xformers
build-matrix: ${{ needs.generate-matrix-linux.outputs.matrix }}
# will push to pytorch if event_name is 'push'
# trigger-event: ${{ github.event_name }}
# secrets:
# AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
# AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }}

# TODO: to be able to publish wheels we have to:
# change the suffix of linux wheels to manylinux
# use a version name compatible with pypi
# publish:
# needs: build-linux
# runs-on: ubuntu-latest
# steps:
# - uses: actions/download-artifact@v3
# - run: python3 -m pip install --upgrade twine
# - run: |
# shopt -s globstar
# python3 -m twine upload --repository testpypi **/*.whl
# env:
# TWINE_USERNAME: __token__
# TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
5 changes: 5 additions & 0 deletions packaging/workflow_env_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cat <<EOT >>${BUILD_ENV_FILE}
export TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0 7.5 8.0 8.6"
export FORCE_CUDA=1
export XFORMERS_BUILD_TYPE="Release"
EOT
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def run(self):
"clean": clean,
},
url="https://facebookresearch.github.io/xformers/",
python_requires=">=3.6",
python_requires=">=3.7",
author="Facebook AI Research",
author_email="oncall+xformers@xmail.facebook.com",
long_description="XFormers: A collection of composable Transformer building blocks."
Expand All @@ -294,6 +294,7 @@ def run(self):
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: BSD License",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Operating System :: OS Independent",
Expand Down

0 comments on commit f3b54da

Please sign in to comment.