MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / InsertReorderToUserMem

Method InsertReorderToUserMem

tensorflow/core/util/mkl_util.h:1654–1661  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers 1

ComputeMethod · 0.80

Calls 7

MklDnnThreadPoolClass · 0.85
CreateStreamFunction · 0.85
execute_primitivesFunction · 0.85
GetEngineMethod · 0.80
push_backMethod · 0.45
GetPrimitiveMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected