Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

740 B
Raw Blame
#!/usr/bin/env bash
# Alternates the WebGL2 kernel and the two WebGPU kernels three times at 1920 by 1080 and 64 samples, each trace as its own gpu-lock job (a light job).
# The first pair runs in fresh Chrome profiles (cold shader caches), the later pairs reuse them (warm).
#   bash bench/webgpu-tracer/compare.sh <output directory>
set -u
# GPU_LOCK, when set, prefixes each trace, for example a queue that serialises jobs on a shared card.
OUT="${1:?output directory}"
rm -rf "$OUT/profile-webgl" "$OUT/profile-wavefront" "$OUT/profile-megakernel"
for RUN in 1 2 3; do
  for VARIANT in wavefront megakernel webgl; do
    ${GPU_LOCK:-} node bench/webgpu-tracer/run.mjs "$OUT" "$VARIANT" --label "run$RUN" 2>&1 | cut -c1-1500
  done
done