diff options
| author | skal <pascal.massimino@gmail.com> | 2026-03-25 08:07:53 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-03-25 08:07:53 +0100 |
| commit | 64095c683f15e8bd7c19d32041fcc81b1bd6c214 (patch) | |
| tree | 91fa6100377d1deb66ac21b3860e15b3dd4958b5 /cmake | |
| parent | a71c95c8caf7e570c3f484ce1a53b7acb5ef2006 (diff) | |
feat(cnn_v3): add infer_cnn_v3.py + rewrite cnn_test for v3 parity
- cnn_v3/training/infer_cnn_v3.py: PyTorch inference tool; simple mode
(single PNG, zeroed geometry) and full mode (sample directory); supports
--identity-film (γ=1 β=0) to match C++ default, --cond for FiLM MLP,
--blend, --debug-hex for pixel comparison
- tools/cnn_test.cc: full rewrite, v3 only; packs 20-channel features
on CPU (training format: [0,1] oct normals, pyrdown mip), uploads to
GPU, runs CNNv3Effect, reads back RGBA16Float, saves PNG; --sample-dir
for full G-buffer input, --weights for .bin override, --debug-hex
- cmake/DemoTests.cmake: add cnn_v3/src include path, drop unused
offscreen_render_target.cc from cnn_test sources
- cnn_v3/docs/HOWTO.md: new §10 documenting both tools, comparison
workflow, and feature-format convention (training vs runtime)
handoff(Gemini): cnn_test + infer_cnn_v3.py ready for parity testing.
Run both with --identity-film / --debug-hex on same image to compare.
Diffstat (limited to 'cmake')
| -rw-r--r-- | cmake/DemoTests.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/DemoTests.cmake b/cmake/DemoTests.cmake index 69b9195..59859c5 100644 --- a/cmake/DemoTests.cmake +++ b/cmake/DemoTests.cmake @@ -196,17 +196,17 @@ add_demo_test(test_gpu_procedural GpuProceduralTest gpu target_link_libraries(test_gpu_procedural PRIVATE 3d gpu audio procedural util ${DEMO_LIBS}) demo_add_asset_deps(test_gpu_procedural shaders) -# CNN shader testing tool (only when STRIP_ALL is OFF and workspace is main) +# CNN v3 shader testing tool (only when STRIP_ALL is OFF and workspace is main) if(NOT DEMO_STRIP_ALL AND DEMO_WORKSPACE STREQUAL "main") add_executable(cnn_test tools/cnn_test.cc src/tests/common/webgpu_test_fixture.cc - src/tests/common/offscreen_render_target.cc ${PLATFORM_SOURCES} ${GEN_DEMO_CC}) target_include_directories(cnn_test PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src + ${CMAKE_CURRENT_SOURCE_DIR}/cnn_v3/src ${CMAKE_CURRENT_SOURCE_DIR}/third_party ${CMAKE_CURRENT_BINARY_DIR}/src/generated ${CORE_INCLUDES}) |
