diffusionerf icon indicating copy to clipboard operation
diffusionerf copied to clipboard

Update C++ Standard to C++17 for PyTorch 2.1.0 compatibility and fix SSIM calculation

Open Wenri opened this issue 1 year ago • 0 comments

Description

This pull request updates the project's C++ standard from C++14 to C++17 to ensure compatibility with PyTorch 2.1.0, which now requires C++17 as a minimum. It also fixes a minor issue in the SSIM calculation function where data_range is explicitly set to 2.

Changes

  • (If applicable) Updated any affected code sections to comply with C++17 standards.
  • Fixed SSIM calculation function by explicitly specifying data_range=2 in skimage.metrics.structural_similarity.

Testing

  • Successfully built the project with the updated C++ standard on Ubuntu 22.04 using CUDA 12.1.
  • Tested the project's core functionalities and observed no runtime errors related to the updated C++ standard or SSIM calculation.
  • Ensured interoperability with PyTorch 2.1.0.

Related Issues/Fixes

  • Fixes compile errors caused by PyTorch 2.1.0's requirement of C++17 as a minimum standard.
  • Addresses an issue with SSIM calculation when input data type is float.

Please review these changes and let me know if there are any concerns or modifications needed before merging this pull request. Thank you for considering my contribution!

Wenri avatar Nov 09 '23 10:11 Wenri