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

Function set_symbolic_shape

imperative/python/megengine/core/_trace_option.py:19–24  ·  view source on GitHub ↗

r"""Sets whether tensor.shape returns a tensor instead of a tuple

(option: bool)

Source from the content-addressed store, hash-verified

17
18
19def set_symbolic_shape(option: bool):
20 r"""Sets whether tensor.shape returns a tensor instead of a tuple"""
21 global _use_symbolic_shape
22 _org = _use_symbolic_shape
23 _use_symbolic_shape = option
24 return _org
25
26
27def use_xla_backend() -> bool:

Callers 4

override_symbolic_shapeFunction · 0.90
test_preprocessFunction · 0.90
test_preprocessFunction · 0.90
test_get_symbolic_shapeFunction · 0.90

Calls

no outgoing calls

Tested by 4

override_symbolic_shapeFunction · 0.72
test_preprocessFunction · 0.72
test_preprocessFunction · 0.72
test_get_symbolic_shapeFunction · 0.72