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

Method setup

src/opr/impl/io.cpp:391–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389};
390
391void ImmutableTensor::Value::setup(std::shared_ptr<DeviceTensorND> val) {
392 mgb_assert(val);
393 m_dev = val;
394 m_summary = ssprintf("const%s", val->shape().to_string().c_str());
395}
396
397void ImmutableTensor::Value::setup(CompNode cn, const HostTensorND& val) {
398 mgb_assert(m_dev->empty() && !m_dev->shape_valid());

Callers 5

setup_valueMethod · 0.45
makeMethod · 0.45
optimize_fwd_graphMethod · 0.45

Calls 9

to_stringMethod · 0.45
shapeMethod · 0.45
emptyMethod · 0.45
shape_validMethod · 0.45
syncMethod · 0.45
copy_fromMethod · 0.45
comp_nodeMethod · 0.45
dtypeMethod · 0.45
raw_ptrMethod · 0.45

Tested by

no test coverage detected