MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / ImmutableTensor

Method ImmutableTensor

src/opr/impl/io.cpp:571–579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

569MGB_TYPEINFO_OBJ_IMPL(ImmutableTensor::DevValueCache::VarNodeCache);
570
571ImmutableTensor::ImmutableTensor(
572 ComputingGraph& graph, const Value& value, const OperatorNodeConfig& config)
573 : Super{&graph, config, value.summary(), {}}, m_value{value} {
574 mgb_assert(value.initialized());
575
576 add_output(value.dev().dtype());
577 add_equivalence_component<ScalarHash<const void*>>(&value);
578 output(0)->add_flag(VarNode::Flag::ALLOW_EMPTY_SHAPE);
579}
580
581ImmutableTensor::~ImmutableTensor() noexcept = default;
582

Callers

nothing calls this directly

Calls 2

initializedMethod · 0.45
dtypeMethod · 0.45

Tested by

no test coverage detected