-
-
Notifications
You must be signed in to change notification settings - Fork 4
70 lines (69 loc) · 2.17 KB
/
release-xla.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
on:
workflow_dispatch:
push:
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: |
. ./dev.sh
xla_rev="$(cat XLA_VERSION)"
echo "XLA_REV=$(short_revision $xla_rev)" >> $GITHUB_ENV
- name: Create C XLA release
id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: xla-${{ env.XLA_REV }}
release_name: XLA revision ${{ env.XLA_REV }}
body: "XLA revision ${{ env.XLA_REV }}"
pjrt-plugin-xla-cpu-linux:
needs: create-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build XLA CPU plugin for Linux
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-linux.so
asset_name: pjrt_plugin_xla_cpu-linux.so
asset_content_type: application/x-sharedlib
pjrt-plugin-xla-cuda-linux:
needs: create-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build XLA CUDA plugin for Linux
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-linux.so
asset_name: pjrt_plugin_xla_cuda-linux.so
asset_content_type: application/x-sharedlib