Function to actually insert reorder primitive in the net This function completes remaining part of output reordering. It inserts a reordering primitive from the temporary buffer that holds the output to the user-specified output buffer. @input: net - net to which to add reorder primitive @input: net_args - net to which user and reorder memories are added if needed. Each entry is a key-value pair
| 1652 | /// needed. Each entry is a key-value pair of the form |
| 1653 | /// <argument-type, dnnl::memory>. |
| 1654 | inline void InsertReorderToUserMem(std::vector<primitive>& net, |
| 1655 | std::vector<MemoryArgsMap>& net_args) { |
| 1656 | DCHECK(user_memory_); |
| 1657 | DCHECK(reorder_memory_); |
| 1658 | net.push_back(CreateReorder(reorder_memory_, user_memory_)); |
| 1659 | net_args.push_back(MemoryArgsMap{{DNNL_ARG_FROM, *reorder_memory_}, |
| 1660 | {DNNL_ARG_TO, *user_memory_}}); |
| 1661 | } |
| 1662 | |
| 1663 | /// TODO: this is a faster path with reorder primitive cache compared with |
| 1664 | /// InsertReorderToUserMem(net, net_args), will remove |
no test coverage detected