Repository navigation
Conversation
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
|
Security and code read of CI ( Library load ( Rust (
Test probe: One behaviour to decide on: once the library is built, AI-assisted. |
Wrap the body of bvh_rehydrate_v1 in catch_unwind so a Rust panic can never unwind across the extern "C" boundary. A panic returns -1, which makes the caller discard the buffer and fall back to Python. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Thanks @wildheathen for the security audit. We'd be glad to see real-data parity counts whenever you have a toolchain ready. |
|
Follow-up to my read, now built and run: The new commit: with whitespace ignored, the diff is only the The CI recipe as written:
Cause: CPython 3.14 keeps a half NaN's payload in
The kernel matches the 3.12 behaviour (canonical quiet NaN), so it is byte-exact against the Python path on 3.12 and not on 3.14. That's an existing property of Real data (identical on 3.14.7 and 3.12.0):
On the default: since AI-assisted. |
Claimed PERF-BVH-NATIVE in the coordination issue.
Changes
cdylibfor CPU BVH rehydration. One call decodes leaf chunks and indices, applies the original float32 rounding points in geometry and leaf-frame transforms, and builds BOX16/BOX32 bounds and parent entries.tools/bvh_rehydrate.pydispatches when a local release library is available. The Python path handles missing or incompatible libraries, native refusals, andLEONIDA_BVH_NATIVE=0. Native code declines raw float32 NaNs and finite inward bounds outside the half range so Python retains its result and error behavior.Benchmark
Public
rehydrate()call on synthetic mixed BOX16/BOX32 trees with 16,384 paired leaves and 1,704,128 output bytes. Median of seven interleaved calls per mode, with the library already loaded. All timed outputs matched byte for byte. Windows 11, Ryzen 9 5900X, CPython 3.12.10, rustc 1.100.0 (GNU toolchain). CPU only, so no GPU or GPU driver was involved.Verification
cargo build --release --locked --offlineandcargo test --release --locked --offlinefortools/bvh_nativepassed with zero compiler warnings and four Rust tests passing.python -I tests/test_bvh_native.pypassed all 11 tests with the library. Coverage includes 2,048 randomized trees, a 4,225-leaf multi-chunk tree, BOX16 rounding, nonfinite values, malformed records, and dispatch from an isolated Python CLI. The suite also passed with bvh_rehydrate: rehydrate faster with the same output (PERF-BVH-REHYDRATE) #7814 and bvh_rehydrate: a finite box bound past the half range keeps 65504, not an infinity #8450 applied separately.python -I tests/test_bvh_rehydrate.pypassed with native enabled, disabled, and physically absent.python -m compileall -q make_game.py tools tests,python -I scripts/check_no_game_data.py, andgit diff --checkpassed. All fixtures were generated by hand from synthetic inputs.AI-assisted with GPT-6.2 Sol.