diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-13 09:33:12 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-13 09:33:12 +0100 |
| commit | 2a793c23b582ed134b8294bfbbe3b6d7aaafe0c0 (patch) | |
| tree | 53073f5947515a3aad9afca7c24ff6b52ce5ef05 /src/gpu/effects/theme_modulation_effect.cc | |
| parent | 65f6866b985fb3d0993fc2b6798c74015fb4fa6a (diff) | |
Add CNN v2 WebGPU testing tool
Implements single-file HTML tool for rapid CNN weight validation:
Features:
- Drag-drop PNG images (whole window) and .bin weights
- Real-time WebGPU compute pipeline (static features + N layers)
- Data-driven execution (reads layer count from binary)
- View modes: CNN output / Original / Diff (×10)
- Blend slider (0.0-1.0) for effect strength
- Console log with timestamps
- Keyboard shortcuts: SPACE (original), D (diff)
Architecture:
- Embedded WGSL shaders (static + compute + display)
- Binary parser for .bin format (header + layer info + f16 weights)
- Persistent textures for view mode switching
- Absolute weight offset calculation (header + layer info skip)
Implementation notes:
- Weight offsets in binary are relative to weights section
- JavaScript precalculates absolute offsets: headerOffsetU32 * 2 + offset
- Matches C++ shader behavior (simple get_weight without offset param)
- Ping-pong textures for multi-layer processing
TODO:
- Side panel: .bin metadata, weight statistics, validation
- Layer inspection: R/G/B/A plane split, intermediate outputs
- Activation heatmaps for debugging
Files:
- tools/cnn_v2_test/index.html (24 KB, 730 lines)
- tools/cnn_v2_test/README.md (usage guide, troubleshooting)
handoff(Claude): CNN v2 HTML testing tool complete, documented TODOs for future enhancements
Diffstat (limited to 'src/gpu/effects/theme_modulation_effect.cc')
0 files changed, 0 insertions, 0 deletions
