Skip to content

Commit

Permalink
CI: miscellaneous fixes for Release builds (llvm#1781)
Browse files Browse the repository at this point in the history
- Use v3 of actions/checkout, since the version we use (v2) uses
   Node.js 12, which is deprecated by GitHub.

 - Source the PowerShell venv sctipt (instead of the bash sript) since
   the calling script is a PowerShell script.  Without this, the build
   doesn't use venv at all.

 - Make the build dependencies in whl-requirements.txt (used by
   setup.py) match those in requirements.txt.  To that end, this patch
   creates a build-requirements.txt that is referenced by
   requirements.txt and whl-requirements.txt.
  • Loading branch information
ashay authored Jan 7, 2023
1 parent 8f01072 commit a897c49
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 26 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/buildRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Get torch-mlir
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: 'true'
- uses: ./.github/actions/setup-build
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
runs-on: macos-latest
steps:
- name: Get torch-mlir
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: 'true'
- uses: ./.github/actions/setup-build
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
runs-on: windows-latest
steps:
- name: Get torch-mlir
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: 'true'
- uses: ./.github/actions/setup-build
Expand Down
12 changes: 12 additions & 0 deletions build-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-r pytorch-requirements.txt

numpy
pybind11
wheel
setuptools
cmake
ninja

# Workaround for what should be a torch dep
# See discussion in #1174
pyyaml
2 changes: 1 addition & 1 deletion build_tools/python_deploy/build_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

Write-Host "Installing Build Dependencies"
python -m venv .\mlir_venv\
.\mlir_venv\Scripts\activate
.\mlir_venv\Scripts\Activate.PS1
pip install -r .\requirements.txt
Write-Host "Build Deps installation completed successfully"

Expand Down
15 changes: 1 addition & 14 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
-r pytorch-requirements.txt

numpy

# Build requirements.
pybind11
wheel
setuptools
cmake
ninja

# Workaround for what should be a torch dep
# See discussion in #1174
pyyaml
-r build-requirements.txt

# Test Requirements
pillow
Expand Down
1 change: 1 addition & 0 deletions utils/bazel/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RUN wget -q https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSIO

# Install torch-mlir requirements
COPY requirements.txt /opt/app/requirements.txt
COPY build-requirements.txt /opt/app/build-requirements.txt
COPY pytorch-requirements.txt /opt/app/pytorch-requirements.txt
WORKDIR /opt/app
RUN python3 -m pip install --upgrade pip
Expand Down
10 changes: 2 additions & 8 deletions whl-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
-f pytorch-requirements.txt
-f build-requirements.txt

setuptools>=42
wheel
cmake==3.22.2
ninja==1.10.2
# Packaging requirements.
packaging
pybind11>=2.6.0,!=2.7.0
PyYAML
numpy

0 comments on commit a897c49

Please sign in to comment.