Commit 46334b5
authored
xp2{tensorflow,torch}: convert NumPy arrays using dlpack (#686)
* xp2{tensorflow,torch}: convert NumPy arrays using dlpack
Newer versions of NumPy can expose arrays as dlpack capsules. Use this
functionality (when supported) to speed up NumPy -> Torch/Tensorflow
array conversion.
* Fix up copy paste error1 parent abf7d31 commit 46334b5
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| 317 | + | |
| 318 | + | |
317 | 319 | | |
318 | 320 | | |
319 | 321 | | |
| |||
350 | 352 | | |
351 | 353 | | |
352 | 354 | | |
| 355 | + | |
| 356 | + | |
353 | 357 | | |
354 | 358 | | |
355 | 359 | | |
| |||
0 commit comments