mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/22505 Differential Revision: D16119310 Pulled By: Krovatkin fbshipit-source-id: 8b742411f40d66690ce28726c213741e0c2de618
33 lines
809 B
C++
33 lines
809 B
C++
#pragma once
|
|
|
|
#include <torch/csrc/WindowsTorchApiMacro.h>
|
|
#include <string>
|
|
#include <unordered_map>
|
|
|
|
#include <torch/csrc/WindowsTorchApiMacro.h>
|
|
|
|
namespace torch {
|
|
namespace jit {
|
|
|
|
struct Graph;
|
|
struct Value;
|
|
|
|
namespace script {
|
|
|
|
// \brief Parse IR from \p STR constructing the corresponding IR in\ GRAPH.
|
|
TORCH_API void parseIR(const std::string& str, torch::jit::Graph* graph);
|
|
|
|
/** \brief Parse IR from \p STR constructing the corresponding IR in\ GRAPH.
|
|
*
|
|
* \p VMAP is filled with String to Value pairs allowing to index Values in the
|
|
* newly created graph by their name in the original IR string.
|
|
*/
|
|
TORCH_API void parseIR(
|
|
const std::string& str,
|
|
torch::jit::Graph* graph,
|
|
std::unordered_map<std::string, Value*>& vmap);
|
|
|
|
} // namespace script
|
|
} // namespace jit
|
|
} // namespace torch
|