Skip to content

Commit

Permalink
mimetype for shared lib; release workflow for plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
joelberkeley committed May 20, 2024
1 parent 5058536 commit a88ece0
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/release-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
62 changes: 62 additions & 0 deletions .github/workflows/release-xla-targets.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a88ece0

Please sign in to comment.