The PackedFunc object. Function plays an key role to bridge front and backend in DGL. Function provide a type-erased interface, you can call function with positional arguments. The compiled module returns Function. DGL backend also registers and exposes its API as Functions. Fo
| 40 | |
| 41 | |
| 42 | class Function(_FunctionBase): |
| 43 | """The PackedFunc object. |
| 44 | |
| 45 | Function plays an key role to bridge front and backend in DGL. |
| 46 | Function provide a type-erased interface, you can call function with positional arguments. |
| 47 | |
| 48 | The compiled module returns Function. |
| 49 | DGL backend also registers and exposes its API as Functions. |
| 50 | For example, the developer function exposed in dgl.ir_pass are actually |
| 51 | C++ functions that are registered as PackedFunc |
| 52 | |
| 53 | The following are list of common usage scenario of dgl.Function. |
| 54 | |
| 55 | - Automatic exposure of C++ API into python |
| 56 | - To call PackedFunc from python side |
| 57 | - To call python callbacks to inspect results in generated code |
| 58 | - Bring python hook into C++ backend |
| 59 | |
| 60 | See Also |
| 61 | -------- |
| 62 | dgl.register_func: How to register global function. |
| 63 | dgl.get_global_func: How to get global function. |
| 64 | """ |
| 65 | |
| 66 | pass # pylint: disable=unnecessary-pass |
| 67 | |
| 68 | |
| 69 | class ModuleBase(object): |
no outgoing calls
no test coverage detected