From a88ece0a03b50ef2f1b164de9f8e469f7cb868c7 Mon Sep 17 00:00:00 2001 From: Joel Berkeley <16429957+joelberkeley@users.noreply.github.com> Date: Mon, 20 May 2024 13:19:15 +0100 Subject: [PATCH] mimetype for shared lib; release workflow for plugins --- .github/workflows/release-backend.yml | 2 +- .github/workflows/release-xla-targets.yml | 62 +++++++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release-xla-targets.yml diff --git a/.github/workflows/release-backend.yml b/.github/workflows/release-backend.yml index a920bc786..683446ed9 100644 --- a/.github/workflows/release-backend.yml +++ b/.github/workflows/release-backend.yml @@ -40,4 +40,4 @@ jobs: upload_url: ${{ needs.create-release.outputs.upload_url }} asset_path: libc_xla.so asset_name: libc_xla.so - asset_content_type: application/octet-stream + asset_content_type: application/x-sharedlib diff --git a/.github/workflows/release-xla-targets.yml b/.github/workflows/release-xla-targets.yml new file mode 100644 index 000000000..7c766f2a1 --- /dev/null +++ b/.github/workflows/release-xla-targets.yml @@ -0,0 +1,62 @@ +on: + workflow_dispatch: + pull_request: # revert to push when done + branches: master + paths: + - XLA_VERSION + +jobs: + create-release: + runs-on: ubuntu-latest + outputs: + upload_url: ${{ steps.create-release.outputs.upload_url }} + steps: + - uses: actions/checkout@v4 + - name: Read XLA version + run: echo "XLA_REV=$(cat XLA_VERSION)" >> $GITHUB_ENV + - name: Create C XLA release + id: create-release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + draft: true # remove when done + tag_name: xla-${{ env.XLA_REV }} + release_name: XLA revision ${{ env.XLA_REV }} + body: "XLA revision ${{ env.XLA_REV }}" + pjrt-plugin-xla-cpu: + needs: create-release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Build XLA CPU plugin + run: | + rm -rf /opt/hostedtoolcache + docker run -v $(pwd):/spidr -w /spidr tensorflow/build:latest-python3.9 sh -c "pjrt-plugins/xla-cpu/build.sh" + - name: Publish XLA CPU plugin + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.create-release.outputs.upload_url }} + asset_path: pjrt_plugin_xla_cpu.so + asset_name: pjrt_plugin_xla_cpu.so + asset_content_type: application/x-sharedlib + pjrt-plugin-xla-cuda: + needs: create-release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Build XLA CUDA plugin + run: | + rm -rf /opt/hostedtoolcache + docker run -v $(pwd):/spidr -w /spidr tensorflow/build:latest-python3.9 sh -c "pjrt-plugins/xla-cuda/build.sh" + - name: Publish XLA CUDA plugin + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.create-release.outputs.upload_url }} + asset_path: pjrt_plugin_xla_cuda.so + asset_name: pjrt_plugin_xla_cuda.so + asset_content_type: application/x-sharedlib