From 2b6b9f2863214c82d9e8d518a8a39b31c8dc15e1 Mon Sep 17 00:00:00 2001 From: rhdong Date: Mon, 11 Nov 2024 13:05:12 -0800 Subject: [PATCH 1/2] [TEST CI] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 77c25e08..ece12d42 100644 --- a/README.md +++ b/README.md @@ -298,7 +298,7 @@ sess_config.gpu_options.allow_growth = True | 0.1.0 | 2.4.1 | r2.4 | GCC 7.3.1 | - | - | - | Serving TFRA-enable models by custom ops in TensorFlow Serving. - + ```sh ## If enable GPU OPs export SERVING_WITH_GPU=1 From 27c05612c0508dab8a7c30f776a2bbff1c5f9987 Mon Sep 17 00:00:00 2001 From: rhdong Date: Tue, 12 Nov 2024 11:12:31 -0800 Subject: [PATCH 2/2] [CI] Switch to self-hosted when `Linux && TF 2.16.2` --- .github/workflows/release.yml | 64 ++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 29feab26..7ca01ae1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,6 +53,8 @@ jobs: py-version: '3.8' - tf-version: '2.16.2' py-version: '3.8' + - tf-version: '2.16.2' + cpu: 'x86' - os: 'macos-14' cpu: 'x86' - os: 'ubuntu-20.04' @@ -111,9 +113,69 @@ jobs: with: name: ${{ runner.os }}-${{ matrix.py-version }}-tf${{ matrix.tf-version }}-${{ steps.device.outputs.value }}-${{ matrix.cpu }}-wheel path: wheelhouse + release-wheel-cpu-tf216: + name: Build release wheels for CPU TF2.16 + strategy: + matrix: + # TODO: add back 'windows-latest' when it can be compiled. + os: ['ubuntu-20.04' ] + py-version: [ '3.9', '3.10', '3.11' ] + tf-version: [ '2.16.2' ] + tf-need-cuda: [ '0' ] + cpu: [ 'x86'] + fail-fast: false + runs-on: [self-hosted, Linux, X64] + steps: + - name: clear cache folder + run: rm -rf /usr/share/dotnet /opt/ghc "/usr/local/share/boost" + - uses: actions/github-script@0.3.0 + id: author-date + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + const commit_details = await github.git.getCommit({owner: context.repo.owner, repo: context.repo.repo, commit_sha: context.sha}); + return commit_details.data.author.date + - if: matrix.tf-version < '2.15.1' + shell: bash + run: echo "SKIP_CUSTOM_OP_TESTS=--skip-custom-ops" >> $GITHUB_ENV + - if: github.event_name == 'push' + shell: bash + run: echo "NIGHTLY_FLAG=--nightly" >> $GITHUB_ENV + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.py-version }} + - name: Setup Bazel + # Ubuntu bazel is run inside of the docker image + if: matrix.os != 'ubuntu-20.04' + run: bash tools/install_deps/install_bazelisk.sh ./ + - name: Build wheels + env: + OS: ${{ runner.os }} + PY_VERSION: ${{ matrix.py-version }} + TF_VERSION: ${{ matrix.tf-version }} + TF_NEED_CUDA: ${{ matrix.tf-need-cuda }} + NIGHTLY_TIME: ${{ steps.author-date.outputs.result }} + CPU: ${{ matrix.cpu }} + shell: bash + run: | + if [[ "$TF_VERSION" =~ ^2\.(11|12|13|14|15|16)\.[0-9]$ ]] ; then + export HOROVOD_VERSION="0.28.1" + fi + bash .github/workflows/make_wheel_${OS}_${CPU}.sh + - uses: haya14busa/action-cond@v1 + id: device + with: + cond: ${{ matrix.tf-need-cuda == '1' }} + if_true: "gpu" + if_false: "cpu" + - uses: actions/upload-artifact@v4 + with: + name: ${{ runner.os }}-${{ matrix.py-version }}-tf${{ matrix.tf-version }}-${{ steps.device.outputs.value }}-${{ matrix.cpu }}-wheel + path: wheelhouse release-wheel-gpu: name: Build release wheels for GPU - needs: [release-wheel-cpu, test-with-bazel] + needs: [release-wheel-cpu, release-wheel-cpu-tf216, test-with-bazel] strategy: matrix: # TODO: add back 'windows-latest' when it can be compiled.