MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / shared_name

Function shared_name

tensorflow/python/eager/context.py:1610–1628  ·  view source on GitHub ↗

Returns the anonymous shared name GUID if no shared name is specified. In eager mode we need to use a unique shared name to avoid spurious sharing issues. The runtime generates a unique name on our behalf when the reserved GUID is used as a shared name. Args: name: Optional shared name

(name=None)

Source from the content-addressed store, hash-verified

1608
1609
1610def shared_name(name=None):
1611 """Returns the anonymous shared name GUID if no shared name is specified.
1612
1613 In eager mode we need to use a unique shared name to avoid spurious sharing
1614 issues. The runtime generates a unique name on our behalf when the reserved
1615 GUID is used as a shared name.
1616
1617 Args:
1618 name: Optional shared name
1619
1620 Returns:
1621 Eager compatible shared name.
1622 """
1623 if name or not executing_eagerly():
1624 return name
1625
1626 # Ensure a unique name when eager execution is enabled to avoid spurious
1627 # sharing issues.
1628 return "cd2c89b7-88b7-44c8-ad83-06c2a9158347"
1629
1630
1631def graph_mode():

Callers

nothing calls this directly

Calls 1

executing_eagerlyFunction · 0.85

Tested by

no test coverage detected