From 128fdda0168e3a392e0ef4db2220be26f873f818 Mon Sep 17 00:00:00 2001 From: Ivan Butygin Date: Fri, 10 Jan 2025 18:19:42 +0100 Subject: [PATCH] venv Signed-off-by: Ivan Butygin --- .github/workflows/ci-tk.yaml | 21 +++++++++++---------- .github/workflows/ci.yaml | 13 ++++++------- .github/workflows/perf.yaml | 13 ++++++------- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci-tk.yaml b/.github/workflows/ci-tk.yaml index a9a4d060..c8cd7ccc 100644 --- a/.github/workflows/ci-tk.yaml +++ b/.github/workflows/ci-tk.yaml @@ -31,7 +31,7 @@ jobs: os: [ubuntu-22.04, nodai-amdgpu-mi300-x86-64, nodai-amdgpu-mi250-x86-64] runs-on: ${{matrix.os}} env: - PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" + VENV_DIR: ${{ github.workspace }}/.venv steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -41,12 +41,11 @@ jobs: with: python-version: ${{matrix.version}} - - name: Cache Pip Packages - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 - id: cache-pip - with: - path: ${{ env.PIP_CACHE_DIR }} - key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} + - name: Create Python venv + run: | + python -m venv ${VENV_DIR} + source ${VENV_DIR}/bin/activate + echo PATH=$PATH >> $GITHUB_ENV - name: Install pip deps run: | @@ -63,10 +62,14 @@ jobs: run: | pytest -n 4 --capture=tee-sys -vv ./tests/kernel/wave/ - - name: Test TKW runtime related stack on amdgpu + - name: Install GPU deps if: "contains(matrix.os, 'amdgpu') && !cancelled()" run: | pip install --no-compile -r pytorch-rocm-requirements.txt + + - name: Test TKW runtime related stack on amdgpu + if: "contains(matrix.os, 'amdgpu') && !cancelled()" + run: | export export WAVE_CACHE_DIR=$PWD/.wave rm -rf ./.wave WAVE_CACHE_ON=1 pytest --capture=tee-sys -vv --run-e2e ./tests/kernel/wave/runtime @@ -74,13 +77,11 @@ jobs: - name: Run e2e tests on AMD GPU MI300 if: "contains(matrix.os, 'mi300') && !cancelled()" run: | - pip install --no-compile -r pytorch-rocm-requirements.txt WAVE_CACHE_ON=0 pytest -n 8 --capture=tee-sys -vv --run-e2e --gpu-distribute 8 ./tests/kernel/wave/ - name: Run e2e tests on AMD GPU MI250 if: "contains(matrix.os, 'mi250') && !cancelled()" run: | - pip install --no-compile -r pytorch-rocm-requirements.txt WAVE_CACHE_ON=0 pytest -n 2 --capture=tee-sys --run-e2e -vv ./tests/kernel/wave/ - name: Run LIT tests diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e074d730..806e5adb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -32,7 +32,7 @@ jobs: os: [ubuntu-22.04] runs-on: ${{matrix.os}} env: - PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" + VENV_DIR: ${{ github.workspace }}/.venv steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -42,12 +42,11 @@ jobs: with: python-version: ${{matrix.version}} - - name: Cache Pip Packages - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 - id: cache-pip - with: - path: ${{ env.PIP_CACHE_DIR }} - key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} + - name: Create Python venv + run: | + python -m venv ${VENV_DIR} + source ${VENV_DIR}/bin/activate + echo PATH=$PATH >> $GITHUB_ENV - name: Install pip deps run: | diff --git a/.github/workflows/perf.yaml b/.github/workflows/perf.yaml index 6aef4a2b..f1be6389 100644 --- a/.github/workflows/perf.yaml +++ b/.github/workflows/perf.yaml @@ -33,7 +33,7 @@ jobs: os: [nodai-amdgpu-mi300-x86-64] runs-on: ${{matrix.os}} env: - PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" + VENV_DIR: ${{ github.workspace }}/.venv steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -43,12 +43,11 @@ jobs: with: python-version: ${{matrix.version}} - - name: Cache Pip Packages - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 - id: cache-pip - with: - path: ${{ env.PIP_CACHE_DIR }} - key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} + - name: Create Python venv + run: | + python -m venv ${VENV_DIR} + source ${VENV_DIR}/bin/activate + echo PATH=$PATH >> $GITHUB_ENV - name: Install pip deps run: |