1 #include <torch/csrc/jit/attributes.h> 2 #include <torch/csrc/jit/ir.h> 7 AttributeValue::Ptr GraphAttr::clone()
const {
8 return Ptr(
new GraphAttr(name, value_->copy()));
11 std::unique_ptr<AttributeValue> GraphsAttr::clone()
const {
12 std::vector<std::shared_ptr<Graph>> copy(value_.size());
13 for (
size_t i = 0; i < value_.size(); ++i) {
14 copy[i] = value_.at(i)->copy();
16 return Ptr(
new GraphsAttr(name, std::move(copy)));