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

Method value

imperative/src/impl/transformations/trace.cpp:703–709  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

701}
702
703HostValue::ref_t CompiledTransformation::TracedValue::value() const {
704 trace_assert(m_accessor->value_getter, "value unreadable");
705 if (m_accessor->is_imperative()) {
706 return m_imperative_value.numpy();
707 }
708 return HostValue::make(m_accessor->value_getter());
709}
710
711auto CompiledTransformation::TracedValue::accessor() const -> const VarAccessor& {
712 return *m_accessor;

Callers 15

as_tensorMethod · 0.45
dispatch_default_cpuMethod · 0.45
dispatch_kernelMethod · 0.45
apply_transformationMethod · 0.45
on_unregisterMethod · 0.45
apply_get_attrMethod · 0.45
apply_get_attrMethod · 0.45
apply_transformationMethod · 0.45
asMethod · 0.45
toMethod · 0.45
unwrap_inputMethod · 0.45

Calls 3

is_imperativeMethod · 0.80
makeFunction · 0.50
numpyMethod · 0.45

Tested by 3

test_serializer_memshareFunction · 0.36
TESTFunction · 0.36