forked from llvm/torch-mlir
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
165 changed files
with
5,729 additions
and
1,838 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,25 @@ on: | |
jobs: | ||
build_linux: | ||
name: Manylinux Build | ||
runs-on: ubuntu-latest | ||
runs-on: a100 | ||
strategy: | ||
matrix: | ||
package: [ torch-mlir, torch-mlir-core ] | ||
py_version: [ cp38-cp38, cp310-cp310, cp311-cp311 ] | ||
exclude: | ||
- package: torch-mlir-core | ||
py_version: cp38-cp38 | ||
- package: torch-mlir-core | ||
py_version: cp310-cp310 | ||
|
||
steps: | ||
|
||
- name: Prepare workspace | ||
run: | | ||
# Clear the workspace directory so that we don't run into errors about | ||
# existing lock files. | ||
sudo rm -rf $GITHUB_WORKSPACE/* | ||
- name: Get torch-mlir | ||
uses: actions/checkout@v3 | ||
with: | ||
|
@@ -28,7 +45,7 @@ jobs: | |
python -m pip install wheel | ||
TM_PACKAGE_VERSION=${{ github.event.inputs.python_package_version }} | ||
printf "TORCH_MLIR_PYTHON_PACKAGE_VERSION=%s\n" $TM_PACKAGE_VERSION > ./torch_mlir_package_version | ||
./build_tools/python_deploy/build_linux_packages.sh | ||
TM_PYTHON_VERSIONS=${{ matrix.py_version }} TM_PACKAGES=${{ matrix.package }} ./build_tools/python_deploy/build_linux_packages.sh | ||
# If we were given a release_id, then upload the package we just built | ||
# to the github releases page. | ||
|
@@ -56,7 +73,7 @@ jobs: | |
run: mkdir dist | ||
- name: Copy releases to publish to dist directory | ||
if: github.event.inputs.release_id != '' | ||
run: cp build_tools/python_deploy/wheelhouse/torch_mlir-*.whl dist/ | ||
run: cp build_tools/python_deploy/wheelhouse/torch_mlir*.whl dist/ | ||
|
||
# Wheels must be published from a linux environment. | ||
# | ||
|
@@ -70,6 +87,9 @@ jobs: | |
build_macos: | ||
name: MacOS Build | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
package: [ torch-mlir, torch-mlir-core ] | ||
steps: | ||
- name: Get torch-mlir | ||
uses: actions/checkout@v3 | ||
|
@@ -85,7 +105,7 @@ jobs: | |
TM_PACKAGE_VERSION=${{ github.event.inputs.python_package_version }} | ||
printf "TORCH_MLIR_PYTHON_PACKAGE_VERSION=%s\n" $TM_PACKAGE_VERSION > ./torch_mlir_package_version | ||
sudo ./build_tools/python_deploy/install_macos_deps.sh | ||
TORCH_MLIR_PYTHON_VERSIONS="3.10" ./build_tools/python_deploy/build_macos_packages.sh | ||
packages=${{ matrix.package }} TORCH_MLIR_PYTHON_VERSIONS="3.11" ./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. | ||
|
@@ -113,7 +133,7 @@ jobs: | |
run: mkdir dist | ||
- name: Copy releases to publish to dist directory | ||
if: github.event.inputs.release_id != '' | ||
run: cp build_tools/python_deploy/wheelhouse/torch_mlir-*.whl dist/ | ||
run: cp build_tools/python_deploy/wheelhouse/torch_mlir*.whl dist/ | ||
|
||
# Wheels must be published from a linux environment. | ||
# | ||
|
@@ -127,6 +147,9 @@ jobs: | |
build_windows: | ||
name: Windows Build | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
package: [ torch-mlir, torch-mlir-core ] | ||
steps: | ||
- name: Get torch-mlir | ||
uses: actions/checkout@v3 | ||
|
@@ -142,6 +165,14 @@ jobs: | |
- name: Build Python wheels and smoke test. | ||
shell: pwsh | ||
run: | | ||
if ( "${{ matrix.package }}" -eq "torch-mlir-core" ) | ||
{ | ||
$env:TORCH_MLIR_ENABLE_JIT_IR_IMPORTER='0' | ||
$env:TORCH_MLIR_ENABLE_ONLY_MLIR_PYTHON_BINDINGS='1' | ||
} else { | ||
$env:TORCH_MLIR_ENABLE_JIT_IR_IMPORTER='1' | ||
$env:TORCH_MLIR_ENABLE_ONLY_MLIR_PYTHON_BINDINGS='0' | ||
} | ||
$env:TORCH_MLIR_PYTHON_PACKAGE_VERSION = '${{ github.event.inputs.python_package_version }}' | ||
./build_tools/python_deploy/build_windows.ps1 | ||
|
@@ -172,7 +203,7 @@ jobs: | |
continue-on-error: true | ||
- name: Copy releases to publish to dist directory | ||
if: github.event.inputs.release_id != '' | ||
run: cp ./wheelhouse/torch_mlir-*.whl dist/ | ||
run: cp ./wheelhouse/torch_mlir*.whl dist/ | ||
|
||
# Wheels must be published from a linux environment. | ||
# | ||
|
@@ -216,4 +247,4 @@ jobs: | |
# if: github.event.inputs.release_id != '' | ||
# uses: pypa/[email protected] | ||
# with: | ||
# password: ${{ secrets.PYPI_API_TOKEN }} | ||
# password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,3 +32,6 @@ bazel-* | |
build_oot/ | ||
docker_venv/ | ||
llvm-build/ | ||
|
||
# C++ build artifacts | ||
compile_commands.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
-r pytorch-requirements.txt | ||
|
||
numpy | ||
pybind11 | ||
wheel | ||
|
Oops, something went wrong.