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

Function get_irnode_shape

imperative/python/megengine/xla/ir_utils.py:464–471  ·  view source on GitHub ↗
(irnode)

Source from the content-addressed store, hash-verified

462
463
464def get_irnode_shape(irnode):
465 if isinstance(irnode, (list, tuple, ir.OpResultList)):
466 assert len(irnode) == 1
467 irnode = irnode[0]
468 assert isinstance(irnode, (ir.RankedTensorType, ir.BlockArgument, ir.OpResult))
469 if not isinstance(irnode, ir.RankedTensorType):
470 irnode = ir.RankedTensorType(irnode.type)
471 return tuple(irnode.shape)
472
473
474def get_irnode_dtype(irnode):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected