diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-14 00:27:53 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-14 00:27:53 +0100 |
| commit | f7c5c19af1b4638958c6875c6f691b2c9aa05a94 (patch) | |
| tree | 9d561ea294f93640100f69a6ad80ff7f0fd41b43 /scripts/crunch_demo.sh | |
| parent | 71ff356ef03b5d07bcd7a36b79cf95df1206717b (diff) | |
CNN v2: Fix weight buffer offset bug
Root cause: Binary format is [header:20B][layer_info:20B×N][weights].
Both cnn_test and CNNv2Effect uploaded entire file to weights_buffer,
but shader reads weights_buffer[0] expecting first weight, not header.
Fix: Skip header + layer_info when uploading to GPU buffer.
- cnn_test.cc: Calculate weights_offset, upload only weights section
- cnn_v2_effect.cc: Same fix for runtime effect
Before: layer_0 output showed [R, uv_x, uv_y, black] (wrong channels)
After: layer_0 output shows [R, G, B, D] (correct identity mapping)
Tests: 34/36 passing (2 unrelated failures)
Diffstat (limited to 'scripts/crunch_demo.sh')
0 files changed, 0 insertions, 0 deletions
