#!/usr/bin/env bash # On the Mac: pack the sources the pod needs into build/igneum-gpu-bench.tar.gz. Nothing is cloned on the pod. # Contents: proto-cuda/host.cu, the three checked-in packs, proto-opencl/host.c, and this directory's scripts. # DEVNET_PACK= adds a pack exported from the live node (igneum-miner export-pack), which carries kernel_bound.cu # for a --serve job test; optional. set -euo pipefail HERE="$(cd "$(dirname "$0")" && pwd)"; REPO="$(cd "$HERE/../.." && pwd)" mkdir -p "$HERE/build" stage="$HERE/build/bundle"; rm -rf "$stage"; mkdir -p "$stage/proto-cuda/packs" "$stage/proto-opencl" cp "$REPO/proto-cuda/host.cu" "$stage/proto-cuda/" for p in igneum-genesis-mh igneum-hourly igneum-genesis; do cp -R "$REPO/proto-cuda/packs/$p" "$stage/proto-cuda/packs/"; done [ -n "${DEVNET_PACK:-}" ] && cp -R "$DEVNET_PACK" "$stage/proto-cuda/packs/igneum-devnet" cp "$REPO/proto-opencl/host.c" "$stage/proto-opencl/" cp -R "$REPO/proto-opencl/emu" "$stage/proto-opencl/" 2>/dev/null || true # emu_opencl.h is included by kernel.cl when no OpenCL compiler is present cp "$HERE/run.sh" "$HERE/make-inline.sh" "$HERE/nvrtc-time.cu" "$HERE/clbuild-time.c" "$HERE/upload.sh" "$HERE/results-template.md" "$stage/" chmod +x "$stage"/*.sh git -C "$REPO" rev-parse --short HEAD > "$stage/SOURCE_COMMIT" 2>/dev/null || true tar -C "$HERE/build" -czf "$HERE/build/igneum-gpu-bench.tar.gz" bundle rm -rf "$stage" echo "wrote $HERE/build/igneum-gpu-bench.tar.gz ($(du -h "$HERE/build/igneum-gpu-bench.tar.gz" | cut -f1))" echo "on the pod (RunPod SSH, port and host from the pod's Connect panel):" echo " scp -P $HERE/build/igneum-gpu-bench.tar.gz root@:/workspace/" echo " ssh -p root@ 'cd /workspace && tar xzf igneum-gpu-bench.tar.gz && cd bundle && LABEL=rtx4090 ./run.sh'"