Skip to content

Move model loading to C++ to allow loading large models (#42) #171

Move model loading to C++ to allow loading large models (#42)

Move model loading to C++ to allow loading large models (#42) #171

Workflow file for this run

name: build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- ruby: 3.2
os: ubuntu-22.04
- ruby: 3.1
os: ubuntu-22.04
- ruby: "3.0"
os: ubuntu-20.04
env:
LIBTORCH_VERSION: 2.0.1
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- uses: actions/cache@v3
with:
path: ~/libtorch
key: libtorch-${{ env.LIBTORCH_VERSION }}
id: cache-libtorch
- name: Download LibTorch
if: steps.cache-libtorch.outputs.cache-hit != 'true'
run: |
cd ~
wget -q -O libtorch.zip https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-$LIBTORCH_VERSION%2Bcpu.zip
unzip -q libtorch.zip
- run: MAKE="make -j$(nproc)" bundle exec rake compile -- --with-torch-dir=$HOME/libtorch
- run: bundle exec rake test