| 1509 | } |
| 1510 | |
| 1511 | bool RequiresCopy(ITensorHandleFactory::FactoryId src, |
| 1512 | ITensorHandleFactory::FactoryId dst, |
| 1513 | TensorHandleFactoryRegistry& registry) |
| 1514 | { |
| 1515 | if (src != dst) |
| 1516 | { |
| 1517 | ITensorHandleFactory* srcFactory = registry.GetFactory(src); |
| 1518 | ITensorHandleFactory* dstFactory = registry.GetFactory(dst); |
| 1519 | |
| 1520 | if (srcFactory && dstFactory && |
| 1521 | (srcFactory->GetExportFlags() & dstFactory->GetImportFlags()) != 0) |
| 1522 | { |
| 1523 | return false; |
| 1524 | } |
| 1525 | return true; |
| 1526 | } |
| 1527 | return false; |
| 1528 | } |
| 1529 | |
| 1530 | // Find the handle factory for the input layer which results in fewest required copies. |
| 1531 | ITensorHandleFactory::FactoryId CalculateSlotOptionForInput(BackendsMap& backends, |
no test coverage detected