xref: /aosp_15_r20/external/pytorch/torch/csrc/jit/frontend/versioned_symbols.h (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1 #pragma once
2 
3 #include <caffe2/serialize/versions.h>
4 #include <torch/csrc/Export.h>
5 #include <torch/csrc/jit/api/module.h>
6 
7 #include <cstdint>
8 
9 namespace torch::jit {
10 // Maps the given symbol into an implementation of its behavior at the
11 // given version.
12 // See note [Versioned Symbols]
13 TORCH_API Symbol
14 get_symbol_for_version(const Symbol name, const uint64_t version);
15 
16 // Maps the given kind to the minimum version that supports it.
17 // See note [Dynamic Versions and torch.jit.save vs. torch.save]
18 TORCH_API uint64_t get_min_version_for_kind(const NodeKind& kind);
19 } // namespace torch::jit
20