Skip to content

Debug build gtest fix#344

Merged
swahtz merged 2 commits into
openvdb:mainfrom
swahtz:projection_debug_gtest_accuracy
Nov 19, 2025
Merged

Debug build gtest fix#344
swahtz merged 2 commits into
openvdb:mainfrom
swahtz:projection_debug_gtest_accuracy

Conversation

@swahtz

@swahtz swahtz commented Nov 19, 2025

Copy link
Copy Markdown
Contributor

Increase the tolerances in the GaussianProjectionForward gtest for debug builds to get around numerical differences between cached results built with release and debug build test outputs. fixes #86

Signed-off-by: Jonathan Swartz jonathan@jswartz.info

…ds to get around numerical differences between cached results built with release and debug build tests

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adjusts test tolerances in the GaussianProjectionForward tests to account for numerical differences between debug and release builds. The changes address issue #86 where cached test results generated with release builds were failing when tests were run with debug builds.

  • Fixes the DISABLED_GenerateOutputData test to use torch::log(scales) instead of scales, making it consistent with the active tests
  • Introduces conditional compilation (#ifdef NDEBUG) to use stricter tolerances for release builds and relaxed tolerances for debug builds
  • Uses appropriate tolerance values for different data types (floating-point values vs. integer radii)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/tests/GaussianProjectionForwardTest.cpp Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

@harrism harrism left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for figuring this one out @swahtz !

@swahtz swahtz merged commit e2d812f into openvdb:main Nov 19, 2025
32 checks passed
@swahtz swahtz deleted the projection_debug_gtest_accuracy branch November 19, 2025 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] GaussianProjectionForwardTest and GaussianProjectionBackwardTest fail in debug build

3 participants