Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
joelberkeley committed Jan 4, 2025
1 parent 612cda3 commit 3f9b8ef
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 44 deletions.
27 changes: 0 additions & 27 deletions .github/scripts/dev_gha.sh

This file was deleted.

25 changes: 25 additions & 0 deletions .github/scripts/install_pack.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh -e

os="$(uname)"
case $os in
'Linux')
sudo apt-get update && sudo apt-get install -y git libgmp3-dev build-essential chezscheme
SCHEME=chezscheme
;;
'Darwin')
brew install chezscheme
SCHEME=chez
;;
*)
echo "WARNING: OS $os not supported, unable to install pack."
exit 1
;;
esac

(
cd "$(mktemp -d)"
git clone https://github.com/stefan-hoeck/idris2-pack.git
cd idris2-pack
make micropack SCHEME=$SCHEME
)
~/.pack/bin/pack switch HEAD
24 changes: 8 additions & 16 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
docker load --input /tmp/openxla-dev.tar
docker run -v $(pwd):/spidr -w /spidr openxla-dev sh -c "./spidr/backend/build.sh"
fi
mv libc_xla-linux-x86_64.so libc_xla.so
- name: Upload binary
uses: actions/upload-artifact@v4
Expand All @@ -75,7 +75,7 @@ jobs:
else
./spidr/backend/build.sh
fi
mv libc_xla-darwin-aarch64.dylib libc_xla.dylib
- name: Upload binary
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
docker load --input /tmp/openxla-dev.tar
docker run -v $(pwd):/spidr -w /spidr openxla-dev sh -c "./pjrt-plugins/xla-cpu/build.sh"
fi
mv pjrt_plugin_xla_cpu-linux-x86_64.so pjrt_plugin_xla_cpu.so
- name: Upload binary
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -173,9 +173,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
. ./.github/scripts/dev_gha.sh
install_pack
run: ./.github/scripts/install_pack.sh
- name: Build tests
working-directory: test/xla-cpu
run: |
Expand All @@ -192,9 +190,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
. ./.github/scripts/dev_gha.sh
install_pack
run: ./.github/scripts/install_pack.sh
- name: Build tests
working-directory: test/xla-cpu
run: |
Expand All @@ -211,9 +207,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
. ./.github/scripts/dev_gha.sh
install_pack
run: ./.github/scripts/install_pack.sh
- name: Build tests
working-directory: test/xla-cuda
run: |
Expand Down Expand Up @@ -307,16 +301,14 @@ jobs:
- uses: actions/checkout@v4
- name: Type-check README
run: |
. ./.github/scripts/dev_gha.sh
install_pack
./.github/scripts/install_pack.sh
SPIDR_INSTALL_SUPPORT_LIBS=false ~/.pack/bin/pack --no-prompt typecheck readme.ipkg
tutorials:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Type-check tutorials
run: |
. ./.github/scripts/dev_gha.sh
install_pack
./.github/scripts/install_pack.sh
export SPIDR_INSTALL_SUPPORT_LIBS=false
res=0; for f in tutorials/*.ipkg; do ~/.pack/bin/pack --no-prompt typecheck $f || res=$?; done; $(exit $res)
2 changes: 1 addition & 1 deletion pjrt-plugins/xla-cuda/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:24.04

RUN apt-get update && apt-get install -y git curl
RUN apt-get update && apt-get install -y chezscheme git curl
RUN curl -LO https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb
RUN dpkg -i cuda-keyring_1.1-1_all.deb
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install \
Expand Down

0 comments on commit 3f9b8ef

Please sign in to comment.