concept-collection / turing-sphere-2
Name the glibc case when Dawn's binary will not load
A host older than the prebuilt binary's glibc is not a missing library and there is no flag for it, so say so and point at a container or a newer host rather than implying something can be installed.
Jeremy Magland <jmagland@flatironinstitute.org> committed commit 182fa984e6af parent 521b449 Browse files
2 changed files+9−2
README.mdmodified+3−1View file
@@ -93,7 +93,9 @@ and the WebGPU globals, and the rest runs unchanged).
9393 Desktop WebGPU comes from the `webgpu` package (prebuilt Dawn, ~70 MB), listed
9494 as an optional dependency so that a platform it has no binaries for fails the
9595 install of that package alone rather than the whole tree. `npm install` picks it
96-up; without it, only `--backend cpu` runs and the benchmark says so. Other
96+up; without it, only `--backend cpu` runs and the benchmark says so. Those
97+binaries need glibc 2.29+, which rules out older cluster images (RHEL/Rocky 8 is
98+2.28) unless you run inside a container with a newer base. Other
9799 flags: `--steps`, `--warmup`, `--json`, `--help`; `DAWN_FLAGS='backend=vulkan'`
98100 (`;`-separated) passes Dawn options through, e.g. to pick a backend or to
99101 compare against Dawn's own software adapter.
scripts/bench.tsmodified+6−1View file
@@ -100,9 +100,14 @@ async function installWebGpu(): Promise<string> {
100100 'says whether it is there. Or run with --backend cpu.',
101101 );
102102 }
103+ const glibc = /GLIBC_([0-9.]+)/.exec(detail);
103104 throw new Error(
104105 `the \`webgpu\` package is installed but did not load:\n ${detail}\n` +
105- 'That is usually the prebuilt Dawn binary missing a system library.\n' +
106+ (glibc
107+ ? `Dawn's prebuilt binary wants glibc ${glibc[1]} or newer and this host is older\n` +
108+ '(`ldd --version` says how old). No flag bridges that — use a container with a\n' +
109+ 'newer base image, or a newer host.\n'
110+ : 'That is usually the prebuilt Dawn binary missing a system library.\n') +
106111 'Run with --backend cpu for the f64 CPU reference instead.',
107112 );
108113 }