• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #pragma once
2 
3 #include <ATen/core/DeprecatedTypeProperties.h>
4 #include <c10/core/TensorOptions.h>
5 #include <utility>
6 #include <vector>
7 
8 namespace torch::utils {
9 
10 std::string options_to_string(const at::TensorOptions& options);
11 std::string type_to_string(const at::DeprecatedTypeProperties& type);
12 at::TensorOptions options_from_string(const std::string& str);
13 
14 // return a vector of all "declared" types, even those that weren't compiled
15 std::vector<std::pair<at::Backend, at::ScalarType>> all_declared_types();
16 
17 // return python module name of backend, like torch.cuda, torch.foo
18 const char* backend_to_string(const at::Backend& backend);
19 
20 } // namespace torch::utils
21