mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
As we live in C++17 world
This is a functional no-op, just
- `s/namespace at { namespace native {/namespace at::native {/`
- `s/namespace torch { namespace jit {/namespace torch::jit {/`
Pull Request resolved: https://github.com/pytorch/pytorch/pull/92100
Approved by: https://github.com/izaitsevfb
20 lines
524 B
C++
20 lines
524 B
C++
#include <c10/util/irange.h>
|
|
#include <torch/csrc/jit/ir/attributes.h>
|
|
#include <torch/csrc/jit/ir/ir.h>
|
|
|
|
namespace torch::jit {
|
|
|
|
AttributeValue::Ptr GraphAttr::clone() const {
|
|
return Ptr(new GraphAttr(name, value_->copy()));
|
|
}
|
|
|
|
std::unique_ptr<AttributeValue> GraphsAttr::clone() const {
|
|
std::vector<std::shared_ptr<Graph>> copy(value_.size());
|
|
for (const auto i : c10::irange(value_.size())) {
|
|
copy[i] = value_.at(i)->copy();
|
|
}
|
|
return Ptr(new GraphsAttr(name, std::move(copy)));
|
|
}
|
|
|
|
} // namespace torch::jit
|