Skip to content

Updated C wrapper wrt. Torch v1.10 #6

Updated C wrapper wrt. Torch v1.10

Updated C wrapper wrt. Torch v1.10 #6

Workflow file for this run

name: Build C Wrapper
on:
push:
branches:
- master
tags: ['*']
pull_request:
workflow_dispatch:
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
build:
name: Build (CPU, GCC ${{ matrix.gcc_version }}, Torch ${{ matrix.torch_version }})
runs-on: ubuntu-latest
timeout-minutes: 60
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
actions: write
contents: read
strategy:
fail-fast: false
matrix:
arch:
- "x64"
gcc_version:
- "8"
julia_version:
- "1.9"
os_version:
- "10"
torch_version:
- "1.10.2"
container:
image: debian:${{ matrix.os_version }}
env:
GCC_VERSION: ${{ matrix.gcc_version }}
TORCH_VERSION: ${{ matrix.torch_version }}
steps:
- name: Install dependencies
run: |
apt-get update
apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
cmake \
jq \
unzip \
wget
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia_version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
- name: build
run: |
cd /usr/local
wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-$TORCH_VERSION%2Bcpu.zip
unzip -q libtorch-*.zip
rm libtorch-*.zip
cd -
export CMAKE_PREFIX_PATH=/usr/local/libtorch
cd deps/c_wrapper
cmake -S . -B build -DUSE_CUDA=$USE_CUDA
cmake --build build