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)
| 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 | |
| 85 | def dispatch(op, *args, **kwargs): |