From b66d17a32459810137b158524b06467cb7b2f2a9 Mon Sep 17 00:00:00 2001 From: Jeremy Reizenstein Date: Mon, 17 Jun 2024 07:09:30 -0700 Subject: [PATCH] Undo c10=>std optional rename Summary: Undoes the pytorch3d changes in D57294278 because they break builds for for PyTorch<2.1 . Reviewed By: MichaelRamamonjisoa Differential Revision: D57379779 fbshipit-source-id: 47a12511abcec4c3f4e2f62eff5ba99deb2fab4c --- pytorch3d/csrc/pulsar/pytorch/renderer.cpp | 12 ++++++------ pytorch3d/csrc/pulsar/pytorch/renderer.h | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pytorch3d/csrc/pulsar/pytorch/renderer.cpp b/pytorch3d/csrc/pulsar/pytorch/renderer.cpp index aa53192c..4349aea7 100644 --- a/pytorch3d/csrc/pulsar/pytorch/renderer.cpp +++ b/pytorch3d/csrc/pulsar/pytorch/renderer.cpp @@ -213,8 +213,8 @@ std::tuple Renderer::arg_check( const float& gamma, const float& max_depth, float& min_depth, - const std::optional& bg_col, - const std::optional& opacity, + const c10::optional& bg_col, + const c10::optional& opacity, const float& percent_allowed_difference, const uint& max_n_hits, const uint& mode) { @@ -668,8 +668,8 @@ std::tuple Renderer::forward( const float& gamma, const float& max_depth, float min_depth, - const std::optional& bg_col, - const std::optional& opacity, + const c10::optional& bg_col, + const c10::optional& opacity, const float& percent_allowed_difference, const uint& max_n_hits, const uint& mode) { @@ -912,8 +912,8 @@ Renderer::backward( const float& gamma, const float& max_depth, float min_depth, - const std::optional& bg_col, - const std::optional& opacity, + const c10::optional& bg_col, + const c10::optional& opacity, const float& percent_allowed_difference, const uint& max_n_hits, const uint& mode, diff --git a/pytorch3d/csrc/pulsar/pytorch/renderer.h b/pytorch3d/csrc/pulsar/pytorch/renderer.h index 33f9e24f..2525ca3f 100644 --- a/pytorch3d/csrc/pulsar/pytorch/renderer.h +++ b/pytorch3d/csrc/pulsar/pytorch/renderer.h @@ -44,8 +44,8 @@ struct Renderer { const float& gamma, const float& max_depth, float min_depth, - const std::optional& bg_col, - const std::optional& opacity, + const c10::optional& bg_col, + const c10::optional& opacity, const float& percent_allowed_difference, const uint& max_n_hits, const uint& mode); @@ -75,8 +75,8 @@ struct Renderer { const float& gamma, const float& max_depth, float min_depth, - const std::optional& bg_col, - const std::optional& opacity, + const c10::optional& bg_col, + const c10::optional& opacity, const float& percent_allowed_difference, const uint& max_n_hits, const uint& mode, @@ -115,8 +115,8 @@ struct Renderer { const float& gamma, const float& max_depth, float& min_depth, - const std::optional& bg_col, - const std::optional& opacity, + const c10::optional& bg_col, + const c10::optional& opacity, const float& percent_allowed_difference, const uint& max_n_hits, const uint& mode);