A PackedFunc in a Disco session.
| 76 | |
| 77 | |
| 78 | class DPackedFunc(DRef): |
| 79 | """A PackedFunc in a Disco session.""" |
| 80 | |
| 81 | # tvm_ffi Object subclasses cannot store Python attributes by default |
| 82 | # (the metaclass sets `__slots__ = ()`); list the field(s) we store here. |
| 83 | __slots__ = ("session",) |
| 84 | |
| 85 | def __init__(self, dref: DRef, session: "Session") -> None: |
| 86 | self.__move_handle_from__(dref) |
| 87 | self.session = session |
| 88 | |
| 89 | def __call__(self, *args) -> DRef: |
| 90 | return self.session.call_packed(self, *args) |
| 91 | |
| 92 | |
| 93 | class DModule(DRef): |
no outgoing calls
no test coverage detected
searching dependent graphs…