Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: 'pipenv'
cache-dependency-path: Pipfile.lock
cache-dependency-path: Pipfile.lock.${{ matrix.python-version }}
- name: Install Pipenv
run: pip3 install pipenv
- name: Install Python Dependencies
run: pipenv sync --categories="packages dev-packages ci" --verbose
run: ./versioned_pipenv sync --categories="packages dev-packages ci" --verbose
- name: ${{ matrix.task }}
run: pipenv run ${{ matrix.cmd }}
run: ./versioned_pipenv run ${{ matrix.cmd }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ __pycache__
.vscode
.idea
*.swp
Pipfile.lock
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM python:3.10

WORKDIR /ml-compiler-opt
COPY . .
RUN pip install pipenv && pipenv sync --system --categories "packages,dev-packages,ci" && pipenv --clear
RUN pip install pipenv && ./versioned_pipenv sync --system --categories "packages,dev-packages,ci" && ./versioned_pipenv --clear

WORKDIR /ml-compiler-opt/compiler_opt/tools
ENV PYTHONPATH=/ml-compiler-opt
Expand Down
1,900 changes: 0 additions & 1,900 deletions Pipfile.lock

This file was deleted.

1,007 changes: 1,007 additions & 0 deletions Pipfile.lock.3.10

Large diffs are not rendered by default.

1,998 changes: 1,998 additions & 0 deletions Pipfile.lock.3.11

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pip3 install pipenv

The actual dependencies:
```shell
pipenv sync --system --categories "packages dev-packages ci"
./versioned_pipenv sync --system --categories "packages dev-packages ci"
```
Note that the above command will only work from the root of the repository
since it needs to have `Pipfile.lock` in the working directory at the time
Expand Down
2 changes: 1 addition & 1 deletion buildbot/buildbot_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ wget --quiet https://raw.githubusercontent.com/google/ml-compiler-opt/main/Pipfi
# install the tf pip package for the AOT ("release" scenario).
sudo -u buildbot python3 -m pip install --break-system-packages pipenv
echo installed pipenv
sudo -u buildbot python3 -m pipenv sync --extra-pip-args="--break-system-packages" --categories "packages dev-packages" --system
sudo -u buildbot python3 versioned_pipenv sync --extra-pip-args="--break-system-packages" --categories "packages dev-packages" --system
echo used pipenv
python3 -m pip install --break-system-packages buildbot-worker==2.9.0
echo installed buildbot worker
Expand Down
4 changes: 2 additions & 2 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ again.

Use `yapf` to format the submission before making a PR. The version of yapf
that is used by this repository along with other development tools can be
installed with `pipenv sync --categories="dev-packages" --system` and run on
the entire repository with `yapf . -ir`.
installed with `./versioned_pipenv sync --categories="dev-packages" --system`
and run on the entire repository with `yapf . -ir`.

## Linting

Expand Down
2 changes: 1 addition & 1 deletion docs/inlining-demo/demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ See also [the build bot script](../../buildbot/buildbot_init.sh)
cd ~/ml-compiler-opt
sudo apt-get install python3-pip
pip3 install pipenv
pipenv sync --system
./versioned_pipenv sync --system

TF_PIP=$(python3 -m pip show tensorflow | grep Location | cut -d ' ' -f 2)

Expand Down
4 changes: 2 additions & 2 deletions docs/regalloc-demo/demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ ml-compiler-opt repository:
```bash
cd $WORKING_DIR/ml-compiler-opt
pip3 install pipenv
pipenv sync --system
./versioned_pipenv sync --system
```

If you plan on doing development work on this checkout of ml-compiler-opt,
Expand Down Expand Up @@ -209,7 +209,7 @@ should work:

```bash
pip3 uninstall protobuf
pipenv sync --system
./versioned_pipenv sync --system
```

## Building LLVM
Expand Down
2 changes: 1 addition & 1 deletion experimental/docker/development.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ COPY buildbot/build_tflite.sh ./
RUN ./build_tflite.sh
COPY . /ml-compiler-opt
WORKDIR /ml-compiler-opt
RUN pip3 install pipenv && pipenv sync --categories "packages dev-packages ci" --system && pipenv --clear
RUN pip3 install pipenv && ./versioned_pipenv sync --categories "packages dev-packages ci" --system && ./versioned_pipenv --clear
RUN apt-get autoremove -y --purge \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
Expand Down
4 changes: 2 additions & 2 deletions run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ pip3 install pipenv

# Download pre-requisite packages.
PIPENV_VENV_IN_PROJECT=1
pipenv sync --dev
./versioned_pipenv sync --dev

# Run tests
TF_CPP_MIN_LOG_LEVE=3
PYTHONPATH="${PYTHONPATH}:$(dirname "$0")"
pipenv run python3 -m pytest
./versioned_pipenv run python3 -m pytest
16 changes: 16 additions & 0 deletions versioned_pipenv
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import subprocess
import shutil

lockfile = "Pipfile.lock"
versioned_lockfile = f"{lockfile}.{sys.version_info.major}.{sys.version_info.minor}"

my_args = sys.argv[1:]

print(f"using lockfile {versioned_lockfile}")
print(f"args: {my_args}")

shutil.copy(versioned_lockfile, lockfile)
subprocess.check_call(["pipenv"] + my_args)