[torch/csrc/onnx] Use nested namespaces (3/N) (#113993)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/113993
Approved by: https://github.com/ZainRizvi
ghstack dependencies: #113991, #113992
This commit is contained in:
Nikita Shulga
2023-11-17 13:56:21 -08:00
committed by PyTorch MergeBot
parent d6744a698c
commit 2efa89a388
2 changed files with 4 additions and 12 deletions

View File

@ -4,9 +4,7 @@
${generated_comment} ${generated_comment}
*/ */
namespace torch { namespace torch::onnx::diagnostics {
namespace onnx {
namespace diagnostics {
enum class Rule : uint32_t { enum class Rule : uint32_t {
${rules} ${rules}
@ -16,6 +14,4 @@ static constexpr const char* const kPyRuleNames [] = {
${py_rule_names} ${py_rule_names}
}; };
} // namespace diagnostics } // namespace torch::onnx::diagnostics
} // namespace onnx
} // namespace torch

View File

@ -3,9 +3,7 @@
#include <torch/csrc/utils/pybind.h> #include <torch/csrc/utils/pybind.h>
#include <string> #include <string>
namespace torch { namespace torch::onnx::diagnostics {
namespace onnx {
namespace diagnostics {
/** /**
* @brief Level of a diagnostic. * @brief Level of a diagnostic.
@ -61,6 +59,4 @@ inline void Diagnose(
py_rule, py_level, py_message, "cpp_stack"_a = true); py_rule, py_level, py_message, "cpp_stack"_a = true);
} }
} // namespace diagnostics } // namespace torch::onnx::diagnostics
} // namespace onnx
} // namespace torch