mirror of https://github.com/llvm/torch-mlir
Enable OSX (Intel, Apple Silicon Builds) (#776)
Update pinned pytorch version. Will submit a follow on PR to bump. Also update artifacts directorypull/778/head
parent
cc3a4a58ef
commit
b03eac4224
|
@ -32,6 +32,24 @@ jobs:
|
|||
python -m pip install wheel
|
||||
./build_tools/python_deploy/build_linux_packages.sh
|
||||
|
||||
name: MacOS Build
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Get torch-mlir
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: 'true'
|
||||
- uses: ./.github/actions/setup-build
|
||||
with:
|
||||
cache-suffix: ''
|
||||
- name: Build Python wheels and smoke test.
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE
|
||||
python -m pip install wheel
|
||||
./build_tools/python_deploy/install_macos_deps.sh
|
||||
python_versions="3.9 3.10" ./build_tools/python_deploy/build_macos_packages.sh
|
||||
|
||||
|
||||
# If we were given a release_id, then upload the package we just built
|
||||
# to the github releases page.
|
||||
- name: Upload Release Assets (if requested)
|
||||
|
|
|
@ -60,18 +60,18 @@ function run() {
|
|||
}
|
||||
|
||||
function build_torch_mlir() {
|
||||
python -m pip install -r /main_checkout/torch-mlir/requirements.txt
|
||||
python -m pip install -r $repo_root/requirements.txt --extra-index-url https://download.pytorch.org/whl/nightly/cpu
|
||||
CMAKE_GENERATOR=Ninja \
|
||||
MACOSX_DEPLOYMENT_TARGET=11.0 \
|
||||
CMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
|
||||
python -m pip wheel -v -w /wheelhouse /main_checkout/torch-mlir/
|
||||
python -m pip wheel -v -w $output_dir $repo_root --extra-index-url https://download.pytorch.org/whl/nightly/cpu
|
||||
}
|
||||
|
||||
function clean_wheels() {
|
||||
local wheel_basename="$1"
|
||||
local python_version="$2"
|
||||
echo ":::: Clean wheels $wheel_basename $python_version"
|
||||
rm -f /wheelhouse/${wheel_basename}-*-${python_version}-*.whl
|
||||
rm -f $output_dir/${wheel_basename}-*-${python_version}-*.whl
|
||||
}
|
||||
|
||||
run
|
||||
|
|
|
@ -16,6 +16,6 @@ requires = [
|
|||
# artifacts.
|
||||
# TODO: Come up with a better way to pin the version.
|
||||
"numpy",
|
||||
"torch==1.12.0.dev20220419+cpu",
|
||||
"torch==1.12.0.dev20220420",
|
||||
]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
|
Loading…
Reference in New Issue