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

Method register

tensorflow/python/util/dispatch.py:71–82  ·  view source on GitHub ↗

Register this dispatcher as a handler for `op`. Args: op: Python function: the TensorFlow operation that should be handled. Must have a dispatch list (which is added automatically for generated ops, and can be added to Python ops using the `add_dispatch_support` de

(self, op)

Source from the content-addressed store, hash-verified

69 return self.NOT_SUPPORTED
70
71 def register(self, op):
72 """Register this dispatcher as a handler for `op`.
73
74 Args:
75 op: Python function: the TensorFlow operation that should be handled. Must
76 have a dispatch list (which is added automatically for generated ops,
77 and can be added to Python ops using the `add_dispatch_support`
78 decorator).
79 """
80 if not hasattr(op, DISPATCH_ATTR):
81 raise AssertionError("Dispatching not enabled for %s" % op)
82 getattr(op, DISPATCH_ATTR).append(self)
83
84
85def dispatch(op, *args, **kwargs):

Calls 1

appendMethod · 0.45

Tested by 1

GetTempDirFunction · 0.36