blob: 4323b8a38bf11263ef80c5af816af740511a5d21 [file] [log] [blame]
#include <torch/jit.h>
#include <torch/csrc/jit/frontend/ir_emitter.h>
#include <ATen/core/stack.h>
#include <memory>
#include <string>
namespace torch {
namespace jit {
std::shared_ptr<CompilationUnit> compile(const std::string& source) {
auto module = std::make_shared<CompilationUnit>();
module->define(
c10::nullopt,
source,
nativeResolver(),
nullptr);
return module;
}
} // namespace jit
} // namespace torch