c10::optional -> std::optional in tensorboard/adhoc/Adhoc.h +9

Summary: `c10::optional` was switched to be `std::optional` after PyTorch moved to C++17. Let's eliminate `c10::optional`, if we can.

Reviewed By: albanD

Differential Revision: D57294278

fbshipit-source-id: f6f26133c43f8d92a4588f59df7d689e7909a0cd
This commit is contained in:
Richard Barnes 2024-05-13 16:40:34 -07:00 committed by Facebook GitHub Bot
parent 17117106e4
commit bd52f4a408
2 changed files with 12 additions and 12 deletions

View File

@ -213,8 +213,8 @@ std::tuple<size_t, size_t, bool, torch::Tensor> Renderer::arg_check(
const float& gamma, const float& gamma,
const float& max_depth, const float& max_depth,
float& min_depth, float& min_depth,
const c10::optional<torch::Tensor>& bg_col, const std::optional<torch::Tensor>& bg_col,
const c10::optional<torch::Tensor>& opacity, const std::optional<torch::Tensor>& opacity,
const float& percent_allowed_difference, const float& percent_allowed_difference,
const uint& max_n_hits, const uint& max_n_hits,
const uint& mode) { const uint& mode) {
@ -668,8 +668,8 @@ std::tuple<torch::Tensor, torch::Tensor> Renderer::forward(
const float& gamma, const float& gamma,
const float& max_depth, const float& max_depth,
float min_depth, float min_depth,
const c10::optional<torch::Tensor>& bg_col, const std::optional<torch::Tensor>& bg_col,
const c10::optional<torch::Tensor>& opacity, const std::optional<torch::Tensor>& opacity,
const float& percent_allowed_difference, const float& percent_allowed_difference,
const uint& max_n_hits, const uint& max_n_hits,
const uint& mode) { const uint& mode) {
@ -912,8 +912,8 @@ Renderer::backward(
const float& gamma, const float& gamma,
const float& max_depth, const float& max_depth,
float min_depth, float min_depth,
const c10::optional<torch::Tensor>& bg_col, const std::optional<torch::Tensor>& bg_col,
const c10::optional<torch::Tensor>& opacity, const std::optional<torch::Tensor>& opacity,
const float& percent_allowed_difference, const float& percent_allowed_difference,
const uint& max_n_hits, const uint& max_n_hits,
const uint& mode, const uint& mode,

View File

@ -44,8 +44,8 @@ struct Renderer {
const float& gamma, const float& gamma,
const float& max_depth, const float& max_depth,
float min_depth, float min_depth,
const c10::optional<torch::Tensor>& bg_col, const std::optional<torch::Tensor>& bg_col,
const c10::optional<torch::Tensor>& opacity, const std::optional<torch::Tensor>& opacity,
const float& percent_allowed_difference, const float& percent_allowed_difference,
const uint& max_n_hits, const uint& max_n_hits,
const uint& mode); const uint& mode);
@ -75,8 +75,8 @@ struct Renderer {
const float& gamma, const float& gamma,
const float& max_depth, const float& max_depth,
float min_depth, float min_depth,
const c10::optional<torch::Tensor>& bg_col, const std::optional<torch::Tensor>& bg_col,
const c10::optional<torch::Tensor>& opacity, const std::optional<torch::Tensor>& opacity,
const float& percent_allowed_difference, const float& percent_allowed_difference,
const uint& max_n_hits, const uint& max_n_hits,
const uint& mode, const uint& mode,
@ -115,8 +115,8 @@ struct Renderer {
const float& gamma, const float& gamma,
const float& max_depth, const float& max_depth,
float& min_depth, float& min_depth,
const c10::optional<torch::Tensor>& bg_col, const std::optional<torch::Tensor>& bg_col,
const c10::optional<torch::Tensor>& opacity, const std::optional<torch::Tensor>& opacity,
const float& percent_allowed_difference, const float& percent_allowed_difference,
const uint& max_n_hits, const uint& max_n_hits,
const uint& mode); const uint& mode);