#!/bin/bash # Run a built binary (poet.elf, test.elf, rbm.elf) with NVBLAS: large # Armadillo matrix multiplies (v_to_h, h_to_v, CD gradients, ...) get # transparently offloaded to the GPU via cuBLAS, falling back to the # system's CPU BLAS (nvblas.conf) for anything NVBLAS doesn't handle. # No source changes -- this only intercepts BLAS symbol calls at runtime. # # Usage: ./run_gpu.sh build/release/poet.elf f "the " set -euo pipefail here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" export NVBLAS_CONFIG_FILE="$here/nvblas.conf" exec env LD_PRELOAD=libnvblas.so "$@"