Commit c5c3386
committed
Handle cupy and dask+cupy segments in multi_stop_search (#3630)
Segment extraction assumed .get() meant cupy and everything else was
safe for np.asarray(seg.values), which crashes on dask-of-cupy results
(implicit cupy->numpy conversion). Route all backends through a
_segment_to_numpy helper (compute dask, then .get() cupy) in both the
stitching loop and _optimize_waypoint_order, and convert the stitched
output back to the input's array type so cupy and dask inputs no longer
come back numpy-backed. Fixes the no-op conversion expression in
test_multi_stop_cupy_matches_numpy and adds a dask+cupy test.1 parent b9ba8a8 commit c5c3386
2 files changed
Lines changed: 67 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1284 | 1284 | | |
1285 | 1285 | | |
1286 | 1286 | | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
1287 | 1301 | | |
1288 | 1302 | | |
1289 | 1303 | | |
| |||
1306 | 1320 | | |
1307 | 1321 | | |
1308 | 1322 | | |
1309 | | - | |
1310 | | - | |
1311 | | - | |
1312 | | - | |
1313 | | - | |
| 1323 | + | |
1314 | 1324 | | |
1315 | 1325 | | |
1316 | 1326 | | |
| |||
1452 | 1462 | | |
1453 | 1463 | | |
1454 | 1464 | | |
1455 | | - | |
1456 | | - | |
1457 | | - | |
1458 | | - | |
1459 | | - | |
| 1465 | + | |
1460 | 1466 | | |
1461 | 1467 | | |
1462 | 1468 | | |
| |||
1486 | 1492 | | |
1487 | 1493 | | |
1488 | 1494 | | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
1489 | 1506 | | |
1490 | 1507 | | |
1491 | 1508 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
978 | 978 | | |
979 | 979 | | |
980 | 980 | | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
981 | 984 | | |
982 | 985 | | |
983 | 986 | | |
| |||
999 | 1002 | | |
1000 | 1003 | | |
1001 | 1004 | | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
1002 | 1009 | | |
1003 | | - | |
| 1010 | + | |
1004 | 1011 | | |
1005 | 1012 | | |
1006 | 1013 | | |
1007 | 1014 | | |
1008 | 1015 | | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
1009 | 1048 | | |
1010 | 1049 | | |
1011 | 1050 | | |
| |||
0 commit comments