(fun, in1, in2)
| 190 | |
| 191 | |
| 192 | def cupy_adapter_sync(fun, in1, in2): |
| 193 | with cupy_stream: |
| 194 | tin1 = [cupy.from_dlpack(dltensor) for dltensor in in1] |
| 195 | tin2 = [cupy.from_dlpack(dltensor) for dltensor in in2] |
| 196 | tout1, tout2 = fun(tin1, tin2) |
| 197 | out1, out2 = [tout.__dlpack__() for tout in tout1], [tout.__dlpack__() for tout in tout2] |
| 198 | cupy_stream.synchronize() |
| 199 | return out1, out2 |
| 200 | |
| 201 | |
| 202 | def cupy_adapter(fun, in1, in2): |
no test coverage detected