This repository has been archived on 2026-11-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
radiance-sycl/libquant
fl0l0u be09d90c71 libquant: the codebook loader caps as it reads and refuses an infinite unit
vq= is the one codebook path that reads a file; table= caps its values
at 4096 but vq= appended every line to a growing vector and checked the
count only after reading the whole file, so a 10 GB codebook grew 10 GB
of vector before anything said no. And its "# unit X" line parsed X with
sscanf %lf -- which accepts "inf" -- while the fallback guard was
!(unit > 0.0), an infinity passes. A "# unit inf" file set every decoded
value to infinity.

The count is now checked as rows append, at 4096: the widest code the
grid emits is u12, so past 4096 codewords could not be indexed even with
the memory read, and the old code silently mis-indexed the over-4095 case
itself. And only a finite positive names a unit -- "inf" and "nan" fall
back to the entries' own rms, as a malformed value already did. A
quant_test case pins the 4096/4097 boundary and that "# unit inf" now
decodes finite.
2026-11-15 20:38:10 +00:00
..
2026-10-30 22:01:01 +01:00
2026-10-16 18:25:18 +02:00
2026-10-16 18:25:18 +02:00
2026-10-16 18:25:18 +02:00
2026-10-16 18:25:18 +02:00
2026-10-16 18:25:18 +02:00
2026-10-16 18:25:18 +02:00
2026-10-16 18:25:18 +02:00
2026-10-16 18:25:18 +02:00
2026-10-04 12:02:41 +02:00
2026-11-04 18:56:58 +01:00
2026-11-04 18:56:58 +01:00
2026-10-30 22:01:01 +01:00
2026-10-30 22:01:01 +01:00
2026-11-04 18:56:58 +01:00
2026-11-04 18:56:58 +01:00
2026-11-04 18:56:58 +01:00
2026-10-16 18:25:18 +02:00
2026-11-04 18:56:58 +01:00
2026-11-14 22:32:28 +01:00
2026-11-04 18:56:58 +01:00