blob: 07064dbdc9e7867c64a69181c728b4297ab639d7 [file] [log] [blame]
#include <torch/jit.h>
#include <ATen/core/stack.h>
#include <torch/csrc/jit/frontend/ir_emitter.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(std::nullopt, source, nativeResolver(), nullptr);
return module;
}
} // namespace jit
} // namespace torch