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

Function device_stack_has_callable

tensorflow/python/framework/func_graph.py:982–985  ·  view source on GitHub ↗

Checks whether a device stack contains a callable.

(device_stack)

Source from the content-addressed store, hash-verified

980
981
982def device_stack_has_callable(device_stack):
983 """Checks whether a device stack contains a callable."""
984 return any(callable(spec._device_name_or_function) # pylint: disable=protected-access
985 for spec in device_stack.peek_objs())
986
987
988def check_mutation(n1, n2):

Callers 1

inner_cmMethod · 0.85

Calls 2

anyFunction · 0.85
peek_objsMethod · 0.80

Tested by

no test coverage detected