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

Method shape

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

Source from the content-addressed store, hash-verified

674}
675
676ShapeValue::ref_t CompiledTransformation::TracedValue::shape() const {
677 if (!m_shape) {
678 trace_assert(m_accessor->shape_getter, "shape unreadable");
679 if (m_accessor->is_imperative()) {
680 return m_imperative_value.shape();
681 }
682 m_shape = ShapeValue::make(ValueShape::from(m_accessor->shape_getter()));
683 }
684 return m_shape;
685}
686
687DTypeValue::ref_t CompiledTransformation::TracedValue::dtype() const {
688 return m_var->dtype;

Callers 3

compileMethod · 0.45
apply_get_attrMethod · 0.45
on_unregisterMethod · 0.45

Calls 3

fromFunction · 0.85
is_imperativeMethod · 0.80
makeFunction · 0.50

Tested by

no test coverage detected